Image segmentation issue; How can I segment an RGB image in a normally noisy environment?

4 Ansichten (letzte 30 Tage)
So I have been trying to to segment the image show some where in this post.
The unfortunate thing is I need to get the entire leaf and traditional color segmenting hasn't show a solution (either part of the leaf is missing, or something else is included otherwise.) What are some other methods/ solutions that may aid me in completely segmenting this leaf from the image? Something based on the focus of the leaf may help.

Akzeptierte Antwort

Image Analyst
Image Analyst am 14 Aug. 2015
Sometimes color segmentation has to be followed up by other things such as hole filling, size filtering, or combined with things like texture segmentation.
  3 Kommentare
Image Analyst
Image Analyst am 14 Aug. 2015
What color channel did you use? Use the one with highest contrast - probably the red or blue channel.
Since you're going to have lots of green things in the image, you may want to consider manually masking the images. For a hundred or so images, this should be fine. If you have thousands, then you may want to put in the work to develop an automatic method. You might want to use bwareafilt(binaryImage, 1) if you're interested in only using the largest blob. You might also try entropyfilt(). Play around with the parameters until you get something that works.
John Conson
John Conson am 15 Aug. 2015
I ended up using k-means clustering methods to get an somewhat suitable image. For manual I am still wondering if there is a way to manually mask an rgb image, alot of the examples are for greyscale only.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Image Analyst
Image Analyst am 16 Aug. 2015
Here is the color gamut of your first image:
Here is the color gamut of your second image:
Here is the second gamut looking down the V axis so that everything is projected onto the H-S plane:
You can see that there are not clear well defined color clusters but a mish-mash of colors that blend together.
If you try to use color quantization like median cut algorithm or rgb2ind on the full HSV image, you'll get this:
You can see that this should be better than doing it on just the a-b plane of an LAB image like you did in your other question:
Do you see 3 clusters in the above image like you told the algorithm there would be? I don't. The thing is, because your leaf colors and defects and background clutter is variable, you don't know how many colors will be in the image, even if they were clustered, which they're not. That's why I recommend fixed thresholds. You can correct for changing light conditions by putting a small Color Checker standard in the field of view.
  2 Kommentare
John Conson
John Conson am 27 Aug. 2015
Where are some examples of the median cut algorithm being used?
Image Analyst
Image Analyst am 29 Aug. 2015
I don't know of any examples where someone published a web page or article about using the median cut algorithm. You'd have to do a search - and you can do that as well as I can.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by