Git Product home page Git Product logo

opencv-samples's Introduction

Learning OpenCV and need a place to play.


Ok, so how do you compile. 

Trying this:
gcc `pkg-config --cflags --libs opencv` -o foo hello-world.cpp

Undefined symbols:
  "___gxx_personality_v0", referenced from:
      ___gxx_personality_v0$non_lazy_ptr in ccyR0e4T.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
dao:opencv-samples adamb$

Wrong compiler.  User g++ instead.

 g++ `pkg-config --cflags --libs opencv` -o hello-world hello-world.cpp 

Copied a test image in and I can now run it like this:
./hello-world test.png

Seems to work with both a png and a jpg file.  

The jpg is too big for the screen, so it's difficult to see.

2009-01-10

Trying Facedetect

 gcc `pkg-config opencv --cflags --libs` facedetect.c -o facedetect

./facedetect --cascade="/opt/local/var/macports/software/opencv/1.0.0_0/opt/local/share/opencv/haarcascades/haarcascade_frontalface_alt.xml" jared.jpg 

Q: Why does it keep running over and over?
A: Because it's using cvCaptureFromAVI() and I'm giving it a JPEG.  It just keeps reading the image over and over again.  I suppose this is ok.

opencv-samples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.