Hello all, I am quantifying the area of mildew lesions on the surfaces of leaves on a batch of images. I can nearly isolate the mildew colonies by exploiting the a* channel in LAB color space. The issue is, that while the colonies separate from the green leaf tissue in LAB, they are nearly the same ‘color’ as the platform on which the image was shot, making it impossible to separate from the background. Trying to simply target the colonies via standard color thresholding is unstable, due to variance between images. However, LAB has proven robust separation of the mildew colonies across the whole image sequence. I can however separate the entire leaf (green leaf + mildew infested portion) from the background, to create a nearly perfect outline of the leaf.
Thus, I would ideally be able to first outline the entire leaf area and “lift” it from the background, and then convert the remaining leaf image to LAB to threshold out the mildew colonies for quantification.
While I can do this manually on an image-by-image basis quite successfully with color threshold > select, I can’t automate this because the color threshold macro automatically produces the binary. Given my processing pipeline, my process must be automated.
In short, I’m looking to add a pre-processing step to “delete” all pixels that are NOT within a certain HSB range, and THEN continue segmenting/thresholding the remaining pixels.
Is this possible? Thank you greatly in advance.
Sample input image
Image converted to LAB. Note the lesions withing the leaf surface. Clearly visible, but have the same value as background.
What I would like to do: delete all the red in this threshold first, and then convert the remaining to LAB and continue thresholding, to avoid confusing the lesions with background: