Multi-threaded implementation of the Hough circle transform is now available

plugin
Tags: #<Tag:0x00007fb87a17c548>

#1

Hey Scientists,
A full implementation of the Hough circle transform has finally come to ImageJ as a plugin: https://imagej.net/Hough_Circle_Transform.

The Hough circle transform is a powerful algorithm that can find and measure circular objects, even when they are embedded in complex and/or noisy backgrounds.

The implementation of both the transform itself and the search through the 3D Hough space is multi-threaded. The plugin also can also support movies, where it will iteratively perform the transform on each frame in the movie.

Outputs for the plugin include the raw transform, maps of the found centroids, and the ability to output the measured parameters to a results table.

The plugin is a modified and debugged version of the Hough circle transform from Hemerson Pistori and Eduardo Rocha Costa: https://imagej.nih.gov/ij/plugins/hough-circles.html. The transform algorithm is an optimized version is based off of a previous implementations by Mark Schulze.

Since this is my first serious foray into coding a plugin, and the bug search space is too large for one person to fully explore (although I think I got most of them), any feedback would be greatly appreciated.

Cheers,
Ben Smith


#2

This is awesome, @Llamero, thanks for contributing!

It would be great if you could mavenize your project to make it easy to build. Here you are a complete example on how to do it.

Thanks again!


#3

Thanks for your work @Llamero!

While mavenizing the project you should also consider cleaning up the repository, e.g. delete old versions of Hough_Circle.java. You can easily access and restore them with Git (additional information at Git). For the packaged jars you should consider using GitHub Releases instead of having them under version control.

Best,
Stefan


#4

Is there a good step by step guide for setting up a Maven plugin so that it can update to a Git repository through Netbeans. My first misguided attempt at this has resulted in my plugin from being entirely erased from my hard-drive with no warning that this would happen (aka a catastophic re-basing). I now have to rebuild the entire plugin and have lost about two days worth of work, and would really like to avoid having this happen again.

Nevermind, I was able to resolve the issue and get Github to accept the NetBeans plugin. A step by step wiki by someone much more knowledgeable than me (my success was more by trial and error) would go a long ways to get people to use Maven with Git. Also, there should be a few warning there, such as if you accidentally click rebase, then NetBeans will delete your java files without so much as a warning.


#5

There is the example-legacy-plugin on GitHub, which you can use as a starting point for new projects. Additionally, there is (not necessarily complete) information on Maven as well as Git. The Project Management page of the ImageJ wiki also contains some useful information to get you started.

You should make it your default workflow to create a work in progress (WIP) commit (add all files to the staging area and commit with the message “WIP: doing work on topic X”) at the end of a work day and push it to a development branch on GitHub (for more information: https://imagej.net/Coding_style#SCM_history). This way you will always have a commit that you can come back to.

If you run into any troubles in future: create a new topic here in the forum! :slight_smile: