Is it possible to grab the 4 numbers from this image using IronOCR? - ocr

So me and my friends play a game and they recently changed there images from white background and black letters to black background and colorful letters. and the old ocr that we was created years ago by someone is pretty useless now as the accuracy is very low if not 0% (it just took the old ocr ~250 attempts). So my question would i be able to to extract the text from the following picture
I have never used IronOCR and i tried using the default code to get text from image but the results were weird.
Thanks in advance!

You can try to segment the image first by color (a histogram analysis will tell you colors on the image). Then you can convert the images to b/w and run OCR. You'll get better accuracy.

Related

How does iOS get the background to seemingly change brightness over time?

I've noticed that my background on my MacBook Air seems to adjust to the time outside, growing darker as it gets darker.
Can I emulate this effect using CSS on my website.
What parameter are they varying and can I use a css filter to do similar?
It's not a parameter or filter, but multiple actual photographs.
https://www.idownloadblog.com/2018/06/06/macos-mojave-dynamic-wallpaper-desktop/
Apple took multiple photographs of the same spot at various intervals between sunrise and dusk to achieve the incredibly smooth transition between day and night. Thanks to enthusiasts, we know that Mojave’s dynamic wallpaper includes 16 layers in one HEIC file.
You can do the same yourself - just show a different background image at different times of day.
You can add images on top of a black background and depending on the time change the image's opacity.

achieve better recognition results via training tesseract

I have a question regarding achieving better recognition results with tesseract. I am using tesseract to recognize serial numbers. The serial numbes consist of only one font-type, characters A-Z, 0-9 and occur in different sizes and lengths.
At the moment I am able to recognize about 40% of the serial number images correct. Images are taken via mobile phone camera. Therefore the image quality isn't the best.
Special problem characters are 8/B, 5/6. Since I am recognizing only serial numbers, I am not using any dictionary improvements and every character is recognized independently.
My question is: Does someone has already experience in achieving better recognition results with training tesseract? How many images would be needed to be able to get good results.
For training tesseract should I use printed and afterwards photographed serial numbers, or should I use original digital serial numbers, without printing and photographing?
Maybe somebody has already experience in that kind of area.
Regarding training tesseract: I have already trained tesseract with some images. Therefore I have printed all characters in different sizes, photographed and labeled them correctly. Example training photo of the character 5
Is this a good/bad training example? Since I only want to recognize single characters without any dependency, I though I don't have to use words for training.
Actual I only have trained with 3 of these images for the characters B 8 6 5 which doesn't result in a better recognition in comparison with the original english (eng) tesseract database.
best regards,
Christoph
I am currently working on a Sikuli application using Tesseract to read text (Strings and numbers) from screenshots. I found that the best way to achieve accuracy was to process the screenshot before performing the OCR on it. However, most of the text I am reading is green text-on black background, making this my preferred solution. I used Scalr's method within BufferedImage to increase the size of the image:
BufferedImage bufImg = Scalr.resize(...)
which instantly yielded more accurate results with black text on gray background. I then used BufferedImage's options BufferedImage.TYPE_BYTE_GRAY and BufferedImage.TYPE_BYTE_BINARY when creating a new BufferedImage to process the Image to grayscale and black/white, respectively.
Following these steps brought Tesseract's accuracy from a 30% to around an 85% when dealing with green text on black background, and a really-close-to-100% accuracy when dealing with normal black text on white background. (sometimes letters within a word are mistaken by numbers i.e. hel10)
I hope this helps!

Algorithm issue with TIFF CCITT Group 4 decompression (T.6)

I work for an engineering design house and we store black and white design drawings in TIFF format compressed with CCITT Group 4 compression.
I am working on a project to improve our software for working with these drawings. I need to be able to load the raw data into my program obviously, so I must decompress it.
I tried using LibTiff but gave up on that rather quickly. It wouldn't build, generating over 2000 errors. I found many obvious syntax errors in the library and concluded it was junk. I spent about 3 hours trying to find the part of the library that implements the CCITT Group 4 codec but no luck, that code is an incomprehensible mess.
So it is that I am writing my own codec for the program. I have it mostly working well, but I am stuck on a problem. I cannot find good documentation on this format. There are a lot of good overviews that describe generally how 2D Modified Huffman compression works, but I cant find any that have specific, implementation level details. So I am trying to work it out by using some of the drawing files as examples.
I have vertical and pass modes working well and my algorithm decompresses about a third of the image properly before it goes off to the wizard and produces garbage.
I traced the problem to the horizontal mode. My algorithm for the horizontal mode expects to see the horizontal mode code 001 followed by a set of makeup codes (optional) and a termination code in the the current pen color, followed by another set of makeup codes (optional) and a termination code in the opposite color.
This algorithm worked well for a third of the way through the image, but suddenly I encountered a horizontal mode run where the opposite color comes before the current pen color.
The section of the image is a run of 12 black pixels followed by a run of 22 white pixels.
The code bits from that section are 00100000110000111 which decodes to Horizontal (001) 22 White (0000011) 12 Black (0000111 ) which as you can see is opposite of the order in which the pixels appear in the image.
Since my algorithm expects image order listing, it crashes. But the previous 307 instances of horizontal mode in this same image file were all in image order. This is the only reversed one I have found (so far).
Other imaging programs display this file just fine. I tried manually editing the bits in the image file just as a test to put the order in image order and that causes other imaging programs to crash when decoding the image. This leads me to believe they have some way of knowing that it is reversed in that instance.
Anyone know specific implementation level details about this TIFF CCITT G4 encoding which could help me understand how and why the run codes are sometimes reversed?
Thanks
Josh
CCITT G4 horizontal codes are always encoded as a pair (black/white) or (white/black). It depends on the current pen color. A vertical code will flip the color, but a horizontal code will leave the color unchanged. If the current pen color is black, then you decode a white horizontal code followed by a black. If the current pen color is white, then you will do the opposite.
Code : 00100000110000111
001 : Horizontal Mode
0000011000 : Black RunLength 17
0111 : White RunLength 2
It is Black first.
Run codes are not reversed.

Calculator digits recognition

I have to recognize set of digits on something like scoreboard, calculator and similiar devices display.
I tried that image in most popular ocr's, but with no success.
How can i preprocess this image to get it work with ocr frameworks? How to get that digits from there?
First,Based on edge detection, determine the position of the digits. Then, convert the image to a two-value image (white foreground and black background). Last, put it to OCR...

How to merge multiple images (.GIF) in one with ASP?

I have a map of Europe, and what I want to do is have each country of a colour depending of some variables. I display them correctly as separate .gif's, but I'd like to create a unique gif so it can be downloaded as 1 image.
Is it possible to do with ASP?
Thank you very much :)
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8626&lngWId=4
I wrote that back in 2003, it'll do what you're asking with some tweaks, but I haven't touched ASP in at least 5 years :)
The idea is that the script opens a gif, reads out the color palette and re-writes it. It's currently configured to "adjust" the palette's HSL so that you can get different colored images (e.g. you could adjust a green image to blue or red), but you could just as easily selectively replace individual colors with whatever you want.
The idea then would that you would make each country it's own specific color and then replace that color with whatever you wanted later. As long as there are <= 256 total colors, you should be fine.
If you want something more complicated, try looking into imagemagick
There is nothing within ASP to do what you want. You would need some third party component to perform this type of task.