Get text from image with ImageMagick and Tesseract - imagemagick

I wanted to know if anyone has ever used Tesseract with ImageMagick to get precise text from image. My main concern is with the small font texts present in an image (or some text that are not clearly visible). The only way I am able to retrieve those unclear texts are by modifying the image by ImageMagick like - by scaling the image, sometimes cropping the image....
I wanted to know if someone has integrated ImageMagick and Tesseract to create even powerful tool?

Till now, I have come up with a script that can search the text in the image... The script uses imagemagick and tesseract. The script is still under development, but you can look at it here

Related

Why does my PNG image look different in OpenCV?

The image is downloaded from a slide captcha and I'm trying to find the gap in this image with OpenCV.
But the gap is missing in the image opened with cv2.imshow() .
I am not familiar with PNG nor OpenCV so I'm so confused right now.
I searched a lot but found nothing useful maybe caused by using wrong keywords.
image opened with Windows Viewer:
image opened with cv2.imshow() :
I'm wondering why the same image in image viewer and OpenCV looks different and is there an easy way to locate the difference?

iOS image quality improvement

Icons Are Pretty Right?
I'm working on an UI update in an iOS app, and trying to make things look a bit better with some new icons- but I seem to be incapable of determining how to save an image correctly so that it looks good in the interface!
As you can see from this image, if I include a white background with the image it looks great. If I take those same images and use an alpha background they look terrible! It appears that either the images aren't using the #2x correctly, or something else is going horribly wrong.
These images are either saved with GIMP as a png with alpha, or exported from inkscape, the originals are vector graphics. We get the same results from both avenues. I am using both a base imageName.png and imageName#2x.png for scaling.
Somehow, magically, I changed the a single image to greyscale in gimp, and changed the base size to 25px and it showed up with alpha correctly blended. Stock images from apple are also functioning correctly, so it absolutely seems to be something that I'm doing incorrectly when I'm saving the images.
The Setup in XCode
Basic Questions
Is there a certain bit depth, argb vs rgba format, or some other quirk that I need to know to get these images to show up correctly? Is there any way to verify that the program is loading the correct imageName#2x vs imageName? Is there some document that talks about integrated graphics (the iconography documentation isn't very helpful on technical details)
Actual Images
With Background:
Without Background:
I think you will find success if you just save the image at 4x the size you actually want and specify the size manually.

GeoTIFF files in ImageJ

I am trying to open GeoTIFF file in ImageJ. It is opened as blank black image. But I want the view as its JPEG converted image. Please If anyone can help me. I want to process that image for Oil Spill Detection.
I would recommend using the Fiji distribution of ImageJ. It includes the Bio-Formats importer which supports a huge number of image formats. It looks like it has support for GeoTIFF tags, as well.
Also, sometimes images "look" black but aren't truly. See this FAQ entry.

ghostscript with a zoom option for tesseract

I am using ghostscript and tesseract to extract text data from scanned PDFs. But the scan result for some part of the pdf is not accurate. For testing purpose, I am taking screenshot of pdf and passing it to tesseract. Below is the scenarios and the problem I'm facing.
Scenario 1:
Link to Screenshot: https://dl.dropbox.com/u/9409594/scenario_1.tif
Once I pass this image (screenshot from a 125% zoomed pdf) to tesseract, below is the result text I'm getting:
ART\CLE STANDARD
NUMBER PFUCE
Scenario 2:
Link to screenshot: https://dl.dropbox.com/u/9409594/scenario_2.tif
If I pass the above screenshot (300% zoom) to tesseract, result is good.
ARTICLE NUMBER
Below are the arguments I'm using with ghostscript and tesseract:
Ghostscript:
gswin64.exe -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tifflzw -r600 -sOutputFile="C:\test\output.tiff" "C:\test\input.pdf"
Tesseract:
tesseract.exe "c:\test\output.tif" "c:\test\output.html" -l eng -psm 6 hocr
From my testing, I feel that if a zoomed version of image is passed to tesseract, result is good. Can I zoom the image using ghostscript before converting it into image? Or is there a better way to do this?
Appreciate your time and help!
You can try this,
http://www.fmwconcepts.com/imagemagick/textcleaner/index.php
You may be aware of this, related to taking screen shot, instead of taking screen shot you can try convertion of pdf to tif using convert command of imagemagik or if its multiple page pdf use pdftoppm and then to tif using convert command.

Tool for creating resizable images

I'm working with a designer generated photoshop psd that contains various UI elements for an iOS app, and I'm slicing their backgrounds into smaller images and using resizableImageWithCapInsets for efficiency. There are a lot of them, and it's quite tedious work.
What I'm looking for is a tool that will help with this process, something like Draw NinePatch that will take a .png file, and a list of cap insets, and then spit out a smaller .png.
Anyone heard of such a thing?
I couldn't find anything, so I wrote a simple tool. If anyone else has this problem, here ya go:
https://github.com/kcoop/CapInsetImageGenerator

Resources