Giter Club home page Giter Club logo

Comments (4)

l1npengtul avatar l1npengtul commented on June 1, 2024 1

The nannou crates's implementation creates a different Texture object per nannou documentation. As far as a pure Wgpu workload is concerned, it is working as intended.
Creating your own implementation of that method as a function should be trivial - just replace the wgpu to nannou::wgpu

from nokhwa.

mofeing avatar mofeing commented on June 1, 2024

So after digging up a lil bit (and some help from the nannou community), there is a better option than reimplementing the Camera::frame_texture method. Although this is a nannou thing, I'll post it here in case anyone runs into the same problem.

The idea is to capture a frame, transform the image into a DynamicImage and create a nannou::Texture using the from_image method.

let img = camera.frame().unwrap();
let dyn_img = image::DynamicImage::ImageRgb8(img);
let tex = nannou::wgpu::Texture::from_image((device, queue), &dyn_img);

from nokhwa.

l1npengtul avatar l1npengtul commented on June 1, 2024

I will add a frame_nannou_texture for nannou users.

from nokhwa.

mofeing avatar mofeing commented on June 1, 2024

Given that nannou is organized in a modular manner, I think it would be a better idea to write a wrapper and implement the features stated in nannou-org/nannou#464. Something like nannou_camera or nannou_webcam.

I can work on this.

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.