0

I'm making a raw capture tool for raspberry pi and the official HQ camera. I can't seem to get RAW DNG or TIFF images, whatever I do. Here's my current code:

from picamera import PiCamera
print('Import successful!')
print("Capturing!")
with PiCamera() as cam:
    cam.capture("out.nef", format="raw", bayer="true")
print('Converting...')
import rawpy
import imageio

path = 'out.nef'
with rawpy.imread(path) as raw:
    rgb = raw.postprocess()
imageio.imsave('default.tiff', rgb)

I tried PiDNG, but it seems to have lost support for the legacy camera stack. Please help!

4
  • Why are you not using the new PiCamera2 library? From a quick google github.com/raspberrypi/picamera2/issues/318
    – CoderMike
    Commented Jun 19, 2023 at 13:08
  • Wait. PiCamera2 works with the HQ camera?
    – N3RDIUM
    Commented Jun 19, 2023 at 13:09
  • 2
    Yes, works with all Pi cameras.
    – CoderMike
    Commented Jun 19, 2023 at 13:20
  • Ooh, thanks for clarifying!
    – N3RDIUM
    Commented Jun 19, 2023 at 13:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.