Skip to content

Commit 80a56e0

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add TextDetectionParams.enable_text_detection_confidence_score
Add TextDetectionParams.enable_text_detection_confidence_score to ImageContext proto so customer can optionally get confidence score for TEXT_DETECTION feature PiperOrigin-RevId: 344839236
1 parent 88ad4d3 commit 80a56e0

5 files changed

Lines changed: 65 additions & 0 deletions

File tree

google/cloud/vision/v1/image_annotator.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,16 @@ message WebDetectionParams {
664664
bool include_geo_results = 2;
665665
}
666666

667+
// Parameters for text detections. This is used to control TEXT_DETECTION and
668+
// DOCUMENT_TEXT_DETECTION features.
669+
message TextDetectionParams {
670+
671+
// By default, Cloud Vision API only includes confidence score for
672+
// DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
673+
// score for TEXT_DETECTION as well.
674+
bool enable_text_detection_confidence_score = 9;
675+
}
676+
667677
// Image context and/or feature-specific parameters.
668678
message ImageContext {
669679
// Not used.
@@ -687,6 +697,9 @@ message ImageContext {
687697

688698
// Parameters for web detection.
689699
WebDetectionParams web_detection_params = 6;
700+
701+
// Parameters for text detection and document text detection.
702+
TextDetectionParams text_detection_params = 12;
690703
}
691704

692705
// Request for performing Google Cloud Vision API tasks over a user-provided

google/cloud/vision/v1p1beta1/image_annotator.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,16 @@ message WebDetectionParams {
490490
bool include_geo_results = 2;
491491
}
492492

493+
// Parameters for text detections. This is used to control TEXT_DETECTION and
494+
// DOCUMENT_TEXT_DETECTION features.
495+
message TextDetectionParams {
496+
497+
// By default, Cloud Vision API only includes confidence score for
498+
// DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
499+
// score for TEXT_DETECTION as well.
500+
bool enable_text_detection_confidence_score = 9;
501+
}
502+
493503
// Image context and/or feature-specific parameters.
494504
message ImageContext {
495505
// lat/long rectangle that specifies the location of the image.
@@ -510,6 +520,9 @@ message ImageContext {
510520

511521
// Parameters for web detection.
512522
WebDetectionParams web_detection_params = 6;
523+
524+
// Parameters for text detection and document text detection.
525+
TextDetectionParams text_detection_params = 12;
513526
}
514527

515528
// Request for performing Google Cloud Vision API tasks over a user-provided

google/cloud/vision/v1p2beta1/image_annotator.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,16 @@ message WebDetectionParams {
521521
bool include_geo_results = 2;
522522
}
523523

524+
// Parameters for text detections. This is used to control TEXT_DETECTION and
525+
// DOCUMENT_TEXT_DETECTION features.
526+
message TextDetectionParams {
527+
528+
// By default, Cloud Vision API only includes confidence score for
529+
// DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
530+
// score for TEXT_DETECTION as well.
531+
bool enable_text_detection_confidence_score = 9;
532+
}
533+
524534
// Image context and/or feature-specific parameters.
525535
message ImageContext {
526536
// Not used.
@@ -541,6 +551,9 @@ message ImageContext {
541551

542552
// Parameters for web detection.
543553
WebDetectionParams web_detection_params = 6;
554+
555+
// Parameters for text detection and document text detection.
556+
TextDetectionParams text_detection_params = 12;
544557
}
545558

546559
// Request for performing Google Cloud Vision API tasks over a user-provided

google/cloud/vision/v1p3beta1/image_annotator.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,16 @@ message WebDetectionParams {
549549
bool include_geo_results = 2;
550550
}
551551

552+
// Parameters for text detections. This is used to control TEXT_DETECTION and
553+
// DOCUMENT_TEXT_DETECTION features.
554+
message TextDetectionParams {
555+
556+
// By default, Cloud Vision API only includes confidence score for
557+
// DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
558+
// score for TEXT_DETECTION as well.
559+
bool enable_text_detection_confidence_score = 9;
560+
}
561+
552562
// Image context and/or feature-specific parameters.
553563
message ImageContext {
554564
// Not used.
@@ -572,6 +582,9 @@ message ImageContext {
572582

573583
// Parameters for web detection.
574584
WebDetectionParams web_detection_params = 6;
585+
586+
// Parameters for text detection and document text detection.
587+
TextDetectionParams text_detection_params = 12;
575588
}
576589

577590
// Request for performing Google Cloud Vision API tasks over a user-provided

google/cloud/vision/v1p4beta1/image_annotator.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,16 @@ message WebDetectionParams {
620620
bool include_geo_results = 2;
621621
}
622622

623+
// Parameters for text detections. This is used to control TEXT_DETECTION and
624+
// DOCUMENT_TEXT_DETECTION features.
625+
message TextDetectionParams {
626+
627+
// By default, Cloud Vision API only includes confidence score for
628+
// DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
629+
// score for TEXT_DETECTION as well.
630+
bool enable_text_detection_confidence_score = 9;
631+
}
632+
623633
// Image context and/or feature-specific parameters.
624634
message ImageContext {
625635
// Not used.
@@ -646,6 +656,9 @@ message ImageContext {
646656

647657
// Parameters for web detection.
648658
WebDetectionParams web_detection_params = 6;
659+
660+
// Parameters for text detection and document text detection.
661+
TextDetectionParams text_detection_params = 12;
649662
}
650663

651664
// Request for performing Google Cloud Vision API tasks over a user-provided

0 commit comments

Comments
 (0)