Skip to content

A Java Program for detecting circles within a given image by using Circle Hough Transform (CHT)

Notifications You must be signed in to change notification settings

danilomodica/CircleFinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleFinder

A Java Program for detecting circles within a given image by using Circle Hough Transform (CHT).

It displays on screen the given image with detected circles highlighted in red.
It also stores to the project /result directory (automatically created):

  • the gray-scale image (gray.png)
  • the blurred image (blur.png)
  • the sobel image (sobel.png)
  • the image with pixels above threshold (aboveThreshold.png)
  • the image with detected circles (detectedCircles.png).

Based on:

How-To-Use

  1. Open a terminal in the project directory

  2. Compile Java source code by running:
    javac -cp . *.java

  3. Run the Main program by running:
    java -cp . Main imagePath [circles] [threshold] [minRadius] [maxRadius]

    Arguments:

    • imagePath (required): path of the image file.
    • circles (optional): number of circles to detect. Default: 1.
    • threshold (optional): threshold for Sobel Operator. Default: 150.
    • minRadius (optional): minimum radius of circles (in px). Default: 10.
    • maxRadius (optional): maximum radius of circles (in px). Default: 100.

About

A Java Program for detecting circles within a given image by using Circle Hough Transform (CHT)

Topics

Resources

Stars

Watchers

Forks

Languages