Forums > MaxMSP

cornerpin with corner inside the plan ?

Apr 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, 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

Apr 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. --

Apr 16 2014 | 7:21 am

You have several possibilities. For example:

– use [] – 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 [] 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 ;-)

Apr 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 :

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 :


  • This reply was modified 2 years by  yopla.
Apr 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 objects are here :

  • This reply was modified 2 years by  yopla.
  • This reply was modified 2 years by  yopla.
Apr 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 2 years by  yopla.
Feb 26 2015 | 7:13 am

Cool stuff!Helpful for my project (calibrating a camera pointing to a rat table) but the final product will run on windows :( Any recommendations for the getPerspective & perspective externals for windows?

  • This reply was modified 2 years by  karolosg.
Mar 09 2015 | 2:00 pm

Hi karolosg
have a look here :

Mar 10 2015 | 2:23 am

Thanks for the input! I used another approach without matrix manipulation but I will check it for future reference!

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

Forums > MaxMSP