I'm trying to convert a piece of MATLAB code into C++ via MATLAB coder. Many of the functions in the MATLAB code like imread, imshow, normcorr2 are not supported by MATLAB coder.
What are some options to deal with this? Would it be possible to rewrite these functions using C++ and insert them via MEX file? Note I have very little experience with MATLAB, so I may be talking out of my rear.
Your idea to provide C code to the coder is right, but mex does not work. Instead, you have to use coder.ceval.
Another option is coder.extrinsic, if you use it you tell the MATLAB coder not to generate code but rather call the function in MATLAB. If you do this, it obviously requires a MATLAB installation on the target system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With