how to choose threshold while segmenting leaf from background?

@ImageAnalyst sr I want to know how to choose segmentation threshold. As I m working on plant identification from leaf and in my database there are different images it's quite possible threshold for one image not works for another. Sr how to choose it. Kindly reply sr. Thanks

 채택된 답변

Image Analyst
Image Analyst 2016년 9월 23일

0 개 추천

Yes, that's true. If you have just random arbitrary pictures then it may not be possible to do what you want. For example if you have a photo of a forest with dozens of trees in it, then finding and classifying every type of leaf in the photo will not be possible. It's best if you can get a single leaf on a uniform background. Then you can look at the hue, saturation, and lightness histograms to come up with a scheme that works. Personally I'm a fan of triangle thresholding.

댓글 수: 6

Thanks for considering my query sr.in my data set I have leaves on uniform background only but the background colour varies some have pink and other white background. How to choose threshold for segmenting them at a time. And how to choose which colour space we should choose for segmentation hsi, rgb,hsv.
Thanks sr, kindly reply.
Image Analyst
Image Analyst 2016년 9월 24일
편집: Image Analyst 2016년 9월 25일
I'd use hsv. Have you seen my HSV color segmentation demo in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Have you tried using im2bw() on each color channel individually and then ANDing or ORing them together?
Segmenting leaves on a white background is, for some reason, something that trillions of people want to do. Search on the "leaf" tag in this forum and you might find code I've posted before.
parul mittal
parul mittal 2016년 9월 25일
편집: parul mittal 2016년 9월 25일
Thanx sr, yes sr I have went through your demo files. I m going to try ur suggestions. Thanx for help. Il get back with the results.
Thanx sr for ur kind help. And of rgb image components worked for white background, segmenting those in a loop. Il post image on pink background in that there is uneven illumination. Kindly give me it's solution also wn il post it. Once again thanks sr for kind help.
Do you have a leaf on a pink gradient background that you want to post?
Yes sr I do have.. Once I Complete project with white background than il post it. Thnx sr

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

waqar ismail
waqar ismail 2018년 2월 4일

0 개 추천

i need dataset of plant.. that u are using please sent me with segmentation code. it is part of my project.. mail me at waqar.ismail001@gmail.com

카테고리

도움말 센터File Exchange에서 Agriculture에 대해 자세히 알아보기

질문:

2016년 9월 23일

답변:

2018년 2월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by