recoloring based on color scales and SF data

For any remark, link or suggestion about CloudCompare and more genrally the 3D
Post Reply
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

recoloring based on color scales and SF data

Post by PablerasBCN »

Hi,

Very often, I find that parts in the cloud dataset are improperly colored, mostly trees, due to projection of traffic signals, small buildings or else, hence, I need to reconstuct the color.

I'm able to get somewhat decent ouputs, here is a rough example, I recolored areas that did not need recolor but I did so to get a quick example.

Image

what I do is a simple recolor, merge with PCV and Intensity. Finish up with colors levels if needed.

Image


I would like to go bit deeper, while vegetation almost gets a pass with this approach, trunks and branches or mand made objects feel like need something "moar"...

For extracting trunks and branches, I compute geometric features, eigenvalue2 , yet depending on thickness of branches 1 may work better, surface variation or combination of theese + final filter by density outputs a rather leaf free tree structure.

To recolor theese, the above approach leaves to desire. So what I attemped was to create a color scale with multiple color entries, all in the brownish region and colorize with that the intensity SF, and while not epic it started to look more "realistic". Then an idea came to my mind...

I think it is not possible right now, but.. would it be possible tooo create a color scale, based on a chunk of data that is properly colored and, create such color scale based on the intensity values? lets say, the points with 0 Intensity value have this color (wethere is the first color to be found or the average of all the colors in that intensity value) Intensity 1, this other color etc untill the colro scale is filled with as many step as requested or as many Intensity values are present.

So, fasically "Color field to Color scale" or "Scalar field to Colro scale", with an option to define step count or "0" for as much as needed where color position is determined by the Intensity value, or may be dropdown for SF .

Then, on an object of similar nature, lets say the original data was a guardrail it would be quite likely that it would look quite similar to a properly colored object.

What do you think?!
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: recoloring based on color scales and SF data

Post by PablerasBCN »

Its me again...

So I think It can be done manually for testing and if it works as spected I would turn it into a feature request.

Since if a file is exported as ascii SF are accesible according to :

http://www.danielgm.net/cc/forum/viewtopic.php?t=199

The in excell I could build the body of the color scale which seems to have this structure:

<Data>
<step r="0" g="0" b="255" pos="0"/>
<step r="255" g="255" b="255" pos="0.5"/>
<step r="255" g="0" b="0" pos="1"/>
</Data>
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: recoloring based on color scales and SF data

Post by PablerasBCN »

So,

I made sort of a tutorial on how I build the color scale. I'm amazed by the ressults, to me this is a game changer in color correction of not only trees but I believe this can work on facades or any other object.

https://drive.google.com/file/d/1ST_XB6 ... share_link
Now, it is time for me to beg for RGB to Color scale feature, I'm sorry Daniel I need to ask for it.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: recoloring based on color scales and SF data

Post by daniel »

That's interesting. What would the (minimal) dialog looke like? And the minimal workflow? I bet you'll ask the user to provide the small cloud as reference for the intesity/RGB mapping, and another cloud to apply it to?
Daniel, CloudCompare admin
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: recoloring based on color scales and SF data

Post by PablerasBCN »

I've done a video of how I recolored a set of trees with this technique, this is new for me too, so I may do some changes in the workflow in the incoming days.

https://youtu.be/ZLGwxMeYccs

I'll propose a ui mockup in the incoming days as I whant to test this a bit further just to see if any extra requirement shows up.

I've also noticed that the max entries for the color scale are somewhere around 3200, tesded 4k and CC crashes. I believe I tested something less and
also crashes. So what I ended up doing was to choose a representative patch, thin to 3200 points and build the color scale from it manually.

I've succesfully tested this approach in a road, and I whant to test in buildings too.


I'll repost in a few days with the data you required me.


Cheers.
Post Reply