Author Topic: Pentax K-1 .dng files cropped  (Read 2534 times)

Offline lage

  • Newcomer
  • Posts: 22
Pentax K-1 .dng files cropped
« on: 2017 November 16 15:04:50 »
Hi.
Pentax K-1 .dng files are cropped compared to Pentax .pef raw files.
Why is that?
This causes me trouble, since it gives Incompatible image geometry errors, depending on which RAW format the images were shot with, even though the same camera was used.

.dng:
Code: [Select]
ImageCalibration: Global context

Loading master calibration frames:
Loading calibration frame image:
E:/foton/Astro/2017/bias_iso3200/superbias_v.xisf
Loading image: w=7392 h=4950 n=1 Gray Float32
904 FITS keyword(s) extracted.
Loading calibration frame image:
E:/foton/Astro/2017/masters/master_dark_iso3200.xisf
Loading image: w=7392 h=4950 n=1 Gray Float32
251 FITS keyword(s) extracted.

Dark frame optimization thresholds:
Td0 = 0.00034062 (653169 px = 1.785%)

Calibration of 18 target frames:
* Using 12 worker threads

Calibrating target frame 1 of 18
Loading target frame:
E:/foton/Astro/2017/flats/_IMG8709.DNG

Timestamp: Thu Nov 16 23:35:39 2017
Camera: Pentax K-1
Owner: Lage Sjoblom
DNG Version: 1.2.0.0
ISO speed: 100
Shutter: 1/1000.0 sec
Aperture: f/0.0
Focal length: 1000.0 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:  7360 x 4912
Full size:   7392 x 4950
Image size:  7376 x 4932
Output size: 7376 x 4932
Raw colors: 3
Filter pattern: RG/GB
Daylight multipliers: 2.345715 0.956155 1.320830
Camera multipliers: 1.957031 1.000000 2.019531 0.000000

Invoking: dcraw -4 -o 0 -r 1 1 1 1 -D -t 0 -k 0 -H 1
Decoding Pentax K-1 file (7376x4932 pixels, ISO=100, Exposure=1/1000s): done
Loading raw image: done
*** Error: Incompatible image geometry


.pef:
Code: [Select]
ImageCalibration: Global context

Loading master calibration frames:
Loading calibration frame image:
E:/foton/Astro/2017/bias_iso3200/superbias_v.xisf
Loading image: w=7392 h=4950 n=1 Gray Float32
904 FITS keyword(s) extracted.
Loading calibration frame image:
E:/foton/Astro/2017/masters/master_dark_iso3200.xisf
Loading image: w=7392 h=4950 n=1 Gray Float32
251 FITS keyword(s) extracted.

Dark frame optimization thresholds:
Td0 = 0.00034062 (653169 px = 1.785%)

Calibration of 24 target frames:
* Using 12 worker threads

Calibrating target frame 1 of 24
Loading target frame:
E:/foton/Astro/2017/flats/_IMG8727.PEF

Timestamp: Fri Nov 17 00:26:18 2017
Camera: Pentax K-1
Owner: Lage Sjoblom
ISO speed: 100
Shutter: 1/1000.0 sec
Aperture: f/0.0
Focal length: 1000.0 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:  7360 x 4912
Full size:   7392 x 4950
Image size:  7392 x 4950
Output size: 7392 x 4950
Raw colors: 3
Filter pattern: RG/GB
Daylight multipliers: 2.446177 0.956158 1.306985
Camera multipliers: 16032.000000 8192.000000 16608.000000 8192.000000

Invoking: dcraw -4 -o 0 -r 1 1 1 1 -D -t 0 -k 0 -H 1
Decoding Pentax K-1 file (7392x4950 pixels, ISO=100, Exposure=1/1000s): done
Loading raw image: done

Calibrating target frame 2 of 24

BR,
Lage

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: Pentax K-1 .dng files cropped
« Reply #1 on: 2017 November 17 01:39:27 »
Hi Lage,

the fact that the image in DNG format is cropped seems to have nothing to do with PixInsight. Both with the raw PEF file and the DNG file PixInsight calls dcraw as raw developping software, with the very same parameters.

1) For the frames at hand:
So the question is: how (with what software) did you get the DNG files? Is it possible to adjust the image size in the process of converting to DNG format?

If that isn't possible you could crop the width of the PEF files after openeing in Pixinsight, paying attention to cut off at the correct side of the image.

