Giter Club home page Giter Club logo

trianglerecognition's Introduction

Find triangle on image using Windows Forms and OpenCV

The application find triangles on image. Written using Windows Forms. Load image, choose what type of triangles to look for and you'll get the triangles circled and sorted by area in descending order.

TrianglesFound

Usage

If you just want to run the application you can download the dist/ folder. Then double click on GUI.application

TriangleRecognition

Requirements

Application runs only under Windows. If you don't have .NET run time installed run dist/setup.exe

Develop

To clone and run project you can use script build.bat

git clone https://github.com/lucky125111/TriangleRecognition.git
cd TriangleRecognition
build.bat

Functions

  1. You can choose what image you want to load (a few are included in the InputData folder)
  2. You can choose what color the triangles should be
  3. You can choose how many triangles you want to look for

Triangles are sorted from the one with the biggest area to the smallest.

How it works

How the shapes are detected:

  1. The image is thresholded in relation to the color for which we are looking for shapes (the threshold removes the noise that is on the picture very well)
  2. Next, the contour of the found shapes is determined
  3. For each contour we find a polygon approximating this contour
  4. If the polygon has 3 vertices then it is a triangle, we add the triangles to the result list
  5. Take the appropriate number of the largest triangles from the result list

The application looks for all polygons on picture, then returns only ones with 3 vertices. This approach is good for artificial data but probably won't work on real life examples.

Remarks

1. Application uses Windows Forms

2. I wanted to do something with OpenCV (I used .NET wrapper for OpenCV)

trianglerecognition's People

Contributors

lberwid avatar lucky125111 avatar

Watchers

 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.