Create RGBA scalar field exporting PCD

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
KirbX
Posts: 3
Joined: Thu Oct 27, 2016 1:44 pm

Create RGBA scalar field exporting PCD

Post by KirbX »

Hello everybody! I'm trying to use CC to export a file with color. The goal is to use it in PCL (Segmentation of pointcloud using color). I have an example on which it works, and the one I want to use isn't working (PCL give me an error "No indices given", it seems that it doesn't find color). The only difference I see is that when I save the point cloud, in 1 case (the one that works), in "Scalar Fields" property i have RGBA, and in the other, I only have "Intensity"... Is it possible to transform "intensity to RGBA"? I already tried "Edit->Scalar Fields->Convert to RGB". But it only change something in the "CC Object" property.

Thanks for all! :)
Best regards!
Raphael
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Create RGBA scalar field exporting PCD

Post by daniel »

Well, the 'Edit->Scalar Fields->Convert to RGB' method creates RGB fields (= 3 separate fields, 8 bits each) out of the intensity values. But apparently from what you describe you need a single field with RGBA (probably a single 32 bits value).

It's not handled natively by CC but it may be possible to use the SF Arithmetics tool to build such a field.

What are the range of values of your intensity field, and same thing for the RGBA field? (see the active SF histogram at the bottom of the cloud properties).
Daniel, CloudCompare admin
KirbX
Posts: 3
Joined: Thu Oct 27, 2016 1:44 pm

Re: Create RGBA scalar field exporting PCD

Post by KirbX »

Well, when I try to load the PCD file that works in CC, it is all blue, and when I check its SF display params -> Display range, nothing is written.
and for the other, all the spectrum is used. I have blue, green, red, yellow, orange, ...
I'm not sure if it's what I had to check (My bad English doesn't help me :/)
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Create RGBA scalar field exporting PCD

Post by daniel »

For the file that works:
- do you have any scalar field at all? Or do you have color? You said that you had a 'RGBA' field in the scalar field properties. If yes, then you should see in the histogram (at the bottom of the cloud properties) the min and max 'displayed' values. They are the min and max values of this scalar field by default.

For the file that doesn't work:
- same thing, but with an intensity field.

Don't hesitate to post snapshots here, or send me the files to 'cloudcompare [at] danielgm.net'.
Daniel, CloudCompare admin
KirbX
Posts: 3
Joined: Thu Oct 27, 2016 1:44 pm

Re: Create RGBA scalar field exporting PCD

Post by KirbX »

I Will post screenshot, 1 photo equals to 1000 words as we say!
But, when I open the image that works with PCL in CC, it becomes all blue (cf expl2), and when I reexport it, colors had disappear :/
Attachments
The file that "works"
The file that "works"
expl2.png (55.56 KiB) Viewed 5627 times
The file I want to convert to RGBA
The file I want to convert to RGBA
expl1.png (143.04 KiB) Viewed 5627 times
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Create RGBA scalar field exporting PCD

Post by daniel »

Hum, the first cloud does have an 'rgba' scalar field, but it seems to be invalid?! Maybe the PCL importer failed. This would explain why you can't export it properly.

Can you send me corresponding file?
Daniel, CloudCompare admin
Post Reply