StereoPi OpenCV Python script 1.

preview_player
Показать описание
StereoPi OpenCV Python script 1.
Related article:
Code:
Рекомендации по теме
Комментарии
Автор

Hello, First of all thank you so much for the tutorial, It really does helps a lot.
I bought this kit for my project and it is really user friendly for beginners.
** the issue is, I have a custom mounting in which left camera is rotated 90 degrees anti-clockwise and right camera 90 degrees clockwise so that the camera ribbions are passed through the center of the mounting towards back on the stereopi board.

So now, When I run your code the images are inverted as per the rotaton. Due to limitation of my robot I cannot change the mounting. And I want to rotate the camera view.
My objective is to rotate left camera view 90 degrees clockwise and right camera view 90 degrees anti-clockwise.
What I have done is:
# Capture frames from the camera

for frame in camera.capture_continuous(capture, format="bgra", use_video_port=True, resize=(img_width, img_height)):
counter+=1

img_width_1 = int (cam_width * scale_ratio / 2)

frame_left = frame[:, :img_width_1, :]
frame_right = frame[:, img_width_1:, :]

frame_left_clockwise = cv2.flip(cv2.transpose(frame_left), 0)
frame_right_anticlockwise = cv2.flip(cv2.transpose(frame_right), 1)

combined_frame = np.hstack((frame_left_clockwise, frame_right_anticlockwise))

cv2.imshow("pair", combined_frame)

manojnawale
welcome to shbcf.ru