Skip to main content

Hough Transform

9 replies [Last post]
dougsleite
Offline
Joined: 2007-11-23
Points: 0

After look for algorithms aimed to detect shapes, I have found the Hough Transform method. My goal is to detect circles in an image, and I have read about several algorithms, based on Hough Transform, that can do it.

Is there somebody that are working in this method using the JAI api?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Francis Chan

are you talking about the generalized hough algorithm or hough algorithm
with look up table? The generalized for the circle is 3 parameters assuming
that we know x and y in the image space. if you are using the formula then
it is not very efficient in term of time, and there is no rule of thumb for
picking the right *threshold* for detection. For the faster detection of a
circle, one should do the look up table. i think i have read that someone
has been able to detect or recognize the image in 60 millisecond. I have
not developed an JAI api for the hough transform for circle yet. However, i
am in the process of developing for the real time image detection of coho
salmon population from remote video stream. i am using generalized hough
transform such as a straight line to detect partial feature of the coho
salmon forehead and chin line, and i am using JAI for this development.

Francis

On Nov 23, 2007 9:59 AM, wrote:
> After look for algorithms aimed to detect shapes, I have found the Hough
Transform method. My goal is to detect circles in an image, and I have read
about several algorithms, based on Hough Transform, that can do it.
>
> Is there somebody that are working in this method using the JAI api?
> [Message sent by forum member 'dougsleite' (dougsleite)]
>
> http://forums.java.net/jive/thread.jspa?messageID=246951
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>
[att1.html]

nabilov
Offline
Joined: 2012-01-03
Points: 0

Hi francis,

I am Nabil Mekelleche an Algerian student.

I am preparing a study about detection of non-analytic forms in image using Generalized hough transform (using look-up table), so i seek for its implementation under matlab or c++ or java.

I spent days on Google trying to find some but, no forum and no tutorial that have found have code for the 'Generalized Hough transform'.

They only have code for analytic curves (circles, ellipsis, parabolas,... ). I know that, for the 'Generalized Hough transform', you don't need a function. Your parameters will serve as a look up table. I am busy writing codes for the 'Generalized Hough transform' but, it would be nice to have already written codes to use as reference.

I will be very grateful if you can help me in this subject .

Thanks a lot.


dougsleite
Offline
Joined: 2007-11-23
Points: 0

I have found other method that seems to be interesting: http://www.csie.mcu.edu.tw/~yklee/CVGIP03/CD/Paper/PR/PR-12.pdf

I ran some tests using an implementation done by a Greek professor (http://ipml.ee.duth.gr/~papamark/GHT/DuthHough.ZIP), and I am glad with the results.

Maybe I try to implement this method using the JAI API.

thanaras2
Offline
Joined: 2007-11-27
Points: 0

so did you find any java implementation of circle hough transformation? Not only jai, but for BufferedImage s too. Cause i need it to detect a circle in an image.

Francis Chan

For BufferedImage, just access the pixel directly and apply the circular
formula to convert from image to hough space, then do the voting detection.
it is just couple of for loops, and keeping track of three parameters
intersection. however, your threshold value for deciding the present of the
circle will vary if you have a composite image.

>I have found other method that seems to be interesting:
http://www.csie.mcu.edu.tw/~yklee/CVGIP03/CD/Paper/PR/PR-12.pdf

I don't think this article will work well for detecting the composite image,
but in term of algorithm and computation, it is very efficient. The reason
the algorithm in article works and efficient is because the author knows the
image in advanced. in the reality, you do not know the image in advanced and
most images in the reality are composite image. the composite images are
images like car. For instance, an image feature of a car has circle (tires),
straight lines(roof), hood (sometimes parabolic shape). Now i want to
implement the above article algorithm, and see the detection rate. it is
very efficient and very fast meaning you can detect circle in real time.
one thing that i can tell for sure from the above article is that the
authors did the image analysis in Matlab, not in java. The figures are
definitely generated from Matlab.

I heard a rumor that Matlab is written in Java. So can anyone from Sun help
me verified this?

As far as the implementation, if i would implement it, i will try the
article mention in the above first. Sorry i haven't implemented the circle
detection yet.

but here is the api that has a circle detection:

http://webscreen.ophth.uiowa.edu/bij/api/registration/HoughTransform.html

cheers

Francis

On Nov 27, 2007 9:05 AM, wrote:

> so did you find any java implementation of circle hough transformation?
> Not only jai, but for BufferedImage s too. Cause i need it to detect a
> circle in an image.
> [Message sent by forum member 'thanaras2' (thanaras2)]
>
> http://forums.java.net/jive/thread.jspa?messageID=247384
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>
[att1.html]

dougsleite
Offline
Joined: 2007-11-23
Points: 0

Well, the tests that I have run ( using the greek implementation above), was made with remote sensing images. In this kind of images, there are lots of different features, as you have mentioned above.

In fact, I am researching about methods that are able to detect circles, as efficient as possible.

I am not an expert about Image Processing, even about Hough Transform, but I have read that Hough Transform method can do this, in spite of it isn't so good at performance because it isn't specific for circles detection.

Thanks for the informations

Francis Chan

okay. i see. it sounds like the algorithm in the article is useable for u
because you know some sort of image coming from the remote sensing. choosing
the right filters is probably very challenging for you if your image has
some noise besides lots of other different features. Why don't you try to
look for the hough transform for shape recognition instead of trying to
implement the generalized circle hough transform. the shape recognition for
hough transform is using the lookup table, and it is assuming the object or
image that you want to detect is known in advance. look it up articles in
IEEE or google scholars for real time image detection of hough transform as
a keyword for search. Ignore all the hardware implementation for detection,
and look for the software implementation. i think i read one article said it
implemented in C# program, and the detection time is very fast like i
mentioned in the previous post 60 milliseconds. however, in java it will be
slightly slower like 0.13 millisecond compare to C#, and i think it has to
do with a layer of translation from bytecode to machine language by JVM.

if you are doing a remote sensing detection for real time, then do the image
pyramid first to reduce the size of the image. that's one way of reducing
the computation for hough space because you have less pixel to look at it
when the size is reduce. make sure you reduce it to the right resolution so
that you can still apply filter and able to extract some nice edges. oh
also, if the image is coming from a remote video camera, then you need to *
deinterlace* the image first( if the video camera is like an analog camera
like camcorder).

good luck

Francis

On Nov 27, 2007 11:11 AM, wrote:

> Well, the tests that I have run ( using the greek implementation above),
> was made with remote sensing images. In this kind of images, there are lots
> of different features, as you have mentioned above.
>
> In fact, I am researching about methods that are able to detect circles,
> as efficient as possible.
>
> I am not an expert about Image Processing, even about Hough Transform, but
> I have read that Hough Transform method can do this, in spite of it isn't so
> good at performance because it isn't specific for circles detection.
>
> Thanks for the informations
> [Message sent by forum member 'dougsleite' (dougsleite)]
>
> http://forums.java.net/jive/thread.jspa?messageID=247405
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>
[att1.html]

dougsleite
Offline
Joined: 2007-11-23
Points: 0

After I have found out more about Hough Transform aimed to detect circles, I have noticed that it detect circles which radius is known previously. Moreover, you need to inform the number of circles that will be detected, or a threshold value.

The good thing in the method that I mentioned in the link above, is that it doesn't have this limitation.

In my application, I am using remote sensing images, and the accuracy is more important than the performance. Then, detect correctly all the circles in the image is the priority.

Using the Hough Transform with look up tables, will am I able to detect all circles with different a priori unknown sizes?

Message was edited by: dougsleite

thanaras2
Offline
Joined: 2007-11-27
Points: 0

HEY guys. I found this. It is a Hough Transformation implemented in Jai.

http://www.koders.com/java/fidDA9F760E242F1AD203B719D54081BFB297AA87A2.a...

but you will need those too

http://www.koders.com/java/fidF50B56D9AF0EED53D010E7797BD3E236DCEA542B.a...

and this

http://www.koders.com/java/fid5BFF512F80A3CFCBEDBB914989AFDFB0B4A697CC.a...

Can you do me a favor. Can you try it, and tell me if it works for you cause i am having some problems. I would be thankfull, honestly,