What code/libraries are you using as 'GitHub DNG Code' and have you posted the question to the Issues for the GitHub repo?I just do not understand why when I run the GitHub DNG code, it produces a White and Grey Boxes image but in the Raspberry Pi OS terminal running " rpicam-still -r -o test.jpg " it produces a correct DNG image
I'm also curious as to how you know that 'rpicam-still -r -o test.jpg' produces a proper DNG image. The 'test.job' will be a JPEG file. I assume there will be a 'test.dng' file also produced which needs to be processed to convert from RAW format to an image format.
Code:
# Capture a DNG.import timefrom picamera2 import Picamera2, Previewpicam2 = Picamera2()picam2.start_preview(Preview.QTGL)preview_config = picam2.create_preview_configuration()capture_config = picam2.create_still_configuration(raw={})picam2.configure(preview_config)picam2.start()time.sleep(2)picam2.switch_mode_and_capture_file(capture_config, "full.dng", name="raw")
Code:
# Capture a DNG and a JPEG made from the same raw data.import timefrom picamera2 import Picamera2, Previewpicam2 = Picamera2()picam2.start_preview(Preview.QTGL)preview_config = picam2.create_preview_configuration()capture_config = picam2.create_still_configuration(raw={}, display=None)picam2.configure(preview_config)picam2.start()time.sleep(2)r = picam2.switch_mode_capture_request_and_stop(capture_config)r.save("main", "full.jpg")r.save_dng("full.dng")
Which I did ask on the GitHub Discussion and no one responded yet (and also the link is on the replies here). And I know that it is producing it correctly, or at least I think so, because its not the black and white boxes and rather an actual image that is in black and white (downside is the pixel size is smaller, 253 x 190). Also I just added the pictures on the GitHub, since I cannot add them here
Statistics: Posted by Ayanhb10 — Fri Apr 05, 2024 10:34 pm