cornerpin with corner inside the plan ?

yopla's icon

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

yopla's icon

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 ?

Max Patch
Copy patch and select New From Clipboard in Max.

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

yaniki's icon

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 ;-)

yopla's icon

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 :

cheers

yopla's icon
Max Patch
Copy patch and select New From Clipboard in Max.

youhou, i got it !
i know, it's still dirty...
thanks to Antoine Villeret for the cv.jit.findhomography and cv.jit.perspective :o)new jit.cv objects are here :
http://sourceforge.net/projects/avjit/files/cv.jit_OSX_v1.7.3-beta.zip/download

yopla's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

edit : new patch without some bugs

karolosg's icon

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?

yopla's icon

Hi karolosg
have a look here :
http://hons.at/software/

karolosg's icon

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