I am using OpenCV EM to segment a image on the HSV domain. Therefore, the segmentation detect some false positives [Highlights in Yellow]. Below, you can see the input image.
And below, the image segmented with false positives.
I try to remove it by using threshold as you can see without success.
Any help on how to keep only the Leaf will be appreciated!
The "false positives" you see are compression artefacts caused by JPEG compression.
https://en.wikipedia.org/wiki/JPEG
You cannot segment this perfectly in Hue or Saturation channel.
Ideally process uncompressed images or use brightness information which usually is preserved in higher frequencies than colour.
Unfortunately you did not provide the actual input image so I cannot help you any further.