Identifying Contours on Map

조회 수: 13 (최근 30일)
Holden Tranquillo
Holden Tranquillo 2022년 1월 6일
답변: Divit 2023년 10월 20일
Hello All,
I am trying to identify contours of lake maps for a project. Part of the difficulty is when contours in the original image intersect, and when names/numbers appear. The end goal is a set of closed, non-intersecting contours so that I can then use them to create a basic solid object from.
I have tried a number of things, but am not getting very far. Does anyone have any good ideas or methods to try?
  댓글 수: 1
Ilya Gurin
Ilya Gurin 2022년 1월 6일
It's a pretty hard problem. Note that contours can't actually intersect, though.

댓글을 달려면 로그인하십시오.

답변 (1개)

Divit
Divit 2023년 10월 20일
Hi Holden,
I understand that you would like to identify contours of the lake maps image attached.
Generally, two contour lines do not intersect each other. The reason behind is that each line represents a separate elevation, and we cannot have two different elevations at one location on the surface of earth. However, contour lines can be close to each other if the slope is steep and intersect only in case of an overhanging Cliff and a cave.
The image you have attached has overlapping contour lines and is not an easy task to identify the contours. You could try following methods to identify the contours:
  • Image Processing: Apply image preprocessing techniques such as image denoising, contrast adjustment, and thresholding to improve the clarity of the contours and reduce noise, to enhance the quality of the lake map image and remove any unwanted elements.
  • Text and Number Removal: Apply text detection algorithms, such as the Stroke Width Transform (SWT) or the EAST text detector, to identify text regions in the image. Once the text regions are detected, you can use inpainting or image inpainting techniques to fill or remove the text regions.
  • Manual Editing: In some cases, manual editing might be necessary to refine the contours and remove unwanted elements. Use image editing software or tools to manually edit the contours, merge or split them as needed, and remove any remaining artifacts or unwanted elements.
  • Contour Extraction: MATLAB provides functions like bwboundaries and “bwtraceboundarythat can help extract contours. Adjust the parameters of the contour extraction algorithm to ensure accurate and complete contour detection.
  • Contour Simplification and Intersection Handling: You might encounter overlapping sections after extracting the contours. Usecontour simplification and intersection handling techniques like the Ramer-Douglas-Peucker algorithm to simplify the contours while preserving their overall shape.
For further information on "bwoboundaies" and "bwtraceboundary", please refer to the documentation links provided below:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by