Skip to content
/ JED Public

Image edge detection and simple vectorization program using convolution filters

License

Notifications You must be signed in to change notification settings

felsocim/JED

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JED: Java Edge Detector

Image edge detection and simple vectorization program using convolution filters

About

As assignment for our Object-oriented programming classes at the University of Strasbourg, we created a image contour detection program which uses convolution filters such as Sobel, Roberts or Prewitt. The program was extended to perform a naive vectorization of the input image. It can be then written down to a Scalable Vector Graphics (SVG) file.

Vectorization algorithm

The vectorization strategy used is very straightforward. Starting with a thresholded black and white image we iterate over and try to detect segments by inspecting neighbor pixels in three directions (right, diagonal right, down and diagonal left). Finally, the resulting set of detected segments allows to redraw the original image in a vectorized form.

Usage

As the program is written in Java, it can be used on any machine running a Java virtual machine.

Plus, the user interface is pretty straightforward to understand: import a source image, select the filter to apply, set desired threshold value, select output SVG file and perform vectorization.

Compiling

At first, ensure there is Java Development Kit (JDK) installed on your computer providing the javac and java executables.

Then, from a Unix terminal or a Windows Command Prompt instance, navigate to the src folder, compile the main program using javac Main.java and run with java Main.

Screenshot

JED Screenshot

Author

Marek Felsoci, student at the University of Strasbourg.

License

Java Edge Detector and its source code are licensed under the terms of the GNU General Public License, version 2. See the LICENSE file for full license text.

Image credits

The "Lena" image was acquired from i.stack.imgur.com/o1z7p.jpg.