devs.visionpackage.org.cmotch.visionlibrary
Class ImageManipulation

java.lang.Object
  extended by devs.visionpackage.org.cmotch.visionlibrary.ImageManipulation

public class ImageManipulation
extends java.lang.Object

Class used for direct pixel by pixel manipulation on a buffered image


Constructor Summary
ImageManipulation(java.awt.image.BufferedImage inputImg)
          Constructor
 
Method Summary
 int getbluePixel(int x, int y)
          Get blue pixel
 int getgreenPixel(int x, int y)
          Get green pixel
 java.awt.image.BufferedImage getImage()
          Return image
 int getredPixel(int x, int y)
          Get Red Pixel
 int imgHeight()
          Get Image height
 int imgWidth()
          Get Image width
 void setBluePixel(int x, int y, int value)
          Set blue pixel
 void setGreenPixel(int x, int y, int value)
          Set green pixel
 void setRedPixel(int x, int y, int value)
          Set red pixel
 void setRGBPixels(int x, int y, int r, int g, int b)
          Set rgb pixel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageManipulation

public ImageManipulation(java.awt.image.BufferedImage inputImg)
Constructor

Parameters:
inputImg - BufferedImage
Method Detail

getImage

public java.awt.image.BufferedImage getImage()
Return image

Returns:
BufferedImage

imgHeight

public int imgHeight()
Get Image height

Returns:
int

imgWidth

public int imgWidth()
Get Image width

Returns:
int

getredPixel

public int getredPixel(int x,
                       int y)
Get Red Pixel

Parameters:
x - int
y - int
Returns:
int

getgreenPixel

public int getgreenPixel(int x,
                         int y)
Get green pixel

Parameters:
x - int
y - int
Returns:
int

getbluePixel

public int getbluePixel(int x,
                        int y)
Get blue pixel

Parameters:
x - int
y - int
Returns:
int

setRedPixel

public void setRedPixel(int x,
                        int y,
                        int value)
Set red pixel

Parameters:
x - int
y - int
value - int

setGreenPixel

public void setGreenPixel(int x,
                          int y,
                          int value)
Set green pixel

Parameters:
x - int
y - int
value - int

setBluePixel

public void setBluePixel(int x,
                         int y,
                         int value)
Set blue pixel

Parameters:
x - int
y - int
value - int

setRGBPixels

public void setRGBPixels(int x,
                         int y,
                         int r,
                         int g,
                         int b)
Set rgb pixel

Parameters:
x - int
y - int
r - int
g - int
b - int