Jump to content

Converting R_B to RGB (fake green channel needed)


Recommended Posts

I am sure that Rick is going to come after me saying that Paint.NET is not made for this, but I have a question concerning astronomy again. For some reason astronomers never take a picture through a green filter when doing sky surveys, only red and blue. I am wondering how I can combine these into a color picture (RGB) from only red and blue channels.

finalsig2.jpg

My Humble Gallery

Astronomy Fans group on facebook

I see things, I'm an astronomer

Link to comment
Share on other sites

I'm assuming you've got two images of the same sky-space, one in Red and one in Blue and you want to overlay these and (somehow) fake a green layer to make a true RGB image?

Am I getting this right?

Link to comment
Share on other sites

I'm assuming you've got two images of the same sky-space, one in Red and one in Blue and you want to overlay these and (somehow) fake a green layer to make a true RGB image?

Am I getting this right?

Exactly. I do not know of any way to make a false-green channel. There is an IR (infra-red) image, but that will not do for many reasons but mostly because IR light goes through gas and dust differently than green light does.

Yes, the images are of the same part of the sky.

finalsig2.jpg

My Humble Gallery

Astronomy Fans group on facebook

I see things, I'm an astronomer

Link to comment
Share on other sites

Sorry for the delay - I have been busy (haven't we all?).

Right, Faking-a-green-layer 101.

You have two images of the same part of the sky, one with red information and one with blue.

You need to combine these by overlaying them using the blend mode Additive, merge down.

Now we need to (somehow) create a green layer. I toyed with the idea of duplicating one of the existing layers and recoloring that. The problem was that this single layer approach ignores the other layer which is rich with information.

Instead I created a small plugin that creates the green color information by combining the information from the red and blue channels. The plugin is simple to use - just specify the % amount of the blue channel you want to bias the green data off and click OK.

Here tis...

FakeGreenChannel.zip

Link to comment
Share on other sites

You're welcome!

Next request? :lol:

Link to comment
Share on other sites

Well now that you mention it... :lol:

I am fascinated by your mathematical approach to the problem, but (and this is a big but) I think the white balance for lack of a better term is off a bit. When I combine the images I do the following:

1. paste the red and blue images (which are grayscale) into Paint.NET

2. use curves to change the color of the image. For the red I decrease the green and blue to 0 and for blue I decrease the red and green to 0.

3. I set the blending mode of the top layer to additive and then I got a purple colored image (which is what I was expecting).

4. I merge the two layers down

5. I run your plugin

The problem occurs at the last step. The image is tinted a teal color. Yes I know the bottom part of the image is orange. That is because I got lazy and did not want to wait for the rest of the image to load. Seriously, it takes a long time to download a 3572x3572 gif via ftp.

I am wondering if I am doing something wrong or if it is the plugin. :?:

72835117.th.jpg

finalsig2.jpg

My Humble Gallery

Astronomy Fans group on facebook

I see things, I'm an astronomer

Link to comment
Share on other sites

mcamp14,

This is the suggestion I was preparing prior to

noticing that EER was making a plugin for you.

--------------------------------

Preparing the faux-green channel.

Open your blue-channel grey-scale image in Paint.NET.

Import the red-channel grey-scale image.

Set the top layer to multiply, merge.

Duplicate the resulting layer, set the top layer

to Additive, merge.

Make a new layer, fill it with R-0, G-255, B-0.

Set that green layer to Multiply, merge.

This gives you a black-and-green image that can be

combined with black-and-red and black-and-blue

layers using Additive blend mode.

Regardless of the method you use, the final result will probably

need some color adjustment.

The green channel is, after all, a fake green channel.

=====================

Making the green channel this way takes into account

differences in blue vs. red luminosities at any given pixel

coordinate and will allow the "bluer' or 'redder" character

to remain, somewhat.

To the degree that the blue and red channels match,

is the green channel added. (That sounds like Yoda-speak)

Link to comment
Share on other sites

Sarkut,

I tried your method, while it is very interesting it is long. I used one of those neat little NTSC test screens because they work well for color tests.

originalut.th.jpg

I made a red and blue channel from it via the extract channel function.

Red:

redchannel.jpg

Blue:

bluechannel.th.jpg

The problem is that it turned out like this:

finalbc.th.jpg

I am confused by two things.

1. Why don't astronomers use a green filter when doing a sky survey?

2. Why can't this be easy?

finalsig2.jpg

My Humble Gallery

Astronomy Fans group on facebook

I see things, I'm an astronomer

Link to comment
Share on other sites

mcamp14,

That test screen has no correlation to what you are working with.

1. Why don't astronomers use a green filter when doing a sky survey?

I suspect red and blue are used because they are the two extremes of the visible spectrum.

They can also give info on Doppler shift.

2. Why can't this be easy?

Easy is subjective, some might consider it to be easy.

It will be easy for you too, once you've figured it out.

===========================

Could you post links to grey-scale red and blue channel

samples?

Link to comment
Share on other sites

3. I set the blending mode of the top layer to additive and then I got a purple colored image (which is what I was expecting).

Can you give me the color info for a sample this purple? ie Red and Blue amounts using the color picker before and after running the plugin?

I am wondering if I am doing something wrong or if it is the plugin. :?:

Not necessarily. If your purple was the result of say 255, 0, 255 then the plugin should return 255 for the green component. However, if you started with a different shade of purple, things can get quite interesting, especially if you're changing the bias to one of the extremes.

This image was my test pattern. The top image is the original, the lower ones are the same image with the bias changed.

FGTest2.gif

Note the teal in the bottom image? It was made with 0,0,255 (green = 100%blue) = 0,255,255.

Is that what you're experiencing?

Link to comment
Share on other sites

I think you have a legacy of the sort of thing I was trying to explain.

(no red),(no green),(some blue) + plugin = (no red),(some green),(some blue) which is the teal shift.

Teal shift?? Is that a new astronomical term I can claim?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...