RGB 0-255 to RGB 0-1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

RGB 0-255 to RGB 0-1

Orkun Ersoy-2
Hi everyone,

 

How to convert RGB 0-255 to RGB 0-1?

Cheers

Orkun
Reply | Threaded
Open this post in threaded view
|

Re: RGB 0-255 to RGB 0-1

giubi
value/255 ?

/Giuseppe



On 17 May 2012 09:45, Orkun Ersoy <[hidden email]> wrote:

> Hi everyone,
>
>
>
> How to convert RGB 0-255 to RGB 0-1?
>
> Cheers
>
> Orkun
>
Reply | Threaded
Open this post in threaded view
|

Re: RGB 0-255 to RGB 0-1

parfait evouna
Divide everything single Channel by 255 and merge them

Pem

Envoyé de mon iPhone

Le 17 mai 2012 à 10:02, "Giuseppe Bianco" <[hidden email]> a écrit :

> value/255 ?
>
> /Giuseppe
>
>
>
> On 17 May 2012 09:45, Orkun Ersoy <[hidden email]> wrote:
>
>> Hi everyone,
>>
>>
>>
>> How to convert RGB 0-255 to RGB 0-1?
>>
>> Cheers
>>
>> Orkun
>>
Reply | Threaded
Open this post in threaded view
|

Re: RGB 0-255 to RGB 0-1

Orkun Ersoy-2
Thanks but if you mean process/math/divide,

Each channel becomes black (dark-0).
Orkun

-----Original Message-----
From: * [mailto:[hidden email]] On Behalf Of parfait evouna
Sent: 17 Mayıs 2012 Perşembe 11:06
To: [hidden email]
Subject: Re: RGB 0-255 to RGB 0-1

Divide everything single Channel by 255 and merge them

Pem

Envoyé de mon iPhone

Le 17 mai 2012 à 10:02, "Giuseppe Bianco" <[hidden email]> a écrit :

> value/255 ?
>
> /Giuseppe
>
>
>
> On 17 May 2012 09:45, Orkun Ersoy <[hidden email]> wrote:
>
>> Hi everyone,
>>
>>
>>
>> How to convert RGB 0-255 to RGB 0-1?
>>
>> Cheers
>>
>> Orkun
>>
Reply | Threaded
Open this post in threaded view
|

Re: RGB 0-255 to RGB 0-1

Gabriel Landini
On Thursday 17 May 2012 12:32:35 Orkun Ersoy wrote:
> Each channel becomes black (dark-0).

You need a 32 bit container to store the result.

1. Convert the RGB image into a RGB stack,
2. Convert the stack to 32-bit,
3. Apply Process>Math>Divide by 255.

if you want to "see" this in colour, you can run "Image>Color>Make Composite".
But the colours might not display exactly the same way as the original as the
channels I think get re-stretched so you might have to adjust the transfer
function limits with the Brightness and Contrast dialog.

Cheers

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: RGB 0-255 to RGB 0-1

Orkun Ersoy-2
Dear Gabriel thanks for your solution. However, now I have a composite image
having values between 0-1 but as you told I cannot save it.
32 bit container?

Orkun

-----Original Message-----
From: * [mailto:[hidden email]] On Behalf Of Gabriel Landini
Sent: 17 Mayıs 2012 Perşembe 15:13
To: [hidden email]
Subject: Re: RGB 0-255 to RGB 0-1

On Thursday 17 May 2012 12:32:35 Orkun Ersoy wrote:
> Each channel becomes black (dark-0).

You need a 32 bit container to store the result.

1. Convert the RGB image into a RGB stack,
2. Convert the stack to 32-bit,
3. Apply Process>Math>Divide by 255.

if you want to "see" this in colour, you can run "Image>Color>Make
Composite".
But the colours might not display exactly the same way as the original as
the
channels I think get re-stretched so you might have to adjust the transfer
function limits with the Brightness and Contrast dialog.

Cheers

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: RGB 0-255 to RGB 0-1

Gabriel Landini
On Friday 18 May 2012 06:07:20 you wrote:
> Dear Gabriel thanks for your solution. However, now I have a composite image
> having values between 0-1 but as you told I cannot save it.
> 32 bit container?

Why not? The composite can be saved:

run("Clown (14K)");
run("RGB Stack");
run("32-bit");
run("Divide...", "value=255 stack");
run("Make Composite", "display=Composite");
setSlice(1);
setMinAndMax(0, 1);
setSlice(2);
setMinAndMax(0, 1);
setSlice(3);
setMinAndMax(0, 1);
saveAs("Tiff", "clown_composite.tif");

Cheers

Gabriel