Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
how can I Extract road from image ? i have take image from Google earth in that road is present .how can i separate that road or how can i display only road from that image? in java
Posted
Comments
baliram bhande 20-Nov-13 9:46am    
any open source API present in java.
Richard MacCutchan 20-Nov-13 10:03am    
Did you ask Google?
baliram bhande 21-Nov-13 1:14am    
i am asking general images .any image only thing is that road is present on that image. not specific to goggle
Richard MacCutchan 21-Nov-13 4:17am    
And as I said you need to ask Google. You are asking how to analyse image data and select only certain parts based on shading colour etc. This is a vast subject and there is plenty of information around, but you need to go and look for it.
Pete O'Hanlon 20-Nov-13 11:26am    
What, exactly, are you trying to accomplish by pulling out road information? As the image is going to be 2D, then you will be missing the fact that roads are actually 3D - this is a common mistake. What happens, for instance, if a road goes under a flyover (a common case). If you're trying, for instance, to roll your own routing algorithms, you need access to the underlying road data - this contains information such as road segments, speeds, etc...

1 solution

There are many problems with such an approach, as others pointed out in their comments.
But let's assume a simple case, with the road being pretty well visible and discernible on that image. It may have a color different from the colors of the areas next to it: so you could define a color (or more exactly: a range of colors) which mean "road". Now you iterate thru the image and check the color. If it fits, add the pixel's x and y values to a list. Next, look thru your list to find out which pixels are connected. And that's your road network then. Not a nice, "vectorized" network yet, but that could be done in the next steps.
 
Share this answer
 
Comments
baliram bhande 21-Nov-13 10:02am    
thanks
baliram bhande 3-Dec-13 1:01am    
i will agree with you but problem is that road color is same as other part of image (i.e house,building ,other obstacles)ex. road color is black and building color is black or any other small object is black color how we can delete other small object because of that we can extract only road part of that image

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900