/**
* Use a PixelGrabber to grab the pixel data from the camera stream.
*
*/
public void grabPixels ( ) {
// Get the width and height of the camera image.
int width = this.cameraStream.getWidth( this );
int height = this.cameraStream.getHeight( this );
// Create a new pixels array with a given width and height.
this.pixels = new int[ width * height ];
// Create a new PixelGrabber using the camera stream and place the grabbed
// pixel data into this.pixels.
this.grabber = new PixelGrabber( this.cameraStream, 0, 0, width, height, this.pixels, 0, width );
try {
// Grab the pixels.
this.grabber.grabPixels( );
}
catch ( Exception e ) {
log.error("Failed to grab pixels.", e);
} // end catch
}
Camera.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:axisviewer
作者:
评论列表
文章目录