image processing canny edge detection

3 ビュー (過去 30 日間)
Mohammad abu aqoulah
Mohammad abu aqoulah 2020 年 5 月 31 日
コメント済み: Image Analyst 2020 年 6 月 1 日
i want to convert image without go to gray scal by split color image by to R G and B after that converting to canny and sum 3 pic

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 5 月 31 日
YourImage = imresize(imread('baby.jpg'), 1/8);
R = YourImage(:,:,1);
G = YourImage(:,:,2);
B = YourImage(:,:,3);
ER = edge(R, 'canny');
EG = edge(G, 'canny');
EB = edge(B, 'canny');
anyedge = ER | EG | EB;
alledge = ER & EG & EB;
majorityedge = (ER + EG + EB) >= 2;
Rany = R; Rany(anyedge) = 255;
Gany = G; Gany(anyedge) = 0;
Bany = B; Bany(anyedge) = 0;
RGBany = cat(3, Rany, Gany, Bany);
Rall = R; Rall(alledge) = 255;
Gall = G; Gall(alledge) = 0;
Ball = B; Ball(alledge) = 0;
RGBall = cat(3, Rall, Gall, Ball);
subplot(3,2,1)
imshow(YourImage);
title('Original');
subplot(3,2,2);
imshow(anyedge)
title('Edge found in any plane');
subplot(3,2,3)
imshow(majorityedge)
title('Edge found in 2+ planes');
subplot(3,2,4)
imshow(alledge)
title('Edge found in all planes');
subplot(3,2,5)
imshow(RGBany)
title('Original outlined with any edge');
subplot(3,2,6)
imshow(RGBall)
title('Original outlined with all edge')
Bany = B; Bany(anyedge) = 0;
  3 件のコメント
Mohammad abu aqoulah
Mohammad abu aqoulah 2020 年 6 月 1 日
i 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
Image Analyst
Image Analyst 2020 年 6 月 1 日

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

Community Treasure Hunt

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

Start Hunting!

Translated by