Package  

 Class 

Use 

Tree 

Deprecated 

Index 

Help 

 

 PREV CLASS   NEXT CLASS

FRAMES    NO FRAMES    

 

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

 


Class ImageProcessing

 
java.lang.Object
  extended byImageProcessing

public class ImageProcessing

extends java.lang.Object

Image processing library class that enables some basic operations on gray-scaled images.

Author:

Your Name!


Constructor Summary

ImageProcessing()
           

 

 

Method Summary

static int[][]

flipX(int[][] imageData)
          Flips the image in relative to the X axis

static int[][]

flipY(int[][] imageData)
          Flips the image in relative to the Y axis

static int[]

histogram(int[][] imageData)
          Returns a histogram of the given gray-scaled image.

static int[][]

invert(int[][] imageData)
          Inverts the gray levels of the image. 0 will turn to 255, 1 to 254 and so on...

static void

main(java.lang.String[] args)
           

static int[][]

rotate90CCW(int[][] imageData)
          Rotates the image 90 degrees counter-clockwise.

static int[][]

rotate90CW(int[][] imageData)
          Rotates the image 90 degrees clockwise.

static int[][]

toBW(int[][] imageData, int threshold)
          Transforms the gray-scaled image to a black and white image.

 

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ImageProcessing

 
public ImageProcessing()

Method Detail

flipX

 
public static int[][] flipX(int[][] imageData)

Flips the image in relative to the X axis (i.e. Vertical flip)

Parameters:

imageData - A gray-scaled image data.

Returns:

The flipped image.


flipY

 
public static int[][] flipY(int[][] imageData)

Flips the image in relative to the Y axis (i.e. Horizontal flip)

Parameters:

imageData - A gray-scaled image data.

Returns:

The flipped image.


rotate90CCW

 
public static int[][] rotate90CCW(int[][] imageData)

Rotates the image 90 degrees counter-clockwise.

Parameters:

imageData - A gray-scaled image data.

Returns:

The rotated image.


rotate90CW

 
public static int[][] rotate90CW(int[][] imageData)

Rotates the image 90 degrees clockwise.

Parameters:

imageData - A gray-scaled image data.

Returns:

The rotated image.


invert

 
public static int[][] invert(int[][] imageData)

Inverts the gray levels of the image. 0 will turn to 255, 1 to 254 and so on...

Parameters:

imageData - A gray-scaled image data.

Returns:

An inverted image.


toBW

 
public static int[][] toBW(int[][] imageData,
                           int threshold)

Transforms the gray-scaled image to a black and white image. Any gray level bigger then the given threshold will turn to white (255) and any level smaller or equal to the threshold will turn to black (0).

Parameters:

imageData - A gray-scaled image data.

threshold - The threshold that symbols the limit that above it a white color will be applied and below it a black will be applied.

Returns:

A black & white image.


histogram

 
public static int[] histogram(int[][] imageData)

Returns a histogram of the given gray-scaled image. The method returns an array of 256 cells. Each cell index represents a gray level (0 to 255). Cell x hold the number of image pixels that have a gray level of x.

Parameters:

imageData - A gray-scaled image data.

Returns:

A histogram.


main

 
public static void main(java.lang.String[] args)

 

Package  

 Class 

Use 

Tree 

Deprecated 

Index 

Help 

 

 PREV CLASS   NEXT CLASS

FRAMES    NO FRAMES    

 

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD