Which way's up?

Oct 13, 2015 at 1:02 PM
Is there a way to help OMR Mark Engine determine the correct way up? With the corners marked the same way, I can understand why it would be difficult.

My form has four .3 inch dots in the corners of a 8.5x11 inch page. So the bounding box is a rectangle. I scan the form right way up, double check the image. Yet, each time I attempt a test, the template designer rotates the test image -90 degrees,which requires some major stretching of the image to get it into the bounding box.

Thanks in advance.
Oct 13, 2015 at 1:19 PM
Happens to the Census sample as as well.
Oct 13, 2015 at 1:55 PM
When I started with an image rotated to the right by 90 degrees, it did counter the rotation to the left by 90. However, though the scanned image now matches the template's orientation, the template is about 5 pixles higher than the image.... <sigh>
Oct 13, 2015 at 9:15 PM
Edited Oct 14, 2015 at 2:38 PM
Found the rotation problem on line 607 of frmMain.cs...

And then discovered another problem, where the control points had to be huge to be found. This was because the radius of the found blob was being compared against an expected width.

I changed line 172 of ScannedImages.cs from...
radius > currentCheck
(radius *2) >= currentCheck
Here are the diffs, I'll try to find a moment to do a Pull Request later.
diff --git a/MarkEngine.Core/Processor/ScannedImage.cs b/MarkEngine.Core/Processor/ScannedImage.cs
index f10cbe2..ff92e70 100644
--- a/MarkEngine.Core/Processor/ScannedImage.cs
+++ b/MarkEngine.Core/Processor/ScannedImage.cs
@@ -169,7 +169,7 @@ namespace OmrMarkEngine.Core.Processor
                         float radius = 0;
                         if (shapeChecker.IsCircle(blobCounter.GetBlobsEdgePoints(blob), out center, out radius) &&
-                            radius > currentCheck)
+                            (radius *2) >= currentCheck)
diff --git a/ScannerTemplate/frmMain.cs b/ScannerTemplate/frmMain.cs
index 32a8c2b..298b92b 100644
--- a/ScannerTemplate/frmMain.cs
+++ b/ScannerTemplate/frmMain.cs
@@ -604,7 +604,8 @@ namespace ScannerTemplate
                 Image image = null;
                     image = Image.FromFile(m_processQueue.Dequeue());
-                image.RotateFlip(RotateFlipType.Rotate270FlipNone);
+                // This rotate appears to be unnecessary. 
+                // image.RotateFlip(RotateFlipType.Rotate270FlipNone);
                 Engine engineProcessor = new Engine();
                 var scannedImage = new ScannedImage(image);
                 var output = engineProcessor.ApplyTemplate(this.m_currentTemplate, scannedImage);
The &43; are plus signs (+) which are being improperly escaped.
Marked as answer by TreeStryder on 10/14/2015 at 7:37 AM
Apr 9, 2016 at 8:19 AM
The error of the rotation is still present in the Template Designer. Another error is the template designer is that deleted bubbles in the GUI are removed. However they are still listed in the textual mxml file. Therefore they do appear again once the template is tested.