How can I use MATLAB C/C++ compiler for "imread" function

1 Ansicht (letzte 30 Tage)
igor kolupaev
igor kolupaev am 19 Okt. 2015
Beantwortet: Walter Roberson am 19 Okt. 2015
clc
filename = imgetfile;
I0 = imread(filename);
I0 = rgb2gray(I0);
imshow(I0,[])

Antworten (1)

Walter Roberson
Walter Roberson am 19 Okt. 2015
It is not allowed to generate C code for imread() .
imread() invokes a series of different libraries depending upon the image type. Some of the libraries are moderately large. For example the TIFF library is approximately 1 3/4 megabytes of .zip source, which compiles down to about 600 Kb of binary.
If you want to be able to read image files in your C/C++ code then push your imread() into a routine and coder.external() the routine and link to appropriate source code.

Kategorien

Mehr zu Call C++ from MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by