Edge detection for color images
Show older comments
Hi, I am need to count the number of edges of the color image.
How i can do it??
Answers (1)
Image Analyst
on 17 Dec 2011
0 votes
Assuming you have the edges already, bwlabel will count them for you. If you don't have the edges already then you need to do some research about how to find edges as there are lots of ways to do it with color images. For example, maybe you just want to convert to gray and use a regular grayscale edge detector.
7 Comments
Hayeen
on 17 Dec 2011
Image Analyst
on 17 Dec 2011
Why is your input image BW not a 2D logical image? It should be. How did you get it?
Hayeen
on 17 Dec 2011
Image Analyst
on 17 Dec 2011
Yes, but you don't need to do max(L(:)) to get it, you can get it directly via:
[labeledImage numberOfEdges] = bwlabel(BW);
Hayeen
on 17 Dec 2011
Image Analyst
on 17 Dec 2011
I don't understand. You gave the criteria: the number of edges. If that's what you want, you simply get the number of edges for each image. I don't know what "compare" means. Maybe you can just see which one has more so your final answer is simply "image A" or "image B". Maybe you just want to log the edge count of each image into a spreadsheet, or maybe have a bar chart to compare them graphically. Maybe the number of edges is a measure of texture an you're trying to find out which process gives a rougher texture. I have no idea what you're doing or how you want to compare images.
Hayeen
on 17 Dec 2011
Categories
Find more on Object Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!