RGB to IHS

To post any request/idea for new functionalities
Elbruno
Posts: 32
Joined: Mon Jul 06, 2015 8:08 pm

RGB to IHS

Post by Elbruno »

Hello,

Are you planning to implement a color transformation from RGB to IHS?

Tyvm.

Att

Bruno
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: RGB to IHS

Post by daniel »

Do you mean HSI? (hue, saturation, and intensity).

Whatever, it's not planned right now. And I'm not sure what you expect as output? Scalar fields?
Daniel, CloudCompare admin
Elbruno
Posts: 32
Joined: Mon Jul 06, 2015 8:08 pm

Re: RGB to IHS

Post by Elbruno »

Yes IHS.

If we mix colors with Intensity from scanner we can get a better resolution sometimes.

Scalars fields or colors fields are good anyway.

Thx
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: RGB to IHS

Post by daniel »

When we speak about HSI (or HSV, etc.) the intensity is not the one from the scanner but the one from the color itself. It's just another way of representing the colors compared to RGB. The issue is that you can't save HSI as an RGB field (you would need an HSI screen to display it... and you would see the exact same colors as on an RGB screen :D).

Otherwise you can already mix the scanner intensities (as a scalar field) with the colors. Simply activate the 'intensity' scalar field, then use 'Edit > Scalar fields > Convert to RGB'. CC will then ask you if you want to mix it with the colors (or not).
Daniel, CloudCompare admin
Elbruno
Posts: 32
Joined: Mon Jul 06, 2015 8:08 pm

Re: RGB to IHS

Post by Elbruno »

I've tryed this.

With grey scale I got a better resolution image. So I used the same idea from panchromatic landsat.

In GIS I got a fusion from my RGB image and a greyscale image.

But the issue is that I didn't find a way to colorize the cloud again with the new image.

I will upload my images.
Low resolution RGB:
Image

Panchromatic
Image

Fusioned RGB
Image

So im trying to apply this directly on point clouds using CC resources.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: RGB to IHS

Post by daniel »

Do you know how the 'fusion' process works exactly? (on the images). What GIS tool / option are you using?
Daniel, CloudCompare admin
Elbruno
Posts: 32
Joined: Mon Jul 06, 2015 8:08 pm

Re: RGB to IHS

Post by Elbruno »

Yes I m researching this process.

First I used Brovery, this can be done in CC atm.

The other ones I´m doing using some scripts to read clouds and execute them.

The best result, was the image above, i have used ESRI method for fusion.

Here Some methods.
http://www.ufrgs.br/engcart/PDASR/fusao.html
Haowyr
Posts: 48
Joined: Wed Feb 11, 2015 11:01 am

Re: RGB to IHS

Post by Haowyr »

Do you already have a workflow to share for this first part in CC?
Elbruno
Posts: 32
Joined: Mon Jul 06, 2015 8:08 pm

Re: RGB to IHS

Post by Elbruno »

My Workflow:

1. Convert to Scalar Field: R,G,B and Composite
2. Scalar Fields arithmetic: Composite multiply [Constant value]=3, Check box “Update SF1 directly”
3. Scalar Fields arithmetic: R/composite Check box “Update SF1 directly”
4. Scalar Fields arithmetic: G/composite Check box “Update SF1 directly”
5. Scalar Fields arithmetic: B/composite Check box “Update SF1 directly”
6. Normalize intensity to 0 to 255 (8 bits), see example:
The numbers bellow I got from my point cloud, each cloud has its own Min and Max values.
6.1. Get Min and Max from histogram, mine are Min = -1730 Max=-1150
6.2. Turn all values into positive: Scalar Fields arithmetic: Intensity plus 1730 “Update SF1 directly”. This way the new range is Min = 0 Max=580
6.3. To adjust 0 to 580 into 0 to 255-> 580/255 = 2.274509804 (use a calc, excel to help if needed)
6.4. Scalar Fields arithmetic: Intensity divided by [Constant value] 2.274509
6.5. Now all intensity values gone to the range 0 to 255.
7. Now we need to Multiply RGB from steps( 3,4 and 5) by Intensity
7.1. Scalar Fields arithmetic: R multiply Intensity“Update SF1 directly”
7.2. Scalar Fields arithmetic: G multiply Intensity“Update SF1 directly”
7.3. Scalar Fields arithmetic: B multiply Intensity“Update SF1 directly”
8. Go to Edit->Colors->Clear
9. Save your Cloud as ASC Txt, and import it again, and use the scalars RGB into Colors

This will transform your intensity into a Colored version.

Intensity:
Imageprint screen

Colored intensity:
Imageimage upload
Last edited by Elbruno on Fri Dec 23, 2016 6:08 pm, edited 1 time in total.
Haowyr
Posts: 48
Joined: Wed Feb 11, 2015 11:01 am

Re: RGB to IHS

Post by Haowyr »

Ok so I guessed it all by myself correctly, although I don't understand how it doesn't "flatten" your color scale at the end. My point clouds look way darker!
Post Reply