Re: new Wiki File

"fransklip" <[email protected]>
Newsgroups gmane.comp.cybernetics.webot.contest
Message-ID <[email protected]>
Hi Dominic,

A small correction for the description with camera_get_image:

"
To retrieve the red value use: image[i] & 0xff0000 To retrieve the
green value use: image[i] & 0x00ff00 To retrieve the blue value use:
image[i] & 0x0000ff 
"

For green and blue you need to mask of the higher color bits, so use:
 green => image[i] & 0x00ff00 
 blue  => image[i] & 0x0000ff 

To get values from 0..255, you need to do some bitshifting too:
 red   = (image[i] & 0xff0000)>>16
 green = (image[i] & 0x00ff00)>>8 
 blue  =  image[i] & 0x0000ff 


Frans / Kimaita

--- In [email protected], "djp79u" <d.j.price@n...> wrote:
> Hi all,
> 
> I have written a more extended API for the controller functions ,
> hopefully this should be clearer than flicking between the webots api
> and the list of available java functions.  If there are any
> inaccuracies let me know.
> 
> Dominic


------------------------ 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
---------------------------------------------------------------------~->

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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.