Re: Using connected components tool
Posted: 2016-12-05T19:31:05-07:00
The use your area threshold. Then get the list of ids left behind that are gray(255) (using my negated mask). Then use the keep on all those ids and save to png. You will get multiple mask images for each id. Then use the mask images as I did above on the original image and you will get each leaf separately. Or just do edge processing of each mask to get the outlines.
I do not understand why you why you want id 0! I did not suggest that.
Perhaps you should explain a bit more or show me a manually created example of what you want as the end product.
As long as you have removed the stripe on the right, some maximum threshold area should remove all smaller objects as I did above. If your leaves are all about the same size, then one area threshold should work for all images. If not then you will have to stop an analyze the listing once to find the area threshold for each image and then use that in a second command to do the filtering.
I do not understand why you why you want id 0! I did not suggest that.
Perhaps you should explain a bit more or show me a manually created example of what you want as the end product.
As long as you have removed the stripe on the right, some maximum threshold area should remove all smaller objects as I did above. If your leaves are all about the same size, then one area threshold should work for all images. If not then you will have to stop an analyze the listing once to find the area threshold for each image and then use that in a second command to do the filtering.