net.sf.jhawkingcam
Class ImageHelper

java.lang.Object
  extended by net.sf.jhawkingcam.ImageHelper

public class ImageHelper
extends java.lang.Object

Program to check web map image to make sure everything is okay with it.


Constructor Summary
ImageHelper()
           
 
Method Summary
static int absoluteDifference(java.awt.image.BufferedImage image1, java.awt.image.BufferedImage image2)
          Compares two images against one another
static javax.media.jai.PlanarImage add(javax.media.jai.PlanarImage image1, javax.media.jai.PlanarImage image2)
          Add two images together
static int countBlackPixels(java.awt.image.BufferedImage result)
          Count number of black pixels
static int countWhitePixels(java.awt.image.BufferedImage result)
          Count number of white pixels
static javax.media.jai.PlanarImage greyscale(javax.media.jai.PlanarImage source)
          Convert to greyscale using linear conversion
static javax.media.jai.PlanarImage invert(javax.media.jai.PlanarImage source)
          Convert black to white and vice-versa
static javax.media.jai.PlanarImage subtract(java.awt.image.BufferedImage image1, java.awt.image.BufferedImage image2)
          Difference of two images
static javax.media.jai.PlanarImage threshold(javax.media.jai.PlanarImage source, double lowValue)
          Threshold - convert pixel values to white that are greater than lowValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageHelper

public ImageHelper()
Method Detail

absoluteDifference

public static int absoluteDifference(java.awt.image.BufferedImage image1,
                                     java.awt.image.BufferedImage image2)
                              throws java.lang.Exception
Compares two images against one another

Throws:
java.lang.Exception

greyscale

public static javax.media.jai.PlanarImage greyscale(javax.media.jai.PlanarImage source)
Convert to greyscale using linear conversion


threshold

public static javax.media.jai.PlanarImage threshold(javax.media.jai.PlanarImage source,
                                                    double lowValue)
Threshold - convert pixel values to white that are greater than lowValue


invert

public static javax.media.jai.PlanarImage invert(javax.media.jai.PlanarImage source)
Convert black to white and vice-versa


add

public static javax.media.jai.PlanarImage add(javax.media.jai.PlanarImage image1,
                                              javax.media.jai.PlanarImage image2)
Add two images together


subtract

public static javax.media.jai.PlanarImage subtract(java.awt.image.BufferedImage image1,
                                                   java.awt.image.BufferedImage image2)
Difference of two images


countBlackPixels

public static int countBlackPixels(java.awt.image.BufferedImage result)
Count number of black pixels


countWhitePixels

public static int countWhitePixels(java.awt.image.BufferedImage result)
Count number of white pixels



JHawkingCam hosted by SourceForge.net - John Dillenburg - john_sourceforge@dillenburg.org