IN matlab 2017b version i have a error in canny edge detection like this.

2 ビュー (過去 30 日間)
sasi g
sasi g 2022 年 2 月 2 日
回答済み: Divyam 2024 年 9 月 17 日
Segmentedimg = edge(Enhanceimg,'canny'); figure('Name','Segmented image','NumberTitle','off'); imshow(Segmentedimg);
title('Segmented Image','fontsize',10,'fontname','Times New Roman','color','Black');
  1 件のコメント
Umeshraja
Umeshraja 2024 年 9 月 17 日
Hi @sasi g, I am not getting any error. Can you mention more on what kind of error are you encountering? Also attach the file you are using for analysis.

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

回答 (1 件)

Divyam
Divyam 2024 年 9 月 17 日
Hi @sasi g,
In case you are using an RGB image, you can use the "rgb2gray" function to convert the RGB image to grayscale as the "edge" function takes a grayscale image as input. Apart from that, capitalize the option you are choosing for "edge" function as shown in the code below:
% Optional: converting RGB image to grayscale
Enhanceimg = rgb2gray(Enhanceimg);
% The method name should be "Canny" instead of "canny"
Segmentedimg = edge(Enhanceimg,'Canny');
figure('Name','Segmented image','NumberTitle','off');
imshow(Segmentedimg);
title('Segmented Image','fontsize',10,'fontname','Times New Roman','color','Black');

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by