コミュニティ

Reasons for Invalid image region specified 回答済み

I am using the sample Node module to call the ABBYY Cloud API. Every thing works fine with the demo code on github when I call processImage.

I added a function processTextField according to the already provided method processImage.

I set the region query string to "?region=115,40,100,40" for an image that is about 400x200 pixel and I get "Invalid image region specified" with code 450 as response.

The call succeeds with "?region=-1,-1,-1,-1".

What could be the reason for this?

I am a bit puzzled. Thanks for any help!

Stefan

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

2件のコメント

  • Avatar
    Permanently deleted user

    My bad. Coordinates are top,left,right,bottom. All - including right and bottom - relative to the top left corner.

    0
  • Avatar
    Permanently deleted user

    According to the processTextField method description, the coordinates of the region are measured in pixels relative to the left top corner of the image and are specified in the following order: left, top, right, bottom.

    So,

    • the first coordinate should be less than the third coordinate,
    • the second coordinate should be less (not equal!) than the fourth coordinate.
    0

サインインしてコメントを残してください。