Identifying Contours on Map
8 ビュー (過去 30 日間)
古いコメントを表示
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/855305/image.png)
1 件のコメント
Ilya Gurin
2022 年 1 月 6 日
It's a pretty hard problem. Note that contours can't actually intersect, though.
回答 (1 件)
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 “bwtraceboundary” that 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:
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!