Package io.anyline2.camera
Interface ImageListener
-
- All Implemented Interfaces:
public interface ImageListener
A listener that can be set to a camera view to be able to receive images from it.
-
-
Method Summary
Modifier and Type Method Description abstract void
onImageAvailable(ImageReceiver imageReceiver)
Called for every new image that is received from the camera. -
-
Method Detail
-
onImageAvailable
abstract void onImageAvailable(ImageReceiver imageReceiver)
Called for every new image that is received from the camera.
The given ImageReceiver is a helper class to get access to the image.
If no getter is called on the receiver, no work is done. So just doing nothing here is fine, if there is currently no need for a new image to process.
The ImageReceiver should not be stored (the underlying data may change after the method returns).
Note: This is called in the cameras thread. For your image processing you should kick off a background task or delegate the work to a background thread.
- Parameters:
imageReceiver
- the image receiver to access the frame data with
-
-
-
-