File Exchange

image thumbnail

Generalized Hough transform

version (3.18 KB) by sagi eppel
Find template/shape given in binary image in grayscale image, using generalize hough transform


Updated 20 Jan 2014

View License

Generalised Hough Transfrom
Find template/shape Itm in greyscale image Is using generalize hough transform

Use generalized hough transform to find Template/shape binary image (given in binary image Itm) in grayscale image (Is grayscale image)

Is is grayscale picture were the template Itm should be found

Itm is bool edge image of the template with edges marked ones

Return the x,y location coordinates which gave the best match

Also return the score of each this point (number of point matching)

%The x,y are the coordinates in image Is in which the the top left edge of image Itm (1,1) should be positioned in order to give the best match

Cite As

sagi eppel (2020). Generalized Hough transform (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)

what kinda input (Itm) is?

Nomita Lama


Awesome! Works very well

sagi eppel

You need two inputs one is a grayscale image.
The second a boolean(0/1) edge image of the template you want to find in the image.
If you put this you shouldn't get any errors.

How can I run this file??
it shows error in line 21..about not enough input arguments.


if you have GHT with rotation , can send it to me
thanks in advance


what about the rotation GHT?






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