Forum

Urgent! Video Calibration

I have a multi touch input. i need to do the following on an extremely short time schedule. F

  1. draw a grid of points called up by typing a hotkey
    2.make it so that where the user touches on the grid is the same location on the video from the camera.

I have attached my current patch. Basically, i need a way to adjust what the camera is seeing. I currently have a mouse control program written in processing. the further i get to the edges of the screen, the more distortion there is between where the cursor is and where my finger is. i need to correct the video somehow. I really appreciate your quick response. I have a science fair this thursday, and i need to have this part working before i can move on.

Thanks

Matt

your patch is missing.

i attached a rough .fx i have in the works, that is helping me in a similar setup. the ‘Deform’ input does a spherical undistortion of the videoinput to get rid of the lens-distortion. this is rather a manual approach than a scientific so i hope it fits.

additionally the .fx can erode/dilate/mean your input pixels which should help cleaning the image before feeding it into the contour-tracker.

Morphology.fx (5.8 kB)

here is the patch, sorry

updated patch.v4p (37.9 kB)

i could not get it to work. atached is the updated patch with the morphology in use.

would there be a way to do what i want to do with a grid, and transforming it, or not easily?

update.v4p (39.5 kB)

nevermind, i was just missing a grid. let me play some.

i messed with all of the settings and the different modes, and still no luck. attached is the most recent patch

thanks for the help

Copy of update.v4p (39.5 kB)

good shader joreg, i like the noise reduction…

ok. so attached is the Morphology.fx in use. put the patch in the same directory as the .fx before opening it.

i forgot to mention that you need a Grid with a resolution of about 10x10. undistortion is done via texture-coordinates in the vertexshader.

right. erode/dilate/mean are for noisereduction. usually one would like to first erode and dilate afterwards for best results. but this is not possible within one pass. therefore i am stuck with dilate only for now and have quite good results.

‘mean’ is similar to the contournodes ‘cleanse’ pin.

MorphologyTester.v4p (5.8 kB)

i got it to work as a combination of tweeking my processing code and also your distortion setting. Is there a way that I can physically manipulate the video, as if it were a piece of fabric, and bunch it up in some places, and tighten it in others, to make it so that what the camera sees and what the screen is displaying are in the same exact position?

of course you can do something like that.

\girlpower+ Dynamic Mesh\MeshEditor Sample.v4p
should help you get started. instead of the teapot you take a grid.
like this you can move the points of a grid individually.

how do i convert my video into a grid? i understand that i need to replace the teapot with my video input, and then take the renderer output and make that my video. Could you embelesh further, or just add it to the latest patch that i uploaded for me?

Either or, I really appreciate the help.

VVVV Rocks

plz help someone.

as a first step apply your video texture to the teapot. then replace the teapot with a grid.

how do i go from either video or texture to a mesh, like the tepot is?

you don’t get from a texture to a mesh, you map a texture onto a mesh. just begin a connection from your texture output, you will see where to connect.

i click on mesh input, and then i look, and on video texture, there is no highlighted box. please feel free to change the demo patch listed above to use video input sent to video texture, instead of a teapot. then post it so that i can see what you are talking about…

thanks.

please read my posts carefully. if i said begin a connection from your texture output and you write you began it at the mesh input, you’v got something wrong… thats just for the record.

if i understand you right, you’ll see in the patch how to switch between the teapot and a grid.

meshswitch.v4p (4.6 kB)

now how do i substitute this in to the deform mesh program. I want to be able to adjust video like a grid as i stated above.

voila.
attached you find a simple demo to deform a videoinput based on a grids points.

i took the:
\girlpower+ Dynamic Mesh\MeshEditor Sample.v4p
and made only some minor modifications.

GridDeform.v4p (15.7 kB)

excellent patch joreg, its just what i needed. The only problem i am having is that the grid is bieng detected as points by the contour method. How can i avoid this. i could change by difference textures from before to after the constant, but i would rather not loose those points on the touch screen.

Thanks for all of your help.