Optimal configuration for Tessnet -- is image format conversion good enough? - ocr

I need to do OCR on a group of images. I have been using Tessnet and it works pretty well. The problem is that it seems to have problems with some images, so I thought that it might work better if I modify the images' brightness, contrast, etc. Also, the images are in .jpg format, but I read that .tiff is optimal.
What can I do? Should I just convert the JPEGs to TIFFs?

There's no point in converting the jpeg images to a lossless format like tiff, you will convert the artifacts as well. You could try and apply a sharpness kernel on the image before you try to do ocr on it.
Look at this page for more information.

Related

Is there any loss of information in converting jpg files to png?

I am working on an image dataset using deep learning for segmentation. The training images and masks are in jpg format. I would like to know whether there is any loss of information in converting jpg to png? I searched a bit, but couldn't get any relevant information. I am trying out whether using png images improves segmentation accuracy. Any help is appreciated.
PNG uses a lossless compression per default.
However, the PNG standard supports many different bit depths, color spaces and nifty features that can result in information loss. For example if you use a standard JPEG file with 24bit color and convert it to a PNG with 8bit color, you will lose image information.
When using default settings in libraries such as OpenCV or PIL, the conversion will be lossless though.

Minimalistic way to read TIFF image format pixels

We are participating at the RoboCup 2015 from the German Aerospace Center in October. Before the torunament we will get a 30x30 pixel sized TIFF image, representing a low-pixel heigtmap. My task is to write a fast and lightweight, dependency free code that reads this TIFF image an does some algorythmic stuff on it.
I googled about the TIFF image format and it seems there are some powerfull libraries, but is there a simple way of reading just the color values of the file?
I remember a format, don't know which, where I just skipped the first 30 bytes and then could read the color values in RGB. Do you have any code that could do that or an idea/explanation how I could acchieve that?
As I said, I do not need filename, imagesize data etc. I actually don't even know why they have choosen the TIFF image-format since its just a normal heightmap in greyscale, but however.
Every help is very appreciated.

What image file formats support storing binary images (1bit black and white) for display in Web Browsers?

I know TIFF and BMP do and PNG doesn't. I'm planning to use this file format to store images that in turn will display on a web page via normal directly. I don't plan to alter them with filters on the client side.
What will work for this scenario?
https://en.wikipedia.org/wiki/Group_4_compression
This link says that there are many standard and proprietary image formats that support storing these kind of images but doesn't say which exactly.
PNG certainly supports 1bit B/W images, either as gray or as indexed.
If what you want is some image format that is standard for web pages and that uses internally the same compression algorithm as CCITT Group 4 compression, then, no, you are out of luck. But why would you want that?

Bitmap too big as3

In AS3, I am loading a png from a zip file (nochump's zip library through ByteArray to Loader). The png can be up to 45k pixels wide but only 120 tall. This creates a problem in flash, as images can only be ~8000 pixels wide. A possible solution would be to split the images into 6 columns somehow. This would probably need to be done in the ByteArray state, because the limitation is in Bitmap and Loader. Would this even be possible?
I believe you should use Alchemy to decode such a large file and put it in a Byterray. It looks like it has been done for JPEG, PNG shouldn't be very different!
http://segfaultlabs.com/devlogs/alchemy-loading-large-jpeg-images
All things are possible since you have the bytes. However this would require you to write a complete png library in actionscript. PNG is a very complicated and sophisticated compressed image format, so you can't just shred the image into blocks by copying portions of the ByteArray.
So really, the answer is no, it is not possible. Sorry.
If it was an uncompressed BMP on the other hand you would be in with a chance. However I suspect that if you are able to change the format of the file, it would be easier to pre-split the image into columns.

Encode/Decode CMYK Images from Flash Player

I'm currently working on an image editor in Flash Player, and I need to be able to export CMYK images to my server. I'm completely new to color profiles and the like, and I was wondering how I could accomplish this. I am pretty sure all images in Flash Player are ARGB, so is there a way to convert the values properly?
You will need to read a little bit about the JPEG format - I mean, not just "JPEGs are used in XYZ, because XYZ." - I mean like the actual format down to the bytes. Because I don't really know if anybody did an actual library for that, maybe you will have to do it.
You need a library that understands the JPEG format and knows whether it is CMYK or RGB, and then to actually convert it (that includes the CMYK-RGB math).
It is not included in the flash built-in libs.