The error you linked is a common one that happens when you input a grayscale (M x N) image instead of a color (M x N x 3) image.
Seems like the toolbox assumes all images passed in as color images and tries to use the rgb2gray function regardless of whether the image is already grayscale!
So you have 2 options:
- Short-term fix: Save your images as color images and try again
- Long-term fix: Add logic to the app to handle this.
To fix the code with the long-term fix, here are the steps:
- Open the app ( edit simMapGenerator.mlapp )
- Go to the "Code View" section
- In line 47, you will see the code imgGray = rgb2gray(imgRaw); Change it to this:
if size(imgRaw,3) == 1
imgGray = imgRaw;
else
imgGray = rgb2gray(imgRaw);
end
Hope that helps!
- Sebastian
2 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/478857-simulation-map-generator-issues#comment_895461
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/478857-simulation-map-generator-issues#comment_895461
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/478857-simulation-map-generator-issues#comment_895464
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/478857-simulation-map-generator-issues#comment_895464
サインインしてコメントする。