Is it possible to get the pixel values (frome the frame buffer?) as float
values
(in the range of 0..1) in some way?
I have an application where
glReadPixels(OrigX, OrigY, width, height, GL_RGB, GL_UNSIGNED_BYTE, data)
is used. If I understand this right this will give me the pixel _integer_
values for R, G and B stored in the buffer 'data'.
To get a more accurate pixel value (for evaluation) I would like to read the
pixel values before they are converted to integer vaules. How can this be
done?
Billy
|
|
0
|
|
|
|
Reply
|
Billy
|
5/7/2004 9:06:28 AM |
|
Billy wrote:
> Is it possible to get the pixel values (frome the frame buffer?) as float
> values (in the range of 0..1) in some way?
>
> I have an application where
>
> glReadPixels(OrigX, OrigY, width, height, GL_RGB, GL_UNSIGNED_BYTE, data)
>
> is used. If I understand this right this will give me the pixel _integer_
> values for R, G and B stored in the buffer 'data'.
>
Try reading the manual: You can type "GL_FLOAT" instead
of "GL_UNSIGNED_BYTE" for the data format.
It won't make the data any more accurate though, if there's
only eight bits of information, there's only eight bits.
> To get a more accurate pixel value (for evaluation) I would like to read the
> pixel values before they are converted to integer vaules. How can this be
> done?
>
The latest generation graphics cards allow you
to render into pbuffers with floats.
--
<\___/> "To err is human, to moo bovine."
/ O O \
\_____/ FTB. For email, remove my socks.
|
|
0
|
|
|
|
Reply
|
fungus
|
5/7/2004 1:48:47 PM
|
|
fungus <openglMY@SOCKSartlum.com> wrote:
>It won't make the data any more accurate though, if there's
>only eight bits of information, there's only eight bits.
Is it possible to get acces to the pixel values before the are
represented by eight bits (using OpenGL API's)?
-------------
Thomas
|
|
0
|
|
|
|
Reply
|
Thomas
|
5/7/2004 11:46:15 PM
|
|
Thomas wrote:
> Is it possible to get acces to the pixel values before the are
> represented by eight bits (using OpenGL API's)?
No. But you can use a float pbuffer.
Wolfgang
|
|
0
|
|
|
|
Reply
|
Wolfgang
|
5/8/2004 4:03:55 PM
|
|
|
3 Replies
329 Views
(page loaded in 0.309 seconds)
Similiar Articles: Grabbing float pixel values (from frame buffer)? - comp.graphics ...Is it possible to get the pixel values (frome the frame buffer?) as float values (in the range of 0..1) in some way? I have an application where g... unsigned int to ABGR float values - comp.graphics.api.opengl ...Grabbing float pixel values (from frame buffer)? - comp.graphics ..... frome the frame buffer?) as float values (in ... OrigY, width, height, GL_RGB, GL_UNSIGNED ... get pixel color - comp.graphics.api.openglGrabbing float pixel values (from frame buffer)? - comp.graphics ... Is it possible to get the pixel values (frome the frame buffer?) as float values (in the ... renderbuffer objects - comp.graphics.api.opengl1) I am confused about the values of the ... this->height(), 0, GL_RGB, GL_FLOAT, 0 ... Object (FBO) - Song Ho Ahn OpenGL Frame Buffer Object (FBO) Related Topics: Pixel ... OpenGL video rendering - comp.graphics.api.opengl... data_range or pixel_buffer ... GL_BGRA, GL_FLOAT, NULL); Then I create the buffer: m ... Now on every new frame: void * pboMemory = glMapBuffer(GL_PIXEL_UNPACK_BUFFER ... glCopyTexSubImage2D - comp.graphics.api.opengl... define the minimum pixel format requirements we will need for our pbuffer // a pbuffer is just like a frame buffer, it can ... not to be mistaken with float ... glReadPixels question - comp.graphics.api.opengl... read the color triplets (that's it, each pixel has three values ... Image processing the frame buffer under OpenGL - comp ... Framebuffer grab problem using glReadPixel ... Speed-up the reading of large binary files with complex structures ...... Apparently there is an 8-byte float, followed by a 1 ... But if you mean that you simply grab the original ... use of Matlab fid=fopen('Myfile.bin','r') Buffer ... pbuffers - comp.graphics.api.opengl... GL_ARB_multisample GL_EXT_packed_pixels GL_EXT_pixel ... mask so is pbuffer not supported iy my system? frame ... now... a DMA transfer?... trying to get a scaled grab of ... How to write RGBA image - comp.soft-sys.matlabImage processing the frame buffer under ... vp.w,vp.h,GL_RGBA,GL_FLOAT,img ... you to convert the gray level value to RGBA and write into 'image'. Loop over every pixel ... Grabbing float pixel values (from frame buffer)? - comp.graphics ...Is it possible to get the pixel values (frome the frame buffer?) as float values (in the range of 0..1) in some way? I have an application where g... Using glReadPixels to read the depth buffer... of the first pixel that is read from the frame buffer. ... DEPTH_COMPONENT,GL_FLOAT, pixels); You're confusing pixel ... how to fill a buffer you supply with values. > ... 7/22/2012 8:39:09 PM
|