Extract shapes from flow chart

1 visualizzazione (ultimi 30 giorni)
Adil  Shafiq
Adil Shafiq il 11 Gen 2013
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)

Risposte (1)

Image Analyst
Image Analyst il 11 Gen 2013
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

Community Treasure Hunt

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

Start Hunting!

Translated by