how to calculate no. of edge pixel of a image for a particular(e.g sobel edge detector) edge detector using matlab

1 view (last 30 days)
how to calculate no. of edge pixel of a image for a particular(e.g sobel edge detector) edge detector using matlab

Answers (3)

Image Analyst
Image Analyst on 15 Mar 2014
Assuming you used edge(), which thresholds the edge image, you could just use sum():
numberOfEdgePixels = sum(edgeImage(:));

Anand
Anand on 23 Feb 2016
bw = edge(I,'sobel');
edgePixels = nnz(bw)

bindu bansal
bindu bansal on 5 Dec 2019
Anybody pl help me to implement paper "a classification algorithm to distinguish Image as Haze or non-Haze".... thanks in advance

Community Treasure Hunt

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

Start Hunting!