Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 18 Okt. 2016
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

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by