How to find center pixel of a group of pixels.
I have a group of pixels and I'd like to find the middle pixel found in the pixels group. Not centroid that generates a new pixel, but a pixel out of all which resembles the "middle" one amongst them.
Thanks.
"centroid that generates a new pixel," - means ?
Matlab's regionprops (centroid), which returns a new pixel, and not a pixel of the given group which best fits as the 'center' of the group. I need something in OpenCV that returns the best fit pixel as the center of the pixel group.
means not the average of all points ( the sum / number of pixels)
do you mean the closest to the centroid ? -> find the pixel with the minimum ( pixel - centroid )
Good idea. Thanks.