I have an image with several objects. Inorder to apply cvFloodFill operation on it, i require the seed points of each object as a parameter. How do i find the seed points? also how to find other parameters like new value, lo_diff and up_diff?
Or If there is any other way of filling the image..please suggest!
Add a comment
|
1 Answer
void cvFloodFill(CvArr* image,
CvPoint seed_point,
CvScalar new_val,
CvScalar lo_diff = cvScalarAll(0),
CvScalar up_diff=cvScalarAll(0),
CvConnectedComp* comp=NULL,
int flags=4,
CvArr* mask=NULL)
According to the docs, seed_point is the x,y coordinate that marks the starting point of the operation. If you look at this example, the last image of this group shows the result of the cvFloodFill() operation demonstrated on Step 1: Filter Examples.
newVal, loDiff and upDiff are parameters you need to experiment with until you find a value that gives you a good result.