Class ImageContext (3.7.0) 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
  Version 3.7.0keyboard_arrow_down  
  
 
    
    
     
    
    
    
    
    
      
  
  
  
    
public   final   class  ImageContext   extends   GeneratedMessageV3   implements   ImageContextOrBuilder  
   
   Image context and/or feature-specific parameters.
 Protobuf type google.cloud.vision.v1p3beta1.ImageContext
 
  
  
  
  Static Fields
   
  CROP_HINTS_PARAMS_FIELD_NUMBER 
  
    
public   static   final   int   CROP_HINTS_PARAMS_FIELD_NUMBER  
   
  Field Value 
  
  LANGUAGE_HINTS_FIELD_NUMBER 
  
    
public   static   final   int   LANGUAGE_HINTS_FIELD_NUMBER  
   
  Field Value 
  
  LAT_LONG_RECT_FIELD_NUMBER 
  
    
public   static   final   int   LAT_LONG_RECT_FIELD_NUMBER  
   
  Field Value 
  
  PRODUCT_SEARCH_PARAMS_FIELD_NUMBER 
  
    
public   static   final   int   PRODUCT_SEARCH_PARAMS_FIELD_NUMBER  
   
  Field Value 
  
  TEXT_DETECTION_PARAMS_FIELD_NUMBER 
  
    
public   static   final   int   TEXT_DETECTION_PARAMS_FIELD_NUMBER  
   
  Field Value 
  
  WEB_DETECTION_PARAMS_FIELD_NUMBER 
  
    
public   static   final   int   WEB_DETECTION_PARAMS_FIELD_NUMBER  
   
  Field Value 
  
  Static Methods
   
   
  getDefaultInstance() 
  
    
public   static   ImageContext   getDefaultInstance ()  
   
  Returns 
  
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
   
  Returns 
  
   
  newBuilder() 
  
    
public   static   ImageContext . Builder   newBuilder ()  
   
  Returns 
  
   
  newBuilder(ImageContext prototype) 
  
    
public   static   ImageContext . Builder   newBuilder ( ImageContext   prototype )  
   
  Parameter 
  
  Returns 
  
   
  parseDelimitedFrom(InputStream input) 
  
    
public   static   ImageContext   parseDelimitedFrom ( InputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   ImageContext   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(byte[] data) 
  
    
public   static   ImageContext   parseFrom ( byte []   data )  
   
  Parameter 
  
    
      
        Name  
        Description  
       
      
        data 
        byte [] 
       
     
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   ImageContext   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteString data) 
  
    
public   static   ImageContext   parseFrom ( ByteString   data )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   ImageContext   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(CodedInputStream input) 
  
    
public   static   ImageContext   parseFrom ( CodedInputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   ImageContext   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(InputStream input) 
  
    
public   static   ImageContext   parseFrom ( InputStream   input )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   ImageContext   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteBuffer data) 
  
    
public   static   ImageContext   parseFrom ( ByteBuffer   data )  
   
  Parameter 
  
  Returns 
  
  Exceptions 
  
   
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   ImageContext   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Exceptions 
  
   
  parser() 
  
    
public   static   Parser<ImageContext>   parser ()  
   
  Returns 
  
  Methods
   
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  getCropHintsParams() 
  
    
public   CropHintsParams   getCropHintsParams ()  
   
   Parameters for crop hints annotation request.
 .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4;
 
  Returns 
  
   
  getCropHintsParamsOrBuilder() 
  
    
public   CropHintsParamsOrBuilder   getCropHintsParamsOrBuilder ()  
   
   Parameters for crop hints annotation request.
 .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4;
 
  Returns 
  
   
  getDefaultInstanceForType() 
  
    
public   ImageContext   getDefaultInstanceForType ()  
   
  Returns 
  
   
  getLanguageHints(int index) 
  
    
public   String   getLanguageHints ( int   index )  
   
   List of languages to use for TEXT_DETECTION. In most cases, an empty value
 yields the best results since it enables automatic language detection. For
 languages based on the Latin alphabet, setting language_hints is not
 needed. In rare cases, when the language of the text in the image is known,
 setting a hint will help get better results (although it will be a
 significant hindrance if the hint is wrong). Text detection returns an
 error if one or more of the specified languages is not one of the
 supported languages .
 repeated string language_hints = 2;
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        index 
        int The index of the element to return.
 
       
     
  
  Returns 
  
    
      
        Type  
        Description  
       
      
        String  
        The languageHints at the given index.
 
       
     
  
   
  getLanguageHintsBytes(int index) 
  
    
public   ByteString   getLanguageHintsBytes ( int   index )  
   
   List of languages to use for TEXT_DETECTION. In most cases, an empty value
 yields the best results since it enables automatic language detection. For
 languages based on the Latin alphabet, setting language_hints is not
 needed. In rare cases, when the language of the text in the image is known,
 setting a hint will help get better results (although it will be a
 significant hindrance if the hint is wrong). Text detection returns an
 error if one or more of the specified languages is not one of the
 supported languages .
 repeated string language_hints = 2;
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        index 
        int The index of the value to return.
 
       
     
  
  Returns 
  
    
      
        Type  
        Description  
       
      
        ByteString  
        The bytes of the languageHints at the given index.
 
       
     
  
   
  getLanguageHintsCount() 
  
    
