Identifying Contours on Map
9 次查看(过去 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?
1 个评论
Ilya Gurin
2022-1-6
It's a pretty hard problem. Note that contours can't actually intersect, though.
回答(1 个)
Omega
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!