Text Recognition package

Submodules

text_recognition_engine module

classdronebuddylib.atoms.textrecognition.text_recognition_engine.TextRecognitionEngine(algorithm:TextRecognitionAlgorithm, config:EngineConfigurations)[source]

Bases: object

The TextRecognitionEngine class handles text recognition operations.

get_class_name() str[source]

Returns the class name.

Returns:

The class name.

Return type:

str

recognize_text(image)[source]

Recognize faces in an image.

Parameters:

image – The image containing faces to be recognized.

Returns:

A list of recognized faces.

google_text_recognition_impl module

classdronebuddylib.atoms.textrecognition.google_text_recognition_impl.GoogleTextRecognitionImpl(engine_configurations:EngineConfigurations)[source]

Bases: ITextRecognition

Implementation of the IFaceRecognition interface using face_recognition library.

get_algorithm_name() str[source]
get_class_name() str[source]
get_optional_params() list[source]
get_required_params() list[source]
recognize_text(image_path) TextRecognitionResult[source]

Detects text within an image located at the specified path.

This method reads the image file, creates an Image object, and uses the Google Cloud Vision API’s text detection capabilities to find text within the image.

Parameters:

image_path (str) – The file path of the image to be processed.

Returns:

An object containing the response from the Google Cloud Vision API. This object includes text annotations for detected text in the image.

Raises:

Google API client exceptions if the request fails.

i_text_recognition module

classdronebuddylib.atoms.textrecognition.i_text_recognition.ITextRecognition(engine_configurations:EngineConfigurations)[source]

Bases: IDBLFunction

Interface for face recognition functionality.

recognize_face()

Recognizes faces in an image.

remember_face()

Associates a name with a face in an image.

abstractrecognize_text(image) list[source]

Recognize text in an image.

Parameters:

image – The image containing text to be recognized.

Module contents