How Matlab coder convert the image to unsinged char
Mostrar comentarios más antiguos
good day
I am working with matlab Coder which convert a image function to c++ code. the function looks something like this array=findsomething(I); where I is an image has been read with the function Imread. the result code in c++ code which has emxArray_uint8_T which looks like this struct emxArray_uint8_T { unsigned char *data; int *size; int allocatedSize; int numDimensions; boolean_T canFreeData; }; the data from the image should be a stream in unsigned char *data,i can read an image from OpenCV but i need to convert the image type from Mat to unsighed char, i have already read http://www.mathworks.com/help/matlab/matlab_external/matlab-data.html#f22019 but i dont know which comes first red blue or green,and if red should i start with coloms or rows? can someone help
Respuesta aceptada
Más respuestas (1)
Saipraveen
el 30 de Sept. de 2019
0 votos
Answering for other users, I have created a file exchange file that converts image to a c/c++ array file that could be used. https://www.mathworks.com/matlabcentral/fileexchange/72535-image-to-c-c-array-converter.
Categorías
Más información sobre Computer Vision Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!