Browse Source

Fix unit tests.

pull/817/head
Canming Huang 3 years ago
parent
commit
a425b3ce2f
  1. 11
      Emgu.CV.Test/AutoTestImage.cs
  2. 1
      Emgu.CV.Test/AutoTestOcr.cs

11
Emgu.CV.Test/AutoTestImage.cs

@ -646,11 +646,14 @@ namespace Emgu.CV.Test
Image<Gray, Single> img4 = new Image<Gray, float>("stuff.jpg");
Image<Bgr, Single> img5 = new Image<Bgr, float>("stuff.jpg");
Bitmap bmp = new Bitmap("stuff.jpg");
Image<Bgr, Single> img6 = bmp.ToImage<Bgr, float>();
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Bitmap bmp = new Bitmap("stuff.jpg");
Image<Bgr, Single> img6 = bmp.ToImage<Bgr, float>();
Image<Hsv, Single> img7 = new Image<Hsv, float>("stuff.jpg");
Image<Hsv, Byte> img8 = new Image<Hsv, byte>("stuff.jpg");
Image<Hsv, Single> img7 = new Image<Hsv, float>("stuff.jpg");
Image<Hsv, Byte> img8 = new Image<Hsv, byte>("stuff.jpg");
}
}
#endif

1
Emgu.CV.Test/AutoTestOcr.cs

@ -120,6 +120,7 @@ namespace Emgu.CV.Test
using (Tesseract ocr = await GetTesseract())
using (Mat img = new Mat(new Size(1024, 960), DepthType.Cv8U, 3))
{
img.SetTo(new MCvScalar()); //Set to a black image
ocr.SetImage(img);
bool success = ocr.Recognize() == 0;
if (success)

Loading…
Cancel
Save