Detecting range proximity to screen

Nov 6, 2008 at 12:47pm

Detecting range proximity to screen

Hello I am trying to do a video piece in wich the distance of the viewer from the screen will trigger 3 sounds, I tried several ways I was trying with arduino and a sonar sensor but the readings of the(multiples) sonar where no consistent and did not cover distance enough for (soft objects) people.
After this I was trying to do it with a camera and positioning the camera on top of the screen and reading the height and trigger a sound depending on the height reading.(for that I was using an example of this list that was using background substraction, I am still learning jitter), i thought this was the best method to detect short distance when you cannot control the whole room.
My problem is that I would like to achieve the same thing without the background substraction to just make it work easier in any type of enviroment.
Basically I would like to be able to cut the screen capture in 3 horizontal spaces, and make each triger a different sound, being the top the one wich cancels the rest and the second will cancel the first.
I was going a litle bit crazy trying to achieve this, and I really appreciatte if somebody could post an example of something similar to this.
thanks.

#40701
Nov 6, 2008 at 6:16pm

maybe something like this…

– Pasted Max Patch, click to expand. –

hope this helps point you in the right direction

#144237
Nov 7, 2008 at 7:12pm

Hello I just saw your patch just now, thank you very much for the help it means a lot, sometimes trying to figurate everything by yourself is really difficult.
I did not have time to study it I am going to do it right now, one thing is I was thinking to split the screen in horizontal lines instead of vertical ones. Just from when I open it I had the impression that i could fix that changing the 3 jit.submatrix dimensions and offset.and also in the p lcdDrawing, Am I correct about this?.
I notice that in the lcddrawing patch the framerect numbers are the same than the offset numbers in the jitsubmatrix but the dimensions numbers are different I would try to check in jitsubmatrix help and in jitLcd help to see if there is a difference there.
thanks again for the help.

#144238
Nov 8, 2008 at 1:58am

you got it. just be careful about the numbers… submatrix and lcd have different ways of defining size and location as you already noticed!! I think the help files will be your friends on this one.

I would be interested to see what you come up with so keep posting patches and ask questions!!

#144239
Nov 8, 2008 at 9:45am

thanks a lot for your help,

#144240

You must be logged in to reply to this topic.