We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Blue video from iSight-camera? (Read 1004 times)
Blue video from iSight-camera?
Mar 25th, 2006, 9:18am
 
Hi!
I'm very new to Processing and have been experimenting with the webcam-examples on my iMac with built-in iSight.
The examples seem to work so far, but the captured images are always very blue, just like a grayscale-image painted blue Smiley
Did anybody experience the same problem? Any help is really appreciated!
I use Mac OS X 10.4 btw and the iSight works in other applications without problems.
Thanks!
Re: Blue video from iSight-camera?
Reply #1 - Mar 25th, 2006, 7:51pm
 
are you on an intel mac?
Re: Blue video from iSight-camera?
Reply #2 - Mar 26th, 2006, 10:33am
 
Yes, I forgot to mention that. It's the new 17"-Intel-iMac with the default configuration.
Re: Blue video from iSight-camera?
Reply #3 - Mar 27th, 2006, 12:26pm
 
ok, i just discovered that the issue is already mentioned in this thread http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Collaboration;action=display;num=1137337064 so i guess i'll just have to wait until there's a fix before i can really use this library, but as it seems, there are a lot of other things to play with in processing...
Re: Blue video from iSight-camera?
Reply #4 - Mar 27th, 2006, 1:11pm
 
You can probably fix the image manually using CapturedImage.pixels[]

e.g. if the problem is that the cam is returning RGBA but  is expecting it to be ARGB:

Code:
for(int i=0;i<capturedImage.pixels.length;i++)
{
int tmp=capturedImage.pixels[i];
int low=tmp&0x000000FF;
capturedImage.pixels[i]=((tmp&0xFFFFFF00)>>8)+(low<<24);
}


if it's ARGB but expected to be RGBA then:
Code:
for(int i=0;i<capturedImage.pixels.length;i++)
{
int tmp=capturedImage.pixels[i];
int high=tmp&0xFF000000;
capturedImage.pixels[i]=((tmp&0x00FFFFFF)<<8)+(high>>24);
}

Re: Blue video from iSight-camera?
Reply #5 - Mar 27th, 2006, 3:45pm
 
k, now tracking this bug here:
http://dev.processing.org/bugs/show_bug.cgi?id=313

should have it fixed sometime soon, or at least a workaround if it's apple's fault.
Page Index Toggle Pages: 1