Re: Problem with camera
"David Weber" <[email protected]>
| Newsgroups | gmane.comp.cybernetics.webot.contest |
|---|---|
| Message-ID | <000b01c3df5c$6b7179d0$6d7ba8c0@aksamit> |
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 ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/pU_rlB/TM ---------------------------------------------------------------------~-> 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/