Shape Detection and Recognition

In summary: I will definitely look into them as I start my journey in understanding neural networks. Thank you for the helpful and informative conversation, it has given me a lot of insight into the world of image recognition and has given me a solid starting point for my research. I appreciate your time and expertise.
  • #1
ecastro
254
8
How can I detect shapes in an image using an algorithm? I have heard of using edge detection and from there the shapes can be identified, but how? Also, edge detection only is effective if the shape has a high difference of contrast from its surrounding area, what would be an effective technique if the shape and its surrounding area almost have the same contrast (but, of course, the shape is still visible)?

P. S. This is my first time tackling this problem, any hints or references to get me started and understand more of this field?

Thank you in advance.
 
Physics news on Phys.org
  • #3
ecastro said:
How can I detect shapes in an image using an algorithm? I have heard of using edge detection and from there the shapes can be identified, but how? Also, edge detection only is effective if the shape has a high difference of contrast from its surrounding area, what would be an effective technique if the shape and its surrounding area almost have the same contrast (but, of course, the shape is still visible)?

P. S. This is my first time tackling this problem, any hints or references to get me started and understand more of this field?

Thank you in advance.

I agree that contrast is probably the best information to rely on when detecting simple edges since they're often associated with abrupt variance of lightning. Algorithms can be designed to be sensitive to certain levels of contrast and thus yield outputs accordingly, deciding for example if certain areas of an image contain edges. This technique is usually robust to illumination changes, so surrounding areas with almost similar contrast shouldn't cause you major problems detecting various types of edges.

For shape recognition, artificial neural networks are usually designed for such needs because of their capacity to learn on exemples. They extract information from training samples and create adapted algorithms to solve problems that are usually more complex. A well-trained neural network designed for shape recognition should have a solid adaptive learning ability, invariant in terms of image scaling, rotation and translation. I can think of many ways neural networks can be designed to recognize shapes : edge matching, using the internal angles, using feature detection, etc. Perhaps fuzzy sets could also be used to improve the neural network's ability to generalize inputs.

That's definitely a path you should look into, there's good documentation available on the subject.
 
Last edited:
  • #4
h6ss said:
I agree that contrast is probably the best information to rely on when detecting simple edges since they're often associated with abrupt variance of lightning. Algorithms can be designed to be sensitive to certain levels of contrast and thus yield outputs accordingly, deciding for example if certain areas of an image contain edges. This technique is usually robust to illumination changes, so surrounding areas with almost similar contrast shouldn't cause you major problems detecting various types of edges.

Will it be effective if I first convert the image into a binary image to detect edges? I have seen that this kind of conversion has some kind of threshold to classify the pixels to have 0 or 1 as their value.

h6ss said:
For shape recognition, artificial neural networks are usually designed for such needs because of their capacity to learn on exemples. They extract information from training samples and create adapted algorithms to solve problems that are usually more complex. A well-trained neural network designed for shape recognition should have a solid adaptive learning ability, invariant in terms of image scaling, rotation and translation. I can think of many ways neural networks can be designed to recognize shapes : edge matching, using the internal angles, using feature detection, etc. Perhaps fuzzy sets could also be used to improve the neural network's ability to generalize inputs.

That's definitely a path you should look into, there's good documentation available on the subject.

I am not really familiar with neural networks and I'm planning to work these things out from scratch.
 
  • #5
ecastro said:
Will it be effective if I first convert the image into a binary image to detect edges? I have seen that this kind of conversion has some kind of threshold to classify the pixels to have 0 or 1 as their value.

I'm sure there would be many different ways to proceed. One I can think of is modelling the image with a function and describing edges using partial derivatives. A point which lie on the edge can be detected by finding local maxima or minima of the first derivative and by detecting the zero-crossing of the second derivative. I've heard about other methods using the gradient vector. There are many, you just need to find what's best according to your knowledge and your needs.

A good read on the subject would be William K. Pratt's book Introduction to Digital Image Processing.

ecastro said:
I am not really familiar with neural networks and I'm planning to work these things out from scratch.

That's excellent, it's a very interesting subject! I highly suggest starting with Anoop Madhusudanan's work at Code Project (http://www.codeproject.com/Articles/14342/Designing-And-Implementing-A-Neural-Network-Librar). You're taken through the fundamentals and then taught in a very intuitive way how to program the networks. It's a fantastic introductory document about neural networks, especially for the people that are more programming-oriented.

There are other excellent books on the subject, like James Anderson's An Introduction To Neural Networks and Laurene Fausett's Fundamentals of Neural Networks. I think a good starting point would also be Wikipedia, of course.
 
  • Like
Likes ecastro
  • #6
Thanks a lot for these references!
 

Related to Shape Detection and Recognition

1. What is shape detection and recognition?

Shape detection and recognition is a process in which a computer or machine is able to identify and classify different shapes, such as circles, squares, or triangles, within an image or video. This technology can be used for various applications, including robotics, object detection, and pattern recognition.

2. How does shape detection and recognition work?

Shape detection and recognition algorithms work by analyzing the edges and contours of an image or video and comparing them to known shapes. This is typically done by using mathematical techniques, such as edge detection and Hough transforms, to find common geometric patterns within the image.

3. What are some real-world applications of shape detection and recognition?

Shape detection and recognition has various real-world applications, including autonomous vehicles, facial recognition, medical imaging, and quality control in manufacturing. It can also be used in video games and augmented reality to detect and track objects in real-time.

4. What are the challenges of shape detection and recognition?

One of the main challenges of shape detection and recognition is dealing with variations in shape and lighting conditions. For example, an object may appear differently depending on its orientation, size, and background. Additionally, lighting conditions, such as shadows and reflections, can make it difficult for the algorithm to accurately detect and recognize shapes.

5. What advancements have been made in shape detection and recognition?

In recent years, there have been significant advancements in shape detection and recognition, particularly with the use of deep learning techniques. These techniques allow for more accurate and robust shape detection and recognition, as they can learn and adapt to different variations and conditions. Additionally, advancements in hardware technology, such as faster processors and GPUs, have also improved the speed and efficiency of shape detection and recognition algorithms.

Similar threads

  • Programming and Computer Science
Replies
6
Views
1K
Replies
2
Views
410
  • Astronomy and Astrophysics
4
Replies
125
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Quantum Interpretations and Foundations
Replies
16
Views
2K
  • Science and Math Textbooks
Replies
3
Views
976
  • Special and General Relativity
Replies
31
Views
2K
  • Sci-Fi Writing and World Building
Replies
1
Views
646
Back
Top