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!
Related
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 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.
I have a collection of images that a client can download should they desire. However, the boss came to me with a requirement to try and add text at the bottom of image. Unfortunately due to space constraints on the server, I can't simply use Javascript to add the information to the bottom of the page when it is uploaded.
Ideally the format should two rows with two cells each. Any help on this would be appreciated.
I believe this is what you are looking for.
http://mvark.blogspot.com/2004/12/code-programmatically-add-text-to.html
I want a header image in my HTML to be random. I have accomplished this by using this php file, however I would like to do something different. I want to have the random images be a part of one sprite. That way the images can all load at the same time and they user won't have to see the images load when navigating to different pages. I would also like to choose the random factor, i.e. show this picture 50% the others 10% of the time (if there are 6 pictures). Is this even possible and where would an amateur start? Is this the best way to implement my scenario so that the user sees as little image load as possible?
You could have the sprited header style declared in CSS as you normally would, and then simply adjust the xpos/ypos of the sprite in-html. You would be able to recycle some of the logic you already have and manipulate individual header probability.
I'd stick with individual assets though, especially if they are the size of a google doodle. Easier to extend that way and, assuming the rest of your static content has already been cached, any overhead of downloading a new image would be negligible.
I am having a minor issue playing with my exported Crystal Report, I can generate the reports just fine on our website, however when I attempt to export them to Word documents I don't quite get a document I can do much with.
i.e.:
I can't position the generated text anywhere in the document, it is almost 'frozen' in place. I would expect if I moved the cursor above the report text and pressed Enter a bunch of times I could remove the report down the page, however it just won't budge
All the text seems to be in its own box and I can't move it around or do anything with it.
Any thoughts? My expectation would be once it is exported to Word I could play with it like a Word document, move the text down the page, edit the document, do something with it.
Thanks!
btw, this question is similar to the one posted here, but this one wasn't tagged properly and I don't have enough karma to fix it:
https://stackoverflow.com/questions/434381/word-formatting-not-intact-when-exported-from-crystal-reoport
I'm afraid that you can't do much about it. Crystal Reports is very much orientated towards putting data in fixed positions on pages, so when it exports to Word it puts its data into text boxes because that's a similar thing that Word offers. You could make the Crystal Report page consists of a giant text field and using spaces and newlines to get the data into the right place, which will probably then give you a giant textbox in Word.