Reputation: 2077
I'm trying to load an OpenCV image (IplImage
) into GPU with clCreateImage2D
.
Reason of using IplImage
is, i want to load any kind of image.(jpg, bmp, png).
I can load image using clCreateImage2D
with CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR
mem_flags, and CL_RGB
and CL_UNORM_SHORT_565
type. But in kernel function read_imagef
function is not accept CL_UNORM_SHORT_565
type.
So, how can i send RGB image to OpenCL kernel function?
Edit: I converted the input image to 32bit. Bu tnow what would be the image_channel_order
and image_channel_data_type
? Order can't be RGBA because it has no alpha channel.
Upvotes: 0
Views: 1310
Reputation: 17025
24 bit RGB is not supported by OpenCL. So you have to first convert it to 32 bit RGB and then pass it to the OpenCL kernel
Upvotes: 2