|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectvxp.PixelSource
| Field Summary | |
int |
kHeight
This is the height of the video that you requested when you constructed this object |
int |
kWidth
This is the width of the video that you requested when you constructed this object |
int |
vidWidth
This is the width of the video after you have created the video. |
| Constructor Summary | |
PixelSource(int pw,
int ph)
Constructor class. |
|
| Method Summary | |
void |
addVideoListener(VideoListener _videoListener)
This will make the pixelsource notify you when a new frame is ready. |
void |
getArray(java.awt.image.BufferedImage _bi,
int _x,
int _y,
int _w,
int _h,
int[] _iArray)
Converts a Buffered Image into an array. |
int[] |
getColorOrder()
This is the amount you would would have to shift a byte packed into an int to give you an accurate value. |
java.lang.String[] |
getDeviceList()
|
java.lang.String |
getDeviceName()
|
java.awt.image.BufferedImage |
getImage()
Gives you the video image in the form of a bufferedImage. |
void |
getImage(java.awt.image.BufferedImage _bi)
Puts a the video image into an image supplied by you. |
int[] |
getPixel(int[] inArray,
int _offset)
Separates Red Green and Blue out of an array where where all three colors are packed into a single int. |
int[] |
getPixel(int[] inArray,
int x,
int y)
Separates Red Green and Blue out of an array where where all three colors are packed into a single int. |
int[] |
getPixel(int x,
int y)
|
int[] |
getPixelArray()
Gives you all the pixels as a linear int array with the r,g and b all packed into integers. |
void |
getPixelArray(int[] _outsidePixels)
Copies all the currrent pixels into the array that you supply |
int[] |
getPixelBrightness(int x,
int y)
|
int |
getVideoHeight()
This returns the height of the video. |
int |
getVideoWidth()
This returns the actual width of the video which may differ from the width you requested because some extra slop bytes may be added at the end of each line. |
boolean |
grabFrame()
Brings a new set of pixels into the system to be used by getPixel, setPixel, getImage etc... |
void |
idleIt()
Tells the digitizer to freshen up the pixels. |
void |
killSession()
Be sure to call this when you close or destroy your main window so a connection to your camera is not left hanging . |
java.lang.String |
setDevice(int whichSource)
|
java.lang.String |
setDevice(java.lang.String whichSource)
|
void |
setImageType()
This needs to be done after configuring the video where you learn about the format of the pixels. |
void |
setImageType(int type)
You can specify which type of image to supply with the getImage command |
void |
setInput(int _bla)
This returns the height of the video. |
void |
setNativeArrays()
This needs to be done after configuring the video where you learn about the widths and heights available. |
void |
setPixel(int[] inputArray,
int _offset,
int red,
int green,
int blue,
int alpha)
Sets the color of a given pixel within a supplied array but uses a precomputed offset instead of the x and y. |
void |
setPixel(int[] inputArray,
int x,
int y,
int red,
int green,
int blue,
int alpha)
Sets the color of a given pixel within an array of pixels. |
void |
setPixel(int _offset,
int red,
int green,
int blue,
int alpha)
Sets the color of a given pixel within the current frame but uses a precomputed offset instead of the x and y. |
void |
setPixel(int x,
int y,
int red,
int green,
int blue,
int alpha)
Sets the color of a pixel in the current frame of video at a given location. |
void |
tellVideoListeners()
|
void |
videoSettings()
Gives you a pop up dialog box for the video digitizer driver. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int kWidth
public int vidWidth
public int kHeight
| Constructor Detail |
public PixelSource(int pw,
int ph)
pw - width of the videoph - height of the video| Method Detail |
public int getVideoWidth()
public int getVideoHeight()
public void setNativeArrays()
public void setImageType()
public void setImageType(int type)
type - Usually this is is either BufferedImage.TYPE_INT_ARGB or BufferedImage.TYPE_INT_RGB.public java.awt.image.BufferedImage getImage()
public void getImage(java.awt.image.BufferedImage _bi)
_bi - the BufferedImage into which you would like the video image placed.
public void getArray(java.awt.image.BufferedImage _bi,
int _x,
int _y,
int _w,
int _h,
int[] _iArray)
_bi - _x - _y - _w - _h - _iArray - public java.lang.String getDeviceName()
public int[] getPixel(int x,
int y)
x - y -
public int[] getPixelBrightness(int x,
int y)
public void addVideoListener(VideoListener _videoListener)
_videoListener - This should be your other class. Try using "this".public void tellVideoListeners()
public int[] getPixel(int[] inArray,
int x,
int y)
x - y -
public int[] getPixel(int[] inArray,
int _offset)
public int[] getPixelArray()
public void getPixelArray(int[] _outsidePixels)
_outsidePixels - array that you want the pixel values placed into
public void setPixel(int x,
int y,
int red,
int green,
int blue,
int alpha)
x - y - red - green - blue - alpha -
public void setPixel(int[] inputArray,
int x,
int y,
int red,
int green,
int blue,
int alpha)
inputArray - x - y - red - green - blue - alpha -
public void setPixel(int _offset,
int red,
int green,
int blue,
int alpha)
_offset - red - green - blue - alpha -
public void setPixel(int[] inputArray,
int _offset,
int red,
int green,
int blue,
int alpha)
inputArray - _offset - red - green - blue - alpha - public void videoSettings()
public void idleIt()
public boolean grabFrame()
public void killSession()
public java.lang.String setDevice(int whichSource)
public java.lang.String setDevice(java.lang.String whichSource)
public void setInput(int _bla)
public java.lang.String[] getDeviceList()
public int[] getColorOrder()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||