False Positives

Discussions about machine vision support in GdPicture.
Post Reply
ShaneH
Posts: 2
Joined: Mon Mar 11, 2013 2:49 pm

False Positives

Post by ShaneH » Mon Mar 11, 2013 3:25 pm

Hi,

I am using ADR to split large PDFs created on a copier into individual documents, however I get a lot of false positives where the scanned image looks nothing like the template image. (This happens in about 10-20% of non-matching pages)

Code: Select all

 For pgTurner = 1 To gdIncomingPDF.GetPageCount
                Dim ImgNo As Integer
                gdIncomingPDF.SelectPage(pgTurner)
                ImgNo = gdIncomingPDF.ExtractPageImage(1)
                Dim nCloserTemplate As Integer = gdImage.ADRGetCloserTemplateForGdPictureImage(ImgNo)
                    If gdImage.ADRGetLastConfidence > TemplateConfidence And EndPage > 0 Then
                        Dim conf As Integer = gdImage.ADRGetLastConfidence
                        gdNewPDF.NewPDF()
                        gdNewPDF.SetKeyWords(String.Format("TemplateID={0};Confidence={1}", PrevTemplateID, PrevTemplateConfidence))
                        For pg = StartPage To EndPage
                            gdNewPDF.ClonePage(gdIncomingPDF, pg)
                        Next
                        StartPage = pgTurner
                        gdNewPDF.SaveToFile(String.Format(filename + "_{0}.pdf", DocNo))
                        gdNewPDF.CloseDocument()
                        DocNo += 1
                        

                    End If
                    If gdImage.ADRGetLastConfidence > TemplateConfidence Then
                        Dim tmpTemplate As TemplateItems = CurrentTemplates.First(Function(tmp As TemplateItems) tmp.templateID = gdImage.ADRGetCloserTemplateForGdPictureImage(ImgNo))
                        PrevTemplateConfidence = gdImage.ADRGetLastConfidence
                        PrevTemplateID = tmpTemplate.templateID
                    End If
                
                EndPage = pgTurner
            Next
            If PrevTemplateID = -1 Then
                tmpItem.Processed = True
            Else
                gdNewPDF.NewPDF()
                gdNewPDF.SetKeyWords(String.Format("TemplateID={0};Confidence={1}", PrevTemplateID, PrevTemplateConfidence))
                For pg = StartPage To EndPage
                    gdNewPDF.ClonePage(gdIncomingPDF, pg)
                Next
                gdNewPDF.SaveToFile(String.Format(filename + "_{0}.pdf", DocNo))
                gdNewPDF.CloseDocument()
           End If
For most images where there ought to be a match, confidence levels are 80-90%, but some pages that are not a match are creeping in at the same confidence levels. Is there a way to improve the accuracy? I have tried adding numerous images to the template with not much difference.

The attached files are heavily redacted, but included here so you can get a feel for the different layouts of the documents.

Thanks

Shane
Attachments
CorrectTemplate.tif
Confidence Level 81
CorrectTemplate.tif (360.54 KiB) Viewed 7271 times
FalsePositive2.tif
Confidence Level 82
FalsePositive2.tif (210.34 KiB) Viewed 7272 times
FalsePositive1.tif
Confidence Level 89
FalsePositive1.tif (516.1 KiB) Viewed 7272 times

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: False Positives

Post by Loïc » Tue Mar 12, 2013 3:11 pm

Hello,

Unfortunately there is nothing that we can do today to improve your results. Basically the ADR engine, in its current version, expects to work with structured documents (for template and doc to identify).
We have research & development plans to make it more accurate with any kind of documents, but since we are talking about "research" I can't provide any hint about a date of availability of an enhanced version.

Thank you for your comprehension.

Kind regards,

Loïc

ShaneH
Posts: 2
Joined: Mon Mar 11, 2013 2:49 pm

Re: False Positives

Post by ShaneH » Tue Mar 12, 2013 6:16 pm

OK.. In that case, would the forms recognition CreateAnchorTemplate / FindAnchor be any more accurate?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest