Anamorphic projection , how to ? frustum ? + face tracking gift

hi guys ,
first of all here is a zip with a face tracking exe i made with OpenFrameworks that send the position of your face to osc

i am trying to get this position to change the projection vanishing point , like this we would have a better feeling of 3d

i heard that it could be done with the function frustum in openGL

and the name of that technique is anamorphic

but i can find how to do it in vvvv

included it the patch a simple vvvv patch that changes the pitch and rool of the camera on the render
like this all the data and osc decoding are already made if you wana take a look

does anybody have any idea how to do this?

head tracking send (5.5 MB)

like the holotoy thing but with the head instead of the accelerometer

vvvv ships with facetracking btw (think it’s HaarTracker, maybe somebody else can remember the name?).
have a look at PerspectiveLookAtRect node for perspective matching with headtracking

it’s detect object, well the aproach quite easy you just have to connect position of your head to XY of an camera. Can be done quite fast with LookAt (Transform) and Perspective (TransformOfCenter). Think i got that one somewhere but not on that PC.

@ sugokuGENKI , thks , but are you sure there is some face tracking node in vvvv ? HaarTracker is a function of openCV , and i can t put my hand on it

if anybody has any idea where i can find this , i d be happy to take a look at that node ,

about PerspectiveLookAtRect , i am trying but i am not sure how to use it here
should i make a scene and then then render the whole scene on a quad with dxTexture , because it looks that PerspectiveLookAtRect as to be use on a quad at the end

thanks for the tip , it seems to works with lookat , but then i had to remove my camera , and all seems isometrical , so i guess that s the reason why i am supposed to use Perspective ,
but i got a question here , do i have to use the Perspective “offCenter” because actually the vanishing point is no more at the center?

cubedemo_5.v4p (24.5 kB)

the facetracker is called: DetectObject (FreeFrame DShow9) according to the OpenCV function it uses. it can detect different objects depending on the haartraining-data you give it.

and the two PerspectiveLookAt nodes both come with a helppatch. try to follow them…

ok , i didn t understool the first time , about the detectobject node thanks

i took a deeper look into creating the xml files but i got another question about this

if you wana detect 2d images , do you have to haartrain ?
the point of object detect is to haartrain on real 3d objects in different positions / lighting / environments onto >5000 pictures
(for example a cup , let s say sometimes you dont see the handle)

it seems that it would be missing the point of how much powerfull is this OpenCV method if we would train for 2d objects (like logos)

because if you get to track a 3d object , that has been train over thousand of files , you are expecting to find it on video fields and just get it :
x y and z coordinates

but then if there is a method to do the same on 2d objects , then you could also expect to extract the projection matrix from it

what do you think about it ?
should i open a new thread ?

i m still trying with PerspectiveLookAt nodes , but havn t got the idea how i have to deal with it yet … it going to take some time , i am doing too many things at the same time

thanks for pointing them out

can someone explain me what i am doing wrong with the perspective ?

i am trying to see a cube ,but the perspective is not looking like what i expect

facetraking (328.0 kB)

Without looking at your patch, I would guess you need the depth buffer turning on in your renderer…

Ah Ok,
I think it would be best to separate the perspective and lookat…

faceTT2.v4p (28.5 kB)

humm , thank for taking a look , but the result now is not what i am trying to do

i now have only one face of the cube visible , and it is following my face
that defeat the purpose of what i was trying to do

what i am trying to do is anamorphic =

keep the front face and the back face parallel (in z plan)
and have the front face to follow (in its plan , keeping // ) the opposite movement of my face (by point symmetry)
the back face shouldn’t be moving
basically i want to move the vanishing point of the scene

that s almost what i get in my experiment , but the back face is larger than the front face (so it looks strange because of the impossible perspective)
and both faces are moving

to add some info

Mediadog is doing it with perspectivelookatrect (transform-viewprojection)

video here

it seems i am getting closer

anamorph.v4p (16.6 kB)

Close, you just needed to connect the “View” and “Projection” pins of PerpectiveLookAtRect to your target renderer, and turn on depth buffering.

Slight mods to your patch. Enjoy!

anamorph.v4p (16.9 kB)

Oh, just noticed the Softimage camera wasn’t hooked up right. Look at this one.

anamorph.v4p (17.1 kB)

so cool , thanks MediaDog , i think i will be working on this from january , i have plainly of idea i never did cause i couldn t have this working

i ll keep you posted on my findings

one thousand times thank you !