Only want to transfer Y (from YUV420) #438
Unanswered
Hornochse007
asked this question in
Q&A
Replies: 1 comment 10 replies
-
Hi, can you just do
I think that will just give you a "view" of the data without copying it, so it should be fast. (Some operations want proper contiguous data, in which case you would have to copy it, it will depend what you want to do.) |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everybody,
I think, this would be a very easy question, but I don't find the answer. Maybe anybody can help me?
I need only the Y-Plane from the buffer, but this really fast. So if I try to cut the np.array, the time will be to long. My idea was to use a new configuration.
Instead of the config {'format':'YUV420', 'size':(4056,3040), 'stride':4096, 'framesize':18677760}
I want a new format: e.g. {'format':'Y', 'size':(4056,3040), 'stride':4064, 'framesize':12354560} or the yuv420 and there only 3040 rows.
`
from picamera2 import Picamera2
pc2 = Picamera2()
cc = pc2.create_still_configuration(main={"size":(4056,3040), "format":"YUV420"}}
pc2.configure(cc)
pc2.start()
image = pc2.capture_array("main")
pc2.stop()
`
Maybe anybody has an idea for me?
Thanks a lot and stay healthy,
Hornochse007
Beta Was this translation helpful? Give feedback.
All reactions