Shannon Edge Detector for Grayscale Images
The Shannon algorithm runs an edge detector method using a Shannon Entropy measure. The .zip folder contains three files, the main file, which is the Shannon Algorithm, an edge detector file and a threshold file. You will need all three files.
To edge detect a gray scale image, input the file name into the main file and click run.
A Shannon entropy-based edge detector is a new method, inspired by biodiversity measures.
I hope you find it useful. Below is a snippet of code from the Edge Detector procedure. It utilizes a 3x3 window.
% Edge Detector
function [g]=EdgeDetector_procedure(f);
[row column]=size(f);
g=f;
m = 3; n = 3; a0 = (m-1)/2; b0 = (n-1)/2;
for y = b0+1 : column-b0;
for x = a0+1 : row-a0;
sum1 = 0;
for k=-b0:b0;
for j=-a0:a0;
if ( f(x,y) == f (x+j,y+k) ) sum1=sum1+1; end;
end;
end;
if ( sum1>6 ) g(x,y)=0; else g(x,y)=1; end;
end;
end;
Citation pour cette source
Tyler Coye (2024). Shannon Edge Detector for Grayscale Images (https://www.mathworks.com/matlabcentral/fileexchange/51124-shannon-edge-detector-for-grayscale-images), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Object Analysis >
Tags
Remerciements
Inspiré par : Novel Cellular Automaton-based Image Segmentation Algorithm
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Shannon Edge/
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0.0 |