Extract shapes from flow chart
이전 댓글 표시
I want to extract shapes from a flow chart and save them as different images . I know that canny edge can be applied to detect shapes in image but I want to extract the shapes as different images (so that I can further apply hough transform on each image to check that what is that shape)
답변 (1개)
Image Analyst
2013년 1월 11일
I think you're better off not using an edge detector and simply doing thresholding. Call imopen() afterwards to delete the lines between the shapes.
binaryImage = grayImage < 128;
binaryImage = imopen(binaryImage, true(3));
measurements = regionprops(binaryImage, 'BoundingBox');
This is easier and better. Edge detectors often give two edges - a positive one and a negative one on each side of the "true" edge.
See code in my Image Segmentation Tutorial to see how to crop the bounding box out of the image into separate images. BlobsDemo Image Segmentation Tutorial
카테고리
도움말 센터 및 File Exchange에서 Object Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!