I have a simple question,
It is how to make or convert string to barcode
(Not QRcode), what i've done is convert string to QrCode using ngxQrcode2,
But, how about barcode, do you guys have some references or sample how to do that?
Related
We are looking for a solution to encode a barcode in XSLT. I cannot find anything about how to only encode this in XSLT. I'm not an expert in XSLT, I have been looking in this issue for about 2 weeks and that's all my experience I have in XSLT.
I tried the JSBarcode but that script also want to display the barcode, but the barcode itself needs to be rendered by another system.
I'm not sure if this is even possible to accomplish.
I think you might want to take a look at http://www.renderx.com/~renderx/Demos/barcode/index.html
The provided stylesheets takes a XML-Documents and converts a series of digits to a barcode. If you don't want to start with a XML-Document, you may store your data inside a variable inside the XSLT-script.
I'm developing an OCR app for Android using JNI and a code developed under C++ using OpenCV and Tesseract. It will be used to read a badge with an alphanumeric ID from a photo taken by the app.
I developed an code which handle with the preprocess of the image, in order to obtain a "readable image" as the one below:
I wrote the following function for "reading" the image using tesseract:
char* read_text(Mat input_image)
{
tesseract::TessBaseAPI text_recognizer;
text_recognizer.Init("/usr/share/tesseract-ocr/tessdata", "eng", tesseract::OEM_TESSERACT_ONLY);
text_recognizer.SetVariable("tessedit_char_whitelist", "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
text_recognizer.SetImage((uchar*)input_image.data, input_image.cols, input_image.rows, input_image.channels(), input_image.step1());
text_recognizer.Recognize(NULL);
return text_recognizer.GetUTF8Text();
}
The expected result is "KQ 978 A3705", but what I get is "KO 978 H375".
I did all the recommendations for improving the quality of the image from https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuality. In addition, reading the docs from https://github.com/tesseract-ocr/docs, I tryed using an approximation of the images using polygons in order to get "better" features. The image I used is one like this:
With this image, I get "KO 978 A3705". The result is clearly better than the previous one, but is not fine.
I think that the processed image I pass to tesseract is fine enought to get a good result and I don't get it. I don't know what else to do, so I ask you for ideas in order to solve this problem. I need an exact result and I think I could get it with the processed image I get. Ideas please! =)
I noticed that with some dilations, the result ORC result is improved incredible well! For me, it was the solution
I'm working on a project with openCV for real time goal detection from a video stream by OpenCV.
So i have first to detect & extract the scoreBox, then try to read (recognize) the score by tesseract-ocr.
My issue is when i proceed to read the score box by tesseract, it doesn't give me the correct result (score value)
Example: applying tesseract on this image, it gives me the result 5: 55:35 L ‘.
Any help, what I have to do? Should I train tesseract or write my own OCR code ?
I wouldn't recommend to rewrite an OCR, but it really looks like the trained package you are using may not be adequate for this application. It might be necessary to create new trained data, as you suggested, with the appropriate font.
As the title suggest, i want to build an ANPR application in windows. I am using Brazilian number plates. And i am using OpenCV for this.
So far i manged to extract the letters form the numberplate. Following images show some of the numbers i have extracted.
The problem i am facing is that how to recognize those letter. I tried to use Google tesseract. But it fails to recognize them sometimes. Then i tried to train an OCR data base using OpenCV i used about 10 images for each character. but it also did not work properly.
So i am stuck here. i need this for final year project.So can anybody help me?? i would really appreciate it.
Following site does it very nicely
https://www.anpronline.net/demo.html
Thank you..
you could train an ann or multi-class svm on the letter images, like here
Check out OpenALPR (http://www.openalpr.com). It already has the problem solved.
If you need to do it yourself, you really do need to train Tesseract. It will give you the best results. 10 images per character is not enough, you need dozens or hundreds. If you can find a font that is similar to your plate characters, a good approach is to print out a sheet of paper with all of the characters used multiple times. Then take 5-10 pictures of the page with your camera. These can then be your input for training Tesseract.
Any ideas for barcode generation into a textbox in c++ under Qt4?
The idea is to have it in some kind of text format to save it and be able to read it later on.
What about generating the image for printing?
Thanks in advance.
Generating a barcode is as simple as using a barcode font. You can embed the font in your application, and create barcode wherever you can put text.
It depends on what kind of a barcode you are talking about, however, a search on Codeproject yielded this interesting library that is written in C#, however it can generate Code 39, Code 128, Interleaved 2 of 5, to name but a few. Perhaps, this could be recompiled to make it look like a COM object using Runtime Callable COM Wrapper (RCCW), meaning on the C++ side, it looks like a COM library? And hence interact with it from a QT/C++ runtime environment.
Hope this helps,
Best regards,
Tom.
Generating barcode with Qt is quite easy - as Reverend Gonzo pointed out, you use a barcode font.
Then you can paint it with QPainter onto anything. Or print it.
I wrote a post/tutorial on generating code128 with Qt, github example included.
How to generate barcode with a font in Qt
Please check out zint, which can be found on Sourceforge.