Edges in wheat leaves
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
David David
am 2 Sep. 2019
Bearbeitet: Image Analyst
am 3 Sep. 2019
I am trying to find the edges in these leaves. However due to shadow and other nuances normal edge detectors do not work very well.
I have tried a laplacian filter however it does not give back the results I hoped for. I would like to separate overlapping leaves as well though I do not need it to be 100% foolproof. The following code gives me a good idea of the edges however I still need to refine it more.
img=imread("path_to_image");
h=fspecial("laplacian",[3000000 0],10.0);
B=imfilter(img,h);
C=imsubtract(img,B);
imshow(B);
figure;imshow(C);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/236702/image.png)
2 Kommentare
Image Analyst
am 2 Sep. 2019
Why do you need the edges? What is your overall goal? For example to find the amount of green growth in the scene? So you think you need to count the blades of grass? If so, a simple way to get the area fraction of green would be just as good, or even better, and much, much simpler.
Akzeptierte Antwort
Image Analyst
am 2 Sep. 2019
With this field of view, you cannot know, because there are plants outside the field of view whose leaves are in the field of view, and conversely there are plants inside the scene whose leaves are outside the scene. Plus there may be plants in the scene that are mostly or totally obscured by leaves and thus not visible at all.
Plus with such a small field of view, your statistics will be very inaccurate. You can't just take that one small field and extrapolate the answer out to a whole farm many acres in size.
If you back up and take a larger scene when the leaves are not so big that they blend into neighboring plants, then you'd have a better chance at counting plants.
I still think the color fraction of green is your best bet. It will correlate very well with the number of plants. First you'd build a calibration table where you manually count the number of plants and then find its green fraction. Do this at several time points if you need to, or want to, take snapshots at different times. Then for a given time, and given green fraction, you just look up the number of plants from your calibration lookup table.
7 Kommentare
Image Analyst
am 3 Sep. 2019
Bearbeitet: Image Analyst
am 3 Sep. 2019
I deem it impossible with the image you have supplied. I have 40 years of image analysis experience and do it as a full time job, and sometimes what you want or think you want is just not attainable so you have to try to measure other things that will still let you move ahead with your research. That's why I'm suggesting alternative approaches that will probably give you the information you really need.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!