FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Video, Camera
(Moderator: REAS)
   JMyron (WebCamXtra)
« Previous topic | Next topic »

Pages: 1 2 
   Author  Topic: JMyron (WebCamXtra)  (Read 8334 times)
REAS


WWW
JMyron (WebCamXtra)
« on: Mar 18th, 2004, 10:41am »

The WebCamXtra for Director (started by Josh Nimoy) has been ported to Processing. It's currently available for OS X.
 
It is an open source library for motion detection, color tracking, glob distinction, and pixel addressing. It "aims to make computer vision easy and inexpensive for beginners and educators."
 
It's new and needs alot of testing. Please try it out!
 
More information can be found here:  
http://webcamxtra.sourceforge.net
 
 
Josh Nimoy

jtnimoy WWW Email
Re: JMyron (WebCamXtra)
« Reply #1 on: Mar 18th, 2004, 10:39pm »

Now it's available for PCs. Please test!
 
pyson

WWW
Re: JMyron (WebCamXtra)
« Reply #2 on: Mar 19th, 2004, 1:40am »

hi,
 
i've tried the examples on a mac (mac osx 10.2.8, 1GHZ powerbook) and it seems to run very slow almost 1 fps.  
 
i've tried the director examples as well and the performance is similar.
 
is the situation similar on a PC?
 
petros
 
Josh Nimoy

jtnimoy WWW Email
Re: JMyron (WebCamXtra)
« Reply #3 on: Mar 19th, 2004, 3:49am »

i have been hearing a lot of 1 fps reports. what about the "average" and "simple" examples? What camera are you using, and is it that slow in other Quicktime apps?
 
thanks
 
Josh Nimoy

jtnimoy WWW Email
Re: JMyron (WebCamXtra)
« Reply #4 on: Mar 19th, 2004, 3:59am »

Also try changing the code to 640x480 and 160x120 in those examples. Some cameras have been found to be more "comfortable" in certain dimensions but not others.
 
-j
 
19hrs

Email
Re: JMyron (WebCamXtra)
« Reply #5 on: Mar 19th, 2004, 5:45am »

great stuff!
 
but, just tried the examples in all resolutions mentioned above, the only res that runs smooth is 160x120.
never had any trouble with my webcam before..
 

19hrs!
http://newsnewsnewsnews.net
pyson

WWW
Re: JMyron (WebCamXtra)
« Reply #6 on: Mar 19th, 2004, 2:04pm »

i've tried different resolutions but still get the same 1 fps. i havent been lucky on 160x120 either.
 
i'm using an isight camera, and i don't have this performance problem when  using the video processing library that comes with processing.
 
what i observed is that it doesn't slow down the performance of the applet. i presume that jmyron runs on a separate thread.
 
petros
 
kentaro

WWW Email
which webcam for mac?
« Reply #7 on: Mar 22nd, 2004, 8:58am »

Hi List,
 
I was wanting to ask what kind of webcam you guys use on macintosh.
 
On my WinXP, Processing67 and JMyron seem to work fine, (well java window frezes on quit but..)
 
