Skip to content Skip to sidebar Skip to footer

Reduced Camera Resolution But Higher Display Window In Python Open Cv

I am working on a project which requires to do face detection on raspberry pi. I have a USB camera to do this. The frame rate was apparently very slow. So, I scaled down the captur

Solution 1:

If I understand you correctly, you want the display image to be a scaled up version of the original. If so, you just need cv2.resize

display_scale = 4
height, width = frame.shape[0:2]
height_display, width_display = display_scale * height, display_scale * width
# you can choose different interpolation methods
frame_display = cv2.resize(frame, (display_width, display_height),
                           interpolation=cv2.INTER_CUBIC)
cv2.imshow("captured video", frame_display)

Post a Comment for "Reduced Camera Resolution But Higher Display Window In Python Open Cv"