Open mcnalu opened 1 year ago
I tried your changes in 4.0.9 but got another error instead: Before:
width, height = self.model.fmt.get("size", (0,0))
AttributeError: 'RaspberryPiHqCamera' object has no attribute 'fmt'
After:
self.fmt['size']=(width,height)
TypeError: list indices must be integers or slices, not str
It looks like you've supplied fmt as a list but it should be a dict. Here's an example that works on 4.0.9 for me:
fmt={}
fmt['format']='SRGGB12_CSI2P'
fmt['stride']=3072
# choose a predefined camera model, set the sensor mode and bayer layout.
# this camera model class sets the appropriate DNG's tags needed based on the camera sensor. ( needed for bit unpacking, color matrices )
#3 is 4056 by 3040, 12bpp
#2 is 2028 by 1520, 12bpp, no crop so 2x2 bin I think
camera = RaspberryPiHqCamera(2, fmt, CFAPattern.BGGR)
Fix that gets raw2dng.py working again by supporting fmt in init of camdefs.py.