Re: using a pixel shader for undistorting an image?



Giff,

Sounds like you already got the difficult part out of the way:
calibration. How did you get the mappings between distorted and
corrected image-pixels? This is what you plan to use as a lookup table
on the GPU right?

I wonder if just resampling a 640x480 image interactively when the
pixel transforms are given is too computationally intensive to move to
GPU. If it is a just-for-fun project, cool. But GPUs would be best at
handling large streams of data and apply the same operation on to a
bunch all at once. In this case, the only such operation I see is to
resample based on a lookup table. Sounds easy enough. I have come
across using lookup tables for interactive manipulation of optical
properties of primitives for volume rendering, and this one sounds
along the lines. Good luck!

P.



On Apr 12, 3:19 am, "Giff" <Giffn...@xxxxxxxxx> wrote:
On 12 Apr, 11:46, Harris <xgeorg...@xxxxxxxxxxxxx> wrote:



The problem you are describing is generally known as "camera calibration"

Not exactly, maybe I was not clear enough. I already did the
calibration, now I need to use the results of it to undistort the
images coming from the camera, I know how to do this in C++, what I
want to do is to move this computation onto the GPU, using a pixel
shader.

I think I have a clue on how to do this: in the initialization process
I will create a texture containing, for each pixe, the destination of
that pixel in the undistorted image (or probably just the offsets in
the x and y directions). I will then pass this texture to the pixel
shader and use it to sample the right pixel.

Thanks for your reply anyway.


.



Relevant Pages

  • Re: Image scaling (sign taken from a Pc Pen)
    ... Min/Maxfunctions) so as to not overflow since each pixel is represented as a byte with a 0-255 range. ... than the main image processing loop need only query the lookup table for the corresponding range adjusted value rather than having ... the method to produce the LUT is increased. ...
    (microsoft.public.vb.winapi.graphics)
  • Re: code optimization help
    ... interpolation lookup table for speed. ... of pixels from the source image that contribute to the corresponding ... contribute to the output pixel. ...
    (comp.soft-sys.matlab)
  • Re: using a pixel shader for undistorting an image?
    ... calibration, now I need to use the results of it to undistort the ... images coming from the camera, I know how to do this in C++, what I ... want to do is to move this computation onto the GPU, using a pixel ... If you already have a working code in C/C++, perhaps you can just use a GPGPU library for exactly ...
    (sci.image.processing)
  • Re: Using OpenGL GLSL without visible window
    ... Fungus, please ... GPU on the market has about twice that (48 shaders ... using pixel shaders is an example of just such a task. ...
    (comp.graphics.api.opengl)
  • Re: Newbie to Forums, SIMD question
    ... Peter Dove wrote: ... > for every pixel in order to apply a gamma value. ... To generate the lookup table (C code for a fixed 1001-entry table, ... This should leave you with a value of ~8-10 bits of precision. ...
    (comp.lang.asm.x86)