示例#1
0
  /**
   * Provides an image for Tesseract to recognize. Copies the image buffer. The source image may be
   * destroyed immediately after SetImage is called. SetImage clears all recognition results, and
   * sets the rectangle to the full image, so it may be followed immediately by a GetUTF8Text, and
   * it will automatically perform recognition.
   *
   * @param imagedata byte representation of the image
   * @param width image width
   * @param height image height
   * @param bpp bytes per pixel
   * @param bpl bytes per line
   */
  public void setImage(byte[] imagedata, int width, int height, int bpp, int bpl) {
    if (mRecycled) throw new IllegalStateException();

    nativeSetImageBytes(imagedata, width, height, bpp, bpl);
  }
示例#2
0
 /**
  * Provides an image for Tesseract to recognize. Copies the image buffer. The source image may be
  * destroyed immediately after SetImage is called. SetImage clears all recognition results, and
  * sets the rectangle to the full image, so it may be followed immediately by a GetUTF8Text, and
  * it will automatically perform recognition.
  *
  * @param imagedata byte representation of the image
  * @param width image width
  * @param height image height
  * @param bpp bytes per pixel
  * @param bpl bytes per line
  */
 public void setImage(byte[] imagedata, int width, int height, int bpp, int bpl) {
   nativeSetImageBytes(imagedata, width, height, bpp, bpl);
 }