Image Processing with java
March 24, 2017 ยท View on GitHub
About this project
The code I was developing on 3-4 years ago, While I studied on Third years in University. My purpose is to use the code in Senior project. Now I don't work in image processing field anymore. I decided to open code for everyone who is interesting in image processing. I want people to lean from my code.
This project develop by using java, image processing concept and basic mathematical formula
What's inside the project.
Image2D.java
Main class, show example to use function
Gaussian.java
The algorithm for bluring image, I use Gaussian distribution method
Link
- https://en.wikipedia.org/wiki/Gaussian_blur
- http://www.pixelstech.net/article/1353768112-Gaussian-Blur-Algorithm
- http://blog.ivank.net/fastest-gaussian-blur.html
Grayscale.java
The algorithm for convert image to gray color, In this file I use Luminosity method, However I can read other method and example at below link
Link
- https://en.wikipedia.org/wiki/Grayscale
- http://developer.bostjan-cigan.com/java-color-image-to-grayscale-conversion-algorithm/
- http://www.tannerhelland.com/3643/grayscale-image-algorithm-vb6/
- http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/
Histogram.java
understand about histogram
- http://www.tutorialspoint.com/dip/histograms_introduction.htm
- http://www.tutorialspoint.com/dip/histogram_equalization.htm
Math formula
Threshold.java
The algorithm to convert image to binary color (Separates pixels in an image into a foreground and background) , In this file I use Otsu's method, However you must have understand about histogram first cause by threshold algorithm base on histogram
understand about Threshold
Math formula for Otsu's method
- http://www.ancient-asia-journal.com/articles/10.5334/aa.06113/
- https://en.wikipedia.org/wiki/Otsu%27s_method
EdgeOperator.java
The algorithm to find edge of image , I use Canny Edge algorithm
Understand about Canny Edge algorithm
Definetion and example
I follow by this link to implement canny edge and use convolution method to apply value to image
Definetion on OpenCv website
AutoBalance.java
link
Remove or Add image area (Morphological)
Concept
Erosion.java
link
Dilation.java
link
See also Morphological
Closing
Opening
Read pixel color value
RGB.java
If you get value of pixle from RGB.java to access RGB value on Dicimal digit, You must use bitwise operators to shitf bit. R >> 16 , G >> 8 and B, Then add mask by (& 0xFF), See example in below link or file this project
link
- http://stackoverflow.com/questions/22391353/get-color-of-each-pixel-of-an-image-using-bufferedimages
- http://stackoverflow.com/questions/6524196/java-get-pixel-array-from-image
Convoluion
To apply vaule to image, You must have understand Convoluion method
- https://en.wikipedia.org/wiki/Convolution
- http://mathworld.wolfram.com/Convolution.html
- http://www.songho.ca/dsp/convolution/convolution.html
License
This project is licensed under the MIT license. See the LICENSE file for more info.