Total members 11894 |It is currently Sun Nov 24, 2024 10:42 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka






* 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.

Attachment:
File comment: Screenshots
ImageViewer1.GIF
ImageViewer1.GIF [ 67.83 KiB | Viewed 14919 times ]

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:
File comment: IDE project
ImageViewer.rar [232.21 KiB]
Downloaded 2378 times

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada
Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

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.



Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

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


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

Thanks for the good project



Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

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



Author:

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


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

updated.


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 7 posts ] 

  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
cron






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com