Is there a way to recognize text in a graphic or a picture with tesseract? - tesseract

First, sorry for my English. I have a question regarding tesseract. Is there a way to recognize text in a graphic or a picture without having to clean the image you want to recognize? in what I read there to clean the image first, remove graphics and photographs and leave only the text. But I want the user to upload to the server and newspaper clippings you can recognize this news without human intervention. It can be tricky. But if you know any other way I could do as they are grateful. Thank you very much

No, you can't.
Tesseract is made for reading text and only text. When you perform OCR on a subject with both text and an image, Tesseract spits out things it finds in the image (garbled crap).
You can detect image regions and crop them out, though. I think that would be a better question to ask.

Related

Shopify - Venture Theme - Product Background Image

I am using Venture Theme on Shopify. I am importing product images from another website with transparent background. And in my website, i am trying to show a background image which is in the Files directory in Shopify or a gradient color.
https://mottomfreedom.com/collections/less-is-more-skull-sweetshirt/products/skull-gr-sweatshirt-less-is-more-collection
I have been searching for a while but couldn't find a similar subject.
Please can any body help me with this?
#borasutcu
Solution 1: You are using PNG image, simply convert your image to JPG and it will have a background e.g https://i.stack.imgur.com/Sx82L.jpg
Solution 2: Set background to image div using CSS
Thanks for mentioning me #Deepak :) Actually i am a visual designer. My website is is receving the product image data from a different website. There will be a huge number of products and several images for each product. Converting an image from png to jpeg is an easy task but it will be a time consuming process in time. I was expecting a CSS solution. I am not experienced in coding but i think a few lines of code which is going to be added to product-card.liquid or theme.scss.liquid will solve my problem permanently. I searched for similar situations but couldn't find.
If you think that this is an inappropriate question for such a platform, i can delete my post.

Remove image background(ID Card) and prepared it for OCR

I want to integrate OCR in an iOS application. I have found some helpful tutorials, specially This Article: How To: Compile and Use Tesseract (3.01) on iOS (SDK 5), helped me a lot. Now I can read plain text from any image which has a clear background. But I want to read information from an ID card which doesn't have clear background at all!
I have also found some answers regarding removing background in stackoverflow, for example: Prepare complex image for OCR, Remove Background Color or Texture Before OCR Processing and How to use OpenCV to remove non text areas from a business card?
But those solutions are not for iOS. I understand the steps, but I need an iOS example and if it is using Core Image, than it would be better for me.
I have no problem in OCR end, but my problem is to remove the background.
Initial Image:
After removing, the image should look like this:
Can you refer me an iOS example? or Is it possible to refer me an iOS example to remove all the color without Black color?
the best way to detect a card in sence is traing a cascade classifier.
Training is not a very small project. the count of the sample images should be more thank 10K.
Once you get the trained cascade classifier, you can detect the the card quickly.
The detection is very quick on iOS, but the tesseract recognition is not very fast,

how to get the image position from pdf file in objective c?

I am doing something like extracting the pdf text in a string format so as to annotate the text and in the same process i need to find the image positions covered in the same pdf file so as to maintain its position. Now the problem is that i am not getting the exact positions of the images in the same pdf file. Is it possible to use some thing like OCR,if yes,how to use that?
Can anybody help me in finding the exact position of the image in the pdf file? I need to implement some pdf reader kind of application for ipad,that's just for the knowledge.
Thank you.
Isn't OCR a little bit heavy weight for iphone?
Take look on tools like pdftotext from Xpdf. It is much simpler to read data, as to render and recognize it back again.

how to save an image with text on another image?

I any one have idea about taking snapshot from iphone application through coding.
means.
I am developing an iphone application where there will be two images dynamically comes. There will be a text view with clear color on those particular images. users will be able to write any text on the images and click save button. Then those particular images will have to be saved in database along with text or have to save them in iphone library along with text.
we may need to convert the image along with text as an another image.. ? or do any one have any ideas about this kind of challenging task..
Please help.
Thanks in advance to you all....

How do I determine if an image has been photoshopped?

Does anyone know how to tell if an image has been photoshopped?
edit Specifically, I want to determine if regions or pixels in the image have been altered by photoshop. I'm not as interested in finding errors in the photoshop job (missing shadows, errors in reflections, etc)
I seem to remember something like a high-pass filter that you could use that would determine the noise levels. Edited regions would have less noise, or at least changes in noise. I'm having a hard time finding information on this or other approaches.
Thanks for your help!
I use this website to check if an image is photoshopped or edited:
http://imageedited.com
HOWTO spot a photoshop job
How To Tell If A JPG Image Has Been Photoshopped (Windows)
Google is your friend for many relevant results.
maybe fotoforensic works. its an online program to compare the no of times a photo has been compressed. the no differs for the original image and the added image. hope it helps u.
http://fotoforensics.com
I would give a try with error level analysis:
http://www.errorlevelanalysis.com/
Follow the links on that site and maybe get in contact with the author, I'm sure they can give you the needed pointers.
The first thing that you have to check is the properties of the file.
If it was last save via photoshop, there should be a meta data under "details" -> "origin" -> "program name". :)