File Exchange

image thumbnail

Simple Shape Detection using Hough Transform

version (10.6 KB) by Tan Chin Luh
This demo shows simple method of shape detection using Hough Transform


Updated 07 Dec 2005

View License

This demo shows simple method of shape detection using Hough Transform. Based on the Hough Matrix, 3 shapes (triangle, round and square) are classified based on their simple properties using if-else statement.

For more information on how it works, visit:

Cite As

Tan Chin Luh (2021). Simple Shape Detection using Hough Transform (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (19)

Przemyslaw Szerling

he xiaojun

Asif Sharif Chaudhry


Awesome ...




nanda kishore

how to work on with real images using hough......pls help

nanda kishore

i took a right angled triangle and it detects it as a square. pls help


toooo simple

bleuf1sh f1sh

I am running 2009b and it won't even run


??? Attempt to reference field of non-structure array.

Error in ==> HoughObject>pbGenerate_Callback at 102

Error in ==> gui_mainfcn at 96

Error in ==> HoughObject at 42
gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback

it would really help me out if I could see a working example for my version, thanks

Sisir Kanti


sh swa


Arun Powar

very very helpful tool..

muhammad rafiq

a very good effort

Sanchit Singh

These blogs are superb....helping us (students) very much...Please keep these blogs forever...

sn huda

Might be really helpful if this program is modified to fit various object in an image.

Bob Jones

agus syawal

this is so simply enough for beginner, thanks

Enes Yigit

Is there the MATLAB code for hough transform?
I dont have yours????????

MATLAB Release Compatibility
Created with R14SP2
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!