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

asked 19 Feb '14, 22:21

Stefan's gravatar image

Stefan
34

edited 19 Feb '14, 22:26

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

(20 Feb '14, 10:45) Stefan

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.
link

answered 20 Feb '14, 18:41

Anastasia%20Galimova's gravatar image

Anastasia Ga... ♦♦
790112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×24

Asked: 19 Feb '14, 22:21

Seen: 1,173 times

Last updated: 20 Feb '14, 18:41

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal