diff options
author | Théo de la Hogue | 2022-04-13 17:00:54 +0200 |
---|---|---|
committer | Théo de la Hogue | 2022-04-13 17:00:54 +0200 |
commit | 30e13e7fa06895fee6b089498840c688a69ef850 (patch) | |
tree | 0791fefbf0410bc28645ea1e7f4aa0eb0f7b24ae | |
parent | 13bc2c352c6fe94163b7868a697b6257fcfba3fa (diff) | |
download | argaze-30e13e7fa06895fee6b089498840c688a69ef850.zip argaze-30e13e7fa06895fee6b089498840c688a69ef850.tar.gz argaze-30e13e7fa06895fee6b089498840c688a69ef850.tar.bz2 argaze-30e13e7fa06895fee6b089498840c688a69ef850.tar.xz |
Using bgr24 instead of rgb24 pixel format
-rw-r--r-- | src/argaze/TobiiGlassesPro2/TobiiVideo.py | 6 |
1 files changed, 3 insertions, 3 deletions
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)) |