set pixel format in camera settings

This commit is contained in:
2024-07-15 12:17:00 +02:00
parent f2342d04b5
commit 10a4a9a3de
2 changed files with 5 additions and 6 deletions
+3 -4
View File
@@ -98,8 +98,8 @@ if __name__ == '__main__':
print(f"{item}: Not implemented")
# Config
camera_config = picam2.create_preview_configuration({'size': picam2.sensor_modes[0]['size']})
camera_config = picam2.create_preview_configuration({'size': (800, 600)})
camera_config = picam2.create_preview_configuration({'format': 'XRGB8888', 'size': picam2.sensor_modes[0]['size']})
camera_config = picam2.create_preview_configuration({'format': 'XRGB8888', 'size': (800, 600)})
picam2.configure(camera_config)
@@ -121,8 +121,7 @@ if __name__ == '__main__':
# Start timer
timer = cv2.getTickCount()
rgb = picam2.capture_array("main")
frame = cv2.cvtColor(rgb, cv2.COLOR_RGB2BGR)
frame = picam2.capture_array("main")
# Process the frame using OpenCV operations
cv2.imshow('Frame', frame)
+2 -2
View File
@@ -1,7 +1,7 @@
{
"NoiseReductionMode": 0,
"AeExposureMode": 0,
"ExposureTime": 13929,
"ExposureTime": 75030,
"AnalogueGain": 1.0,
"FrameRate": 60.38
"FrameRate": 10.580000000000002
}