フィルターのクリア

Hi i need help fixing this code in app designer its about thresholding here is the error message and thank u

2 ビュー (過去 30 日間)

回答 (1 件)

Image Analyst
Image Analyst 2022 年 12 月 12 日
The badly-named "a" is not an image, and it needs to be. What does this show
whos a
size(a)
  2 件のコメント
jana
jana 2022 年 12 月 12 日
i changed the code to this and it turns the rgb image to green but not the grayimage to green eventhough iconverted the image in the code below ill attach the original file too if u can help and thank u
Agray=im2gray(app.Image);
zerochan = zeros(size(Agray),class(Agray));
green = cat(3,zerochan,Agray,zerochan);
setappdata(0,'filename',green);
setappdata(0,'imrotation',green);
I=imshow(green,'parent',app.UIAxes2,...
'XData',[1 app.UIAxes2.Position(3)],...
'YData',[1 app.UIAxes2.Position(4)]);
app.UIAxes2.XLim=[0 I.XData(2)];
app.UIAxes2.YLim=[0 I.YData(2)];
Image Analyst
Image Analyst 2022 年 12 月 12 日
This does not turn the RGB image to green. It converts the RGB image into gray scale through a weighted average of all the color channels. Then you put it into a new RGB image where the red and blue channels are black and the gray scale version of the RGB image is in the green channel. It looks like it should do that. Does it throw an error, or did you just tell it to do something that you did not want it to do?

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

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by