Extract shapes from flow chart
2 ビュー (過去 30 日間)
古いコメントを表示
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)
0 件のコメント
回答 (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
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!