You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to extract 3 channels from an image coming from Kinect2 stream. So, first I ream the color stream with the pylibfreenect2 package.
color = frames["color"]
So I have the following shape
print(color.asarray().shape) #(1080, 1920, 4)
As I understood, 4 is rather the number of bytes per pixel or the alpha-channel. I want the image to have 3 channels (RGB) and have a shape of (1080, 1920, 3). I tried to do it like:
image_c = cv2.cvtColor(c, cv2.COLOR_RGBA2RGB)
But had an error from PIL package:
TypeError: Cannot handle this data type
The text was updated successfully, but these errors were encountered:
I am trying to extract 3 channels from an image coming from Kinect2 stream. So, first I ream the color stream with the pylibfreenect2 package.
color = frames["color"]
So I have the following shape
print(color.asarray().shape) #(1080, 1920, 4)
As I understood, 4 is rather the number of bytes per pixel or the alpha-channel. I want the image to have 3 channels (RGB) and have a shape of (1080, 1920, 3). I tried to do it like:
image_c = cv2.cvtColor(c, cv2.COLOR_RGBA2RGB)
But had an error from PIL package:
TypeError: Cannot handle this data type
The text was updated successfully, but these errors were encountered: