Page 1 of 1
Finding centre of an object
Posted: 01 Dec 2020, 09:38
by autohotkey11
Broken Link for safety
Re: Finding centre of an object
Posted: 01 Dec 2020, 11:49
by swagfag
with opencv, first u isolate the red channel(or whichever one gives u the most consistent outline), then u clean it up with some morphological transformations, blurs/sharpens if need be, then u make a cv contour out of it. divide its moments to obtain the centroid(if thats what u meant by "center". its not exactly clear from the image): see
https://en.wikipedia.org/wiki/Image_moment#Examples
Re: Finding centre of an object
Posted: 01 Dec 2020, 14:58
by autohotkey11
i don't have too much experience with opencv is it possible to make a multi detection of one pixel color? for exemple i want to detect all pixel with the same color on the screen then after that make the geomertic form and try to detect the centre of that geometric form made by this groupe of pixel?
Re: Finding centre of an object
Posted: 01 Dec 2020, 17:58
by swagfag
is it possible this, is it possible that. many things are possible. and many are not. depending on the degree of expertise and all.
what ure describing is possible. is it possible out of the box? no, ull have to implement the algorithms that make it possible urself. i dont know why u would want to waste ur time doing that, considering the heavy lifting has already been done for u(by knowledgeable opencv contributors over the course of many years)