Switch to full style
Project under GPL source codes are posted here
Post a reply

Image-Viewer-Image Processing-Filters-Noise-enhancements

Tue Mar 18, 2008 11:18 pm

* Project Name:   Image Viewer
* Programmer:   msi_333
* Type:   Multimedia
* Technology:  Java
* IDE:   NetBeans
* Description:   This is an image processing project created using java. Includes many image filters with different sizes and for different uses on images :
- Applying Filters
1- Threshold (using dynamic threashold).
2- Invert .
3- Yellow Invert.
4- 3x3 Blur .
5- 3x3 Sharpen .
6- 3x3 Edge Detection.
7- 5x5 Edge Detection.
8- Custom Filter (user enter any Filter).
9- Canny Detector.

- Applying Noise
1- Gaussian Noise.
2- Impluse Noise.

- Applying Enhancement
1 - Binirization (Using Threashold)
2 - Brightness
- Image Operations :
1- Zoom out.
2- Zoom in.
3- Rotation CCW.
4- Rotation CC.
5- Select (Part of image).
6- RGB Histogram.

Other Features :
- Can Load any image with extention (jpg,gif,png) and make the operations on it then he can save it on the harddisk.
- User can refresh the Orginal Image at any time to get it back.
- Can Print the image after operations.
- The user can make more than one operations after each other on the same image. For example he can user Invert filter then use edge 3x3 filter then he can save image.

ImageViewer1.GIF
Screenshots

This projects have follow structure
Code:
Package : EnhancementOpr , includes
/Binirization.java
/Filter.java

Binirization.java :
java code
package EnhancementOpr;
import java.lang.reflect.Array;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.awt.geom.GeneralPath;
import com.sun.image.codec.jpeg.*;
import java.io.*;
import javax.imageio.*;
import java.awt.image.BufferedImage;

/**
*
* @author sami
*/
public class Binirization {

public static int THRESHABOVE = 255;
public static int THRESHBELOW = 0;
private BufferedImage bufi;
private Raster data;
private DataBuffer datab;
private int width, height;
private int threshold;
private int datav [];
private int datanew[];
private BufferedImage bufnew;
/** Creates a new instance of Binirization */
public Binirization(BufferedImage newimg) {
bufi=newimg;
}

public static int getColor(int b, int g, int r) {
return (int)Math.pow(2,16)*r + 256*g + b;
}
public void setThreshold(int threshold){
this.threshold=threshold;
}

public int getWidth(){
return data.getWidth();
}

public int getHight(){
return data.getHeight();
}

public void DoBinirization(){


width=bufi.getWidth();
height=bufi.getHeight();
BufferedImage bi = new BufferedImage(width, height,bufi.getType());
for(int i=0;i<width;i++) {
for(int j=0;j<height;j++) {
int rgb =bufi.getRGB(i,j);

int r = (rgb >> 16) & 0xff;
int g = (rgb >> 8) & 0xff;
int b = (rgb >> 0) & 0xff;

// Calculate the brightness
if(r>threshold||g>threshold||b>threshold)
{
r=255;
g=255;
b=255;
}
else
{
r=0;
g=0;
b=0;
}


// Return the result
rgb= (rgb & 0xff000000) | (r << 16) | (g << 8) | (b << 0);
bi.setRGB(i, j,rgb);
}

bufnew=bi;

}
}

public BufferedImage getImg(){

return bufnew;
}



}

Filter.java :
java code
package EnhancementOpr;
import java.io.*;
import java.awt.image.*;


public abstract class Filter {

public abstract BufferedImage filter(BufferedImage image, BufferedImage output);


public BufferedImage filter(BufferedImage image) {
return filter(image, null);
}


public BufferedImage verifyOutput(BufferedImage output, BufferedImage input) {
return verifyOutput(output, input.getWidth(), input.getHeight(), input.getType());
}


public BufferedImage verifyOutput(BufferedImage output, BufferedImage input, int type) {
return verifyOutput(output, input.getWidth(), input.getHeight(), type);
}

public BufferedImage verifyOutput(BufferedImage output, int width, int height, int type) {

if (output != null && output.getWidth() == width &&
output.getHeight() == height && output.getType() == type) return output;

return new BufferedImage(width, height, type);
}
}


Code:
Package : imageviewer , includes
/CustomFilter.java
/EdgeDetector.java
/EnhancementPanel.java
/Image_Print.java
/ImageComponent.java
/ImageProcess.java
/Main.java
/noisePanel.java
/RGBFrame.java
/ShowFrame.java
/ViewerFrame.java
/NoiseFilters
/NoiseFilters/NoiseFilter.java



Attachments
ImageViewer.rar
IDE project
(232.21 KiB) Downloaded 1477 times

Re: ImageViewer

Tue Feb 10, 2009 9:13 am

hello sir,
I liked your project on image viewer. I am in final year of my engg and intend to do a project on image processors. Can you please guide me in this regard.

Re: ImageViewer

Wed Feb 11, 2009 12:11 am

what is the title of your project , did u tried the image java viewer ! :)

Re: ImageViewer

Fri Feb 13, 2009 8:47 pm

Thanks for the good project

Re: ImageViewer

Sat May 19, 2012 11:01 am

hello sir... please guide me that how ro run this project... please... :beg:

Re: ImageViewer

Sat May 19, 2012 11:40 pm

download netBeans IDE , it is free and java .. ?

Re: ImageViewer

Sun Jan 20, 2013 3:09 pm

updated.

Post a reply
  Related Posts  to : Image-Viewer-Image Processing-Filters-Noise-enhancements
 image processing filters project     -  
 Image Viewer     -  
 make Noise on Image     -  
 Image Noise Filter in Java     -  
 image processing     -  
 image processing in java     -  
 Move image in front of a background image     -  
 different between cfa image and gray level image     -  
 PNG image to the image you generated     -  
 put image in asp.net     -  

Topic Tags

Java Image, Java Projects