How to Detect Edges of an Image using Canny Edge Detection technique

Technical Source
2 min readMar 4, 2022

--

How to Detect Edges of an Image using Canny Edge Detection technique. I have already detected edges of Images, but I’m not sure if it is correct or not. Also, I want to add legend command and axis information in this, how would I do this thing?

if true
% code
end
clc;
clear all;
close all;
img = imread('Tableqa.jpg');
image(img)
title('Original Image')
figure,
I = rgb2gray(img);
imshow(uint8(I))
image(I)
title('Grey Scaled Image')
figure,
Canny_img = edge(I,'Canny');
imshow(Canny_img)
image(Canny_img*255)
title('Edge Detected Image')

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Use axis(‘on’, ‘image’). I fixed other problems too. Fixed code is below:

clc;
clear all;
close all;
workspace; % Make sure the workspace panel is showing.
% Read in original RGB image.
rgbImage = imread('Table.jpg');
subplot(2, 2, 1);
imshow(rgbImage)
axis('on', 'image');
title('Original Image')
% Convert to gray scale.
grayImage = rgb2gray(rgbImage);
subplot(2, 2, 2);
imshow(grayImage)
axis('on', 'image');
title('Grey Scale Image')
% Get edges
Canny_img = edge(grayImage, 'Canny');
subplot(2, 2, 3);
imshow(Canny_img, [])
axis('on', 'image');
title('Edge Detected Image')
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'Outerposition', [0, 0.05, 1, 0.95]);

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet