I am new to python and as a project, I have to make a GUI which can be used with Allied Vision Camera in order to capture pictures, store it and adjust some features like exposure, white balance and gain. I have created a small code for fetching frames from the camera but it stays still when I move the camera and not updating the frames.
My code:
import cv2
from vimba import *
from queue import SimpleQueue
global is_streaming
is_streaming = True
queue = SimpleQueue
with Vimba.get_instance() as vimba:
cams = vimba.get_all_cameras()
with cams[0] as cam:
while is_streaming:
cam.set_pixel_format(PixelFormat.BayerRG8)
frame = cam.get_frame()
frame = frame.as_numpy_ndarray()
frame = cv2.cvtColor(frame, cv2.COLOR_BAYER_RG2RGB)
cv2.imshow('image', frame)
#queue.put(frame)
key = cv2.waitKey()
if key == ord('q'):
break
cv2.destroyAllWindows()
I am new to python and as a project, I have to make a GUI which can be used with Allied Vision Camera in order to capture pictures, store it and adjust some features like exposure, white balance and gain. I have created a small code for fetching frames from the camera but it stays still when I move the camera and not updating the frames. My code:
Any help is appreciated.