Re: using a pixel shader for undistorting an image?
- From: Harris <xgeorgiou@xxxxxxxxxxxxx>
- Date: Sat, 14 Apr 2007 00:08:20 +0000 (UTC)
"Giff" <Giffnews@xxxxxxxxx> wrote in
news:1176373177.376232.41730@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
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.
Sorry, my mistake then....
If you already have a working code in C/C++, perhaps you can just use a GPGPU library for exactly
than purpose. The most generic way to do it, of course, is to use a pre-compiler toolkit like BrookGPU
that makes the task of shader programming much much easier when it comes to GPGPU routines.
Take a look at SourgeForge - there are some very interesting projects related to SIMD and GPGPU
programming. I plan to test some of them myself to see how they can be used in heavyweight
processing algorithms (signal processing and pattern recognition).
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.
Yes, this this the main idea in geometric corrections. The main problem is how to code a fast and
straight-forward implementation, preferrably SIMD-compatible, so that the spatial-dependent
transformations can be executed as fast as possible. I think you can find some conference papers on-
line from various game companies (mostly related to FPS game engines like Unreal) that describe
some of the latest features of shader technology, including on-the-fly "lens" effects (the inverse of
which is very similar to what you are trying to do).
Good luck :-)
--
Harris
.
- Follow-Ups:
- Re: using a pixel shader for undistorting an image?
- From: pixel.to.life
- Re: using a pixel shader for undistorting an image?
- References:
- Prev by Date: Re: using a pixel shader for undistorting an image?
- Next by Date: Re: using a pixel shader for undistorting an image?
- Previous by thread: Re: using a pixel shader for undistorting an image?
- Next by thread: Re: using a pixel shader for undistorting an image?
- Index(es):
Relevant Pages
|