Skip to content

luyun760324/thread_detector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thread broke detector

Simple Computer vision project (good example for using openCV 3 on C++ style)

This project detects all threads in textile machine (and detects cases, when threads are broken or other object overlap threads)

General instructions

For installing and compiling project you need to install:

Code instructions

This project uses next algorithms:

  • Haar's cascade for detecting threads and wheels on textile machine (dataset for training in ./cascadeHaar directory)
void detect(cv::Mat & frame, int neighbors, cv::Size min_size, cv::Size max_size);

cv::Mat & frame   - captured frame from video or web-cam (and transformed to grey binary image)
int neighbors     - normal overlaping coefficient (for `cv::CascadeClassifier::detectMultiScale` openCV method)
cv::Size min_size - minimal rectangle size for detecting (for `cv::CascadeClassifier::detectMultiScale` openCV method)
cv::Size max_size - maximal rectangle size for detecting (for `cv::CascadeClassifier::detectMultiScale` openCV method)
  • BackgroundSubstractorMOG for detecting other object, that overlaps threads and textile machine (uses cv::BackgroundSubtractor from OpenCV contrib modules)
bool detectOther(cv::Mat & frame);

cv::Mat & frame - captured frame tranformed to binary image
returns true, when overlapped object detected

Compile and run

> cd path/to/project
> make
> ./detector path/to/video (if no arg - webcam turn on)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.8%
  • Makefile 4.2%