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

2 次查看(过去 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 CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by