PDA

View Full Version : 2d Warping.



artur
04-26-2000, 07:51 AM
Hello !

Forgive my English , please !

I'm developing a program to make deformations
(warping) on images. Speed is very critical for me. So , I want to know if the OpenGL and
hardware accelerators can help me .

What you think ?

Artur Correa

artur@ig.com.br

john
04-26-2000, 05:20 PM
Yes, it can. There's an example around the place about distortion. Its included with the Irix distribution on SGIs, but its likely to be around here, somewhere.

The trick is to render the frame to the back buffer, copy the image to texture memory and render a distorted polygon mesh. The mesh should be configured so the texture parameters and verticies point to the distorted and undistorted points. (Which way is better? who knows? ;-)

Hope this helps,

cheers,
John

artur
04-27-2000, 04:59 AM
Originally posted by john:
Yes, it can. There's an example around the place about distortion. Its included with the Irix distribution on SGIs, but its likely to be around here, somewhere.

The trick is to render the frame to the back buffer, copy the image to texture memory and render a distorted polygon mesh. The mesh should be configured so the texture parameters and verticies point to the distorted and undistorted points. (Which way is better? who knows? ;-)

Hope this helps,

cheers,
John

=============================================
Thanks for your response!

I must to study more and more about OpenGL after all. Your help was very useful.

I will buy a 3D Board in brief . So , I
will start the work !

john
04-27-2000, 03:23 PM
Howdy,

glad to hear it. ;-) actually, my honours project last year was on this sort of thing. well, a part of it involved distorting the frame buffer. I maybe even have some really old demos of the distortion if you're interested in it. No, i lie: I _do_ have a glut-based demo. If you want me to send it to you to see how I distort the frame, let me know.

cheers
John

artur
04-28-2000, 03:27 AM
[QUOTE]Originally posted by john:
[B]Howdy,

I'd like to receive your examples, In order to examine it !

I'm very grateful

Same aspects of my project:

I'm Working in a Digital video workstation , for medical application.

Look this http://www.sismed.com.br/isi.htm

By this time , I'm improving the system with the digital subtraction resource:

1) My system captures a continuation of frames , that shows the patient's heart.
(the coronary blood vessels)in animation .

2) The Doctor chosses a frame (normaly the first) like a "mask"

3) The digital subtraction system makes the animation , by subtracting each
frame from the masc. So , we can see only the contrasted vessels , because
the first frame don't have contrasted vessels.

This technique is used to eliminate indesired objects, like Bones.

The problem is: The patient's movement cause the dislocation of the frames
relating to the masc. So , the result of the subtraction became shadowed.

The Warping of the masc is a tool pointed to help in dis case. The idea
is to readapt the masc to each frame of the animation. I know that I will need
an automatic generation of the meshes , but that is another problem...

Artur Correa
arturapps@ig.com.br

rangers99
03-04-2002, 05:18 PM
Anyone tried implementing McMillans image warping algorithm in OPenGL. ie. Given one image, create a new one from a nearby viewpoint.

Tried various ways of implementing it and getting garbage. Im new to OPenGL so maybe thats the reason. Or maybe Im just thick.