Why imshow not working in stand alone application.Is there any alternative for that?

4 ビュー (過去 30 日間)
I developed a application using matlab compiler .Everything works fine except the command imshow.What is the probability of getting this isseus.How i can solve this.

採用された回答

Walter Roberson
Walter Roberson 2016 年 10 月 18 日
imshow is not in the list of MATLAB commands that cannot be compiled; see http://www.mathworks.com/help/compiler/unsupported-functions.html
However, if you are using a sufficiently old version of MATLAB, then imshow was in the Image Processing Toolbox rather than MATLAB itself, so with those older versions to use imshow() you would have needed to compile in the Image Processing Toolbox.
Which MATLAB version are you using? And what behaviour do you see when you attempt to use imshow() in a compiled executable?
Generally, either image() or imagesc() should work as replacements. If you are using imshow() with a logical image, then you should be able to use
image(BWImage); axis image off
If you are using imshow() with a two-level image, 0 and 1, then use
imagesc(TwoLevelImage); axis image off; colormap(gray(2))
If you are using imshow() with a grayscale uint8 image, then use
image(GrayImageUint8); axis image off; colormap(gray(256));
If you are using imshow() with an RGB uint8 image, then use
image(RGBImage8); axis image off

その他の回答 (0 件)

カテゴリ

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