Class OCRImageObject

java.lang.Object
nl.dannyj.mistral.models.ocr.OCRImageObject

public class OCRImageObject extends Object
Represents an extracted image object within an OCR page.
  • Constructor Details

    • OCRImageObject

      public OCRImageObject()
    • OCRImageObject

      public OCRImageObject(String id, Integer topLeftX, Integer topLeftY, Integer bottomRightX, Integer bottomRightY, @Nullable String imageBase64)
      Creates a new OCRImageObject instance.
      Parameters:
      id - Image ID for extracted image in a page.
      topLeftX - X coordinate of top-left corner of the extracted image.
      topLeftY - Y coordinate of top-left corner of the extracted image.
      bottomRightX - X coordinate of bottom-right corner of the extracted image.
      bottomRightY - Y coordinate of bottom-right corner of the extracted image.
      imageBase64 - Base64 string of the extracted image.
  • Method Details

    • builder

      public static OCRImageObject.OCRImageObjectBuilder builder()
    • getId

      public String getId()
      Image ID for extracted image in a page.
      Returns:
      The image ID.
    • getTopLeftX

      public Integer getTopLeftX()
      X coordinate of top-left corner of the extracted image.
      Returns:
      The top-left X coordinate.
    • getTopLeftY

      public Integer getTopLeftY()
      Y coordinate of top-left corner of the extracted image.
      Returns:
      The top-left Y coordinate.
    • getBottomRightX

      public Integer getBottomRightX()
      X coordinate of bottom-right corner of the extracted image.
      Returns:
      The bottom-right X coordinate.
    • getBottomRightY

      public Integer getBottomRightY()
      Y coordinate of bottom-right corner of the extracted image.
      Returns:
      The bottom-right Y coordinate.
    • getImageBase64

      @Nullable public String getImageBase64()
      Base64 string of the extracted image.
      Returns:
      The Base64 image string.
    • setId

      public void setId(String id)
      Image ID for extracted image in a page.
    • setTopLeftX

      public void setTopLeftX(Integer topLeftX)
      X coordinate of top-left corner of the extracted image.
    • setTopLeftY

      public void setTopLeftY(Integer topLeftY)
      Y coordinate of top-left corner of the extracted image.
    • setBottomRightX

      public void setBottomRightX(Integer bottomRightX)
      X coordinate of bottom-right corner of the extracted image.
    • setBottomRightY

      public void setBottomRightY(Integer bottomRightY)
      Y coordinate of bottom-right corner of the extracted image.
    • setImageBase64

      public void setImageBase64(@Nullable String imageBase64)
      Base64 string of the extracted image.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object