'Google Cloud Vision OCR API returning incorrect values for bounding box/vertices

I'm using the "TEXT_DETECTION" option from the Google Cloud Vision API to OCR some images.

The bounding box around individual characters is sometimes accurate and sometimes not, often within the same image.

Is this a normal side-effect of a probabilistic nature of the vision algorithm, a bug in the Vision API, or of course an issue with how I'm interpreting the response?

Image annotated with text and bounding boxes from Google Vision OCR API

The letter "a" with poor bounding box

Here's the portion of the response specific to the letter "a" from which I'm extracting the bounding box.

stdClass Object
(
    [property] => stdClass Object
        (
            [detectedLanguages] => Array
                (
                    [0] => stdClass Object
                        (
                            [languageCode] => en
                        )

                )

        )

    [boundingBox] => stdClass Object
        (
            [vertices] => Array
                (
                    [0] => stdClass Object
                        (
                            [x] => 419
                            [y] => 304
                        )

                    [1] => stdClass Object
                        (
                            [x] => 479
                            [y] => 304
                        )

                    [2] => stdClass Object
                        (
                            [x] => 479
                            [y] => 397
                        )

                    [3] => stdClass Object
                        (
                            [x] => 419
                            [y] => 397
                        )

                )

        )

    [text] => a
)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source