Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Tracing the edges of the canny image and turn the contour into a convex volume?

Recommended Posts

If the satellite image is used to generate some contour after the vegetation analysis, I hope to turn this contour or canny image into a convex volume, and the contour has no vertexes any where, so how can I trace it?

thanks

Jack

Share this post


Link to post
Share on other sites
Advertisement

You want to generate a mesh from image data? You should post some images so we can see the contour data you have available.

Share this post


Link to post
Share on other sites
Posted (edited)

You can look up this: https://en.wikipedia.org/wiki/Watershed_(image_processing) (the images on the page do not illustrate the idea very well)

It can work somehow like this, assuming we have a mostly black image with some white / grey contours.

Create a blurred image and combine blurred and original image by taking maximum from both, and repeat this process unil there are no more black pixels.

You now have a height map with the contours being the highest points.

Fill it up with water: Sort all pixels by height and start growing groups from the lowest pixel. If a pixel has already processed neighbours, take the group ID from them, otherwise create a new group for it.

If two larger groups start touching each other,

either decide to merge them or not (e.g. both have average color green from original satellite image, so both must be vegetation - merge),

or build a merging tree you can later traverse to make decisions how fine / coarse your segmentation should be.

 

After that you have some groups of pixels. You can pick groups representing vegetation if they are average green, turn pixels into complex polygon, run polygon simplification and finally convex decomposition over it.

 

Unfortunately this kind of work is sensitive to tweaking values and some manual intervention is probably necessary (exactly like setting proper values for an edge detection algorithm) :(

I guess machine learning would work much better than what i suggest.

 

 

 

Edited by JoeJ

Share this post


Link to post
Share on other sites

Actually, when you create a canny image out of the original one, the cluster is already grouped into one color, so the mask could be just black and white, in which white is vegetation area and black is not, I think it would work somehow..

thanks

Jack

Share this post


Link to post
Share on other sites

Hi,

Does anyone know if there is such a thing called the "waters" index?

Because we have something called the vegetation index which is calculated with..

 

float SAVI = (NIR - red / NIR + red + L) * (1+L);

which performs really well.

It picks up all the vegetations I am after, but what about for waters areas, such as seas, lakes, or rivers?

thanks

Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!