2) For the future:
However, it seems to me that you use different file formats / software for light frame and dark or bias frame acquisition. I advise to generally avoid that - then you should not have any problems with the processing.

Bernd

Offline lage

  • Newcomer
  • Posts: 22
Re: Pentax K-1 .dng files cropped
« Reply #2 on: 2017 November 17 14:38:43 »
Hi.
Yes, i noticed that the output comes from dcraw by running "dcraw -i -v <filename>
I also tried libraw, who will replace dcraw in PI according to this post:
https://pixinsight.com/forum/index.php?topic=11726.msg72275#msg72275
libraw outputs the same size for both the .pef and .dng files:

.pef
Code: [Select]
F:\download\libraw>raw-identify -v _IMG8727.PEF

Filename: _IMG8727.PEF
Timestamp: Fri Nov 17 00:26:18 2017
Camera: Pentax K-1
Body serial: 6398821
Owner: Lage Sjoblom

EXIF:
        MinFocal: 0.0 mm
        MaxFocal: 0.0 mm
        MaxAp @MinFocal: f/0.0
        MaxAp @MaxFocal: f/0.0
        MaxAperture @CurFocal: f/0.0
        FocalLengthIn35mmFormat: 1000 mm
        LensMake:
        Lens:


Makernotes:
        DriveMode: -1
        FocusMode: -1
        MeteringMode: -1
        AFPoint: -1
        ExposureMode: -1
        ImageStabilization: -1
        CameraFormat: 2, FF
        CameraMount: 10, Pentax K
        LensID: 0 0x0
        Lens:
        LensFormat: 0, Undefined
        LensMount: 10, Pentax K
        FocalType: 0, Undefined
        LensFeatures_pre:
        LensFeatures_suf:
        MinFocal: 0.0 mm
        MaxFocal: 0.0 mm
        MaxAp @MinFocal: f/0.0
        MaxAp @MaxFocal: f/0.0
        MinAp @MinFocal: f/22.0
        MinAp @MaxFocal: f/0.0
        MaxAp: f/0.0
        MinAp: f/0.0
        CurFocal: 0.0 mm
        CurAp: f/0.0
        MaxAp @CurFocal: f/0.0
        MinAp @CurFocal: f/0.0
        TeleconverterID: 0
        Teleconverter:
        AdapterID: 0
        Adapter:
        AttachmentID: 0
        Attachment:

ISO speed: 100
Shutter: 1/1000.0 sec
Aperture: f/0.0
Focal length: 1000.0 mm
Flash exposure compensation: 0.00 EV
Embedded ICC profile: no
Number of raw images: 1
Thumb size:  7360 x 4912
Full size:   7392 x 4950
Image size:  7376 x 4932
Output size: 7376 x 4932
Raw colors: 3
Filter pattern: RGGBRGGBRGGBRGGB
Highlight linearity limits: 16380 16380 16380 16380
Makernotes 'As shot' multipliers: 16032.000000 8192.000000 16608.000000 8192.000000
Makernotes 'Daylight' multipliers: 17476 8192 13682 8192
Makernotes 'Tungsten' multipliers: 10837 8192 24099 8192
Makernotes 'Flash' multipliers: 18989 8192 11684 8192
Makernotes 'Cloudy' multipliers: 19365 8192 11840 8192
Makernotes 'Shade' multipliers: 21680 8192 10293 8192
Makernotes 'Daylight Fluorescent D' multipliers: 21356 8192 13235 8192
Makernotes 'Day White Fluorescent N' multipliers: 18213 8192 14988 8192
Makernotes 'Cool White Fluorescent W' multipliers: 16480 8192 18080 8192
Makernotes 'Warm White Fluorescent L' multipliers: 13908 8192 22842 8192
Camera2RGB matrix:
1.4688  -0.4725 0.0037
-0.2267 1.5352  -0.3085
0.0351  -0.4141 1.3790

XYZ->CamRGB matrix:
0.8566  -0.2746 -0.1201
-0.3612 1.2204  0.1550
-0.0893 0.1680  0.6264

Derived D65 multipliers: 2.446177 0.956158 1.306985

.dng
Code: [Select]
F:\download\libraw>raw-identify -v _IMG8726.dng

Filename: _IMG8726.dng
Timestamp: Thu Nov 16 23:35:43 2017
Camera: Pentax K-1
Body serial: 6398821
Owner: Lage Sjoblom
DNG Version: 1.2.0.0

EXIF:
        MinFocal: 0.0 mm
        MaxFocal: 0.0 mm
        MaxAp @MinFocal: f/0.0
        MaxAp @MaxFocal: f/0.0
        MaxAperture @CurFocal: f/0.0
        FocalLengthIn35mmFormat: 1000 mm
        LensMake:
        Lens:


Makernotes:
        DriveMode: -1
        FocusMode: -1
        MeteringMode: -1
        AFPoint: -1
        ExposureMode: -1
        ImageStabilization: -1
        CameraFormat: 2, FF
        CameraMount: 10, Pentax K
        LensID: 0 0x0
        Lens:
        LensFormat: 0, Undefined
        LensMount: 10, Pentax K
        FocalType: 0, Undefined
        LensFeatures_pre:
        LensFeatures_suf:
        MinFocal: 0.0 mm
        MaxFocal: 0.0 mm
        MaxAp @MinFocal: f/0.0
        MaxAp @MaxFocal: f/0.0
        MinAp @MinFocal: f/22.0
        MinAp @MaxFocal: f/0.0
        MaxAp: f/0.0
        MinAp: f/0.0
        CurFocal: 0.0 mm
        CurAp: f/0.0
        MaxAp @CurFocal: f/0.0
        MinAp @CurFocal: f/0.0
        TeleconverterID: 0
        Teleconverter:
        AdapterID: 0
        Adapter:
        AttachmentID: 0
        Attachment:

ISO speed: 100
Shutter: 1/1000.0 sec
Aperture: f/0.0
Focal length: 1000.0 mm
Flash exposure compensation: 0.00 EV
Embedded ICC profile: no
Baseline exposure: -0.506
Number of raw images: 1
Thumb size:  7360 x 4912
Full size:   7392 x 4950
Image size:  7376 x 4932
Output size: 7376 x 4932
Raw colors: 3
Filter pattern: RGGBRGGBRGGBRGGB
Highlight linearity limits: 16380 16380 16380 16380
Makernotes 'As shot' multipliers: 1.957031 1.000000 2.019531 0.000000
Makernotes 'Daylight' multipliers: 17476 8192 13682 8192
Makernotes 'Tungsten' multipliers: 10837 8192 24099 8192
Makernotes 'Flash' multipliers: 18989 8192 11684 8192
Makernotes 'Cloudy' multipliers: 19365 8192 11840 8192
Makernotes 'Shade' multipliers: 21680 8192 10293 8192
Makernotes 'Daylight Fluorescent D' multipliers: 21356 8192 13235 8192
Makernotes 'Day White Fluorescent N' multipliers: 18213 8192 14988 8192
Makernotes 'Cool White Fluorescent W' multipliers: 16480 8192 18080 8192
Makernotes 'Warm White Fluorescent L' multipliers: 13908 8192 22842 8192
Camera2RGB matrix:
1.4687  -0.4727 0.0039
-0.2267 1.5353  -0.3085
0.0351  -0.4142 1.3791

XYZ->CamRGB matrix:
0.8566  -0.2746 -0.1201
-0.3612 1.2204  0.1550
-0.0893 0.1680  0.6264

DNG Illuminant 1: Illuminant A
DNG Illuminant 2: D65
camRGB -> sRGB Matrix:
1.4687  -0.2267 0.0351
-0.4727 1.5353  -0.4142
0.0039  -0.3085 1.3791

DNG color matrix 1:
1.1137  -0.5750 -0.1198
-0.3412 1.0166  0.3786
-0.0175 0.0404  0.7194

DNG color matrix 2:
0.8933  -0.2863 -0.1253
-0.3612 1.2204  0.1550
-0.0884 0.1663  0.6198

Derived D65 multipliers: 2.345715 0.956155 1.320830

So, it seems to be a bug in dcraw causing this.
No tool was used to create the .dng file, it´s straight out of camera. In Pentax cameras, you have the choice to save RAW-files in either .pef or .dng format.
So the image size should be the same.

Attached is a side-by-side comparison of the output from libraw for both the .dng and .pef files.

So, my question now is; When will the libraw based DSLR_RAW module be available in PI? I´m eager to try it.

BR,
Lage