Page 1 of 1

Anchor template not working

Posted: Mon Apr 04, 2011 8:50 am
by lordnedox
Hi,
i'm trying to run the OMR-Anchor sample without being able to make it work.

The problem i think is because calling:
m_GdPictureImaging.CreateAnchorTemplate( m_TemplateImg, m_AnchorLeft, m_AnchorTop, m_AnchorWidth, m_AnchorHeight );

always returns 0, while m_GdPictureImaging.GetStat( )returns OK.

I tried with JPGs and PNGs, even with the one found at this URL https://www.gdpicture.com/products/plugi ... essing.php. The result is always the same.

Trying to proceed width the method FindAnchor will result on a "Error: 2" message box (invalid parameter).

Could you please let me know what i'm missing? Is there any requirement on the file type (resolution, file size, file type) ?

Re: Anchor template not working

Posted: Mon Apr 04, 2011 10:02 am
by Loïc
Hi,

Please could you attach the image from which you are trying to create a template anchor and also give us parameter values used ?

Re: Anchor template not working

Posted: Mon Apr 04, 2011 10:49 am
by lordnedox
As I said, i used the sample found in GdPicture Imaging folder, without modifications (except for the license number).

I tried with different files, but i got the same behaviour even with this image: https://www.gdpicture.com/images/gdpicture-omr.png , which you suggested in another post.

In this image, the area i try to select is the one marked in blue. I checked the coordinate returned by the viewer and seem ok, but CreateAnchorTemplate still return 0.

Re: Anchor template not working

Posted: Mon Apr 04, 2011 11:03 am
by Loïc
Hi,

You are right. We have a problem with color image that we just fixed for the next minor release.
We are currently able to handle 1bpp image only, but we will support any kind of bitmap in a couple of days max...

Kind regards,

Loïc

Re: Anchor template not working

Posted: Mon Apr 04, 2011 12:24 pm
by lordnedox
Thank you very much for you quick reply, actually we always process 1BPP images but for testing purposes I was trying a color image.
Will look forward for your next release.

Regards

Re: Anchor template not working

Posted: Wed Oct 19, 2011 4:35 pm
by Normando
In what version fix this problem? 8.3 the last?

Re: Anchor template not working

Posted: Wed Oct 19, 2011 4:37 pm
by Loïc
I don't remember now, but the current version available for download have this issue fixed.

Re: Anchor template not working

Posted: Wed Oct 19, 2011 5:19 pm
by Normando
Hi Loïc, thank you

I have a problem when use findAnchor, always return invalid parameter

I create a template with L=74, T=39, W=73, H=107
TemplateId = m_objImaging.CreateAnchorTemplate(iImgRefClone, L, T, W, H)

I Try to findanchor with the same values and return values at zero
status = m_objImaging.FindAnchor(iImgDocClone, TemplateId, ModoOMR, L, T, W, H, _xr, _yr, _wr, _hr, Coincide)

THIS ALWAYS RETURN INVALID PARAMETER
But if i use -> status = m_objImaging.FindAnchor(iImgDocClone, TemplateId, ModoOMR, 0, 0, WIDTH of IiMageDocClone, Height of iImgDocClone , ....) returns OK

i'm lost

Re: Anchor template not working

Posted: Wed Oct 19, 2011 6:10 pm
by Loïc
Hi,

Please create a ticket on our helpdesk platform attaching sample application & image that demonstrate the problem. See: https://www.gdpicture.com/support/getting-support-from-our-team

Kind regards,

Loïc

Re: Anchor template not working

Posted: Tue Oct 25, 2011 5:49 pm
by Normando
Hi Lorïc

Thank you very much for you fastest response and solution

One more question....

When i uses findanchortemplate over two totaly diferent images i got a very hight accuracy return values.(like 97%)

What is the accuracy level that i can say "the image is not located"?

Thanks

Re: Anchor template not working

Posted: Tue Oct 25, 2011 5:57 pm
by Loïc
Hi,

You can consider good matching an accuracy between 90% & 100% if the template is correctly defined. From the reference guide:
To maximize detection speed and accuracy, the Anchor region must contain less than 50% of white pixels and must have as less white margins as possible.
Let me know if you need further information.

Kind regards,

Loïc