Batch transform .fls to pcd using Cloudcompare

Discuss CloudCompare software here.
Post Reply
joysunny
I have made 10-20 posts
I have made 10-20 posts
Posts: 10
Joined: Fri Oct 15, 2021 2:50 pm
2
Full Name: Jing
Company Details: ETH Zurich
Company Position Title: scientific researcher
Country: switzerland
Linkedin Profile: No
Has thanked: 2 times

Batch transform .fls to pcd using Cloudcompare

Post by joysunny »

Hi everyone!

I am trying to batch transform hundreds of .fls files from Faro to .pcd files using the command line of Cloudcompare.

Code: Select all

cmd_list = [
    [str(CCPath),
     '-SILENT',  # no gui
     '-NO_TIMESTAMP',
     '-O', str(filePath),
      '-C_EXPORT_FMT', 'PCD',
     '-SAVE_CLOUDS'
     ] for filePath in file_list]
However, the above command will result in pcd files with the following fields: rgb x y z, while what I want is Intensity x y z. Does anyone know the command that allows me to keep Intensity rather than the RGB in the exported files?

Many thanks in advance!

Joy
badam
V.I.P Member
V.I.P Member
Posts: 916
Joined: Tue May 11, 2021 5:36 pm
2
Full Name: Adam Berta
Company Details: InnoScan 3D Hungary Kft
Company Position Title: unknown
Country: Hungary
Linkedin Profile: No
Has thanked: 52 times
Been thanked: 297 times
Contact:

Re: Batch transform .fls to pcd using Cloudcompare

Post by badam »

joysunny wrote: Fri Oct 15, 2021 4:12 pm Hi everyone!

I am trying to batch transform hundreds of .fls files from Faro to .pcd files using the command line of Cloudcompare.

Code: Select all

cmd_list = [
    [str(CCPath),
     '-SILENT',  # no gui
     '-NO_TIMESTAMP',
     '-O', str(filePath),
      '-C_EXPORT_FMT', 'PCD',
     '-SAVE_CLOUDS'
     ] for filePath in file_list]
However, the above command will result in pcd files with the following fields: rgb x y z, while what I want is Intensity x y z. Does anyone know the command that allows me to keep Intensity rather than the RGB in the exported files?

Many thanks in advance!

Joy
from command line wiki ther is an option to remove RGB from loaded clouds/meshes.

https://www.cloudcompare.org/doc/wiki/i ... _line_mode

-REMOVE_RGB
joysunny
I have made 10-20 posts
I have made 10-20 posts
Posts: 10
Joined: Fri Oct 15, 2021 2:50 pm
2
Full Name: Jing
Company Details: ETH Zurich
Company Position Title: scientific researcher
Country: switzerland
Linkedin Profile: No
Has thanked: 2 times

Re: Batch transform .fls to pcd using Cloudcompare

Post by joysunny »

Thanks badam for your kind reply!

I just tried -REMOVE_RGB, however, in this case, the resulting files only contain x,y,z. Is there a way to allow me also keep Intensity?

Joy
badam
V.I.P Member
V.I.P Member
Posts: 916
Joined: Tue May 11, 2021 5:36 pm
2
Full Name: Adam Berta
Company Details: InnoScan 3D Hungary Kft
Company Position Title: unknown
Country: Hungary
Linkedin Profile: No
Has thanked: 52 times
Been thanked: 297 times
Contact:

Re: Batch transform .fls to pcd using Cloudcompare

Post by badam »

joysunny wrote: Mon Oct 18, 2021 7:37 am Thanks badam for your kind reply!

I just tried -REMOVE_RGB, however, in this case, the resulting files only contain x,y,z. Is there a way to allow me also keep Intensity?

Joy
use the wiki it is pretty straightforward, but if pcd does not save intensity by defult, then maybe you could create an rgb color scale. you may need to load a specific color scale and activate the intensity scalar field...
-SET_ACTIVE_SF {index} Sets the active scalar field index (for all loaded clouds).
Note:

scalar field indexes start at 0 ('-1' means 'no SF enabled')


-SF_COLOR_SCALE {filename} Loads a color scale from a XML file (generated with the Color Scales Manager). The loaded color scale is then applied to the active scalar field.
Note:

it may be necessary to explicitly set the active scalar field with the SET_ACTIVE_SF command
since version 2.10 only
-SF_CONVERT_TO_RGB {TRUE/FALSE} Converts the active scalar field to RGB colors. The user must explicitly specify whether the previously existing colors (if any) should be mixed with the new ones (TRUE) or overwritten (FALSE).
Note:

it may be necessary to explicitly set the active scalar field with the SET_ACTIVE_SF command
since version 2.10 only
joysunny
I have made 10-20 posts
I have made 10-20 posts
Posts: 10
Joined: Fri Oct 15, 2021 2:50 pm
2
Full Name: Jing
Company Details: ETH Zurich
Company Position Title: scientific researcher
Country: switzerland
Linkedin Profile: No
Has thanked: 2 times

Re: Batch transform .fls to pcd using Cloudcompare

Post by joysunny »

badam wrote: Mon Oct 18, 2021 7:45 am
joysunny wrote: Mon Oct 18, 2021 7:37 am Thanks badam for your kind reply!

I just tried -REMOVE_RGB, however, in this case, the resulting files only contain x,y,z. Is there a way to allow me also keep Intensity?

Joy
use the wiki it is pretty straightforward, but if pcd does not save intensity by defult, then maybe you could create an rgb color scale. you may need to load a specific color scale and activate the intensity scalar field...
-SET_ACTIVE_SF {index} Sets the active scalar field index (for all loaded clouds).
Note:

scalar field indexes start at 0 ('-1' means 'no SF enabled')


-SF_COLOR_SCALE {filename} Loads a color scale from a XML file (generated with the Color Scales Manager). The loaded color scale is then applied to the active scalar field.
Note:

it may be necessary to explicitly set the active scalar field with the SET_ACTIVE_SF command
since version 2.10 only
-SF_CONVERT_TO_RGB {TRUE/FALSE} Converts the active scalar field to RGB colors. The user must explicitly specify whether the previously existing colors (if any) should be mixed with the new ones (TRUE) or overwritten (FALSE).
Note:

it may be necessary to explicitly set the active scalar field with the SET_ACTIVE_SF command
since version 2.10 only
Thanks a lot, Adam! I have tried SET_ACTIVE_SF , however, I do not know the actual index of intensity (tried several values 0,1,..) and did not manage to do the transformation. Later, it is solved by first transform fls to e57 by faro scene, then e57 to pcd by Cloudcompare.

Best
Jing
Post Reply

Return to “CloudCompare”