Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

2 problems here:

  1. "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);

  2. careful with printf ! for doubles, you need %f not %d, so: printf("MAX= %f, MIN= %f", maxVal, minVal);