GithubHelp home page GithubHelp logo

Comments (7)

atduskgreg avatar atduskgreg commented on August 14, 2024

It's generating paths like this:

/C:/Users/gregab/Documents/Processing/libraries/opencv_processing/data/haarcascade_frontalface_alt.xml

Had assumed the problem must've been because I run Windows in a VM, but now I'm suspecting I'm doing something much stupider.

from opencv-processing.

SidSt avatar SidSt commented on August 14, 2024

I get this error in "LiveCamTest":

"OpenCV for Processing 0.4 by Greg Borenstein http://gregborenstein.com
Using Java OpenCV 2.4.5.0
Cascade failed to load"

I've tried using these paths and none worked:

  • opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE);
  • opencv.loadCascade("C:\Users\Sid\Downloads\processing-2.0\modes\java\libraries\opencv_processing\data\haarcascade_frontalface_alt.xml");
  • opencv.loadCascade("C:\Users\Sid\Downloads\processing-2.0\modes\java\libraries\opencv_processing\data\haarcascade_frontalface_alt.xml");
  • opencv.loadCascade("/C:/Users/Sid/Downloads/processing-2.0/modes/java/libraries/opencv_processing/data/haarcascade_frontalface_alt.xml");
  • opencv.loadCascade("/C:/Users/Sid/Downloads/Nova Pasta (2)/opencv_processing/data/haarcascade_frontalface_alt.xml");
  • opencv.loadCascade("C:/Users/Sid/Downloads/Nova Pasta (2)/opencv_processing/data/", "haarcascade_frontalface_alt.xml");

The video opens, but not with Quicktime and will not appear face detection.

And in Processing 1.5.1 appears:

"NosuchMethodError: You may be using a library that's incompatible with this version of Processing"

from opencv-processing.

SidSt avatar SidSt commented on August 14, 2024

Anyone have any idea what is happening and how to solve?

from opencv-processing.

atduskgreg avatar atduskgreg commented on August 14, 2024

Fixed as of 0.4.1 and 5dafc9c with thanks to @P0ulp!

from opencv-processing.

binocularity avatar binocularity commented on August 14, 2024

Hi - cascade in LiveCamTest seems OK on windows .. except when I am using Processing with the libraries on a folder in a network drive ?

Even giving the absolute path doesn't seem to help, eg:

opencv.loadCascade("//userfs/nh784/w2k/Processing/libraries/opencv_processing/library/cascade-files/lbpcascade_frontalface.html",true);

gives me the error:
OpenCV for Processing 0.5.0 by Greg Borenstein http://gregborenstein.com
Using Java OpenCV 2.4.5.0
Cascade failed to load

It would be very useful if anyone has a fix for this? I am trying to teach a lab with this and I don't have the option to move off the network drive.

from opencv-processing.

atduskgreg avatar atduskgreg commented on August 14, 2024

Hmm. When you pass it the absolute path, loadCascade() just passes that directly to OpenCV's CascadeClassifier constructor:

https://github.com/atduskgreg/opencv-processing/blob/master/src/gab/opencv/OpenCV.java#L497

Have you verified that the path your passing in is actually a cascade? It ends in a .html extension which doesn't sound right. I'd expect it to be .xml. And, in fact, there is no lbpcascade_frontalface.html file in the cascade-files folder, but there is lbpcascade_frontalface.xml:

https://github.com/atduskgreg/opencv-processing/blob/master/lib/cascade-files/lbpcascade_frontalface.xml

Could that be the problem?

from opencv-processing.

binocularity avatar binocularity commented on August 14, 2024

aha - silly me - apologies for having to check my syntax.

Yes that all works - now to turn it into an interesting lab assignment!

Many thanks

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.