Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. OCR Anyone?

OCR Anyone?

Scheduled Pinned Locked Moved The Lounge
csharpcomhelptutorialquestion
14 Posts 6 Posters 17 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Working on an app that is very much table driven. I have "table data"; but not in text form; only images. Windows 10 has OCR! Using a PDF reader (and a nice zoom), I use the "Snipping Tool" to snip my "table", and save it as an image file. Then using the C# sample OCR app, I load the image and it extracts the text. I'm getting 95 to 100% recognition. The app highlights what it extracted from the image so you can see what "noise" was the issue (you could then pixel adjust the image, for example). Since it's possible to access clip board images, you could eliminate the file step altogether. Brilliant stuff, IMO. [OCR sample - Code Samples | Microsoft Docs](https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/ocr/)

    It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

    S R Sander RosselS M 4 Replies Last reply
    0
    • L Lost User

      Working on an app that is very much table driven. I have "table data"; but not in text form; only images. Windows 10 has OCR! Using a PDF reader (and a nice zoom), I use the "Snipping Tool" to snip my "table", and save it as an image file. Then using the C# sample OCR app, I load the image and it extracts the text. I'm getting 95 to 100% recognition. The app highlights what it extracted from the image so you can see what "noise" was the issue (you could then pixel adjust the image, for example). Since it's possible to access clip board images, you could eliminate the file step altogether. Brilliant stuff, IMO. [OCR sample - Code Samples | Microsoft Docs](https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/ocr/)

      It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

      S Offline
      S Offline
      Slacker007
      wrote on last edited by
      #2

      I did not know Win10 had OCR out of the box for free. I used to use LEADTools OCR a couple of year's ago but that is mega expensive. Interesting.

      L M 2 Replies Last reply
      0
      • S Slacker007

        I did not know Win10 had OCR out of the box for free. I used to use LEADTools OCR a couple of year's ago but that is mega expensive. Interesting.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Yep, for $3,000 (LeadTools) you could purchase a "whole lotta" Windows licenses, depending on your source and version and student status.

        It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

        1 Reply Last reply
        0
        • L Lost User

          Working on an app that is very much table driven. I have "table data"; but not in text form; only images. Windows 10 has OCR! Using a PDF reader (and a nice zoom), I use the "Snipping Tool" to snip my "table", and save it as an image file. Then using the C# sample OCR app, I load the image and it extracts the text. I'm getting 95 to 100% recognition. The app highlights what it extracted from the image so you can see what "noise" was the issue (you could then pixel adjust the image, for example). Since it's possible to access clip board images, you could eliminate the file step altogether. Brilliant stuff, IMO. [OCR sample - Code Samples | Microsoft Docs](https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/ocr/)

          It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

          R Offline
          R Offline
          Rick York
          wrote on last edited by
          #4

          I am missing something. If that requires a C# sample app how is it that W10 has OCR? If it requires an external app then W10 does NOT have OCR at all. The app provides OCR.

          "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

          S L 2 Replies Last reply
          0
          • R Rick York

            I am missing something. If that requires a C# sample app how is it that W10 has OCR? If it requires an external app then W10 does NOT have OCR at all. The app provides OCR.

            "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

            S Offline
            S Offline
            Slacker007
            wrote on last edited by
            #5

            I thought it was an app showing you how to use Windows 10 OCR assemblies. Perhaps I am missing something. Shows how to use the OCR API:

            Windows.Media.Ocr

            1 Reply Last reply
            0
            • L Lost User

              Working on an app that is very much table driven. I have "table data"; but not in text form; only images. Windows 10 has OCR! Using a PDF reader (and a nice zoom), I use the "Snipping Tool" to snip my "table", and save it as an image file. Then using the C# sample OCR app, I load the image and it extracts the text. I'm getting 95 to 100% recognition. The app highlights what it extracted from the image so you can see what "noise" was the issue (you could then pixel adjust the image, for example). Since it's possible to access clip board images, you could eliminate the file step altogether. Brilliant stuff, IMO. [OCR sample - Code Samples | Microsoft Docs](https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/ocr/)

              It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

              Sander RosselS Offline
              Sander RosselS Offline
              Sander Rossel
              wrote on last edited by
              #6

              I'm planning to use Azure Cognitive Services for a small project for some OCR. More specifically, I'd like to automatically read dates, descriptions and prices on invoices when I upload them to my system. It's probably a hell of a lot of work and will save me little time, but I just wouldn't feel like a developer if I'd let this chance slip to automate in two weeks what I can do in three minutes :D

              Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

              L 1 Reply Last reply
              0
              • L Lost User

                Working on an app that is very much table driven. I have "table data"; but not in text form; only images. Windows 10 has OCR! Using a PDF reader (and a nice zoom), I use the "Snipping Tool" to snip my "table", and save it as an image file. Then using the C# sample OCR app, I load the image and it extracts the text. I'm getting 95 to 100% recognition. The app highlights what it extracted from the image so you can see what "noise" was the issue (you could then pixel adjust the image, for example). Since it's possible to access clip board images, you could eliminate the file step altogether. Brilliant stuff, IMO. [OCR sample - Code Samples | Microsoft Docs](https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/ocr/)

                It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                M Offline
                M Offline
                markrlondon
                wrote on last edited by
                #7

                I must admit that I've never tested it but Windows has had automatic OCRing of TIFF files (if you install the TIFF IFilter) for at least a decade. As I say, I've never tested it but it was (and still is) there.

                L 1 Reply Last reply
                0
                • R Rick York

                  I am missing something. If that requires a C# sample app how is it that W10 has OCR? If it requires an external app then W10 does NOT have OCR at all. The app provides OCR.

                  "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  I wouldn't post a turd party crap and claim "Windows 10 has OCR". That would be spam, IMO. It's a "native" UWP app from the SDK "master" collection of "samples". (examples?) I included the link so people could "examine" the code and decide if it was useful (since it is quite "small"), and runs "out of the box".

                  It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                  R 1 Reply Last reply
                  0
                  • Sander RosselS Sander Rossel

                    I'm planning to use Azure Cognitive Services for a small project for some OCR. More specifically, I'd like to automatically read dates, descriptions and prices on invoices when I upload them to my system. It's probably a hell of a lot of work and will save me little time, but I just wouldn't feel like a developer if I'd let this chance slip to automate in two weeks what I can do in three minutes :D

                    Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    Make them use EDI.

                    It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                    Sander RosselS 1 Reply Last reply
                    0
                    • M markrlondon

                      I must admit that I've never tested it but Windows has had automatic OCRing of TIFF files (if you install the TIFF IFilter) for at least a decade. As I say, I've never tested it but it was (and still is) there.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      From what I could tell, OCR, up to now, was for masochists. Just query OCR.

                      It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                      M 1 Reply Last reply
                      0
                      • L Lost User

                        I wouldn't post a turd party crap and claim "Windows 10 has OCR". That would be spam, IMO. It's a "native" UWP app from the SDK "master" collection of "samples". (examples?) I included the link so people could "examine" the code and decide if it was useful (since it is quite "small"), and runs "out of the box".

                        It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                        R Offline
                        R Offline
                        Rick York
                        wrote on last edited by
                        #11

                        Apparently we have a different understanding of the word, "has."

                        "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                        1 Reply Last reply
                        0
                        • L Lost User

                          From what I could tell, OCR, up to now, was for masochists. Just query OCR.

                          It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                          M Offline
                          M Offline
                          markrlondon
                          wrote on last edited by
                          #12

                          It can be hard to get an exact like for like OCR but it can often work well enough. I just tested the TIFF IFilter OCR ability and it seems to actually work (mostly). I took a screen shot of this forum page and saved it as a .tiff. I then used Windows Search to search for text within the file. I tried "must admit that I've never tested it" and it found it! (I admit that I had a lot of hits on the phrase so I added "kind:picture" to narrow it down to picture files so as to not have to scroll through pages of hits). I tried various words in the screenshot and one word that the TIFF IFilter failed to OCR was "masochists". Don't ask me why. ;-) I'll upload the TIFF somewhere if you want it but you can trivially create your own to test it with. You'll need to manually install the TIFF IFilter if you haven't already done so. ** edit ** I tested with some more search strings. When I accidentally searched for "makr them use EDI" (quotes included) it found nothing. When I corrected the spelling to "make them use EDI" (quotes included again) it instantly found it. Windows Search really is searching the OCR'd and indexed contents of the image file.

                          1 Reply Last reply
                          0
                          • L Lost User

                            Make them use EDI.

                            It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                            Sander RosselS Offline
                            Sander RosselS Offline
                            Sander Rossel
                            wrote on last edited by
                            #13

                            That's completely not my use case, nor possible, nor wishful.

                            Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                            1 Reply Last reply
                            0
                            • S Slacker007

                              I did not know Win10 had OCR out of the box for free. I used to use LEADTools OCR a couple of year's ago but that is mega expensive. Interesting.

                              M Offline
                              M Offline
                              Meshack Musundi
                              wrote on last edited by
                              #14

                              It does and you can even use the OCR API in a WPF or WinForms application: [OCR in WPF using the WinRT OCR API](https://www.codeproject.com/Articles/5276805/OCR-in-WPF-using-the-WinRT-OCR-API)

                              "As beings of finite lifespan, our contributions to the sum of human knowledge is one of the greatest endeavors we can undertake and one of the defining characteristics of humanity itself"

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups