Skip to content
Yusuf Shakeel edited this page Feb 8, 2014 · 41 revisions

Welcome to the Java-Image-Processing-Project wiki!

Image Processing project

By: Yusuf Shakeel

Date: 26-Jan-2014 Sunday

URL:

facebook.com/yusufshakeel

youtube.com/yusufshakeel

github.com/yusufshakeel

yusufshakeelblog.blogspot.in


Note

This project is in development stage so files will get modified quite often.

I have used Netbeans IDE 7.3.1 for this project. It is a free software and you can download it from netbeans.org.

Content

Directories:

src - Holds the source code files.

src/imageFX - This directory is the ENGINE of the project. It contains .java files to process image.

src/myPackage - This directory contains .java files that uses the ENGINE.

Files:

src/imageFX/DYCanvas.java - This file contains some random canvas creating method.

src/imageFX/FilterImage.java - Contains filtering methods.

src/imageFX/ImageFX.java - Contains common image processing functions like flip, negative etc.

src/imageFX/MyImage.java - Contains MyImage class that is used to create image objects.

src/imageFX/ThresholdImage.java - Contains thresholding methods.

How to use the imageFX package in your project?

  1. Download the Java-Image-Processing-Project repository and copy paste the imageFX directory inside your project directory.
  2. Import the imageFX classes inside your java file(s) where you want to use it.

For instance, if you want to import the imageFX classes inside your Test.java file, then write the following line

import imageFX.*;

inside your Test.java file.

So your Test.java file may look something like this

import java.io.*;

import imageFX.*;

public class Test{

    //your code goes here...

}//class Test ends here

How to create MyImage object?

Following are the ways of creating MyImage object.

MyImage iobj = new MyImage();

This will create an object iobj whose dimension is still not initialized. This is useful if you already have an image on your computer and want to store that image in iobj.

MyImage iobj = new MyImage(100,200);

This will create an object iobj of dimension 100x200. This is useful if you want to create your own image or want to generate a random image.

MyImage iobjClone = new MyImage(iobj);

This will create an object iobjClone which will be a clone of an already created object iobj.

Creating MyImage object to read an image file

  1. Create MyImage object.

MyImage iobj = new MyImage();

  1. Read the Image file. For instance if you want to read Taj.jpg file which is in D: then type

`iobj.readImage("D:\Taj.jpg");

  1. After creating an object and reading the image file you have to initialize the pixel array by typing the following line

iobj.initPixelArray();

Clone this wiki locally