Informazioni sulle funzionalità di riconoscimento dei caratteri
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Il riconoscimento ottico dei caratteri (OCR) è una delle tre API preaddestrate di Vertex AI su Google Distributed Cloud (GDC) air-gapped. Il servizio OCR
rileva il testo in vari tipi di file, come
immagini, file di documenti e testo scritto a mano.
OCR offre i seguenti metodi disponibili in
Distributed Cloud per riconoscere il testo:
Rileva il testo da un batch di file PDF o TIFF in un bucket di archiviazione per le richieste offline.
Scopri di più sulle lingue supportate
rilevate dalla funzionalità di riconoscimento del testo.
Funzionalità di riconoscimento ottico dei caratteri
L'API OCR può rilevare ed estrarre il testo dalle immagini. Le
due funzionalità di annotazione seguenti supportano il riconoscimento ottico dei caratteri:
TEXT_DETECTION rileva ed estrae il testo da qualsiasi immagine. Ad esempio, una
fotografia potrebbe contenere un cartello stradale o un segnale stradale. Il servizio OCR
restituisce un file JSON con la stringa estratta, le singole parole e
i relativi rettangoli di selezione.
Figura 1. Fotografia di un segnale stradale in cui l'API OCR rileva
le parole e i relativi riquadri di delimitazione.
DOCUMENT_TEXT_DETECTION estrae anche il testo da un'immagine, ma il servizio
ottimizza la risposta per testo e documenti densi. Ad esempio, un'immagine
scansionata di un testo digitato potrebbe contenere diversi paragrafi e intestazioni. Il servizio
OCR restituisce un file JSON con informazioni su pagina, blocco, paragrafo,
parola e interruzione.
Figura 2. Immagine scansionata di testo digitato in cui l'API OCR rileva informazioni come parole, pagine e paragrafi.
Testo scritto a mano
La figura 3 è un'immagine di un testo scritto a mano. L'API OCR rileva ed estrae il testo da queste immagini. Per un elenco di sistemi di scrittura che
supportano il riconoscimento della scrittura a mano libera, consulta
Sistemi di scrittura.
Figura 3. Immagine di scrittura a mano libera in cui l'API OCR rileva il testo.
Limiti del riconoscimento ottico dei caratteri
I metodi API BatchAnnotateImages e BatchAnnotateFiles supportano solo una
singola richiesta per chiamata batch.
La tabella seguente elenca i limiti attuali del servizio OCR
in Distributed Cloud.
Limite di file per l'OCR
Valore
Numero massimo di pagine
Cinque
Massima dimensione del file
20 MB
Dimensione massima immagine
20 milioni di pixel (lunghezza x larghezza)
I file inviati per l'API OCR che superano il numero massimo di pagine o le dimensioni massime dei file restituiscono un errore. I file inviati che superano le
dimensioni massime dell'immagine vengono ridimensionati a 20 milioni di pixel.
Tipi di file supportati per l'OCR
L'API preaddestrata OCR rileva e trascrive
il testo dai seguenti tipi di file:
PDF
TIFF
JPG
PNG
Devi archiviare i file localmente nel tuo ambiente Distributed Cloud. Non puoi accedere ai file ospitati in Cloud Storage o ai file disponibili pubblicamente per il rilevamento del testo.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eOptical Character Recognition (OCR) is a pre-trained Vertex AI API on Google Distributed Cloud (GDC) air-gapped that can detect text in images, document files, and handwritten text.\u003c/p\u003e\n"],["\u003cp\u003eThe OCR service offers three methods: \u003ccode\u003eBatchAnnotateImages\u003c/code\u003e for detecting text from JPEG or PNG images, \u003ccode\u003eBatchAnnotateFiles\u003c/code\u003e for PDF or TIFF files in inline requests, and \u003ccode\u003eAsyncBatchAnnotateFiles\u003c/code\u003e for offline text detection from PDF or TIFF files in storage buckets.\u003c/p\u003e\n"],["\u003cp\u003eThe OCR API supports two main features: \u003ccode\u003eTEXT_DETECTION\u003c/code\u003e to extract text from any image and \u003ccode\u003eDOCUMENT_TEXT_DETECTION\u003c/code\u003e optimized for dense text and documents.\u003c/p\u003e\n"],["\u003cp\u003eThe OCR API also supports handwritten text detection and extraction, with specific supported handwriting scripts available for recognition.\u003c/p\u003e\n"],["\u003cp\u003eOCR has limitations such as a maximum of five pages, a 20 MB file size limit, and a maximum image size of 20 million pixels, and it supports file types like PDF, TIFF, JPG, and PNG, stored locally in the Distributed Cloud environment.\u003c/p\u003e\n"]]],[],null,["# Learn about character recognition features\n\nOptical Character Recognition (OCR) is one of the three Vertex AI\npre-trained APIs on Google Distributed Cloud (GDC) air-gapped. The OCR\nservice detects text in [various file types](#supported-file-types), such as\nimages, document files, and handwritten text.\n\nOCR offers the following methods available in\nDistributed Cloud to recognize text:\n\n| **Note:** The `BatchAnnotateImages` and `BatchAnnotateFiles` API methods only support a single request per batch call.\n\nLearn more about the [supported languages](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vertex-ai-ocr-supported-langs)\ndetected by the text recognition feature.\n\nOptical character recognition features\n--------------------------------------\n\nThe OCR API can detect and extract text from images. The\nfollowing two annotation features support optical character recognition:\n\n- `TEXT_DETECTION` detects and extracts text from any image. For example, a\n photograph might contain a street or traffic sign. The OCR\n service returns a JSON file with the extracted string, individual words, and\n their bounding boxes.\n\n **Figure 1.** Road sign photograph where the OCR API detects\n words and their bounding boxes.\n- `DOCUMENT_TEXT_DETECTION` also extracts text from an image, but the service\n optimizes the response for dense text and documents. For example, a scanned\n image of typed text might contain several paragraphs and headings. The\n OCR service returns a JSON file with page, block, paragraph,\n word, and break information.\n\n **Figure 2.** Scanned image of typed text where the OCR API detects information such as words, pages, and paragraphs.\n\nHandwritten text\n----------------\n\nFigure 3 is an image of handwritten text. The OCR API detects and\nextracts text from these images. For a list of handwriting scripts that\nsupport handwriting recognition, see\n[Handwriting scripts](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vertex-ai-ocr-supported-langs#handwriting-scripts).\n\n**Figure 3.** Handwriting image where the OCR API detects text.\n\nOptical character recognition limits\n------------------------------------\n\nThe `BatchAnnotateImages` and `BatchAnnotateFiles` API methods only support a\nsingle request per batch call.\n\nThe following table lists the current limits of the OCR service\nin Distributed Cloud.\n\nSubmitted files for the OCR API that exceed the maximum number of\npages or the maximum file size return an error. Submitted files that exceed the\nmaximum image size are downsized to 20 million pixels.\n\nSupported file types for OCR\n----------------------------\n\nThe OCR pre-trained API detects and transcribes\ntext from the following file types:\n\n- PDF\n- TIFF\n- JPG\n- PNG\n\nYou must store the files locally in your Distributed Cloud environment. You\ncan't access files hosted in Cloud Storage or publicly available files for\ntext detection."]]