ASP.net C# image processing - c#

I am designing a website for PUBLIC TRANSPORT TICKETING SYSTEM using ASP.NET c# and MSSQL..So when a customer registers in the site, I want to send SMS with a barcode to him to use that in the bus to validate him..
so in the bus there is KIOSK and also a barcode reader..When he get into the bus first he has to validate himself..
So i want to implement this : when the passenger shows the image of the barcode in his mobile the barcode should compare it with the database and if it's validated proceed if not give an error message..
plz consider my question and kind be enough to reply..
Thank alot..

Usually barcodes are compared as strings, not as images. Note that it's not recommended to store the barcode as image in the database. You simply can store the barcode value (string) in the database and compare it with the barcode recognition result.
We currently generate barcodes (Code 93) using a 3rd party toolkit named leadtools. This toolkit gives you the ability to read\write common barcodes. For more information, see the following link:
http://www.leadtools.com/help/leadtools/v175/dh/to/leadtools.topics.barcode~ba.topics.programmingwithleadtoolsbarcode.html

Barcodes are NOT generally implemented by image comparison.
Rather, the barcode evaluates to a string or number, which is then a PK into a backend database somewhere.
(Eg, check on any product in your kitchen pantry. The barcode will often have a human-readable version of the number that the barcode represents, written below the barcode).
You've specified there's a barcode reader in place... This will do the "heavy lifting" of reading the barcode and passing the resultant string/number into the system.

Related

How create QR Code with c# that saves information such as a person name with his website and phone number and alot more information

I need a C# code in my ASP.NET MVC project to generate a QR Code as my company's logo that this QR Code must have company's information such as company name, website, phone number and much more information about that. This QR Code must have a complex type information and while someone read this with QR Code Reader then it must shows him all of this information and then if this person click on the phone number then this number must be dialed or when he clicked on the URL then he must go to company's website.
Any help will be appriciated!
A QR code is simply a container for whatever you want to store. Given your description you want to encode a vCard in the QR code. Most modern devices will be able to decode that information and add it to their contact database. Check this answer Generate QR code from .vcf card / Business card in C# Windows phone 8.1 I think this will help you.

Can barcode Misread code?

in my asp.net mvc application on Register Form when users are using barcode scanner to insert data to textbox ,they say that it misses some portion of code like if they scan 02501603566 they get 02501602566 or 01301103564 can be 01301403564 after register.can barcode misread some data? i tested on my barcode and everything works fine.customers have big amount of data so they cant check every time what they have scanned in input.this can happen 1 times in 100..
Yes its not only possible that a scanner misreads are barcode, it definitely happens. 1D barcodes are the worst, but also cheap readers and readers configured improperly for the type of barcode being read can also be a problem.
If you are in control of the code, use a barcode with the appropriate error checking (and there are many).
Also check your barcode reader settings (they all have them).
If all else fails check the barcode with a different scanner or barcode reader app and check if its the fault tolerance of the scanner itself.
Misreads in the form of a perfectly scanning but wrong barcode can be
caused by scanner number substitution
Somehow the printed barcode image is wrongly decoded by the scanner. A poor quality printed barcode can contribute to this, but barcode structure also contributes. UPC is notoriously vulnerable to number substitution of 1 and 7, and 2 and 8 characters
Low ISO Decodability scores can contribute to barcode misreads,
especially when they are caused by pixel rounding in the print process
This is most common in a thermal or thermal transfer printing but it can also occur in ink jet, DOD and other digital printing systems
Scanners can also misread otherwise acceptable barcodes. Most often
the cause can be traced to damaged or dirty optics, but faulty decode
algorithms area known cause, albeit a rare one
Older, high-mileage scanners such as lasers tend to be more prone to misreads than newer, more sophisticated digital area imager scanners.
If a calibrated, ISO compliant verifier decodes and assigns an acceptable grade to a misreading barcode, one can be confident the cause lies with the scanner and not the barcode itself. This is yet another example of how a scanner cannot effectively serve as a verifier

C# Only allowing qr code to be scanned once

