From 30e13e7fa06895fee6b089498840c688a69ef850 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 13 Apr 2022 17:00:54 +0200 Subject: Using bgr24 instead of rgb24 pixel format --- src/argaze/TobiiGlassesPro2/TobiiVideo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/argaze/TobiiGlassesPro2/TobiiVideo.py b/src/argaze/TobiiGlassesPro2/TobiiVideo.py index b3e11f3..6318de8 100644 --- a/src/argaze/TobiiGlassesPro2/TobiiVideo.py +++ b/src/argaze/TobiiGlassesPro2/TobiiVideo.py @@ -91,7 +91,7 @@ class TobiiVideoSegment(): video_ts += self.__vts_offset # return micro second timestamp and frame data - return video_ts, TobiiVideoFrame(frame.to_ndarray(format='rgb24'), frame.width, frame.height) + return video_ts, TobiiVideoFrame(frame.to_ndarray(format='bgr24'), frame.width, frame.height) class TobiiVideoStream(threading.Thread): """Capture Tobii Glasses Pro 2 video camera stream.""" @@ -161,7 +161,7 @@ class TobiiVideoStream(threading.Thread): self.__read_lock.acquire() # store frame time, matrix, width, height and pts into a tuple - self.__frame_tuple = (frame.time, frame.to_ndarray(format='rgb24'), frame.width, frame.height) + self.__frame_tuple = (frame.time, frame.to_ndarray(format='bgr24'), frame.width, frame.height) # unlock frame access self.__read_lock.release() @@ -207,7 +207,7 @@ class TobiiVideoOutput(): def write(self, frame): """Write a frame into the output video file""" - formated_frame = av.VideoFrame.from_ndarray(frame, format='rgb24') + formated_frame = av.VideoFrame.from_ndarray(frame, format='bgr24') formated_frame.reformat(format=self.__stream.codec_context.pix_fmt, interpolation=None) self.__container.mux(self.__stream.encode(formated_frame)) -- cgit v1.1