EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / DIP.. shape detection

DIP.. shape detection

|

Miscellaneous › Others › DIP.. shape detection

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 11 months ago by SHAH DISHANT H..
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • May 8, 2014 at 7:42 am #4882
    keagan
    Participant

    Hello

     

    My name is Keagan Subban.

     

    Please can u guys assist me with the following algoritm or some help to get it done. I am only familiar with the strel, bwperim, imdilate and bwlabel functions.

    Please assist me.

     

    Given a colour image containing a variety of shapes your algorithm should be able to detect and classify the distinct shapes.

    Your shape detection algorithm should be able to detect the following shapes:

    1. Circle

    2. Square

    3. Triangle

    4. Rectangle

    5. Pentagon

    6. Hexagon

    7. Ellipse

    8. Octagon

    The final algorithm must output 3 images:

    1. A binary (black and white) image with all the shapes in white and background in black. In addition, a number, indicating the classification according to the above numbered descriptors, must be inserted in the centre of each shape. A value of zero (0) should be placed in the centre of the shape that does not fall into one of the above classifications. 

    2. A colour image with each shape displayed in a pre-assigned colour i.e. instead of inserting a number into each shape they can be displayed in different colours e.g. blue for all circles and yellow for all hexagons. The colour black must be assigned to all unclassified shapes. The background of this image must be white.

    3. A binary (black and white) image with all the shapes in white and background in black. In addition, a number, indicating the area (in m2 and 3 decimal places), must be inserted in the centre of each shape in the image. A text value of “N/A” should be placed in the centre of the shape that does not fall into one of the above classifications. Assume each pixel represents a distance of 1 mm.

    May 10, 2014 at 3:52 am #11709
    SHAH DISHANT H.
    Participant

    Hi,

     

    For shape detection, we must do two things.

     

    1. Create database of ur all shapes in .MAT file.

    2. Decide way of detection.

     

     

    We have two options for that.

    1. Using eigen values of the database and captured images we can find out the shape.

    2. Using inbuilt function corr2 we can get the detected shape.

     

    After the shape has been detected than we can convert it into binary, gray scale, histogram etc. as per the requirements.

    May 10, 2014 at 8:01 am #11715
    keagan
    Participant

    Hello Shah

     

    Thanks for reply. I have been doing some research on this. I have extracted rgb, I am have a problem with figuring the shape ratios. I need to detect like nine shapes in my test image and put a number at the centre of the shape. Like all squares with number one in centre, all trinagles number two in centre and up to nine for nine shapes.  I want to know if you can help me with what ratios represent what shape. Output image will be black background and shapes in white.

     

    if abs(allRatios-1.12) < 0.2

    shape = ‘triangle’;

     

    May 26, 2014 at 5:37 am #11767
    SHAH DISHANT H.
    Participant

    Hi,

     

    We can try for that. But can you pls tell me whether u have finished with shape detection perfectly ?

    Once it is done, let me know how u have done it with code.

     

    I will see and figure out how we can do it..

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Lightbox circuit May 16, 2025
  • I want to make a CRT with some modifications But i have no Idea where to start May 16, 2025
  • Kawai KDP 80 Electronic Piano Dead May 16, 2025
  • LT3511 Isolated Flyback Converter May 16, 2025
  • Funny Images Thread! May 16, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise