Author Topic: ImageCalibration .CR2 TargetFrames + Output Integer sample format = Balnk Image  (Read 4830 times)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Hello Juan,

Take one more bug. Actually i found it in my CosmeticCorrection, but same problem in ImageCalibration:
Target Frames: Canon.CR2 images.
Output Sample format "16bit-integer" or "Same as target" .fit
Result: Absolutely blank image. See Log and Statistics.

Note:  Calibration is OK, if set Output Sample format to "32bit-float".

Best regards,
Nikolay.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Waiting for "there is no bug here".

 ;D
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 NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Waiting for "there is no bug here".

 ;D
Maybe...  Actually, I found the bug 2 year ago. But Juan ignored the report, and I forgot about the bug... so I will push Juan again and again... until he did not say: "there is no bug here, because..."
Also, I think ImageCalibration (I have code for Version 1.1.1.0077 only) is not compatible with 64bit images, because all MasterFiles limited to FImage(32float).

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Quote
But Juan ignored the report

I don't ignore bug reports---what's the point in doing that? :) It's simply that I overlooked your report for some reason (I didn't answered you, which supports this).

I can confirm the bug. I can see where's the problem in the code. I'll fix it ASAP, although it actually has no practical relevance. In addition, I'll remove the 'same as target', '8-bit' and '16-bit' options because they make no sense.

So Sander, stop waiting for "there is no bug here"!  >:D

Quote
Also, I think ImageCalibration (I have code for Version 1.1.1.0077 only) is not compatible with 64bit images, because all MasterFiles limited to FImage(32float).

That's true. For example, in line 1690 of ImageCalibrationInstance.cpp you can see these declarations:

   Image* bias = 0;
   Image* dark = 0, * optimizingDark = 0;
   Image* flat = 0;


So you're right, all calibration frames are loaded as 32-bit floating point images irrespective of the original data type. The same happens for all target frames. This isn't a bug, but a simple design pattern: Actually, working with 64-bit images makes no sense at all for a calibration routine. Supporting them would complicate the code (and would duplicate its binary size) without any justification, from both theoretical and practical considerations. All intermediate calculations are always performed in double precision, but this is a different thing.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
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 NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
I can confirm the bug. I can see where's the problem in the code. I'll fix it ASAP
Juan, please show me how you will fix the problem. I must do same in CosmeticCorrection module.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hmm, after a closer look at the code, I'm not so sure that I understand the problem. Do you see the same problem with unbayered images (e.g., CCD raw images) saved as 16-bit images with ImageCalibration, or does it happen only with DSLR CFA images?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
I see problem only with CR2 files. CR2 file converted to 16Int FITS is working fine. No matter convert to RAW Bayer Mono or to Color. Any type of FITS working fine. Problem there are only with CR2.

Also, if ImageCalibration output set to 32Int, calibrated image is not pure black, but is very-very dark. See Statistics PrintScreen.

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
The CR2 file.

PS Thanks for fileshare. ;)