Giter Club home page Giter Club logo

Comments (4)

l1npengtul avatar l1npengtul commented on June 13, 2024

Camera should be created once, and for your application a CallbackCamera would be appropriate to not block the main thread waiting on a frame. Once you get a buffer, you should decode it using RgbFormat to get a ImageBuffer<Rgb<u8> Vec<u8>>, which should be trivial to display in any image and/or canvas2d widget.

from nokhwa.

l1npengtul avatar l1npengtul commented on June 13, 2024

senpai is pretty close to release, just need to fix nv12 and make sure AVFoundation works.

from nokhwa.

bookshiyi avatar bookshiyi commented on June 13, 2024

senpai is pretty close to release, just need to fix nv12 and make sure AVFoundation works.

When I use nokhwa 0.10.3, the following error is prompted. Is the conversion of nv12 to rgb format still not available?

Captured Single Frame of 4147200
Frame format: NV12
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ProcessFrameError { src: NV12, destination: "RGB", error: "bad input buffer size" }', src/main.rs:97:53

Thank you sincerely.

from nokhwa.

l1npengtul avatar l1npengtul commented on June 13, 2024

The NV12 decoder is likely still somewhat buggy, or nokhwa is confused. Try running it through yuyv and see what happens.

If issue persists please open a new issue @bookshiyi

from nokhwa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.