Coder Social home page Coder Social logo

xaurdesu / rectdetect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shibatch/rectdetect

0.0 0.0 0.0 62 KB

Realtime rectangle detector with GPGPU

Home Page: https://www.youtube.com/watch?v=HpaY0HOomAI

License: MIT License

CMake 1.58% C 87.07% C++ 11.35%

rectdetect's Introduction

Rectangle Detector

This is a demo program for a method for realtime rectangle detection from an image. This program detects ALL rectangular shapes viewed from 3D perspective in real time, utilizing a GPU. The program is purely rule-based.

Download

Source code and compiled binary can be downloaded from https://github.com/shibatch/rectdetect/releases

Movies

See the following youtube videos to see some results.

Running demo programs

You need to set up OpenCL runtime in order to run the programs. A CPU device should work, but it is pretty slow.

The following programs will be built.

rect

This is a program for detecting rectangles in a still image.

Usage : ./rect <image file name> [device number] [output file name]

Available OpenCL devices and their numbers are displayed if you execute the program without any arguments.

poly

This is a program for converting edges in the image to polyline. The result is written to output.png.

Usage : ./poly <image file name> [device number]

vidrect

This is a program for detecting rectangles from a video.

Usage : ./vidrect [device number] [input video file] [output video file] [Horizontal AOV]

You can use camera as input. In that case, specify the camera by cam:,, as an input. Output can be displayed on an window by specifying - as an output.

The following command line captures the video from the first camera in 1280x720 resolution and output is shown in the window.

./vidrect 0 cam:0,1280,720 - 72

The following command line captures the video from input.mpg and output to output.mpg.

./vidrect 0 input.mpg output.mpg 72

vidpoly

This is a program for converting edges in the video to polyline.

Build

Please use cmake to build the program.

$ cd rectdetect-X.XX
$ mkdir build
$ cd build
$ cmake ..
$ make
D:\rectdetect-X.XX> mkdir build & cd build
D:\rectdetect-X.XX> cmake -G"Visual Studio 15 2017 Win64" ..
D:\rectdetect-X.XX> cmake --build . --config Release

In order to build the program with Microsoft Visual Studio, you need to edit the CMakeLists.txt.

License

This software is distributed under the MIT license.

rectdetect's People

Contributors

shibatch 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.