image processing edge edge detection

33 ビュー (過去 30 日間)
Mohammad abu aqoulah
Mohammad abu aqoulah 2020 年 5 月 31 日
コメント済み: Ameer Hamza 2020 年 6 月 1 日
how can Apply edge detection to the original RGB image using the "Canny edge Operator"
  4 件のコメント
Mohammad abu aqoulah
Mohammad abu aqoulah 2020 年 6 月 1 日
i mean
i want to convert RGB image to R , G and B
after that convert R to canny edge
after that convert G to canny edge
after that convert B to canny edge
after that sum three pic
Mohammad abu aqoulah
Mohammad abu aqoulah 2020 年 6 月 1 日
that mean
i have image i want firstly split this image into R , G and B and show 3 images red , green and blue images
secondly apply edge canny in each 3 colore image
canny edge detection on green image (g_d)
canny edge detection on blue image (b_d)
canny edge detection on red image (r_d)
after that add (g_d)+(b_d)+(r_d) to have colore canny detection

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2020 年 5 月 31 日
Did you try edge():
rgbImage = imread('peppers.png');
subplot(1,2,1);
imshow(rgbImage);
grayImage = rgb2gray(rgbImage);
subplot(1,2,2);
edgeImage = edge(grayImage, 'Canny');
imshow(edgeImage, []);
Or you could do it on each color channel separately if you want.
  10 件のコメント
Mohammad abu aqoulah
Mohammad abu aqoulah 2020 年 6 月 1 日
the problem is
when i spilt the image into 3 image i mean each image has 1 color and i need the canny edge detection in this color as the folowing
Ameer Hamza
Ameer Hamza 2020 年 6 月 1 日
Mohammad, you can try this modified version of Image Analyst's code.
rgbImage = imread('peppers.png');
subplot(2,2,1);
imshow(rgbImage);
[R, G, B] = imsplit(rgbImage);
subplot(2,2,2);
edgeImageR = edge(R, 'Canny');
R(edgeImageR) = 255;
Rimage = zeros(size(rgbImage), 'uint8');
Rimage(:,:,1) = R;
imshow(Rimage, []);
title('Edge Image of Red', 'FontSize', 15)
subplot(2,2,3);
edgeImageG = edge(G, 'Canny');
G(edgeImageR) = 255;
Gimage = zeros(size(rgbImage), 'uint8');
Gimage(:,:,2) = G;
imshow(Gimage, []);
title('Edge Image of Green', 'FontSize', 15)
subplot(2,2,4);
edgeImageB = edge(B, 'Canny');
B(edgeImageR) = 255;
Bimage = zeros(size(rgbImage), 'uint8');
Bimage(:,:,3) = B;
imshow(Bimage, []);
title('Edge Image of Blue', 'FontSize', 15)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by