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

Convert frame to an uint8 numpy array #21

Closed
thibo73800 opened this issue Sep 7, 2021 · 1 comment
Closed

Convert frame to an uint8 numpy array #21

thibo73800 opened this issue Sep 7, 2021 · 1 comment
Assignees
Labels
aloscene aloscene good first issue Good for newcomers

Comments

@thibo73800
Copy link
Contributor

The following code should be available as a method of Frame instances, in order to convert the frame to numpy array in uint8 image format.

Code example

frame = frame.detach()
frame = frame.norm255()
frame = frame.cpu()
frame = frame.type(torch.uint8)
frame = frame.rename(None)
frame = frame.permute([1, 2, 0])
frame = frame.contiguous()
frame = frame.numpy()
@thibo73800 thibo73800 added the aloscene aloscene label Sep 7, 2021
@thibo73800 thibo73800 added the good first issue Good for newcomers label Jul 28, 2022
@thibo73800
Copy link
Contributor Author

This can be implement on top of as_numpy()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aloscene aloscene good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants