Author Topic: Debayer RGBG G2-8300C  (Read 2500 times)

Offline bdelafouchardiere

  • Newcomer
  • Posts: 2
Debayer RGBG G2-8300C
« on: 2016 August 04 04:58:02 »
Hello,

I've just come back from a star party where I have been using a Moravian G2-8300C camera.
I discovered that the Bayer matrix is curiously RGBG.

This combination is not avalable in the debayer script. I've looked into the javascript source and added a section with RBGB unfortunaltly the script is throwing an error where I try to use this combination.

Any idea how to add in the drop down combo box the RGBG combination ?

Bruno


Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Debayer RGBG G2-8300C
« Reply #1 on: 2016 August 04 11:29:05 »
if the images are FITS files you can change the fits reader direction during calibration by giving the format hint "bottom-up" during ImageCalibration (or in any other process that supports format hints).

you can also change this in the Format Explorer by double-clicking "FITS" and changing the reader direction, but this will do it globally for all processes until you change it back.

then you can try opening one of the files and experimenting with the 4 choices again and see which one debayers the images properly. at that point you can return the global value to defaults and just use the format hints when dealing with those images.

rob

Offline bdelafouchardiere

  • Newcomer
  • Posts: 2
Re: Debayer RGBG G2-8300C
« Reply #2 on: 2016 August 04 13:58:34 »
Hello,

Thanks for your answer, I wanted to know if this could be implemented in the script batchDebayer.js in src
Ideally if we could add a specific section with RGBG pattern, I guess this should be somewhere around the following section.

Unfortunalty is I manually add the section, it fails

this.bayerPatterns = new Array;
   this.bayerPatterns.push("RGGB");
   this.bayerPatterns.push("BGGR");
   this.bayerPatterns.push("GBRG");
   this.bayerPatterns.push("GRBG");
   this.bayerPatterns.push("RGBG");
   this.bayerPatternsMap = new Array;
   this.bayerPatternsMap.push(p.RGGB);
   this.bayerPatternsMap.push(p.BGGR);
   this.bayerPatternsMap.push(p.GBRG);
   this.bayerPatternsMap.push(p.GRBG);
   this.bayerPatternsMap.push(p.RGBG);
   this.chosenBayerPattern = "RGGB";
   this.chosenBayerPatternConstant = p.RGGB;

Am I missing some parameter somewhere else in this JS script ?

Bruno

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Debayer RGBG G2-8300C
« Reply #3 on: 2016 August 04 16:52:26 »
what you are trying to do won't actually do anything...

Code: [Select]
         // Set up the Debayer instance
         var p = new Debayer;
         p.bayerPattern = globalData.chosenBayerPatternConstant;

the code you have changed has simply modified the "globalData" data structure which is then used to select the bayer pattern in the Debayer process referenced as "p" in the code snippet above. unfortunately that won't accomplish anything, because Debayer does not support "RGBG" as a debayer pattern. you'd have to modify the source code to Debayer, adding the actual code path to interpret the bayer matrix as RGBG, and then recompile it. i don't even know if the source for Debayer is available...

rob