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