8 bit RGB values in colorized xyzRGB-file

613 views
Skip to first unread message

Gustaf Peterson

unread,
Apr 9, 2014, 2:49:58 AM4/9/14
to last...@googlegroups.com
I am trying to colourise a las-file from an orthophoto and the export it as an ASCII-grid (xyzRGB). This works fine but the RGB values it returns are 5 digits which i guess is 32 bit (?). The program I am loading the data into (GeoVisionary) needs it to be 3 digits (0-255), is it possible to ask las2txt or lascolor to do that? 

Martin Isenburg

unread,
Apr 9, 2014, 3:04:13 AM4/9/14
to LAStools - efficient command line tools for LIDAR processing
Hello Gustaf,

unfortunately you do not provide enough information for me to properly answer your question. It is always helpful (and I use this opportunity to remind anyone asking a question) to include the exact command line you are using as well as the console control output (use '-verbose') of the tool you are running. Also a lasinfo.exe of the LAS/LAZ file before and after processing is always helpful.

You have two options, one good, one bad.

GOOD: transform RGB down to 8 bits when converting to ASCII as documented here:

D:\lastools\bin>las2txt -h
[...] 
Transform RGB colors.
  -scale_rgb_down (by 256)
  -scale_rgb_up (by 256)
[...]

BAD: use option '-dont_scale_rgb_up' when creating colored LAS/LAZ that is documented below. It is bad because it creates a LAS/LAZ file that is not specification conform.

D:\lastools\bin>lascolor -h
[...]
LAStools (by mar...@rapidlasso.com) version 140403 (academic)
usage:
lascolor -i in.las -image ortho.tif -o out.laz
lascolor -i in.laz -image ortho.tif -dont_scale_rgb_up -odix _rgb -olaz
lascolor -i in_rgb.laz -image ortho.tif -zero_rgb -odix _new -olaz
lascolor -h

Regards,

Martin @rapidlasso


On Wed, Apr 9, 2014 at 8:49 AM, Gustaf Peterson <peterso...@gmail.com> wrote:
I am trying to colourise a las-file from an orthophoto and the export it as an ASCII-grid (xyzRGB). This works fine but the RGB values it returns are 5 digits which i guess is 32 bit (?). The program I am loading the data into (GeoVisionary) needs it to be 3 digits (0-255), is it possible to ask las2txt or lascolor to do that? 

Veldman, Edgar

unread,
Apr 9, 2014, 3:04:21 AM4/9/14
to last...@googlegroups.com

Gustaf,

 

You want to add the following function:

 

Transform RGB colors.

  -scale_rgb_down (by 256)

 

Edgar

--

bobby riley

unread,
Jun 19, 2014, 11:27:31 AM6/19/14
to last...@googlegroups.com
Good morning Gustaf,

Was your lascolor issue ever resolved?  I tried lascolor.exe 4 ways and got the same result each time.... 5 digit RGB values.  The image referenced in the commands below have three 8bit bands.

lascolor -v -i ground.las -image B000067.tif -o ground_RGB_67_down.las
lascolor -v -i ground.las -scale_rgb_down -image B000067.tif -o ground_RGB_67_down.las
lascolor -v -i ground.las -scale_rgb_up -image B000067.tif -o ground_RGB_67_up.las
lascolor -v -i ground.las -zero_rgb -image B000067.tif -o ground_RGB_67_zero.las

Thks,
Bobby

Reply all
Reply to author
Forward
0 new messages