MATLAB: How to process images with changing background and foreground and with poor contrast

image processingImage Processing Toolboximage segmentation

Hello.
I have a series of images of plants growing under pink light. I need to compute the area percentage occuped by the plants. I been using the functions: imread, rgb2hsv, HSV chanel separation, imadjust, of V chanel, imcomplement, regionprops and numel.
I already tried to work in RGB and HSV color spaces. The problem is as the plants grow, the processing stops working well and it begin to take into account part of the plants as background.
I try to open the image and use strel, also to filter some pixels with bwareaopen. But I'm losing some imformation in the process.
Someone could please give me a hand with this…I'm trying to solve this since a while now and also I'm quite new with the image processing.
Thank you in advance.
Attached are two sample pictures of the same portion of the crop,taken with couple of weeks of difference.

Best Answer

Since the background appears uniform, I'd use stdfilt() to distinguish between uniform background, and cluttered foreground.