Loading an image using coder

4 views (last 30 days)
Katsmeat
Katsmeat on 29 Apr 2015
Commented: Walter Roberson on 13 May 2015
I've got a simple function that processes a sequence of about 100-300 numbered jpegs to derive a single numerical value from each, and save the resulting 300 values in a csv file. I want to use the coder to translate it into c++ and compile it a stand-alone exe.
I've been through the code, taking out all the functions that don't feature on the list of those supported by the coder. But I'm stuck with imread . There seems to be no coder compatible equivalent available. I'm know I'm missing something as a substantial range of image processing functions have been implemented. And they surely must work on something .
Failing that, the solution seems to be to dust off my C skills and edit the coder-generated source by hand to load jpegs. But that surely isn't the way one's supposed to do it

Answers (1)

Vignesh
Vignesh on 13 May 2015
imread doesn't support code generation. Consider writing C code to use libjpeg library to load jpg files. Alternatively, if you make an avi file out of their image files, vision.VideoFileReader generates standalone C code which relies on shared libraries. This means that the generated code will run only on platforms that MATLAB supports (think windows, linux, mac).

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!