For my mac panther/powerbookG4-400
I tried logitec quickcam express on mac with webcam driver for osx, from source forge (http://webcam-osx.sourceforge.net)
It picks up the camera from mac cam application fine,
but from Processing, it just freeze. (no java window)
 
I suppose I should be using iShight, but it's very expensive in new zealand..
 
Thanks.
 
michael05

WWW
Re: JMyron (WebCamXtra)
« Reply #8 on: Mar 22nd, 2004, 10:35am »

my old quickcam workes fine with processing. is use the macam driver too. but the framerate is low and the colors are bad.
 
do you use the quicktime component fix for the driver? the 0.8 version did not work on my powerbook in processing first, too. there was a hint at versiontracker to use this one:
http://www.macosx.nl/~jorisw/macam0.8-fixed.zip
(http://versiontracker.com/dyn/moreinfo/macosx/13065&vid=101119)
drop the .component in /Library/Quicktime
 

°°°°°°°°°°°°°°°°°°°°
http://www.m05.de
pyson

WWW
Re: JMyron (WebCamXtra)
« Reply #9 on: Mar 24th, 2004, 12:30am »

has anybody tried jmyron on a mac? i get very low frame rate on all the examples that come with jmyron (1fps or even low). i know a friend of mine tried it on a pc where he gets a very good frame rate around 25fps.
 
my configuration if processing 68, powerbook 1ghz. mac osx 10.2.8, isight.
 
btw when i try similar code using the video processing library that comes with processing i don't have this performance problem.
 
thanx
petros
 
sspboyd


Re: JMyron (WebCamXtra)
« Reply #10 on: May 18th, 2004, 9:09am »

Quote:
has anybody tried jmyron on a mac? i get very low frame rate

I just tried it out this evening with my PbTi 667, 10.3.3, Sony DCR-TRV11 and the frame rate is very good, even at 800x500.
 
steve
 

gmail.com w/ sspboyd username
sspboyd


Re: JMyron (WebCamXtra)
« Reply #11 on: May 18th, 2004, 9:30am »

I am playing with some of the demo code included with JMyron.
What exactly does differenceImage do? Does it return only the pixels where change has occurred? Is it cumulative frame to frame? In testing the demo programs it seems to leave lots of red green and blue colour splotches on the screen.
 
I am trying to learn this for a video installation project and I'm not sure if JMyron is overkill or not.
 
I am looking for a way to analyze a video feed in a 10x10 grid for change beyond a nominal threshold. So for example if I wave my hand around in the upper left corner of the camera's field of view, the grid sections in the upper left will indicate that a change has occurred in those sections.
 
From looking at the documentation I think I need to use adapt, adaptivity, differenceImage and average (maybe retinaImage too but Im not sure). I don't think I need globs because I don't really care what the motion is, I just want to know if a significant degree of change has occurred to the pixels in each grid section.
 
Any feedback is appreciated.
 
Thanks,
steve
 

gmail.com w/ sspboyd username
sspboyd


Re: JMyron (WebCamXtra)
« Reply #12 on: May 20th, 2004, 9:58pm »

After much futz'ing around and help from Sprak, I managed to get what I was hoping for. I still don't know what adaptability would be useful for and Im not positive Im using average()'s parameters correctly but it seems to be working.
 
Is there a faster way of doing this? Im pretty happy with the speed so far (loops are generally around 100-115ms) but maybe there's a better way?
 
steve
 
Code:
// Test sketch
// motion detect and highlight areas of motion based on 40x40 grid
 
JMyron m;//a camera object
// the following vars are:
// screen dimension, grid dimension, tile dimension, timer vars, temporary counter var
int dimX, dimY, gx,gy,tileW,tileH, now, then ,looptime, tmpC;
float gSense; // sensivity of the motion detection
void setup(){
  dimX=320; dimY=240;
  gx=40; gy=40;
  tileW=int(dimX/gx); tileH=int(dimY/gy);
  size(dimX, dimY);
  m = new JMyron();//make a new instance of the object
  m.start(dimX,dimY);//start a capture at 320x240
  m.update();
  //m.adaptivity(2); // this just screws things up
  m.adapt();// immediately take a snapshot of the background for differencing
  println("Myron " + m.version());
  tmpC=0; // intialise counter
  gSense=50; // set motion sensitivity
  stroke(200); // set stroke colour
  noFill(); // set noFill
  now=then=0; // how very zen like!
}
 
void loop(){
  then=now;
  now=millis();
  looptime=now-then;
  m.update();//update the camera view
  m.adapt();// immediately take a snapshot of the background for differencing
  int[] img = m.differenceImage(); //get the normal image of the camera
  for(int i=0;i<width*height;i++){ //loop through all the pixels
    pixels[i] = img[i]; //draw each pixel to the screen
  }
 
  // Test entire screen for brightness first before testing each section to
  // determine if anything has changed (hopefully will save some time)
  ////// Note: This extra step doesn't seem to be saving any time (if anything
  ////// it appears to make it take longer, weird).
  //////
  /*
  float imgB=brightness(m.average(0,0,dimX,dimY)); // get the entire screen brightness
  if(imgB>gSense){
    //tmpC++;
    //println("Motion #"+tmpC+" brightness="+imgB);
    */
    for(int y=0; y<gy; y++){
 for(int x=0; x<gx; x++){
   int xLoc=x*tileW; int yLoc=y*tileH;
   // I am unclear from the documentation which vars I should be using for  
   // m.average() It looks like it is working correctly so I assume I've  
   // got it right.
   if(brightness(m.average(xLoc,yLoc,xLoc+tileW, yLoc+tileH))>gSense){
     rect(xLoc,yLoc,tileW,tileH);
   }
 }
    }
  }
 
  void mousePressed(){
    // m.settings();//click the window to get the settings
    // println(brightness(m.average(0,0,dimX,dimY)));
    println("last loop time was "+looptime);
  }
  public void stop(){
    m.stop();//stop the object
    println("last loop time was "+looptime);
  }
 

gmail.com w/ sspboyd username
patrik

WWW
Re: JMyron (WebCamXtra)
« Reply #13 on: May 21st, 2004, 2:00pm »

Hi,
 
can JMyron track individual objects without knowing anything about their color?
 
Can't figure out if the glob detection is always based on color or if it can be used with a reference image (the retina image i think it's called with JMyron)
 
Can someone clear this up for me? Thanks!
 
mudpub

mudpubnet WWW
Re: JMyron (WebCamXtra)
« Reply #14 on: Jun 3rd, 2004, 11:11pm »

on Mar 24th, 2004, 12:30am, pyson wrote:
has anybody tried jmyron on a mac i get very low frame rate on all the examples that come with jmyron (1fps or even low).

 
i'm having the same problem...i get about 1fps with an iSight cam and 1.33Ghz powerbook. same thing on a dual 1Ghz powermac G4. has anyone had any success with the iSight and JMron and if not, what mac compatible webcams have you had success with
 
-tak.
 

mudpub.com / mudcorp.com / yale university school of art
Pages: 1 2 

« Previous topic | Next topic »