CPU Problems when running Multiple Videos

Dec 19, 2011 at 7:27pm

CPU Problems when running Multiple Videos

Hi,

I am new to Jitter and I am currently building a patch thats tracks different coloured snooker balls on a snooker table and triggers audio samples, I have used the Jitter tutorials and a few of the past post’s on the forum to build the patch but i have ran into CPU problems when tracking 7 different colours. I have had to use 7 different jit.findbounds objects as i was unable to achieve the results i wanted with running the whole patch off one. I have posted my patch below and would appreciate any advice any has on it.

Thanks

Dave

#60765
Dec 19, 2011 at 7:31pm

Could not get my patch to copy so i have uploaded it here.

Attachments:
  1. v2.2Working.maxpat
#218674
Dec 21, 2011 at 2:14pm

Hi

(don’t look to your patch…. no Max here)

I’ve made an similar work last year for school.

I had the same CPU problem… I have used 3 computer (1-Filming & processing, 2-Creating realtime music, 3-Calculating projections to table)

How I’ve solved the problem:

Detection made step by step
- detect end of motion
- detect diference from empty table still image(result all the balls)
- mask the balls
- use mask of 1st ball to “median” the RGB
- use mask of 2nd ball to “median” the RGB
- …etc… till the last ball
- use that information to identify all the balls
- detect movement
- repete again…

Then the XY position of every ball was sended to the other computers… they know what to do with it!

Every step unlug the video feed to the last one… this was the best solutins to reduce CPU comsumption. This also mean that I can’t use two processes at the same time. Every step makes the computer to run more than 60%.

I’ve gave up to detect colors in real time…. It’s possible if you have an time machine to buy an future computer, or you need to program C and make your own Operative System…. (just to do that)… or Cycling kills QuickTime based Jitter… thats the main problem.

Sorry my bad english and hope I’ve helped somehow!

#218675
Dec 21, 2011 at 2:21pm

Hello again.

Don’t make the color detection by comparing with an RGB data base, but by comparing the balls with each other.
It’s easier
- “the higher Blue value must be the blue ball”

Yellow, green and red
- “IF RG it’s similar = yellow IF NOT Red or Green”
- “If R>G then Red ELSE Green”

You know….

#218676

You must be logged in to reply to this topic.