Image resolution was changed during Masterdark integration

Robert-Poelzl

Member
Nov 28, 2012
11
0
Hello,

with my canon 600D im making widefieldimages....
Now i had the problem that i got an error during the imagecalibration. At the end of the Process Console:

______________________________________________________________
ImageCalibration: Global context

Loading master calibration frames:
Loading calibration frame image:
G:/Astronomie/Astrofotos/Kalibrierungsbilder Canon/Masterdark_240sek_800Iso_ca25C.xisf
Loading image: w=5202 h=3465 n=3 RGB Float32
587 FITS keyword(s) extracted.
Loading calibration frame image:
G:/Astronomie/Astrofotos/Kalibrierungsbilder Canon/Flats Samyang 135 f2/Single__0076_ISO800_1-1000s__10C.CR2
Reading metadata: done

Camera ........... Canon EOS 600D
Timestamp ........ 2019-10-26T05:29:33Z
Exposure ......... 1/1000s
ISO speed ........ 800
Focal length ..... 50 mm
CFA pattern ...... Bayer GBRG
Raw dimensions ... w=5344 h=3516
Image geometry ... x=142 y=52 w=5202 h=3464

Raw decoding parameters:
Output mode ............... demosaic
Interpolation ............. VNG
Interpolate as 4 colors ... disabled
FBDD noise reduction ...... 0
Wavelet noise threshold ... 0
White balancing ........... camera
Black point correction .... enabled
Highlights clipping ....... enabled
Auto rotate ............... disabled
Output image .............. w=5202 h=3464 n=3 RGB

Reading RAW data: done
Scaling colors: done
Pre-interpolating: done
Interpolating: done
Converting to RGB: done
*** Error: Incompatible image geometry
<* failed *>

_______________________________________________________________

The masterdark what i used had 1 Pixelrow more than the normal RAW image(s).
To solve the problem i croped the masterdark after i found WHERE i have to crop.

Can anybody tell me how i can prevent this problem.
The error could arise during the imageintegration.

THANKS
Robert
 

pfile

PTeam Member
Nov 23, 2009
5,297
63
the CR2 is being opened by libRAW and the libRAW decoder is set to debayer the image. (output mode .... demosaic). you need libRaw to be opening the image as raw as calibration should take place on raw images only, never debayered images.

in the format hints section of ImageIntegration you should be passing the input hint "raw cfa" to ImageIntegration. (no quotes, just type raw cfa there re-run)
 

bulrichl

Well-known member
Nov 2, 2016
746
45
La Palma, Canary Islands
The reason that the old MasterDark won't work is a change in LibRaw, see https://pixinsight.com/forum/index....rd-in-images-after-batch-preprocessing.14272/ , #6.

You are using an old MasterDark that was produced with PixInsight version 1.8.7 or an older version. Since PixInsight version 1.8.8 the LibRaw version has changed. The cropping of the image is performed differently. This affects the image height and also the bayer/mosaic pattern which is changed from RGGB to GBRG. However, now the correct bayer/mosaic pattern will be used as well when you set it to 'Auto' when the Debayer process is applied, you don't need to set it explicitely any more.

If you still have the underlying dark frames that were used for preparing the MasterDark, integrate them again with the new PixInsight version to a new MasterDark. This new MasterDark will work for calibration.

Bernd
 
Last edited:

pfile

PTeam Member
Nov 23, 2009
5,297
63
bernd - that may be the case, but read his log, the CR2 is being debayered on opening, plus color balancing is being applied, etc.
 

bulrichl

Well-known member
Nov 2, 2016
746
45
La Palma, Canary Islands
Rob, the MasterDark which he tries to use is a RGB image with h=3465 pixels. The target image in CR2 format is opened "demosaiced" (as RGB image as well), but the new Libraw version states: h=3464. So the primary error is the not matching image height.

Of course you are right that ImageCalibration should be performed on CFA data for best results.

Bernd
 

pfile

PTeam Member
Nov 23, 2009
5,297
63
fair enough, but my point was that i'm not sure that libRAW would report the same dimensions of a file opened raw vs. a file opened debayered with the same version. if it failed under "pure raw" then move to the next step.

at any rate i recognize that the 600D is affected by this problem, but one thing at a time.
 

bulrichl

Well-known member
Nov 2, 2016
746
45
La Palma, Canary Islands
OK. If the same LibRaw version is involved, the same dimensions are reported regardless whether the image is opened raw or debayered, and the Debayer process doesn't change the dimensions.

Bernd
 
  • Like
Reactions: pfile

Robert-Poelzl

Member
Nov 28, 2012
11
0
Thanks for all !!

This helps.
My wrong masterdark was made by PI Version 01.08.06.1457 :)
I have to make a new masterdark - because i deleted the darkfiles. (not much space on disc) But no problem


Where i can find the settings to avoid such resolution fails?

I read in the thread (link from Bernd) that there are different settings to convert to RGB ....

Here are my settings:
1585647035140.png

Is this looking ok?
With other settings i get different colors and so on...

This are my current "DeBayer" settings:
1585648133751.png


Very kind regards and stays healthy
Robert
 

pfile

PTeam Member
Nov 23, 2009
5,297
63
just click "pure raw" in the RAW preferences and then click OK. or else pass the format hint "raw cfa" to any process that's going to open a CR2 directly.

i don't think you need to make any other changes as long as you are willing to regenerate your master calibration frames with the latest version of PI. as long as you are using the same version of PI for everything the dimensions will come out the same for all CR2 frames decoded by libRAW.

as for debayer, you seem to be using an older script - also these cameras are not CMYG but RGGB. you should use the "Debayer" process for this. in the distant past Debayer could only work on views but it was upgraded a while back to take lists of files on disk as well. so just use Debayer.

rob
 

Robert-Poelzl

Member
Nov 28, 2012
11
0
Hello Rob,

Thanks for your help !!
Im making the whole calibration procedure now.....

I will write when everything is done.

kind regards
Robert
 

pfile

PTeam Member
Nov 23, 2009
5,297
63
note that the exact filter ordering of the bayer pattern might shift due to how libRaw is cropping the file. still, the cameras have R/G/B filters, not CYMK filters, and the bayer pattern will be some combination of R,G,G and B. you should be able to select "Auto" for the debayer method in Debayer and the right thing should happen.