Coder Social home page Coder Social logo

object-detection's Introduction

Object Recognition with OpenCV and JavaFX

No Maintenance Intended

Computer Vision course - Politecnico di Torino

A project, made in Eclipse (Neon), for identify and track one or more tennis balls. It performs the detection of the tennis balls upon a webcam video stream by using the color range of the balls, erosion and dilation, and the findContours method. Some screenshots of the running project are available in the screenshots folder.

Please, note that the project is an Eclipse project, made for teaching purposes. Before using it, you need to install the OpenCV library (version 3.x) and JavaFX 8 and create a User Library named opencv that links to the OpenCV jar and native libraries.

A guide for getting started with OpenCV and Java is available at http://opencv-java-tutorials.readthedocs.org/en/latest/index.html.

object-detection's People

Contributors

luigidr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

object-detection's Issues

Assertion failed (m.dims >= 2) at erode

Hi,

I was trying to run the code of the grabFrame method from the ObjRecognitionController class but I'm getting an error when I perform the Imgproc.erode operation:

Mat erodeElement = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(12, 12));
Imgproc.erode(mask, morphOutput, erodeElement);

The error is:

OpenCV Error: Assertion failed (m.dims >= 2) in cv::Mat::Mat, file C:\builds\master_PackSlaveAddon-win64-vc12-static\opencv\modules\core\src\matrix.cpp, line 454
Exception in thread "main" CvException [org.opencv.core.CvException: cv::Exception: C:\builds\master_PackSlaveAddon-win64-vc12-static\opencv\modules\core\src\matrix.cpp:454: error: (-215) m.dims >= 2 in function cv::Mat::Mat
]
at org.opencv.imgproc.Imgproc.erode_2(Native Method)
at org.opencv.imgproc.Imgproc.erode(Imgproc.java:2007)
at MainMorphological.main(MainMorphological.java:34)

Have you had to deal with this error?do you know what the reason of the error is?

I don't know what the problem is since the mask and morphOutput elements are empty Mats and the erodeElement is exactly the same as the one you're using.

Thanks in advance.

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.