1 | initial version |
you can only use minMaxLoc IF your image was loaded correctly. so that call should go into the if block, too !
minMaxLoc only works on single channel images (see docs, again, please). maybe you need to load your image using the IMREAD_GRAYSCALE flag.
2 | No.2 Revision |
you can only use minMaxLoc IF your image was loaded correctly. so that call should go into the if block, too !
minMaxLoc only works on single channel images (see docs, again, please). maybe you need to load your image using the IMREAD_GRAYSCALE flag.
you used the 'mask' argument wrong. it shouldnot be the same image, and it would need a single channel, binary image here. i guess, you don't need it at all.
3 | No.3 Revision |
you can only use minMaxLoc IF your image was loaded correctly. so that call should go into the if block, too !
minMaxLoc only works on single channel images (see docs, again, please). maybe you need to load your image using the IMREAD_GRAYSCALE flag.
you used the 'mask' argument wrong. it shouldnot should not be the same image, and it would need a single channel, binary image here. i guess, you don't need it at all.