|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorc.camera.ImageUtil
public class ImageUtil
Useful image utilities.
| Constructor Summary | |
|---|---|
ImageUtil()
|
|
| Method Summary | |
|---|---|
static java.awt.image.BufferedImage |
channelSelect(java.awt.image.BufferedImage image,
int channel)
|
static java.awt.image.BufferedImage |
cloneImage(java.awt.image.BufferedImage in)
Clone an image. |
static java.awt.image.BufferedImage |
convertImage(java.awt.image.BufferedImage in,
int type)
Ensure an image is of the right format, converting it to the format if necessary. |
static java.awt.image.BufferedImage |
ditherImageFloydSteinberg(java.awt.image.BufferedImage in)
Convert an arbitrary input image into a black and white dithered image (using the Floyd-Steinberg dithering algorithm with auto thresholding) suitable for display on the lcd panel. |
static java.awt.image.BufferedImage |
ditherImageRandom(java.awt.image.BufferedImage in)
Convert an arbitrary input image into a black and white dithered image (using random diffusion.) This produces relatively awful results compared to Floyd-Steinberg. |
static java.awt.image.BufferedImage |
rgbToHsv(java.awt.image.BufferedImage image)
|
static java.awt.image.BufferedImage |
scaleImage(java.awt.image.BufferedImage in,
int newwidth,
int newheight)
Scale an image. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageUtil()
| Method Detail |
|---|
public static java.awt.image.BufferedImage convertImage(java.awt.image.BufferedImage in,
int type)
in - The input image, in any format.type - The desired type, e.g. BufferedImage.TYPE_3BYTE_BGR
public static java.awt.image.BufferedImage ditherImageFloydSteinberg(java.awt.image.BufferedImage in)
in - The image to convert.
public static java.awt.image.BufferedImage ditherImageRandom(java.awt.image.BufferedImage in)
in - The image to convert.
public static java.awt.image.BufferedImage scaleImage(java.awt.image.BufferedImage in,
int newwidth,
int newheight)
in - The input imagenewwidth - The width of the new iamgenewheight - The height of the new imagepublic static java.awt.image.BufferedImage cloneImage(java.awt.image.BufferedImage in)
in - The image to be cloned.
public static java.awt.image.BufferedImage rgbToHsv(java.awt.image.BufferedImage image)
public static java.awt.image.BufferedImage channelSelect(java.awt.image.BufferedImage image,
int channel)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||