I have a multi touch input. i need to do the following on an extremely short time schedule. F
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.
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.
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.
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?
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?
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…
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.