Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Shape detection - recognition
Forum Updated to NodeBB v4.3 + New Features

Shape detection - recognition

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Talei
    wrote on last edited by
    #1

    Hello,
    I'm looking for a way to detect basic shapes like circle, triangle etc. that are either as images or as QPainterPath.

    Basically what I want to do is to detect and classify shape that is drawn by user.

    Any suggestion how would I go about this?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stevenceuppens
      wrote on last edited by
      #2

      Hi,

      http://www.opencv.org

      Steven CEUPPENS
      Developer / Architect
      Mobile: +32 479 65 93 10

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Talei
        wrote on last edited by
        #3

        Hello,
        Thanks for reply.
        Yes I know that OpenCV can detect shapes from images, but what I was looking for is detection base on path.

        Maybe some simply classifier based on shape points angles or other techniques (what techniques? - that's the question).

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sandy.martel
          wrote on last edited by
          #4

          Google for the shortstraw algorithm, should find those 2 articles:

          "ShortStraw: A Simple and Effective Corner Finder for Polylines"
          "Revisiting ShortStraw – Improving Corner Finding in Sketch-Based Interfaces"

          It's easy to implement or you might find some implementations around.

          Once you have the corners you can find if the edge between them are roughly straight lines, find the angle between each edge, find the edges that are crossing each other, etc.

          With that information you can classify your shapes. For example, 4 corners, 4 straight lines, about 90 degree angles imply a rectangle or a square.

          I'm planning on using that technique for a project of mine.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Talei
            wrote on last edited by
            #5

            @sandy.martel

            Thank You for the paper information.
            What You posted is my initial idea of implementing it but I just wanted to ask before, because maybe someone already did lib or something.

            Anyway thanks for the info.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved