Coder Social home page Coder Social logo

Comments (5)

atduskgreg avatar atduskgreg commented on July 17, 2024

That's an interesting thought, Rune. I usually end up using both the OpenCV for Processing object as well as built-in OpenCV objects like Mat, etc. So I don't very frequently have the use case you're talking about. At the very least I'm going to be using the main OpenCV object for I/O to and from PImages, etc. No?

from opencv-processing.

runemadsen avatar runemadsen commented on July 17, 2024

Yes, I guess it's more of an advanced user thing, as most people will always create a Processing object. I was just porting a Random Forest example in this repo:

https://github.com/runemadsen/random-forest-processing-opencv/blob/master/random_forest.pde

You'll see that my source code looks like this:

// we use Greg's nice little library to load the correct dylibs at runtime. We never actually 
// use this object, but we get error if we don't instantiate it before using the core OpenCV classes
OpenCV opencv;
opencv = new OpenCV(this, "test.jpg");

// now use the Mat class
Mat training_data = new Mat(200, 64, CvType.CV_32FC1);

I would consider it low priority, but wanted to ping you so you know the use case.

from opencv-processing.

atduskgreg avatar atduskgreg commented on July 17, 2024

Yeah. I saw that. Looks great. Implementing Random Decision Forests has been on my list so thanks for getting that ball rolling! I guess what's weird about this is that you're using it without any images. Which is kinda funny in OpenCV! But I see what it would be useful. You're basically in a mode of using OpenCV's machine learning libraries for their own sake rather than with images. That's a good use case. I'll see about adding that init. But in the meantime, you can just give the OpenCV constructor width and height, you don't have to give it an image.

from opencv-processing.

runemadsen avatar runemadsen commented on July 17, 2024

Yes, it is kind of weird. I guess my training data is a matrix, so it's image-like, without an image actual to load.

Ah, didn't see that constructor in the source. I'll remove the test image then. That empty constructor is basically the same as init, so I think you can close this for now.

Thanks a bunch.

from opencv-processing.

atduskgreg avatar atduskgreg commented on July 17, 2024

Ok. Cool.

from opencv-processing.

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.