bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.53k stars 1.58k forks source link

The blobFromImage function returns an abnormal result #2095

Open CJL6015 opened 1 year ago

CJL6015 commented 1 year ago

This is my code,the width and height of the blob are always -1. Mat img = opencv_imgcodecs.imread(imagePath); Mat blob = opencv_dnn.blobFromImage(img, 1.0, new Size(640, 640), new Scalar(0.0), true, false, CV_32F);

saudet commented 1 year ago

That's probably normal if the blob has 4 dimensions.