We use QR codes on our products. Each QR code is virtually identical except for a unique serial number.
I'm writing a C# Win Form program for building product KITS. They then scan off each product within that KIT to complete the Order. Some KITS contain multiples of the same product. I want to prevent the user from simply scanning the same QR code for a product with multiples in a KIT.
I will be creating a database for this Win App to store which qr codes have been scanned off the total amount needed for the KIT.
To ensure that the same QR code isn't scanned, would I be correct in assuming I'd simply need to run a check against the serial numbers previously scanned in the database? If so, how is the most efficient way to do this?
Thanks
It depends how the QR Code is stored in your database and how each QR code differs. Is it stored as data/an image? What exact data is being encoded onto the QR code?
You mention that the QR codes are virtually identical, but they have a unique serial number. Is this serial number stored in the QR Code? If so then after decoding you can simply search for the serial number in the database.
As far as efficiency goes, use the unique serial number as the identifier column in your table. Then, either query for that serial number, and only approve the scan if the query does not return anything. It is not completely safe though, as once you're trying to write the value to the table, it may already have been written by a different caller.
On the other hand, if you have a unique constraint on the column, you can just attempt to insert the scanned serial number - and let it fail if it already exists.
If you have a single user/computer being used for scanning each kit, and the process of scanning each kit has a definitive beginning or ending, and the data being stored isn't massive, and each kit scanned will be scanned in a single session, I would store each item scanned in an in-memory collection until the entire kit is scanned, then write the completed kit to the database asynchronously.
You can check the each new code against the in-memory collection.
This helps to make sure you don't have partial collections (orphaned data) in the database.
Makes it much more efficient to remove erroneously scanned items.

How 3rd party finger print device is working with C#

I am very new to this topic:-
Suppose If I am using 3rd party finger print sdk,
The sdk will provide API's to read data?
After scan what data format the device will return, thumb image or
some index value?
Suppose if it is index value where it is stored the thumb images ,
how the device will identify the image after second scan?
The device itself using separate DB for storing the thumb images?
Can I expect above queries should be solved by device developer
manual?
Thanks,
Hemu
Three major operations need to be followed:
Capture : Captures the finger
Merge : Merges the three finger templates into one (to be used for recording the fingerprint first time)
Verify : Compare two fingerprint templates (merged one vs newly captured one) and return the score
Scanner doesn't return the index. It should be handled at your software during the capture. More workflow informations can be found at http://camsunit.com/application/html-based-fingerprint-scanner-for-website-authentication-and-attendance.html

How to generate barcode from a string using C#?

Is it possible to generate barcode from a string
using c#?
Is there any builtin classes for generating barcodes in asp.net?
Is it possible to detect a barcode printer connected with a system?
Yep. Of course it is possible. :-)
As far as I know there are two ways to generate bar codes:
Using a special bar code font (try to google for "barcode font free")
Render the bar code to an image and display that (try using the Barcode Rendering Framework available on github)
In response to your updated question about detecting barcode printers:
I think a barcode printer will show up as a regular printer on your system. At least that is how the devices I have played with have worked.
This means that you can detect a specific barcode printer by enumerating the installed printers on the system and looking for the specified device, but in most cases I would suggest that you let the user specify the printer himself using either the standard print dialog or using a custom dialog.
Is it possible to generate barcodes from a string using c#?
Yes, it is. There are quite a lot of frameworks that do it - either as a font or an image.
Is there any built-in classes for generating barcodes in asp.net?
No, but this c# project on github allows a string to be converted into an image (even multiple barcode types). All you need to do then is display the image in your application, just like any other image.
Is it possible to detect a barcode printer connected with a system?
Yes, in a WinForm application, for example, you could use System.Drawing.Printing.PrinterSettings.InstalledPrinters.
to detect if you have printer installed then you may simply enumerate available printers using:
System.Drawing.Printing.PrinterSettings.InstalledPrinters
Is it possible to generate barcode from a string using c#?
If you want a C# barcode generator that can create your desired barcode type in a single line of code, you can use IronOcr.
// Create A Barcode in 1 Line of Code
BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode", BarcodeWriterEncoding.QRCode).SaveAsJpeg("QR.jpg");
The result can be exported as images, bitmaps, binary data, streams, stand-alone HTML image tag, Data Uris, PDFs or HTML.
If you need more advanced barcodes, QR Codes with logos - these are also supported.
Disclaimer: I work for Iron Software, makers of IronBarcode
Yes, it's possible using C#.
No, there are no built-in classes. But there are 3rd-party libraries.
For example, a free cross-platform C# library Gehtsoft.Barcodes for generation of different types of barcodes and QR codes from string into image. You can find it in nuget.
Moreover, you can generate barcode directly into PDF document with Gehtsoft.PDFFlowLib.Barcodes C# library (it uses Gehtsoft.Barcodes library automatically). It can also be downloaded from nuget.
DocumentBuilder.New()
.AddSection()
.AddParagraph()
.AddBarcode("4810151021665", BarcodeType.EAN_13)
.ToDocument()
.Build("Result.pdf");
Using this libraries you can generate barcodes UPC-A, EAN-13, EAN-8, GS1-128 (Code Sets A, B, and C) and QR codes (variants 1-40, four levels of error correction available).
Here is a tutorial with many examples: Adding barcodes.
Note, that Gehtsoft.PDFFlowLib.Barcodes library is an extension of PDFFlow library for generation PDF documents using C#.

Categories

Resources