Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Segmentation to separate touching objects in an image

Status
Not open for further replies.

PedroMarques

Newbie level 4
Joined
Feb 23, 2017
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
41
I'm using the function regionprops to detect the number of trees on a image taked by drone.
imagem_original.jpg
First I removed the ground using Blue NDVI:
bndvi.jpg
Image with threshold:
bdnvi_seg.jpg
Then I used the function regionprops to detect the number of trees on image:
regprops.jpg
But there are a problem on region 15, because all trees on that region are connected and it detects as one tree. I tried to separate the trees on that region using Watershed Segmentation, but its not working:
water_seg_final.jpg
Am I doing this the wrong way? Is there a better method to separate the trees?

If anyone can help me with this problem I will appreciate. Here is the region 15 without the ground:
corte_regbseg.jpg
If it helps, here is the Gradient Magnitude image:
Gradient magnitude.jpg
 

Perhaps with a slightly different approach. Just after the threshold detection process, you could try to apply some erosion algorithm with a number of interactions enough to separate the regions.
 

Perhaps with a slightly different approach. Just after the threshold detection process, you could try to apply some erosion algorithm with a number of interactions enough to separate the regions.

I already tried but didnt work because the trees are so connected that the function erosion deletes a lots of information
 

Hi,

* I'd specify the size. Min and max
* and I'd focus on round shapes

If possible..

Klaus
 

Your photograph contains a mix of green and tan pixels. Trees are roughly the same size and shape. Pick an average tree and count its pixels. Divide this into the total amount of green pixels. Then you have the number of trees in the photo. This method might not work normally except for the fact that practically all your trees are uniform in size.
 

Trees are roughly the same size and shape. Pick an average tree and count its pixels. Divide this into the total amount of green pixels. Then you have the number of trees in the photo.

This method certainly would give a reasonable result for a mass measurement, with the advantage of not having to take into account particular features of each tree, and I'm sincerely not sure if for the above picture if there is another suitable procedure to do that with an acceptable accuracy - there are considerable superposition among neighbor trees.

Anyway, still back on the initial approach, considering that most of the trees ehxibit a similar size shadow pattern, I would recommend to you take a look on convolutional pattern matching algorithms. The 6th picture "corte_regbseg.jpg" could be used for that, taking for example the tree at the top of the picture as the reference pattern ( it is already appart from others, not being necessary to make any clean ).
 

Your photograph contains a mix of green and tan pixels. Trees are roughly the same size and shape. Pick an average tree and count its pixels. Divide this into the total amount of green pixels. Then you have the number of trees in the photo. This method might not work normally except for the fact that practically all your trees are uniform in size.

I can do that with regionprops, because the function gives me the area of each region detected.

dados_regionprops.jpg

For example, knowing that at most a tree has an area of ​​3000 pixels, and that the region to study has 116,000 pixels of area, so the region has around 38 trees. But this is an estimate and I have to be as accurate as possible, and if it possible know the center os each tree on that region to detect with regionprops.
 

This method certainly would give a reasonable result for a mass measurement, with the advantage of not having to take into account particular features of each tree, and I'm sincerely not sure if for the above picture if there is another suitable procedure to do that with an acceptable accuracy - there are considerable superposition among neighbor trees.

Anyway, still back on the initial approach, considering that most of the trees ehxibit a similar size shadow pattern, I would recommend to you take a look on convolutional pattern matching algorithms. The 6th picture "corte_regbseg.jpg" could be used for that, taking for example the tree at the top of the picture as the reference pattern ( it is already appart from others, not being necessary to make any clean ).

I had already thought about recognizing patterns but for another part of my project. Because after having the right segmentation and being able to individualize each tree, I will have to identify what kind of tree is the one that is present in the region. But before moving on to recognition I have to have the right segmentation.

- - - Updated - - -

This method certainly would give a reasonable result for a mass measurement, with the advantage of not having to take into account particular features of each tree, and I'm sincerely not sure if for the above picture if there is another suitable procedure to do that with an acceptable accuracy - there are considerable superposition among neighbor trees.

Anyway, still back on the initial approach, considering that most of the trees ehxibit a similar size shadow pattern, I would recommend to you take a look on convolutional pattern matching algorithms. The 6th picture "corte_regbseg.jpg" could be used for that, taking for example the tree at the top of the picture as the reference pattern ( it is already appart from others, not being necessary to make any clean ).

I forgot to mention in the previous answer but I have already worked with pattern recognition in another project, I have used SIFT and SURF more specifically. And already tried to apply in this case of trees, but did not have good results because as the original image is very large, it is very pixilized on trees. The image I put here is just a 500x500 image of the original image, because the original has 8000x8000.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top