public   int   getLanguageHintsCount ()  
   
   List of languages to use for TEXT_DETECTION. In most cases, an empty value
 yields the best results since it enables automatic language detection. For
 languages based on the Latin alphabet, setting language_hints is not
 needed. In rare cases, when the language of the text in the image is known,
 setting a hint will help get better results (although it will be a
 significant hindrance if the hint is wrong). Text detection returns an
 error if one or more of the specified languages is not one of the
 supported languages .
 repeated string language_hints = 2;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        int  
        The count of languageHints.
 
       
     
  
   
  getLanguageHintsList() 
  
    
public   ProtocolStringList   getLanguageHintsList ()  
   
   List of languages to use for TEXT_DETECTION. In most cases, an empty value
 yields the best results since it enables automatic language detection. For
 languages based on the Latin alphabet, setting language_hints is not
 needed. In rare cases, when the language of the text in the image is known,
 setting a hint will help get better results (although it will be a
 significant hindrance if the hint is wrong). Text detection returns an
 error if one or more of the specified languages is not one of the
 supported languages .
 repeated string language_hints = 2;
 
  Returns 
  
   
  getLatLongRect() 
  
    
public   LatLongRect   getLatLongRect ()  
   
   Not used.
 .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1;
 
  Returns 
  
   
  getLatLongRectOrBuilder() 
  
    
public   LatLongRectOrBuilder   getLatLongRectOrBuilder ()  
   
   Not used.
 .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1;
 
  Returns 
  
   
  getParserForType() 
  
    
public   Parser<ImageContext>   getParserForType ()  
   
  Returns 
  
  Overrides 
  
   
  getProductSearchParams() 
  
    
public   ProductSearchParams   getProductSearchParams ()  
   
   Parameters for product search.
 .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5;
 
  Returns 
  
   
  getProductSearchParamsOrBuilder() 
  
    
public   ProductSearchParamsOrBuilder   getProductSearchParamsOrBuilder ()  
   
   Parameters for product search.
 .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5;
 
  Returns 
  
   
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
   
  Returns 
  
  Overrides 
  
   
  getTextDetectionParams() 
  
    
public   TextDetectionParams   getTextDetectionParams ()  
   
   Parameters for text detection and document text detection.
 .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12;
 
  Returns 
  
   
  getTextDetectionParamsOrBuilder() 
  
    
public   TextDetectionParamsOrBuilder   getTextDetectionParamsOrBuilder ()  
   
   Parameters for text detection and document text detection.
 .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12;
 
  Returns 
  
   
  getUnknownFields() 
  
    
public   final   UnknownFieldSet   getUnknownFields ()  
   
  Returns 
  
  Overrides 
  
   
  getWebDetectionParams() 
  
    
public   WebDetectionParams   getWebDetectionParams ()  
   
   Parameters for web detection.
 .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6;
 
  Returns 
  
   
  getWebDetectionParamsOrBuilder() 
  
    
public   WebDetectionParamsOrBuilder   getWebDetectionParamsOrBuilder ()  
   
   Parameters for web detection.
 .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6;
 
  Returns 
  
   
  hasCropHintsParams() 
  
    
public   boolean   hasCropHintsParams ()  
   
   Parameters for crop hints annotation request.
 .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the cropHintsParams field is set.
 
       
     
  
   
  hasLatLongRect() 
  
    
public   boolean   hasLatLongRect ()  
   
   Not used.
 .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the latLongRect field is set.
 
       
     
  
   
  hasProductSearchParams() 
  
    
public   boolean   hasProductSearchParams ()  
   
   Parameters for product search.
 .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the productSearchParams field is set.
 
       
     
  
   
  hasTextDetectionParams() 
  
    
public   boolean   hasTextDetectionParams ()  
   
   Parameters for text detection and document text detection.
 .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the textDetectionParams field is set.
 
       
     
  
   
  hasWebDetectionParams() 
  
    
public   boolean   hasWebDetectionParams ()  
   
   Parameters for web detection.
 .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the webDetectionParams field is set.
 
       
     
  
   
  hashCode() 
  
  Returns 
  
  Overrides 
  
   
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
   
  Returns 
  
  Overrides 
  
   
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
   
  Returns 
  
  Overrides 
  
   
  newBuilderForType() 
  
    
public   ImageContext . Builder   newBuilderForType ()  
   
  Returns 
  
   
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   ImageContext . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  toBuilder() 
  
    
public   ImageContext . Builder   toBuilder ()  
   
  Returns 
  
   
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
   
  Parameter 
  
  Overrides 
  
  Exceptions 
  
 
     
    
  
  
  
     
  
 
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-30 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]