Debayering problem

cuivenion

Well-known member
Jan 19, 2018
48
0
Hi, Pixinsight can't find the right pattern to debayer my canon 600d files. When I leave it in auto I get an error message. When I choose RGGB the colours are wrong. This isn't a problem that can be solved by DBE and colour balancing.

I found a workaround where a split my final image into RBG components and then re combine until I get the correct colours. Obviously this isn't ideal though. Any help would be appreciated.
 

pfile

PTeam Member
Nov 23, 2009
5,220
57
what program did you use to capture the files? what file format are they in?

rob
 

pfile

PTeam Member
Nov 23, 2009
5,220
57
sorry, forgot about the fact that 600D is one of the cameras suffering from a LibRaw issue. see this thread for the solution:

https://pixinsight.com/forum/index.php?topic=14219.0

rob
 

cuivenion

Well-known member
Jan 19, 2018
48
0
Backyard EOS, I converted them to XSIF from CR2 for stacking and pre processing in Pixinsight.
 

bulrichl

Well-known member
Nov 2, 2016
728
41
La Palma, Canary Islands
When using Canon's raw format CR2, there is no modification of the data by the capturing software. So Backyard EOS does not change the data in any form.

However, there is an old issue with the Batch FormatConversion script (also see https://pixinsight.com/forum/index.php?topic=12228.15 , reply #15) that will prevent the Debayer tool from working with the Bayer/mosaic pattern set to 'Auto':

BatchFormatConversion does not write properties to the file. This means, that the information about the Bayer/mosaic pattern is missing in the converted file. Debayer then generates the error message: "*** Error: Unable to acquire CFA pattern information: Required image metadata not available.".

I reported this issue to Juan on 3rd January 2020 and he replied that he will fix this issue as soon as possible.

Bernd
 

bulrichl

Well-known member
Nov 2, 2016
728
41
La Palma, Canary Islands
bulrichl said:
However, there is an old issue with the Batch FormatConversion script (also see https://pixinsight.com/forum/index.php?topic=12228.15 , reply #15) that will prevent the Debayer tool from working with the Bayer/mosaic pattern set to 'Auto':

BatchFormatConversion does not write properties to the file. This means, that the information about the Bayer/mosaic pattern is missing in the converted file. Debayer then generates the error message: "*** Error: Unable to acquire CFA pattern information: Required image metadata not available.".
This issue is now fixed with PixInsight 1.8.8-4 and the updated BatchFormatConversion script version 1.4.0. If you convert CR2 files to XISF and later on debayer them, setting of bayer/mosaic pattern to 'AUTO' now yields the correct debayer result.

Bernd
 

PeterLive

Member
Aug 17, 2017
14
0
72
Attleborough
I have been using PI for some years now.
After major updates It is usual to have problems with RAW files that have worked fine before the update.
Once again after the recent updating I cannot correctly debayer my new or oder files that have been either produced by SGPro or BYEOS.

I have tried all debayer options without sucess.

Please could you provid a fix and take care in the future to support RAW files reliably.
 

Vladimir

New member
Jun 28, 2020
3
0
I finally found this thread and this seem to be the right one. I'm a beginner and evaluating PI by going through a tutorial and processing my images. The images from from a Canon 100D (SL1) and I tried using RAW in PI. My problem is exactly like above, but I'm on PI 1.8.8.5. I'm getting

*** Error: Unable to acquire CFA pattern information: Required image metadata not available.

while running BatchPrePorcessing and the master light is opening as a grey image. Debaying fails with the same error message. I tried to set bayer pattern manually, but not values seem to be good.

Which bayer pattern should I set for Canon 100D ?

What would the be plan B ? Convert all RAW to TIFF ? Which kind of TIFF should that be then?
 

pfile

PTeam Member
Nov 23, 2009
5,220
57
while you should be able to sort this out, for plan B you'd want to convert to DNG, not TIFF. DNG is a generic RAW format and can handle bayered data. TIFF can not so you'll probably end up with interpolation and even stretching by the software used to create the TIFF.
 

bulrichl

Well-known member
Nov 2, 2016
728
41
La Palma, Canary Islands
For an One Shot Color (OSC) camera, the image calibration shall be executed on Color Filter Array (CFA) data. So set RAW Preferences (Format Explorer, Double click on 'RAW') to 'Pure Raw' and confirm with 'OK'.

Now open a raw image in CR2 format. The data are displayed as CFA data (grayscale). In the Process console you'll find an output like this:

Reading 1 image(s):
C:/Users/Bulrich/Downloads/canon_eos_100d_10.cr2
Reading metadata: done

Camera ........... Canon EOS 100D
Timestamp ........ 2000-01-01T00:01:59Z
Exposure ......... 1/60s
ISO speed ........ 100
Focal length ..... 32 mm
Aperture ......... f/5.6 = 5.7 mm
CFA pattern ...... Bayer RGGB
Raw dimensions ... w=5280 h=3528
Image geometry ... x=72 y=52 w=5208 h=3476

Raw decoding parameters:
Output mode ............... cfa
Auto crop ................. enabled
Wavelet noise threshold ... 0
White balancing ........... disabled
Black point correction .... disabled
Highlights clipping ....... disabled
Auto rotate ............... disabled
Output image .............. w=5208 h=3476 n=1 Gray

Reading RAW data: done


LibRaw, the raw image decoding software used by PixInsight, detects the Bayer pattern 'RGGB' automatically. When using raw data in the proprietary raw format, there is no need to specify the Bayer pattern for the Debayer process explicitely, you can leave it at 'Auto'.

---

If your master light from BPP is opening as grayscale image, probably the Global option for 'CFA images' was disabled. You must enable it.

Please also note that BPP is superseded by WeightedBatch Preprocessing (WBPP), see .

Bernd
 

Vladimir

New member
Jun 28, 2020
3
0
Thanks for the replies! I just stacked DNGs with the same error message when trying to debay...

Where should I enable the "Global option for 'CFA images' " ?

At the moment, my problem seems to be that I cannot debay the master light since the Debayer fails to find the CFA pattern. I tried to select a pattern manually including RGGB but all results look terrible... It tried TIFF meanwhile. The color shows up and looks OK when I open the master light, but it looks a bit blurry.... This is, maybe, because of problems mentioned by "pfile"

I have three or four tutorials, videos on YouTube, and a book about PixInsight, but all this does not help now, since this problem is not mentioned anywhere... I seem to get stuck...
 

Vladimir

New member
Jun 28, 2020
3
0
I think, I now got it...
- Set to "Pure RAW"
- used "WeightedBatch Preprocessing"
- I fount the 'CFA images' on the "Global option" panel in the "Lights" tab of the "WeightedBatch Preprocessing". It was unchecked, even though I reset all settings several times. So it cannot be me...

The image now opens on RGB but looks very greenish which is normal at this stage as I heard. Thanks for the hints, esp to Bernd. Danke!