c++ - Convert float array image to a format usable for opencv -
I wonder if my float array is an easy way to convert image to iplimize, which can be controlled by OpenCV Of course I can create an empty Iplimage with the same size and can simply copy the pixels for emplty iplimage from my float array image, but for this it has a more elegant solution. A faster low memory consumer method may be because the source images are too large and the copying process will take a while.
Best regards,
Zangtnik
Can do some such (assuming 32 bit floats):
float * my_float_image_data; CvSize size; Shape. High = height; Shape. Width = width; IplImage * ipl_image_p = cvCreateImageHeader (size, IPL_DEPTH_32F, 1); Ipl_image_p-> Imagedata = my_float_image_data; Ipl_image_p-> ImageDataGreen = ipl_image_p- & gt; Image data;
Comments
Post a Comment