Git Product home page Git Product logo

Comments (10)

rmhrisk avatar rmhrisk commented on May 23, 2024 1

Sounds good. As for a sample, mind providing a PR?

from gammacv.

tetreault avatar tetreault commented on May 23, 2024

Correction - I have it functional, however it is giving me results very different from the official GammaCV demo on the website. Here's a screenshot.

Screen Shot 2019-03-13 at 9 57 59 PM

from gammacv.

WorldThirteen avatar WorldThirteen commented on May 23, 2024

Hi @tetreault!
Looks like the problem is here:

this.currFrameTensor = new gm.Tensor("uint8", [
  this.modifiedCanvas.clientWidth,
  this.modifiedCanvas.clientHeight,
  4
]);

Since the gm.Tensor, and browser's getImageData use Row-major ordering for multidimentional data (Wiki), the first element in shape (second argument) must be height of the image, like:

this.currFrameTensor = new gm.Tensor("uint8", [
  this.modifiedCanvas.clientHeight,
  this.modifiedCanvas.clientWidth,
  4
]);

So each tensor that represents the image should have shape: [height, width, 4].
Hope this helps!
Do you think this should be highlighted in our docs?
I didn't try to check it using your code. If my suggestion does not help I'll try later today.

from gammacv.

tetreault avatar tetreault commented on May 23, 2024

Hello @WorldThirteen thank you for the time and the help!

Unfortunately switching the width and height parameters did not produce the result I was hoping for seen in the pixelwise_math demo. I wanted to save you some time and I created a basic demo repo on github for you to check out - the file to look at is pages/index.vue. Here's the repo link: https://github.com/tetreault/gammacv-nuxt-demo

When I used your suggestion the canvas just displayed basically unmodified frames from the webcam feed. I've not done much work with tensors and am new to GammaCV so I am sure the mistake I am making is a simple one!

from gammacv.

tetreault avatar tetreault commented on May 23, 2024

@WorldThirteen after merging your PR it works! It looks like my mistake was a small stupid one 😄

Thank you for the help! I'm excited to use gammacv in some upcoming work!

from gammacv.

tetreault avatar tetreault commented on May 23, 2024

I will also keep the gammacv nuxt repo up that I linked in my prior comment, in case anyone in the future needs it!

from gammacv.

rmhrisk avatar rmhrisk commented on May 23, 2024

@tetreault we would love to hear about the projects your doing with GammaCV as it will influence how we add to it in the future.

from gammacv.

tetreault avatar tetreault commented on May 23, 2024

Sure thing! I'd be happy to provide feedback. Currently I'm just prototyping out an experience pending client approval, but if we get client approval on the design and prototype I'm happy to send through an email discussing the project at a high level. Is the email in your github bio a good one to send this email to later on @rmhrisk ?

from gammacv.

tetreault avatar tetreault commented on May 23, 2024

As for GammaCV docs, I do think in my opinion having a small simple isolated snippet of code under "Getting Started" would be a good head start, similar to how you have it for handling static images/chaining operations.

from gammacv.

tetreault avatar tetreault commented on May 23, 2024

no problem!

from gammacv.

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.