|
||||||||||
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
|
java.lang.String |
dir
|
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 |
adaptiveHistogramEqualization(int blocksHigh,
int blocksWide)
|
void |
add(int n)
|
void |
add(ShortImageBean sib)
|
void |
assembleMosaic(java.awt.Image subImage,
int x1,
int y1)
|
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)
|
void |
clearLow34()
|
void |
clearLowHalf()
|
void |
clearQ1()
|
void |
clearq2()
|
void |
clearRect(int x1,
int y1,
int x2,
int y2)
|
static void |
clearRect(ShortImageBean shortImageBean,
int x1,
int y1,
int x2,
int y2)
|
int |
clip(double y)
|
static short |
clip(int c)
|
static void |
clip(ShortImageBean sib)
|
void |
clp()
|
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()
|
java.awt.Image |
cropImage(java.awt.Point min,
java.awt.Point max)
Crop the image in the SIB to the size of min and max ImageUtils has a better crop implementation |
int |
cx(int x)
|
int |
cy(int y)
|
void |
divide(java.awt.Image energy)
|
void |
divide(int n)
|
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)
|
void |
freiChen()
|
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)
|
java.awt.Point[] |
getAverageLocationsOfWhiteSpotsAtEachRow(int threshR)
|
double |
getAverageR()
Obtained by summing the 2D array and dividing by the number of elements. |
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.lang.String |
getDir()
|
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()
|
int |
getLocationOfNonWhiteSpotAtRowFromRightToLeft(int y)
|
java.awt.Point |
getLocationOfWhiteSpotAtMaxRowAndMaxCol()
|
java.awt.Point |
getLocationOfWhiteSpotAtRow(int row)
|
MinMax2D |
getMinMax2DForBorder()
|
float |
getMse(ShortImageBean sib)
|
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()
|
java.awt.Point[] |
getTheBrightestSpotForEachColumnLeftToRight()
|
java.awt.Point[] |
getTheBrightestSpotForEachColumnRightToLeft()
|
java.awt.Point[] |
getTheBrightestSpotForEachRow()
|
float |
getTotalNoisePower(ShortImageBean sib)
|
float |
getTotalSignalPower()
Compute the total signal power by adding all the r,g,b values, squaring. |
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)
|
void |
grbNumImg()
|
boolean |
isEqual(int x,
int y,
int value)
|
boolean |
isFromFile()
|
boolean |
isInRange(double v,
double x,
double sigma)
|
static void |
linearCut(short[][] a,
int numberOfBitsToCut)
|
static void |
linearTransform(double c,
double br,
ShortImageBean b)
|
static void |
main(java.lang.String[] args)
|
void |
mask(ShortImageBean background)
|
void |
multiplyRed(ShortImageBean sib)
r = r * sib.getR(); |
void |
negate()
|
void |
negate2()
|
void |
pixelDifference()
|
static void |
powImage(ImageFrame ifi,
ShortImageBean nf,
double p)
|
void |
prewitt()
|
void |
print()
|
void |
process(HppFilterInterface hppFilter)
|
void |
randImage(int min,
int max)
|
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 |
roberts2()
|
void |
saltAndPepper(int n)
|
void |
scale(int scale)
|
void |
setB(short[][] b)
|
void |
setBlue(int x,
int y,
short blue)
|
void |
setClipped(boolean b)
|
void |
setDir(java.lang.String dir)
|
void |
setFile(java.io.File _f)
|
void |
setFromFile(boolean fromFile)
|
void |
setG(short[][] g)
|
void |
setGreen(int x,
int y,
short green)
|
void |
setHeight(int _h)
|
void |
setImage(java.awt.Image img)
|
void |
setImage(ShortImageBean window,
java.awt.Rectangle re)
|
void |
setPel(int x,
int y)
|
void |
setPixel(int x,
int y,
java.awt.Color c)
|
void |
setPixel(int x,
int y,
int red,
int green,
int blue)
|
void |
setPixel(int x,
int y,
short red,
short green,
short blue)
|
void |
setR(short[][] r)
|
void |
setRed(int x,
int y,
short red)
|
void |
setRGBPels(byte[] rp,
byte[] gp,
byte[] bp)
|
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 |
turn90()
|
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
public java.lang.String dir
Constructor Detail |
---|
public ShortImageBean(java.awt.Dimension d)
public ShortImageBean()
public ShortImageBean(java.awt.Image img)
public ShortImageBean(short[][] r, short[][] g, short[][] b)
r
- 2d array of shortg
- 2d array of shortb
- 2D array of shortpublic 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 turn90()
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 testZeroPadImage()
public void zeroPadImage(int top, int bottom, int left, int right)
top
- the size of the top padbottom
- the size of the bottom padleft
- the size of the left padright
- the size of the right padpublic java.awt.Dimension getSize()
public void swapGreenAndBlue()
public float getMse(ShortImageBean sib)
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
- the other image to average againstpublic void add(ShortImageBean 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[] getAverageLocationsOfWhiteSpotsAtEachRow(int threshR)
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
- the x coordinate to obtain the averagey
- the y coordinate to objain the average
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 void setRGBPels(byte[] rp, byte[] gp, byte[] bp)
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 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 void setPixel(int x, int y, int red, int green, int blue)
public MinMax2D getMinMax2DForBorder()
public void square()
public void divide(int n)
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
- get the center of the rectangle
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)
public void setImage(ShortImageBean window, java.awt.Rectangle re)
public void multiplyRed(ShortImageBean sib)
sib
- the other imagepublic java.awt.Point[] getTheBrightestSpotForEachRow()
public java.awt.Point[] getTheBrightestSpotForEachColumnRightToLeft()
public java.awt.Point[] getTheBrightestSpotForEachColumnLeftToRight()
public void clp()
public void clearLow34()
public void clearLowHalf()
public void clearq2()
public void clearQ1()
public void clearRect(int x1, int y1, int x2, int y2)
public int cy(int y)
public int cx(int x)
public void grbNumImg()
public static void clearRect(ShortImageBean shortImageBean, int x1, int y1, int x2, int y2)
public java.lang.String getDir()
public void setDir(java.lang.String dir)
public java.awt.Image cropImage(java.awt.Point min, java.awt.Point max)
min
- the upper left cornermax
- the lower right corner
public void freiChen()
public void pixelDifference()
public void prewitt()
public void roberts2()
public static void main(java.lang.String[] args)
public boolean isEqual(int x, int y, int value)
public int getLocationOfNonWhiteSpotAtRowFromRightToLeft(int y)
public static void powImage(ImageFrame ifi, ShortImageBean nf, double p)
public static void linearTransform(double c, double br, ShortImageBean b)
public void assembleMosaic(java.awt.Image subImage, int x1, int y1)
public void adaptiveHistogramEqualization(int blocksHigh, int blocksWide)
public void setRed(int x, int y, short red)
public void setGreen(int x, int y, short green)
public void setBlue(int x, int y, short blue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |