asalamon74 / pktriggercord

Remote control for Pentax DSLR cameras
http://pktriggercord.melda.info
GNU Lesser General Public License v3.0
103 stars 39 forks source link

Wrong image height on RAW files from K-5 when using pktriggercord #72

Open SM3NSE opened 2 years ago

SM3NSE commented 2 years ago

Hi. I use a astromodified Pentax K-5 for astrophotography with Kstars/EKOS/INDI which uses libpktriggercord for camera control https://www.indilib.org/ccds/pentax-dslr.html

The problem is that the image size is wrong for RAW files. Raw image sizes when shot in camera are 4992x3284 Raw image sizes when shot with pktriggercord are 4992x3344 This leaves a black stripe at the bottom of each image, 60 pixels high, when shot with pktriggercord, which in turn causes problems in preprocessing astro images. I have compared Pentax K-1, K-3 and K-5, and this only happens on the K-5. I hope this can be fixed.

Some useful links: EXIF diffs on K-5 images shot in camera and with pktriggercord: https://drive.google.com/file/d/100cHsc_kZGuYItxAbh2lkY4YAo6nc9c9/view?usp=sharing

Comparision of image sizes for K-1, K-3, K-5, shot in camera and with pktriggercord: https://docs.google.com/spreadsheets/d/1XYhQfgmxXLO26zC3SFntfZpgl40_LS2MWYk1ggAzDU8/edit?usp=sharing (Shooting jpg or dng with K-1 and pktriggercord freezes camera and changes USB mode from MSC to PTP, hence missing images)

Images, EXIF data and more shot in cameras and with pktriggercord https://drive.google.com/drive/folders/1CnpVuBJx8Z0No5HPsfrl8_n-y9Ceua4U?usp=sharing

Best regards, Lage

asalamon74 commented 2 years ago

PkTriggerCord does not do any resizing or image processing. It asks for the camera for the image, downloads the binary data and saves it to a file.

Someone already reported (but I cannot find the link now) that pktriggercord save a "more raw" image compared to the images created just by the camera. It was quite useful for him (for astro photography), because some built-in noise reduction was skipped, it was better to process the images later.

Most likely there is an extra step in the camera which is skipped when we use pktriggercord. Since the API is not opensource but only some part of it is reverse engineered there is no info about how to call this extra step (or maybe it's not even possible).

At this point I'm afraid it should be processed by the raw converter. I do remember that in dcraw (used by ufraw) it was really easy to modify the image size and margins for the raw processing, I modified it for my K-x because I didn't like the original size (this problem was not related to pktriggercord).