camera

Why is inverse intrinsic matrix denoted with dimensions [3, 4]?

Why is inverse intrinsic matrix denoted with dimensions [3, 4]? Question: I am working with the multinerf Framework from Google Research. It’s great to work with and things are actually pretty clear down to the paragraph existing data loaders under Intrinsic camera poses: Intrinsic camera poses pixtocams= [N, 3, 4] numpy array of inverse intrinsic …

Total answers: 1

RGB565 1D array to 3d RGB image

RGB565 1D array to 3d RGB image Question: I have a 1D RGB565 array that I get from a camera and would like to convert it to a 3D RGB image. So the image has QVGA resolution (320×240) and with the RGB565 format that results to a 153600 byte array. Is there a quick way …

Total answers: 1

Constant camera grabbing with OpenCV & Python multiprocessing

Constant camera grabbing with OpenCV & Python multiprocessing Question: I’m after constantly reading images from an OpenCV camera in Python and reading from the main program the latest image. This is needed because of problematic HW. After messing around with threads and getting a very low efficiency (duh!), I’d like to switch to multiprocessing. Here’s …

Total answers: 1

How to project a chessboard in camera coordinates to real-world coordinates in OpenCV using rvecs and tvecs outputs of cv.calibrateCamera?

How to project a chessboard in camera coordinates to real-world coordinates in OpenCV using rvecs and tvecs outputs of cv.calibrateCamera? Question: Situation Following the Camera Calibration tutorial in OpenCV I managed to get an undistorted image of a checkboard using cv.calibrateCamera: Original image: (named image.tif in my computer) Code: import numpy as np import cv2 …

Total answers: 3

How to save an image read via camera.capture_continuous (format rgb) and save it to a file

How to save an image read via camera.capture_continuous (format rgb) and save it to a file Question: I read the raspi camera via camera.capture_continuous(stream,format=’rgb’, use_video_port=True, resize=(width, height) to feed it to the Coral Edge USB Accelerator. This works perfectly. But now I want to save certain images (depending on the analysis) to the harddrive. I’m …

Total answers: 2

How to get the latest frame from capture device (camera) in opencv

How to get the latest frame from capture device (camera) in opencv Question: I want to connect to a camera, and only capture a frame when an event happens (e.g. keypress). A simplified version of what I’d like to do is this: cap = cv2.VideoCapture(device_id) while True: if event: img = cap.read() preprocess(img) process(img) cv.Waitkey(10) …

Total answers: 5

How to open camera with pygame in Windows?

How to open camera with pygame in Windows? Question: I want to open the camera with Python using the pygame module on a Windows 7 machine, but it’s not working. I have previously used “/dev/video0” which is the read device in Linux. The pygame documentation just shows how to open a camera device in Linux. …

Total answers: 3

Capturing video from two cameras in OpenCV at once

Capturing video from two cameras in OpenCV at once Question: How do you capture video from two or more cameras at once (or nearly) with OpenCV, using the Python API? I have three webcams, all capable of video streaming, located at /dev/video0, /dev/video1, and /dev/video2. Using the tutorial as an example, capturing images from a …

Total answers: 10

Setting Camera Parameters in OpenCV/Python

Setting Camera Parameters in OpenCV/Python Question: I am using OpenCV (2.4) and Python (2.7.3) with a USB camera from Thorlabs (DC1545M). I am doing some image analysis on a video stream and I would like to be able to change some of the camera parameters from my video stream. The confusing thing is that I …

Total answers: 5