cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

alexfd7
Adept I

Some questions about images

Hello everyone,

someone could help me with some questions? recently I am using "Insight Segmentation and Registration Toolkit (ITK)" with OpenCL.

In my c ++ code, I carry an image using ITK classes, and I export it to a float vector and insert within a "cl :: Image2D". I made a simple application kernel where I reverse the image. Runs cool.

However I started to display the values of some pixels of the image, and change Them as well. Inside the kernel, I work with objects that represent the image with 4-channel component (RGBA). Right?

Since I am using an image in gray levels, only R component is sufficient to change color of a pixel, for whiter or blacker. Right?

What I want to understand, what is the method applied to do the conversion of the values of pixels of image 4 channels to 1 channel (grayscale). To the resulting image in my code in C ++, I copy my output buffer to float vector again. I see that the values of pixels that we display inside the kernel are very different than come from the float vector.

Since already I appreciate the attention

0 Likes
0 Replies