Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 0886a2d

Browse files
feat: Add TextDetectionParams.advanced_ocr_options (#464)
* feat: Add TextDetectionParams.advanced_ocr_options Advanced OCR options allow users to customize behavior for a specific OCR engine version. PiperOrigin-RevId: 465402148 Source-Link: googleapis/googleapis@ad64930 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5d2c8b2b1cb0d15bf7243513a5543a9ec3ecd778 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWQyYzhiMmIxY2IwZDE1YmY3MjQzNTEzYTU1NDNhOWVjM2VjZDc3OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 0915348 commit 0886a2d

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

google/cloud/vision_v1/types/image_annotator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,12 +802,19 @@ class TextDetectionParams(proto.Message):
802802
By default, Cloud Vision API only includes confidence score
803803
for DOCUMENT_TEXT_DETECTION result. Set the flag to true to
804804
include confidence score for TEXT_DETECTION as well.
805+
advanced_ocr_options (Sequence[str]):
806+
A list of advanced OCR options to fine-tune
807+
OCR behavior.
805808
"""
806809

807810
enable_text_detection_confidence_score = proto.Field(
808811
proto.BOOL,
809812
number=9,
810813
)
814+
advanced_ocr_options = proto.RepeatedField(
815+
proto.STRING,
816+
number=11,
817+
)
811818

812819

813820
class ImageContext(proto.Message):

google/cloud/vision_v1p1beta1/types/image_annotator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,12 +722,19 @@ class TextDetectionParams(proto.Message):
722722
By default, Cloud Vision API only includes confidence score
723723
for DOCUMENT_TEXT_DETECTION result. Set the flag to true to
724724
include confidence score for TEXT_DETECTION as well.
725+
advanced_ocr_options (Sequence[str]):
726+
A list of advanced OCR options to fine-tune
727+
OCR behavior.
725728
"""
726729

727730
enable_text_detection_confidence_score = proto.Field(
728731
proto.BOOL,
729732
number=9,
730733
)
734+
advanced_ocr_options = proto.RepeatedField(
735+
proto.STRING,
736+
number=11,
737+
)
731738

732739

733740
class ImageContext(proto.Message):

google/cloud/vision_v1p2beta1/types/image_annotator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,19 @@ class TextDetectionParams(proto.Message):
745745
By default, Cloud Vision API only includes confidence score
746746
for DOCUMENT_TEXT_DETECTION result. Set the flag to true to
747747
include confidence score for TEXT_DETECTION as well.
748+
advanced_ocr_options (Sequence[str]):
749+
A list of advanced OCR options to fine-tune
750+
OCR behavior.
748751
"""
749752

750753
enable_text_detection_confidence_score = proto.Field(
751754
proto.BOOL,
752755
number=9,
753756
)
757+
advanced_ocr_options = proto.RepeatedField(
758+
proto.STRING,
759+
number=11,
760+
)
754761

755762

756763
class ImageContext(proto.Message):

google/cloud/vision_v1p3beta1/types/image_annotator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,12 +792,19 @@ class TextDetectionParams(proto.Message):
792792
By default, Cloud Vision API only includes confidence score
793793
for DOCUMENT_TEXT_DETECTION result. Set the flag to true to
794794
include confidence score for TEXT_DETECTION as well.
795+
advanced_ocr_options (Sequence[str]):
796+
A list of advanced OCR options to fine-tune
797+
OCR behavior.
795798
"""
796799

797800
enable_text_detection_confidence_score = proto.Field(
798801
proto.BOOL,
799802
number=9,
800803
)
804+
advanced_ocr_options = proto.RepeatedField(
805+
proto.STRING,
806+
number=11,
807+
)
801808

802809

803810
class ImageContext(proto.Message):

google/cloud/vision_v1p4beta1/types/image_annotator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,12 +811,19 @@ class TextDetectionParams(proto.Message):
811811
By default, Cloud Vision API only includes confidence score
812812
for DOCUMENT_TEXT_DETECTION result. Set the flag to true to
813813
include confidence score for TEXT_DETECTION as well.
814+
advanced_ocr_options (Sequence[str]):
815+
A list of advanced OCR options to fine-tune
816+
OCR behavior.
814817
"""
815818

816819
enable_text_detection_confidence_score = proto.Field(
817820
proto.BOOL,
818821
number=9,
819822
)
823+
advanced_ocr_options = proto.RepeatedField(
824+
proto.STRING,
825+
number=11,
826+
)
820827

821828

822829
class ImageContext(proto.Message):

0 commit comments

Comments
 (0)