Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,075
Thanks: 6 times Was thanked: 124 time(s) in 121 post(s)
|
QuestionIs it to possible to get the word coordinates after the ocr process? AnswerYes it is. Please look at code below Code:
using (var api = OcrApi.Create())
{
using (var bmp = Bitmap.FromFile(@"d:\0\test.png") as Bitmap)
{
api.Init();
api.SetImage(bmp);
api.Recognize();
var iterator = api.Iterator;
do
{
//Gets bounding rectangle of the current object at the given level.
var rect = iterator.PageIterator.GetBoundingBox(Patagames.Ocr.Enums.PageIteratorLevel.RIL_WORD);
var word = iterator.GetUtf8Text(Patagames.Ocr.Enums.PageIteratorLevel.RIL_WORD);
}
while (iterator.Next(Patagames.Ocr.Enums.PageIteratorLevel.RIL_WORD));
}
}
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close