1 | initial version |
You have to filter your answer. For example, don't used minMaxloc, but process your image manually. Otherwise, you can use a binary mask (greater than a threshold it is your answer) and find all one in the binary image. The threshold isn't easy to find (at one or two pixels of the better values, the value in the answer is high too), optionally, you could find only center of connected components in your binary result.