Re: Problem with camera
"raoul schmidiger" <[email protected]>
| Newsgroups | gmane.comp.cybernetics.webot.contest |
|---|---|
| Message-ID | <005d01c3df61$20465d90$016ffea9@leih3> |
do you have hotmail messenger. if so, i am new under [email protected] ----- Original Message ----- From: David Weber To: [email protected] Sent: Tuesday, January 20, 2004 2:50 PM Subject: Re: [webots-contest] Problem with camera hi all i found the solution to my problem i tried to get the int-array of the camera twice and it seems that this gets corrupt data i invoked twice: image = camera_get_image(camera); and even the first data was corrupt ... when i invoke it only once then the data is correct greetz david ----- Original Message ----- From: "David Weber" <[email protected]> To: <[email protected]> Sent: Monday, January 19, 2004 10:20 PM Subject: [webots-contest] Problem with camera > hi all > > i've got a problem with the RGB values i get from the camera > and i don't see the problem ... > > -------------------------------------------------------------------------- -- > --- > > int camera = robot_get_device("camera"); > > camera_enable(camera,64); > > int[] image = camera_get_image(camera); > > for (int z =0 ; z < image.length; z++) { // z is the same as (x > + y * width) > > int pixel = image[z]; > > int r = (pixel>>16)&0xFF; > int g = (pixel>>8)&0xFF; > int b = pixel&0xFF; > } > > -------------------------------------------------------------------------- -- > --- > > i tried it in various time steps and it always gets the same values ... > most of those rgb - values are black and some of them are kind of green or > blue > > any ideas ? > > greetz david > > > > > > Yahoo! Groups Links > > To visit your group on the web, go to: > http://groups.yahoo.com/group/webots-contest/ > > To unsubscribe from this group, send an email to: > [email protected] > > Your use of Yahoo! Groups is subject to: > http://docs.yahoo.com/info/terms/ > > > > Yahoo! Groups Sponsor ADVERTISEMENT ------------------------------------------------------------------------------ Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/webots-contest/ b.. To unsubscribe from this group, send an email to: [email protected] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.