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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void onImageAvailable(ImageReceiver imageReceiver) Called for every new image that is received from the camera.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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