AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Fixing rotation problem

Forum to discuss Glyph Recognition And Tracking Framework project, its features, applications, etc.

Fixing rotation problem

Postby MaartenWitteveen » Wed Mar 21, 2012 9:26 am

I am using the standard source code from the Glyph Recognition Proto v.2.0.1 and I am witnessing a small anomaly. When processing this image it results to this.

test.jpg
Input bitmap
test.jpg (87.57 KiB) Viewed 4895 times


processed.jpg
after process
processed.jpg (250.89 KiB) Viewed 4895 times


I first thought it could have something to do with a database which I hadn’t created yet, but when I printed the output it somehow is translated to this
0 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 0 0
0 0 0 1 1 1 1 1 0
0 0 1 1 1 1 1 1 0
0 1 1 1 1 1 1 0 0
0 0 1 1 1 1 1 1 0
0 0 0 1 1 1 1 1 0
0 0 0 0 1 1 1 0 0
0 0 0 0 0 0 0 0 0

While the output where the letters are upright are formatted like this. (turned 90 degrees to the left)

0 0 0 0 0 0 0 0 0
0 0 1 1 0 1 1 0 0
0 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0

I am trying to make sense whether this is something that I can fix within the source code or if anyone has ever come across this problem. I haven’t made any major changes to the source code, not ones that could cause this problem. I would very much appreciate your input so please let me know if something comes to mind.

Kind regards, Maarten Witteveen
MaartenWitteveen
 
Posts: 1
Joined: Wed Mar 21, 2012 9:10 am

Re: Fixing rotation problem

Postby andrew.kirillov » Wed Mar 21, 2012 9:39 am

MaartenWitteveen wrote:While the output where the letters are upright are formatted like this. (turned 90 degrees to the left)

Not sure what is the problem you have. The fact that recognized output is 90 degrees rotated does not seem to be wrong to me. It all depends on which corner is the first one in the detected glyph's quadrilateral. If it would be top left one, then the output should not be rotated. But it seems like in your case the algorithm just picked another corner as the first one - bottom left (the most left one, which is 100% valid for the FindQuadrilateralCorners() routine).
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3243
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to GRATF

cron