locked
QR-code position detection (getting coordinates values) RRS feed

  • Question

  • I want to get the coordinates values of a QR-code that is inside a large image. Also there could be more than one QR-code in the image; I have to detect in which position the codes are existing. How to implement this?
    Thursday, May 31, 2018 8:26 AM

All replies

  • Hi Nionta,

    Thank you for posting here.

    For your question, you could use BarcodeLib.BarcodeReader.dll.

    Please download the source file from the link below.

    http://www.barcodelib.com/net_barcode_reader/barcodes/qrcode.html

    1. Add reference of this dll.

    2. Try the code below.

     string[] results = BarcodeReader.read("CODE39_2.png", BarcodeReader.CODE39);

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 4, 2018 5:46 AM
  • Please note that's a paid product; the free trial randomly changes the first letter of the scanned code, and it's not clear the free trial will do more than one barcode per page.

    Also, I don't believe that library will tell you the LOCATION of the codes that it found, but that's an odd request anyway.  Why do you need that?


    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Monday, June 4, 2018 7:47 PM
  • You can find one or multiple barcodes in an image using the LEADTOOLS barcode SDK. (Disclaimer: I am an employee of the vendor of this toolkit).

    The following code finds 2 types of barcodes (QR and PDF417), and displays the data and location of the first one:

    BarcodeEngine engine = new BarcodeEngine();
    BarcodeReader reader = engine.Reader;
    BarcodeData[] barcode = reader.ReadBarcodes(image, LeadRect.Empty, 5, new BarcodeSymbology[] { BarcodeSymbology.QR, BarcodeSymbology.PDF417 });
    if (barcode != null)
       Console.WriteLine("Data:{0}, Found at location {1}", barcode[0].Value, barcode[0].Bounds);
    

    You can get a free evaluation edition from this page: https://www.leadtools.com/downloads?category=main. The evaluation is fully-functional (but time-limited) and comes with free technical support through email and chat.

    Friday, July 13, 2018 11:07 AM