How to detect edges using Canny Edge detection method?

8 vues (au cours des 30 derniers jours)
Nadia jabeen
Nadia jabeen le 18 Sep 2020
Commenté : Nadia jabeen le 19 Oct 2020
I have applied Canny Edge Detector. How can I improve result for canny edge detector so that large edges and images can be clearly seen. I have attached input and output images.
X = cell2mat(struct2cell(load('F:\study\practise\New folder\2010\script\preprocessed2010.mat', 'Alpha')));
for k=1:length(X)
b=X(k).img;
b(b==0)=NaN;
b (b > -5) = NaN;
b (b < -32) = NaN;
figure, temp1 = imagesc(b);title('Original Image') ;colormap('gray'); colorbar;
baseFileName = sprintf('%d.jpg',k);
% % % Specify some particular, specific folder:
fullFileName = fullfile('E:\practise\images', baseFileName);
figure(gcf); % Activate the figure again.
export_fig(fullFileName);
% Get edges
A = edge(b, 'canny');
figure, temp1 = imagesc(A);title('Edge Detected Image') ;colormap('gray'); colorbar;
baseFileName = sprintf('%dCanny.jpg',k);
fullFileName = fullfile('E:\practise\images', baseFileName);
figure(gcf); % Activate the figure again.
export_fig(fullFileName);
%
end
  2 commentaires
Image Analyst
Image Analyst le 28 Sep 2020
Youi forgot to attach preprocessed2010.mat.
Nadia jabeen
Nadia jabeen le 19 Oct 2020
preprocessed2010.mat is heavy file. I can't attach this file. Can you tell me by using an example image that how can I detect edges having length greater than 50km. I Could not understand how to modify edge detection code? Kindly help me.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by