Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate using a component to perform RGB conversion #32

Closed
waveform80 opened this issue Dec 9, 2013 · 1 comment
Closed

Investigate using a component to perform RGB conversion #32

waveform80 opened this issue Dec 9, 2013 · 1 comment
Assignees
Milestone

Comments

@waveform80
Copy link
Owner

The video splitter component does not support RGB format. This means that since release 0.8, video-port-based raw captures can only be in YUV format. This is probably quite a niche requirement, but it's not good to remove functionality and hence we should strive to re-introduce this capability before a 1.0 release.

@ghost ghost assigned waveform80 Dec 9, 2013
@waveform80
Copy link
Owner Author

This is turning out to be an interesting one. It appears the resizer can be used to perform certain RGB conversions. The BGR24 format that's usually used for RGB output isn't supported, but BGRA and RGBA are. Given that it's relatively trivial to convert either of these into RGB (just slice out the unused alpha component and re-order bytes if required), this should form a basis for a fix. In addition, we should offer RGBA and BGRA as additional raw formats (simply because it's trivial).

Furthermore, this shouldn't simply be a fix for raw video-port captures - it should probably form the basis for all raw captures. In other words, deprecate the raw_format property, make the format of the capture method the raw format and push all the work into the encoders module so we can stop messing around with the camera's own ports (which prevent things like recording+raw captures from working). This'll also simplify raw RGB captures from:

camera.raw_format = 'rgb'
camera.capture('foo.data', format='raw')

to:

camera.capture('foo.data', format='rgb')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant