Jump to content

 
Photo

Need some help with edge detection and vectors

- - - - -

  • Please log in to reply
7 replies to this topic

#1
mikerouge

mikerouge

    Newbie

  • Validated Member
  • Pip
  • 8 posts
  • No Country Selected

I'm trying to make some outline maps of mountains. It's a basic process. Start with a DEM and extract a distance map from a fixed observer position. Each pixel in that map is shaded according to its distance from observer: near = white; far = black.

Now, if you want to render the outlines, it's simply a case of finding the abrupt changes, the discontinuities, in that depth map. You can do this by looking at the slope of the image, or by running some edge detectors.

I used Whitebox GIS because it has a nice array of edge filters, but it's a bit fiddly to use. Free though. But I'd like to know how you would perform the edge detection on the distance map?

I'd also like to know the best way to thin and vectorise those outlines, so that I can rescale them and display them with antialiasing. I don't know much about smooth vectorisation but I'm hoping you guys will. If you've got any tips for extracting nice clean mountain outlines from my DEM I'd be ever so grateful. Thanks

Attached File  cartotalk.jpg   146.67KB   75 downloads

#2
Michael Schmeling

Michael Schmeling

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 204 posts
  • Gender:Male
  • Location:Kassel, Germany
  • Germany

I would do the edge detection in a graphics program (Photoshop) and autotrace the result in Illy to get vectors. But I haven't tried this myself.
Michael Schmeling
Kassel, Germany
Arid Ocean Map Illustrations
http://maps.aridocean.com
Indie Cartographer
http://www.indiecartographer.com

#3
canvas101

canvas101

    Contributor

  • Validated Member
  • PipPip
  • 37 posts
  • United States

Hello mikerouge,

I would approach this from a more artistic point of view and utilize a pen and tablet and trace the rendered results. Import the image into AI and trace the profiles that you need. When utilizing edge detection I find a less natural result.

Regards

#4
mikerouge

mikerouge

    Newbie

  • Validated Member
  • Pip
  • 8 posts
  • No Country Selected

OK thanks everyone.

So, I used 'Live Paint' in Illustrator to convert my rasters to vectors. Pictures at the bottom. It looks really nice. I think that's the best way to do it, just uses a simple threshold and the options are easy to tweak.

I am new to Illy though, and I'd like to export those vectors back to ArcGIS so I can symbolise them. It's not clear to me how to change the line thickness in Illy.

I tried to export to DXF but nothing appeared in ArcGIS. If anyone's got any tips I'd be really grateful. But yes, Illy has a nice clean look.

As for the depth map filter, I just wrote a simple VB script to look at gradients in three directions, this is a nice way to get a single pixel width line that is true to the original file.

If anyone can help with the vectors -> ArcGIS approach I'd be pleased. Thank you

Attached File  1.jpg   228.73KB   46 downloads
Attached File  2.jpg   74.13KB   43 downloads

#5
Kathi

Kathi

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 188 posts
  • Gender:Female
  • Location:Olten, Switzerland
  • Interests:geology, GIS, cartography, famlily, reading, cooking, travelling, gardening
  • Switzerland

If anyone can help with the vectors -> ArcGIS approach I'd be pleased.



If there was a rather fool-proof way, I'd also love to know about it! I don't have MapPublisher, just Illy CS3 and ArcView 9.3.

So far I've always exported my graphics from Illustrator to dxf, then imported that into ArcGIS, used the necessary transformation to have it plot in the correct location, then export to shapefile if needed.

The problem in this workflow is in the first step: before exporting you need to make sure there are no transparencies or styles like paintbrushes applied, or those features and anything below them will be rasterized. I'm also guessing that complex paths (I'm not sure that's what they're really called in English, they're "Zusammengesetzer Pfad" in German) may cause problems. And right now I'm struggling with the export of bezier curves, they just won't show up, so I guess those spell trouble, too... :unsure: :(
Cheers,

Kathi

#6
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,870 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

complex paths (I'm not sure that's what they're really called in English, they're "Zusammengesetzer Pfad" in German)


Compound paths ;)
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#7
Kathi

Kathi

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 188 posts
  • Gender:Female
  • Location:Olten, Switzerland
  • Interests:geology, GIS, cartography, famlily, reading, cooking, travelling, gardening
  • Switzerland

Thanks for the clarification, Hans!
Cheers,

Kathi

#8
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,870 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Thanks for the clarification, Hans!


Bitte schön!
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->