57 references to Height
Microsoft.ML.ImageAnalytics (9)
ImageGrayscale.cs (3)
187if (src == null || src.Height <= 0 || src.Width <= 0) 193Contracts.Assert(dst.Width == src.Width && dst.Height == src.Height);
ImagePixelExtractor.cs (1)
348Host.Check(src.Height == height && src.Width == width);
ImageResizer.cs (3)
299if (src == null || src.Height <= 0 || src.Width <= 0) 301if (src.Height == info.ImageHeight && src.Width == info.ImageWidth) 327Contracts.Assert(dst.Width == info.ImageWidth && dst.Height == info.ImageHeight);
MLImage.cs (2)
139byte[] pixels = new byte[Height * Width * 3]; 143for (int i = 0; i < Height * Width * 3;)
Microsoft.ML.Samples (8)
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScale.cs (2)
96imagePath, name, $"Width={imageObject.Width}, Height={imageObject.Height}", 97$"Width={grayscaleImageObject.Width}, Height={grayscaleImageObject.Height}");
Dynamic\Transforms\ImageAnalytics\ConvertToImage.cs (1)
79$"Width={imageObject.Width}, Height={imageObject.Height}",
Dynamic\Transforms\ImageAnalytics\ExtractPixels.cs (2)
111$"Width={imageObject.Width}, Height={imageObject.Height}", 112$"Width={resizedImageObject.Width}, Height={resizedImageObject.Height}",
Dynamic\Transforms\ImageAnalytics\LoadImages.cs (1)
91$"Width={imageObject.Width}, Height={imageObject.Height}");
Dynamic\Transforms\ImageAnalytics\ResizeImages.cs (2)
99$"Width={imageObject.Width}, Height={imageObject.Height}", 100$"Width={resizedImageObject.Width}, Height={resizedImageObject.Height}");
Microsoft.ML.Tests (28)
ImagesTests.cs (28)
258Assert.Equal(image.Height, grayImage.Height); 280Assert.Equal(singleImage.Image.Height, transformedSingleImage.GrayImage.Height); 1043index = pixelSize * (image.Width) * (image.Height - 1); 1045index = pixelSize * image.Width * image.Height - pixelSize; 1047index = pixelSize * image.Width * ((image.Height / 2) - 1) + pixelSize * ((image.Width / 2) - 1); 1051index = pixelSize * image.Width * ((image.Height / 3) - 1) + pixelSize * ((image.Width / 2) - 1); 1054index = pixelSize * image.Width * ((image.Height / 3 * 2) - 1) + pixelSize * ((image.Width / 2) - 1); 1057index = pixelSize * image.Width * ((image.Height / 2) - 1) + pixelSize * ((image.Width / 3) - 1); 1060index = pixelSize * image.Width * ((image.Height / 2) - 1) + pixelSize * ((image.Width / 3 * 2) - 1); 1190Assert.Equal(100, resizedImage.Height); 1191Assert.NotEqual(100, dataObjects[0].LoadedImage.Height); 1199Assert.Equal(100, prediction.ResizedImage.Height); 1200Assert.NotEqual(100, prediction.LoadedImage.Height); 1210int i = dataObjects.Last().LoadedImage.Height; 1240Assert.Equal(image1.Height, image2.Height); 1245Assert.Equal(image1.Width * image1.Height * (image1.BitsPerPixel / 8), image1.Pixels.Length); 1253using MLImage image3 = MLImage.CreateFromPixels(image1.Width, image1.Height, image1.PixelFormat, image1.Pixels); 1255Assert.Equal(image1.Height, image3.Height); 1293Assert.Equal(image1.Height, image2.Height); 1313Assert.Equal(10, image.Height); 1322Assert.Throws<InvalidOperationException>(() => image.Height); 1372Assert.Equal(image1.Height, image2.Height);
Microsoft.ML.TorchSharp (12)
AutoFormerV2\ObjectDetectionTrainer.cs (12)
372var midTensor2 = midTensor1.reshape(1, image.Height, image.Width, 3); 374var midTensor4 = midTensor3.reshape(3, image.Height, image.Width); 383using var reMidTensor = midTensor.reshape(1, 3, image.Height, image.Width); 385var padH = 32 - (image.Height % 32); 386using var transMidTensor = torch.zeros(1, 3, image.Height + padH, image.Width + padW, device: Device); 387transMidTensor[RangeUtil.ToTensorIndex(..), RangeUtil.ToTensorIndex(..), RangeUtil.ToTensorIndex(..image.Height), RangeUtil.ToTensorIndex(..image.Width)] = reMidTensor / 255.0; 907var midTensor2 = midTensor1.reshape(1, image.Height, image.Width, 3); 909var midTensor4 = midTensor3.reshape(3, image.Height, image.Width); 918var reMidTensor = midTensor.reshape(1, 3, image.Height, image.Width); 920var padH = 32 - (image.Height % 32); 921var transMidTensor = torch.zeros(1, 3, image.Height + padH, image.Width + padW, device: _parent.Device); 922transMidTensor[RangeUtil.ToTensorIndex(..), RangeUtil.ToTensorIndex(..), RangeUtil.ToTensorIndex(..image.Height), RangeUtil.ToTensorIndex(..image.Width)] = reMidTensor / 255.0;