GUI: Fix camera color scheme
This commit is contained in:
1 parent
f783a887ed
commit
9adbff0006
1 file changed
+1
-1
@@ -33,7 +33,7 @@ class SampleCameraThread(QThread):
|
||||
if header["type"] == "uint8" and len(header_shape) == 2:
|
||||
bayer_image = np.frombuffer(data, dtype=np.uint8)
|
||||
bayer_image = bayer_image.reshape(header_shape)
|
||||
rgb_image = cv2.cvtColor(bayer_image, cv2.COLOR_BAYER_RG2RGB)
|
||||
rgb_image = cv2.cvtColor(bayer_image, cv2.COLOR_BAYER_GB2RGB)
|
||||
#cv2.COLOR_BAYER_GB2RGB for ethernet connection
|
||||
rgb_image = rgb_image[:, ::-1, :].copy()
|
||||
qimage = QImage(rgb_image.data, header_shape[1], header_shape[0], #For ethernet need header_shape[0], header_shape[1], header_shape[0]*3,
|
||||
|
||||
Reference in new issue
Block a user