Overlay displaying 640x75 and 640x150 areas for Raspberry v2 camera raspiraw capturing at 1007fps (with 640x75 and 640x150_s tools)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import numpy as np | |
from picamera2 import Picamera2, Preview | |
picam2 = Picamera2() | |
picam2.configure(picam2.create_preview_configuration()) | |
picam2.start_preview(Preview.QTGL, x=100, y=100, width=640, height=480) | |
picam2.start() | |
overlay = np.zeros((480, 640, 4), dtype=np.uint8) | |
col = (0xFF, 0xFF, 0x00) | |
overlay[0 , : ] = (col) + (0xFF,) | |
overlay[74 , : ] = (col) + (0x80,) | |
overlay[149 , : ] = (col) + (0xFF,) | |
overlay[:150, :1] = (col) + (0xFF,) | |
overlay[:150, 639: ] = (col) + (0xFF,) | |
picam2.set_overlay(overlay) | |
input("Press Enter to continue ...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example screenshot, shows the 640x75 and 640x150 areas on top of 640x480 camera preview window. Not really useful for raspiraw capturing, because raspiraw needs legacy camera mode, and picamera2 needs libcamera stack. So for working with raspiraw better use picamera version.
