1 | initial version |
"The function does not work with multi-channel arrays" see docs, again ! so you need to imread() it as grayscale:
img1 = imread("DCIM_20171025_1.JPG", IMREAD_GRAYSCALE);
careful with printf
! for doubles, you need %f
not %d
, so: printf("MAX= %f, MIN= %f", maxVal, minVal);