cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

cyndwith
Journeyman III

Problem with access images??

i have been trying to employ some basic image processing operation using openCL...

i see that image can be stored in uchar4 array....i see that my bmp image is just 24 bit...will it be a problem??

and when i try to generate histgram for each color layer of the image RGB...i get un expected results..

I store the image data in uchar4* imageData, and try to access it through...imageData.x, imageData.y etc....

i observe that when ever there is a change in the value of imageData.z histogram it is reflected in the imageData.y histogram??

am unable to find the fault...

can anyone help me...thank you in advance!!!

0 Kudos
Reply
1 Reply
nou
Exemplar

Re: Problem with access images??

you just pointed out problem. BMP use 24 bit per pixel. so you must reorganize data from 3 bytes/pixel to 4 bytes/pixel. and just warn you uchar3 and other three component vector types have same size as 4 component. so it doesn't help change it to three component vector type.

0 Kudos
Reply