|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectj2d.ImageBean
j2d.ShortImageBean
public class ShortImageBean
GPL code by DocJava, Inc. User: lyon Date: Mar 5, 2003 Time: 5:44:03 PM
Field Summary | |
---|---|
short[][] |
b
|
Clipper |
clipper
|
short[][] |
g
|
short[][] |
r
|
Constructor Summary | |
---|---|
ShortImageBean()
|
|
ShortImageBean(java.awt.Dimension d)
|
|
ShortImageBean(float[] rf,
float[] gf,
float[] bf,
int w,
int h)
|
|
ShortImageBean(java.awt.Image img)
|
|
ShortImageBean(int w,
int h)
|
|
ShortImageBean(short[][] r,
short[][] g,
short[][] b)
input a new sib and create |
Method Summary | |
---|---|
void |
add(int n)
|
void |
average(ShortImageBean sib)
average averages the input short image bean with the given short image bean ShortImageBean sib, sib2; sib.average(sib2); This
is like: a = avg(a,b); |
void |
buildPolygonList(int x,
int y,
java.awt.Polygon p)
|
int |
clip(double y)
|
static short |
clip(int c)
|
static void |
clip(ShortImageBean sib)
|
void |
colorErode(float[][] k)
|
void |
colorToRed()
Copy all colors to red plane, using an average operation. |
void |
computeGradient(int x,
int y)
|
void |
computeMagnitudeAndGradiant()
|
void |
convolveSlow(float[][] k)
|
static ShortImageBean |
copy(ShortImageBean sib)
|
void |
copyRedToGreenAndBlue()
|
void |
divide(java.awt.Image energy)
|
static void |
drawHoughLineGray(ShortImageBean shortImageBean,
int x,
int y,
short[][] s)
|
void |
drawLineRed(int x1,
int y1,
int x2,
int y2)
|
void |
drawLineRed2(int x1,
int y1,
int x2,
int y2)
|
void |
drawRect(int ix,
int iy,
int w,
int h)
|
double |
getAverage()
|
int |
getAverage(int x,
int y)
Get the average value of the pixels at a given location |
double |
getAverageB()
Compute the average blue value |
double |
getAverageG()
|
java.awt.Point |
getAverageLocationOfWhiteSpotAtRow(int row)
|
double |
getAverageR()
|
short[][] |
getB()
|
short |
getBlue(int x,
int y)
|
short[] |
getBluePels()
|
java.awt.Point |
getCentroid()
This routine computes the centroid of all pixels that are 255 in the red plane. |
java.awt.Point |
getCentroid(java.awt.Rectangle rect)
get the blob centroid of only the area inside the rectangle |
Clipper |
getClipper()
|
java.awt.Point |
getColorLocation(double rMinusAvg,
double gMinusAvg,
double redRangeAvg,
double gRangeAvg)
|
java.awt.Point |
getColorLocation(double rOverAvg,
double gOverAvg,
double bOverAvg,
double stdDevR,
double stdDevG,
double stdDevB)
|
int |
getColWithLargestNumberOfWhiteSpots()
|
java.awt.Dimension |
getDimension()
|
java.io.File |
getFile()
|
short[][] |
getG()
|
short |
getGreen(int x,
int y)
|
short[] |
getGreenPels()
|
double |
getGreenRangeAvg()
|
int |
getHeight()
|
java.awt.Image |
getImage()
|
ShortImageBean |
getImageFlowBean()
|
java.awt.Point |
getLocation()
|
java.awt.Point |
getLocationOfFirstWhiteSpot()
|
java.awt.Point |
getLocationOfWhiteSpotAtMaxRowAndMaxCol()
|
java.awt.Point |
getLocationOfWhiteSpotAtRow(int row)
|
MinMax2D |
getMinMax2DForBorder()
|
int[] |
getPels()
|
byte[] |
getPelsFromBlue()
|
short[][] |
getR()
|
short |
getRed(int x,
int y)
|
short[] |
getRedPels()
|
double |
getRedRangeAvg()
|
int |
getRowWithLargestNumberOfWhiteSpots()
|
java.awt.Dimension |
getSize()
|
double |
getSNRinDb(ShortImageBean sib)
|
double |
getStandardDeviationOfB()
|
double |
getStandardDeviationOfG()
|
double |
getStandardDeviationOfR()
|
float |
getTotalNoisePower(ShortImageBean sib)
|
float |
getTotalSignalPower()
|
int |
getWidth()
|
void |
gray()
convert the image to gray scale by taking the average of the red, green and blue colors. |
void |
grayPyramid(float[][] k)
|
boolean |
isFromFile()
|
boolean |
isInRange(double v,
double x,
double sigma)
|
static void |
linearCut(short[][] a,
int numberOfBitsToCut)
|
static void |
main(java.lang.String[] args)
|
void |
mask(ShortImageBean background)
|
void |
negate()
|
void |
negate2()
|
void |
print()
|
void |
process(HppFilterInterface hppFilter)
|
void |
randImage(int min,
int max)
|
static int |
readByte(java.io.InputStream in)
|
static char |
readChar(java.io.InputStream in)
|
static int |
readInt(java.io.InputStream in)
|
static char |
readNonwhiteChar(java.io.InputStream in)
|
static ShortImageBean |
readPpm(java.io.File fn)
|
void |
reinitializeRedGreenAndBlue()
make new instances of the internal short arrays. |
void |
removeTheDcComponent()
Compute the average value for the Red, Green and Blue color plans and remove the average values from each of them. |
void |
resample(int ratio)
|
void |
saltAndPepper(int n)
|
void |
scale(int scale)
|
void |
setB(short[][] b)
|
void |
setClipped(boolean b)
|
void |
setFile(java.io.File _f)
|
void |
setFromFile(boolean fromFile)
|
void |
setG(short[][] g)
|
void |
setHeight(int _h)
|
void |
setImage(java.awt.Image img)
|
void |
setPel(int x,
int y)
|
void |
setPixel(int x,
int y,
java.awt.Color c)
|
void |
setPixel(int x,
int y,
short red,
short green,
short blue)
|
void |
setR(short[][] r)
|
void |
setWidth(int _w)
|
void |
square()
|
void |
subtract(ShortImageBean sib)
a = a - b; |
static void |
subtract(ShortImageBean sibA,
ShortImageBean sibB)
|
void |
swapGreenAndBlue()
|
static void |
templateEdge(ShortImageBean shortImageBean,
float[][] k1,
float[][] k2)
|
static void |
test(RunVec3dPanel runVec3dPanel)
|
void |
testDrawRedLine()
|
static void |
testZeroPadImage()
|
void |
thresh(short threshValue)
|
java.awt.Point |
threshCentroid(int[] fa)
|
void |
threshColor(int[] fa)
|
void |
threshColor4(int[] fa)
|
short[][] |
trim(int dx,
int dy,
short[][] s)
|
void |
zeroPadImage(int top,
int bottom,
int left,
int right)
Use the present RGB as the input, create a new RGB which will grow by top, bottom, left and right, and replace the RGB with the new values. |
Methods inherited from class j2d.ImageBean |
---|
getColorModel, setImage |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public short[][] r
public short[][] g
public short[][] b
public Clipper clipper
Constructor Detail |
---|
public ShortImageBean(java.awt.Dimension d)
public ShortImageBean()
public ShortImageBean(java.awt.Image img)
public ShortImageBean(short[][] r, short[][] g, short[][] b)
public ShortImageBean(int w, int h)
public ShortImageBean(float[] rf, float[] gf, float[] bf, int w, int h)
Method Detail |
---|
public boolean isFromFile()
isFromFile
in interface ImageBeanInterface
isFromFile
in class ImageBean
public void setFromFile(boolean fromFile)
setFromFile
in interface ImageBeanInterface
setFromFile
in class ImageBean
public void setHeight(int _h)
setHeight
in interface ImageBeanInterface
setHeight
in class ImageBean
public void setWidth(int _w)
setWidth
in interface ImageBeanInterface
setWidth
in class ImageBean
public java.io.File getFile()
getFile
in interface ImageBeanInterface
getFile
in class ImageBean
public void setFile(java.io.File _f)
setFile
in interface ImageBeanInterface
setFile
in class ImageBean
public static void test(RunVec3dPanel runVec3dPanel)
public static void main(java.lang.String[] args)
public static void testZeroPadImage()
public void zeroPadImage(int top, int bottom, int left, int right)
top
- bottom
- left
- right
- public java.awt.Dimension getSize()
public void swapGreenAndBlue()
public float getTotalNoisePower(ShortImageBean sib)
public float getTotalSignalPower()
public ShortImageBean getImageFlowBean()
public void average(ShortImageBean sib)
ShortImageBean sib, sib2; sib.average(sib2); This
is like: a = avg(a,b);
sib
- public static ShortImageBean copy(ShortImageBean sib)
public Clipper getClipper()
public int getWidth()
getWidth
in interface ImageBeanInterface
getWidth
in class ImageBean
public int getHeight()
getHeight
in interface ImageBeanInterface
getHeight
in class ImageBean
public java.awt.Image getImage()
getImage
in interface ImageBeanInterface
getImage
in class ImageBean
public void setImage(java.awt.Image img)
setImage
in interface ImageBeanInterface
setImage
in class ImageBean
public void gray()
public void colorToRed()
ShortImageBean.colorToRed(sib); r = (r+g+b)/3;
public static void clip(ShortImageBean sib)
public void saltAndPepper(int n)
public void add(int n)
public void negate()
public void process(HppFilterInterface hppFilter)
public void negate2()
public java.awt.Point getLocation()
public java.awt.Point getLocationOfWhiteSpotAtMaxRowAndMaxCol()
public java.awt.Point getAverageLocationOfWhiteSpotAtRow(int row)
public java.awt.Point getLocationOfWhiteSpotAtRow(int row)
public int getColWithLargestNumberOfWhiteSpots()
public int getRowWithLargestNumberOfWhiteSpots()
public java.awt.Point getLocationOfFirstWhiteSpot()
public java.awt.Point getColorLocation(double rOverAvg, double gOverAvg, double bOverAvg, double stdDevR, double stdDevG, double stdDevB)
public boolean isInRange(double v, double x, double sigma)
public double getRedRangeAvg()
public double getGreenRangeAvg()
public java.awt.Point getColorLocation(double rMinusAvg, double gMinusAvg, double redRangeAvg, double gRangeAvg)
public void copyRedToGreenAndBlue()
public void subtract(ShortImageBean sib)
sib
- public static short clip(int c)
public static void subtract(ShortImageBean sibA, ShortImageBean sibB)
public int getAverage(int x, int y)
x
- y
-
public double getAverageB()
public void removeTheDcComponent()
public double getAverage()
public double getAverageG()
public double getAverageR()
public double getStandardDeviationOfR()
public double getStandardDeviationOfG()
public double getStandardDeviationOfB()
public short[][] getR()
public void setR(short[][] r)
public short[][] getG()
public void setG(short[][] g)
public short[][] getB()
public void setB(short[][] b)
public byte[] getPelsFromBlue()
public int[] getPels()
public short[] getRedPels()
public short[] getBluePels()
public short[] getGreenPels()
public double getSNRinDb(ShortImageBean sib)
public static void linearCut(short[][] a, int numberOfBitsToCut)
public void scale(int scale)
public static ShortImageBean readPpm(java.io.File fn) throws java.io.IOException
java.io.IOException
public static int readInt(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public static int readByte(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public static char readNonwhiteChar(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public static char readChar(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public void print()
public void setPixel(int x, int y, java.awt.Color c)
public void setPixel(int x, int y, short red, short green, short blue)
public MinMax2D getMinMax2DForBorder()
public void square()
public void divide(java.awt.Image energy)
public void mask(ShortImageBean background)
public void threshColor4(int[] fa)
public void colorErode(float[][] k)
public java.awt.Point getCentroid()
public java.awt.Point threshCentroid(int[] fa)
public void threshColor(int[] fa)
public void drawRect(int ix, int iy, int w, int h)
public void setClipped(boolean b)
public void convolveSlow(float[][] k)
public void randImage(int min, int max)
public static void templateEdge(ShortImageBean shortImageBean, float[][] k1, float[][] k2)
public void setPel(int x, int y)
public void drawLineRed2(int x1, int y1, int x2, int y2)
public void drawLineRed(int x1, int y1, int x2, int y2)
public void computeGradient(int x, int y)
public void computeMagnitudeAndGradiant()
public void reinitializeRedGreenAndBlue()
public int clip(double y)
public void testDrawRedLine()
public short[][] trim(int dx, int dy, short[][] s)
public void resample(int ratio)
public void thresh(short threshValue)
public static void drawHoughLineGray(ShortImageBean shortImageBean, int x, int y, short[][] s)
public void grayPyramid(float[][] k)
public void buildPolygonList(int x, int y, java.awt.Polygon p)
public java.awt.Point getCentroid(java.awt.Rectangle rect)
rect
-
public java.awt.Dimension getDimension()
public short getRed(int x, int y)
public short getGreen(int x, int y)
public short getBlue(int x, int y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |