Forums > MaxMSP

cornerpin with corner inside the plan ?

April 10, 2014 | 3:12 am

Hello forum,
i wonder if there is a way to make a cornerpin by moving corners wich are inside the plane. The same transformation as jit.gl.cornerpin, but the corners could be anywhere we ask on (or outside) the plane…

it could be usefull to make soft edge and warping, overlap-overlaying, when some corners of the plane are out from the window… so we can still see them

there maybe a way with cv.jit.findhomography and cv.jit.perspective


April 16, 2014 | 6:41 am

little up,

nobody is intersting with corner inside of the plane or am I alone having problems with corners outside of the screen ?
do you think is it only possible ?
is it possible to extract the homography, or appling a scale of the current ?

i tried this way, but the corners are not hang on the texture when i multiply there coordinates…
thanks, it could be really useful

– Pasted Max Patch, click to expand. –

April 16, 2014 | 7:21 am

You have several possibilities. For example:

- use [jit.gl.mesh] – create a matrix with coords of points (you may use even more complicated shapes with this method) and change matrix vals to control position and shape of your shape

- use [jit.gl.sketch] in similar way

- use tex_map, text_s… etc. to put the texture in position you want to

Actually I have a ready-made patch doing this job somewhere in my archives… I can find it later ;-)


April 16, 2014 | 8:13 am

thanks yaniki for your answer,
but are you sure that it is possible to keep homography with theses ways ?
the goal is to make perfect overlaying of two images (from 2 differents videoprojectors) by placing some dots of the first image on the second image..
But moving points inside of the images, in order to be able to do this even if the borders of the images are out of the screen.

i think it’s possible with only 3 points as they said in this paper :

http://kiq.li/1Wz

but since cornerpin makes homography, i hope it’s possible to warp a texture with it…
i also remind flockvision toolkit with a sticher algorythm wich warp a plane from several points :

http://cycling74.com/forums/topic/announce-flock-vision-toolkit-for-maxmspjitter/

cheers

  • This reply was modified 3 months by  yopla.

April 23, 2014 | 10:23 am

youhou, i got it !
i know, it’s still dirty…
thanks to Antoine Villeret for the cv.jit.findhomography and cv.jit.perspective :o)

– Pasted Max Patch, click to expand. –

new jit.cv objects are here :

http://sourceforge.net/projects/avjit/files/cv.jit_OSX_v1.7.3-beta.zip/download

  • This reply was modified 3 months by  yopla.
  • This reply was modified 3 months by  yopla.

April 24, 2014 | 4:43 am

ok that’s better :
with pattr recall and possiblity of changing source points several times while keeping the transformation

edit : new patch without some bugs

– Pasted Max Patch, click to expand. –
  • This reply was modified 3 months by  yopla.

Viewing 6 posts - 1 through 6 (of 6 total)