Skip to content

Commit

Permalink
fix: BGR (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Nov 17, 2024
1 parent 7eab85d commit 5d4158f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ def open(self):

def get_frame(self) -> np.ndarray:
if self.camera_type == "libcamera":
return self._camera.capture_array()
frame = self._camera.capture_array() # In RGB format
# Convert RGB to BGR for OpenCV compatibility
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)
return frame
else:
return self._camera.get()

Expand Down

0 comments on commit 5d4158f

Please sign in to comment.