How to translate the text on a picture with google? - google-translate

I'm not sure if this is the correct part of SE to ask this question but here it goes.
If I would encounter a picture file with unknown text, I could take another picture of it and get it translated with my phone by using Google Goggles, but how would I be able to translate it on my computer? I tried entering the picture link to Google translate, but it said it wasn't able to open the file.

This isn't about a programming problem, so your question is probably in the wrong section.
However, what you're looking for is an OCR service. Use it to extract the text from the image first, then translate it.

The problem to extract the text from a picture is referred as "Scene Text Recognition" in computer vision. If the image is a picture of a pdf/document, the text can be extracted using OCR with quite good accuracy.
But if the text is present in a picture (like picture of a traffic board), the OCR may not always work. In this case you can use some computer vision APIs provided online, for eg:
You can use the Google Vision API and paste the image link in the "Try It" section to extract out the text.

Related

Ghostscript strips Alt Text

I work with an app called ICMS (Integrated Case Management System), and documents are submitted to this app in .docx format. Many times they need to include images and we require "Alt Text" to be added to each image. Once the document is added to ICMS I can see the Alt Text is still there, but when the document is signed by an admin user the document goes through a conversion from .docx to pdf. From my understanding ICMS is using Ghostscript for that conversion and when that conversion happens, it strips/deletes the Alt Text. Has anyone had this issue before? Are there any kind of DocStructureTags within Ghostscript that are possibly set to False? If so, where can we find them? Any insight would be appreciated. Thank you.

how to provide RoI to an image being processed by text detection

I have a library of images I wish to process, and each image is of the same structure. I want to pull out the text within the images. I have this working, however there are some pieces of text that I wish to ignore. I also am hampered because the OCR isn't perfect, and gives "wrong" characters sometimes.
I have solved the problem by taking the image, cropping it into individual sub-images, and running each of those through the OCR. It is effectively creating ROIs. Because I know the locations for the text desired, this works.
Google's billing policy is based on number of images, so 6x the images processed, is not something I want to do in production.
I would like to be able to give ROI's to the scanning engine instead, as inputs when the text detection occurs. Is there a best way to achieve this?
TIA!

Applying simple text to a picture API in telegram

I am developing a telegram bot that involves the process of adding a text that the user input to an existing image.
It goes like that:
The user inputs a text like his name, time, etc.
The bot adds a text layer on top of the image. (the image is constant and doesn't change).
The user gets in return from the bot the picture with the added text, in a typical image format like JPG or PNG (doesn't matter).
However I actually have no idea what kind of method or API I should use, I was thinking of something like photoshop API but it seems way too complicated and overkill. I am looking for a simple solution that is easy to learn and apply, as it is just adding a text layer on top of a picture and saving it.
I would be interested to hear how would you apply such a thing, to get ideas on how it could be done.
Thank you very much,
Shay

How to QR-scan image from gallery or Base64 data?

As the question indicates, how can I take a image into account and scan it using QR scanner, Image is received form backend, practically i can return the image in any format to my app, So i thought i will send the image in base64, But question arises, is how to covert that image in any way to make it possible to QR scan it,
So i break down it into two parts,
Saving the received image.
Taking that image and QR scan it.
Searched a lot but all the libraries are pointing towards scanning the QR using camera.
How can I achieve this two parts, Basically am asking for suggestions,
Any kind of help will be greatly appreciated.
Thanks in advance.

How can I generate a circular qr-code like a messenger or a kik code?

How can you generate the codes like shown below:
I will assume you want to use an existing standard instead of attempting to invent your own encoder\decoder.
Any 2D barcode can be intentionally damaged for esthetics if you crank up the redundancy used for error correction. 2D barcodes are designed to survive a certain amount of damage. Placing an image in the center and rounding the corners are both considered damage from the perspective of the reader. For round corners you can't use a barcode with orientation dots in the corners, like QR. You must choose a format that is oriented with a marker in the middle like:
MaxiCode
https://en.wikipedia.org/wiki/MaxiCode
ShotCode
https://en.wikipedia.org/wiki/ShotCode
Aztec Code
https://en.wikipedia.org/wiki/Aztec_Code
Similarly, if you wanted to place an image in the center then you wouldn't want to use one that requires a bullseye for orientation, unless you can retain the bullseye somehow in your central image. To place an image in the center and also round the corners you need to get creative. In your first image there are four tracking dots around the image. In the second and third examples the company uses it's own logo as the orientation point.
The first code you show is a proprietary code made by Facebook. It is now no longer used by their products, but some sites, e.g. respond.io may allow you to create them and some regular QR code scanners may be able to read them.
The second code is a Snapchat code and can be made on their site directly when you log into your account. You can also do it the the app on your device using their support instructions within limits for success.
The third code is a Kik code and there is a blog post of how to make that possible by generating a key and then downloading the code image in the color of your choice. They have more posts about how to work with them.
With all that said and done, you could try a site (not affiliated) like QR Code Go to make regular QR codes that are a little fancy. Thank you. Good day.

Resources