Questions tagged [shape-recognition]

32 questions
186
votes
7 answers

Draw a perfect circle from user's touch

I have this practice project that allows the user to draw on the screen as they touch with their fingers. Very simple App I did as an exercise way back. My little cousin took the liberty of drawing things with his finger with my iPad on this App…
Unheilig
  • 15,690
  • 193
  • 65
  • 96
23
votes
4 answers

Recognize open and closed shapes opencv

how to detect open and closed shapes in opencv. These are simple sample shapes I want to detect. I have detected rectangle using findContours and approxPolyDP and than checking for angle between vectors. Now I want to detect the open shape,…
Fahad Malik
  • 645
  • 2
  • 7
  • 16
17
votes
3 answers

2D Shape recognition algorithm - looking for guidance

I need the ability to verify that a user has drawn a shape correctly, starting with simple shapes like circle, triangle and more advanced shapes like the letter A. I need to be able to calculate correctness in real time, for example if the user is…
10
votes
4 answers

How to check if four points form a rectangle

I am working on a shape recognition app. At this moment a set of points (x,y) is determined by corner detector (red points, img. 2.). Four of these points (in red frames, img. 2.) are vertices of a rectangle (sometimes a little deformed rectangle).…
sowizz
  • 165
  • 1
  • 9
9
votes
1 answer

in Python use of hierarchy for findContours

I implemented a Python script for recognizing shapes in hand drawings. However, the script recognizes more shapes than needed. Here is an example picture: and this is the output of the script: Part of the code I wrote is the following: def…
Francesco Sgaramella
  • 911
  • 3
  • 17
  • 35
4
votes
1 answer

How to tell if the most obvious object in a picture is a shape?

Okay guys, I think I have done everything I can except one important thing: Shape Extraction. I already do this fairly in a fairly simple way, but there are some cases where it really messes up. The way I do this is: Pick a point in the outline…
Nathan
  • 251
  • 1
  • 2
  • 4
2
votes
0 answers

Shape Detection Using Hough Transform in Matlab

I'm using a Properly working Matlab code (The original code is from here) that uses Hough trnsform to detect basic shapes like round, square and triangle.Here below is the important code segment. [H, theta,rho]=hough(S); Above H is the Hough…
PrazSam
  • 1,116
  • 1
  • 12
  • 20
2
votes
0 answers

shape recognition with Javascript/HTML

For a little project it would be nice if I have the possibility to make some shape recognition. It is a Webpage which shows a Visio Diagram. It shall be possible to click on one of the shapes (only rectangles) and then additional Information shall…
Stefan
  • 51
  • 1
  • 5
1
vote
2 answers

2D Shape Outline Recognition

I am looking to implement shape recognition/matching of similar curves (discreet point arrays) in 2D. I have found a paper on the subject but Im somewhat lost when it comes to implementing this in code. I have figured out that this function needs to…
Andreas Zita
  • 6,150
  • 4
  • 39
  • 104
1
vote
3 answers

How to detect intersecting shapes with OpenCV findContours?

I have two intersecting ellipses in a black and white image. I am trying to use OpenCV findContours to identify the separate shapes as separate contours using this code (and attached image below). import numpy as np import matplotlib.pyplot as…
Brendan Hill
  • 2,790
  • 2
  • 21
  • 45
1
vote
0 answers

Using OpenCV to recognize similar shapes/images

I have two images looking alike, that I want to compare with openCV for similarity (percentage or number). On of them is in a "database" and being compare to a handdrawn version of the shape. This works well with matchShapes() and findContours if…
1
vote
2 answers

Recognizing the bricks in a brick wall

I followed different tutorials to recognize shapes in OpenCV but most of these tutorials just recognize shapes on a sheet of paper. I wanted to take it to the "next" level and recognize shapes in a real image. I thought that a simple next step would…
ThierryDer
  • 101
  • 1
  • 6
1
vote
2 answers

how to compute interior angles of hexagon shape in python openCV

I have detected the shape of hexagon in Python using OpenCV. I just want to compute its interior angle -- shape is detected by using contour technique and approximation ..
1
vote
1 answer

Displaying recognized shapes with Python opencv

I am still new to opencv, but I found a piece of code that identifies shapes contours in an image and indicates their center.The only issue is that the program would display one contour and one center, and the user has to close the window manually…
Heba
  • 37
  • 4
1
vote
1 answer

Recognize hand drawn shape in OpenCV

I have the following task: recognize a set of simple hand-drawn shapes on a sheet of paper from a still image (not a video stream), so they might not be exactly identically pixelwise. Those shapes are basically symbols for doors, windows, etc. in a…
1
2 3