Author Topic: Debayer status  (Read 10361 times)

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Debayer status
« on: 2009 April 23 19:50:33 »
The module can now save and restore its debayer settings. When the module loads it restores the saved setting. Naturally the module can also be restored to its default behavior which can then be stored.

I wanted to add this right away as I imagine that folks generally have only 1 OSC camera and therefore don't need to switch this setting too often.

It currently only generates a superpixel image. Next I'll add an interpolated debayer.

If you'd like to give the module a try, let me know. I'm setting up a page on my website but it's not done yet.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Debayer status
« Reply #1 on: 2009 April 23 20:08:29 »
Ok, I created a simple page. Get the module here:

http://www.tungstentech.com/Software/PixInsightModules/tabid/79/Default.aspx

Sorry Niall, no CYMG. If you can get satisfactory results in java perhaps I can port it to PCL. I have a Meade DSI although I don't use it anymore. When I did I let DeepSkyStacker do the debayering.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Debayer status
« Reply #2 on: 2009 April 24 03:34:01 »
Hi Sander,

I am well on my way to sorting out the final details for my JSR code. I can now get the code to deBayer a full directory of images, with no further user interaction after the blue touch-paper has been lit !!

Now that I have completed that side of things, like you, I just want to 'tweak' the UI - so that virtually 'any' CFA can be handled.

One 'trick' that I have learned is to test the deBayer routine again RAW images, taken by the camera, of a 'test card' that comprises three swatches of 'primary colour', three swatches of 'secondary colour', three swatches of 'grey' (25%, 50% and 75%) and a swatch each of black and white.

I print my test card on a standard colour laser printer (inkjet works just as well), and I expose using nothing more than a 'pin-hole' over the CCD, under 'natural sunlight'.

This works very well, and certainly lets you know if your CFA array is correctly aligned with the RAW image.

Another 'trick' is to use a final 'Hue' Curve to tweak the colour balance to suit your camera - in my opinion this curve 'should' be applicable thereafter, to ALL astro-images.

HTH
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Debayer status
« Reply #3 on: 2009 April 24 03:36:34 »
[Edited by David Serrano: removed dupe]
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Debayer status
« Reply #4 on: 2009 April 24 05:49:33 »
Hi Niall,

there will be no color weighting nor hue curves in this module most likely. PI 1.5 comes with the tools needed to do this in a later step.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Debayer status
« Reply #5 on: 2009 April 28 07:47:17 »
I've now added multi threading and bilinear extrapolation support. I won't publish it though as there seems to be 0 interest in it except for Juan's cheering and Niall's related work on CYMG :)

I'll consider it a cloudy nights exercise. Once I've added a few more things I'll re-publish and ask Juan if he wants to do Mac builds. I could probably swing Linux builds with some effort but it's unlikely I'll ever allow a Mac in my labs :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Debayer status
« Reply #6 on: 2009 April 28 09:26:27 »
Hi Sander,

there's a lot of interest in your module, of course! But sometimes we don't have the time to reply the forum. Please, post the module when you want; I will test it in the near future.



Best regards,
Vicent.

Offline Thorsten Lockert

  • Newcomer
  • Posts: 36
    • Personal Home Page
Interest
« Reply #7 on: 2009 April 28 09:33:24 »
Quote from: "Nocturnal"
I won't publish it though as there seems to be 0 interest in it except for Juan's cheering and Niall's related work on CYMG :)

Uhm, I'd say there is a good bit of interest -- we are just waiting for it to be finished!

Thorsten

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Debayer status
« Reply #8 on: 2009 April 28 10:09:43 »
Thanks guys for the feedback. I got the impression no one tried the first version or was waiting for new features.

I want to review Bilinear code a little bit more and then will publish a new version. It seemed to work OK with my images but that's only 1 of 4 RGB patterns. Probably later today. Windows 32 bit only for now, sorry.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Debayer status
« Reply #9 on: 2009 April 28 14:06:51 »
Sander,

Please be sure that I am interested - I just don't currently have time to test your code as well as mine :-\

But, I do envy your ability to do anything in the PCL environment, far less control your multi-threaded mutexes (whatever THEY might be - sounds more like a side-effect of swine fever to me  :D)

I am pressing ahead with my CMYG deBayer script - simply because the script layout itself might help encourage others to 'give it a go'. Hopefully I will have commented it enough to help with the lack of documentation.

I am also constantly thinking about a different approach to how deBayering is carried out - probably most programmers use some form of 'scan the pixels', establish the 'local pixel CFA colour', and then attack the 'nearest neighbour interpolation' problem.

Currently, I am playing around with a method that creates four full-size CFA grids to suit the RAW images in question (the option being provided for flips, flops and grid offsets just prior to their creation). These four 'images' then get PixelMath multiplied with the RAW image, creating four new images, each of which now contains the CFA response in ONE of the CFA colours.

Obviously, these four images still need to be 'interpolated' to 'fill-in the gaps' - and this is where I am currently experimenting with deconvolution kernels based on the fundamental FWHM quality of the RAW images that have been obtained (data that is easily obtained from DSS, AIP4WIN, etc - maybe even PIv1.5). The 'nearest neighbour' interpolation can be based on a variable grid size, from 3x3, 5x5, 7x7 etc - depending on whether the user wants 'speed' or 'quality'. And, again, I am hoping that my JSR can relay on PI 'core' calls to achieve most of the processor-intensive work.

Finally, the four CFA-extracted images can be processed to give an RGB image, and I have found that the transformation algorithm need not be in any way complicated at this stage - it just takes a few simple steps thereafter to get a nicely colour balanced image ready for further alignment and stacking.

Maybe some of my ideas might NOT have been tried by 'really clever' programmers like you Sander - if not feel free to use them - just try and remember who I am when those $$$-bills start to pour into your bank accounts  ::)

But, just don't get despondent, your efforts are being appreciated, but sometimes just in silence !

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Debayer status
« Reply #10 on: 2009 April 29 00:37:38 »
Quote
Once I've added a few more things I'll re-publish and ask Juan if he wants to do Mac builds. I could probably swing Linux builds with some effort but it's unlikely I'll ever allow a Mac in my labs

My ears are wide open  ;D
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline ManoloL

  • PixInsight Addict
  • ***
  • Posts: 220
Re: Debayer status
« Reply #11 on: 2009 April 29 07:22:05 »
Hello Nocturnal:

The last two days when I tried downloading the program I get the following message:

The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Regards.
Saludos.

Manolo L.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Debayer status
« Reply #12 on: 2009 April 29 09:34:18 »
Hi,

sorry for the inconvenience. There were two problems it seems a) my web site provider isn't very good which caused timeouts and b) the path to the file was wrong. I guess you were the only one to actually try to download it :) The URL was created by the framework but it was all wrong. Nice. I should have tested it, sorry.

The page should now load correctly and the download link as well. In the meantime here is the download link for the .zip:

http://www.tungstentech.com/Portals/0/downloads/Debayer-pxm.zip
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity