File Exchange

image thumbnail

Shape recognition using 2-D correlation

version (83.4 KB) by Diego Barragán
Shape recognition using 2-D correlation. Input images are read from webcam.


Updated 29 Jan 2015

View License

Application of image processing that captures an image from an integrated or external camera and proceeds to recognize shapes as rectangle, circle, star and triangle. The recognition is based on the correlation, which measures the similarity of two images. For more information, please visit

Cite As

Diego Barragán (2021). Shape recognition using 2-D correlation (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Michael Azuelo


hi sir , i would like to ask u, how to modify the code in order to detect square shapes as well.? tyvm for this helpful file

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!