Search Unity

Antares QR Code

Discussion in 'Assets and Asset Store' started by Neodrop, May 16, 2011.

  1. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    $BDD2F38C-7FBA-11E0-BDFA-C3F71496DD27.png

    Works in any Unity-supported platforms!
    QRCode library is a .NET component that can be used to encode and decode QRCode. QRCode is a 2 dimensional bar code that originated in Japan. Nowadays, it is widely used in a wide range of industries

    Nowadays, QRCode is used in mobile phones to ease data entry.
    QRCode can also be printed on a business card or shown on any display, which can then be captured by the mobile phone provided the mobile phone has the software to read QRCode.

    - Encode content into a QRCode Texture2D which can be saved to PNG

    - Decode a QRCode Texture2D

    - Read QRCode from photo and unclear pictures.

    http://u3d.as/content/neo-pax/antares-qr-code/1QF

     
    Last edited: Jun 17, 2011
  2. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
  3. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    The link in first post is fixed.
     
  4. Cheston

    Cheston

    Joined:
    Jun 15, 2011
    Posts:
    2
    Hello, I am very interested in this plugin, but would like to know more about how it works. I currently have an application for Android that takes a screenshot from the phone camera, saves it to their SD card, and then puts it on a plane as a Texture2D. Would this plugin allow me to read the QR data from that Texture2D? Is it possible to read data from the phone camera directly without applying the image to a plane? Please let me know if I am unclear and I will try to re-phrase. Thank you very much!
     
  5. PAX

    PAX

    Joined:
    Oct 12, 2010
    Posts:
    54
  6. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Currently, our plugin can create and read a clearly pictures.
     
  7. Cheston

    Cheston

    Joined:
    Jun 15, 2011
    Posts:
    2
    Thanks very much for the response. I am curious though, how did you avoid using "System.Drawing" in your plug in? All the QR Code libraries I have seen use this DLL to deal with the image files... Is the library you use in Java or some other language to avoid this?
     
  8. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Pure C# and Unity
    No other tricks.
     
  9. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    1.2 is uploaded on Asset Store

     
  10. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    I just purchased your QR code reader, works great in the editor. But then when I set up the demo project and built it to my iPhone 4G, I encountered this error with your .dll:

    "QR2/Libraries/Antares.QRCode.dll.s:32730:FATAL:Symbol plt__class_init_____ already defined."

    Any ideas? I'd really like to get this to work. Thanks.
     
  11. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Thank you. We will looking for it immediately.
     
  12. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Fixed. Soon, the update will be uploaded on Asset Store.
     
  13. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    1.21 Successfully submitted. Pending review by Unity.
     
  14. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    Thanks for the quick response! I'm waiting on it to post in the store, I'll let you know if it works when I do!
     
  15. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    No dice, still has the same error. I'm not doing anything special, I literally opened a new project, tested that it built properly, then imported the new build from the Unity Asset Store (version 1.21 uploaded today) and still has this error:
     

    Attached Files:

    • $pic.jpg
      $pic.jpg
      File size:
      243.6 KB
      Views:
      5,903
  16. PAX

    PAX

    Joined:
    Oct 12, 2010
    Posts:
    54
    Can you show build settings from your iOS project?
     
  17. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    In our tests all compiled fine. Did you use any other middleware in your project ?
     
  18. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
  19. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    No middleware, totally clean use of your example demo package. I've attached a screen capture of my unity build settings and my xcode build settings. Thanks for looking into this for me!
     

    Attached Files:

  20. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Thanks, we will test it asap. Currently, all works fine for our testers. We will try to reproduce your settings.
     
  21. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Try to set iOS SDK version to 4.2 or less. All work for 4.2
    I think this problem will gone for xCode 4.3 when Unity 3.4 will be published.
     
  22. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    You are probably right, I tried switching from a iPhone 4G to a 3GS (both had the 4.33 software version installed) and they both failed. I have heard a lot of people are having trouble with Unity to iPhone now with the 4.3.3 update. Do you know when Unity will out with the latest build?
     
  23. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    As I think, in next few days or 1-2 week
     
  24. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    But you can try set your xCode settings to 4.2 instead 4.3
    Should be Ok
     
  25. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    I tried building it with 4.0-4.2 with the same result. It must be something to do with my iPhone and Xcode iOS version being 4.3.3. Did you build it with an iPhone 4G on iOS 4.3.3? It says the class "init" is already defined, do you have an init class in the .dll?
     
  26. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Sorry, we haven't 4G and have tested it in 3GS (I will specify it more detailed a bit later.)

    I think this is some Unity incompatibility with latest iOS update. Not inside our code.
    I hope for 3.4
     
    Last edited: Jun 24, 2011
  27. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    So I am sure this has bad written all over it, but I figure out a way around the compilation error by editing the "Antares.QRCode.dll.s" file from within Xcode, and the find the three instances of "plt__class_init_____". The first one I left alone, and the other two I changed to "plt__class_init2_____" and "plt__class_init3_____"

    No idea what negative side effects this may have, but the demo app runs on my iPhone fine now. Thanks for all the prompt responses!
     
  28. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Very strange. Can you send the edited dll's to me? I will upload it to the Store.
     
  29. x46085

    x46085

    Joined:
    Sep 18, 2010
    Posts:
    12
    Sure, this thing won't accept it as a .s file, do you have an email you can PM me?
     
  30. SrBilyon

    SrBilyon

    Joined:
    Jul 13, 2010
    Posts:
    291
    I would assume that I would need Unity Android Pro to use this for Android games? (I hope not :D)
     
  31. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Not. Because it is a purely dotnet plugin. You don't need a PRO to use it.
     
  32. SrBilyon

    SrBilyon

    Joined:
    Jul 13, 2010
    Posts:
    291
    You just became my best friend.
     
  33. Bushyo

    Bushyo

    Joined:
    Apr 13, 2011
    Posts:
    8
    I couldn't find answer for my question: does your plugin use camera in devices ( iOs, Android ) and read the code from that "stream"? or does it only decode QR from a still picture ( loaded in library or from disk ) ?
     
  34. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    QR Plugin has been created to work with pictures and QR codes. Not from video stream. The plugin itself can't work with camera or something also. It's not iOS special created code - it's universal QR reader. You should give the picture to him and where you get it is not a plugin's interest ;)
     
  35. tigershan

    tigershan

    Joined:
    Jul 29, 2010
    Posts:
    73
    Is the .net .dll code included? If not can you add in a function that returns bool or not for rather the qrcode exist in the picture frame? Currently when a qrcode doesn't exist in the picture frame, it just throw in an exception and crashes.

    Thanks.
     
  36. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    What about

    try{
    //your code here
    }catch(Exeption e){
    Debug.Log(e);
    }
     
  37. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    It should return 'nothing', not throw an exception as 'fast and no exception' + 'throw an exception instead of just telling that there was nothing to read' = does not work that well and as this library is primarily for the two platforms where this is the norm (mobiles) thats a suboptimal solution to signal that you didn't find anything, don't ya think Neodrop :)

    On desktop its naturally no problem but who needs a QR reader on desktops, you don't carry them around under your arm 99.9% of the time
     
  38. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Pending review by Unity

    Code (csharp):
    1.  
    2. var result = QRCodeProcessor.Decode(qrCodeImage);
    3. if (result!= null)
    4. {
    5.      _decodedString = result.Text;
    6. }
    7. else
    8. {
    9.     _decodedString = "Error while reading QRCode Image!";
    10. }
    11.  
     
  39. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Antares QR Code 1.22 has been accepted.

    I hope it'll be more handy.
     
  40. tigershan

    tigershan

    Joined:
    Jul 29, 2010
    Posts:
    73
    Thanks, I got the video feedback writing to texture2D, and was able to read QR code in certain format of the image(on PC/Mac), can you tell me the exact requirement to be able to read the image?

    Seems like, I have to flip the image in texture2D, does it have to be a square too, I tried it with the Prime31 AR plugin to get it work on Iphone, where the video feedback is used to write to the texture, however I can't seem to get the texture to be read by the qr code, no matter how I rotate it. Does it have to be the original image? does it have to be power of 2?

    Thanks.
     
  41. PAX

    PAX

    Joined:
    Oct 12, 2010
    Posts:
    54
    Power of two is not required. If your picture are flipped, you can't read it. May be you can try to flip it instead rotate?
     
  42. tigershan

    tigershan

    Joined:
    Jul 29, 2010
    Posts:
    73
    Have you tried this out? The flip and writing texture is done in xcode, I had to go in there and try to modify the code, first, I had to comment out the fast path, then try to scale it negatively, I pretty much flipped it, and tried everything possible. That's why I asked, I had to turn down the resolution though, could that have done anything?
     
  43. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Can you show your problem with some screenshots? I'm not sure what I understand this problem correctly.
     
  44. evilgoldfish

    evilgoldfish

    Joined:
    Oct 20, 2010
    Posts:
    33
    Hi guys, I know this sounds stupid (It seems to have been addressed in the forum) but I would really like confirmation. Basically we want to build an app that scans QR codes for IOS and Android using the Antares QR reader. Basically the programmer we have asked to do it for us said it's not possible to build for Android only IOS, but everything we have seen and read in this forum suggests otherwise?
    Could you confim we can build using this, an app on Android AND IOS that scans codes?
     
  45. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Yes, you can do it. Both for iOS and Android.
     
  46. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Our company bought the plug-in , and it works fine.
    Since Unity 3.5 (beta) have camera support, could you make an example how to get the webcamtexture ready to use with your system? I did managed do get it run but the most users will have some Sirius problems with that and using the camera is (so far i can think) the most likely used application for this.

    This would help a lot for fast integration.
     
  47. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    May be later, but not in next two weeks. Sorry, I'm too busy now, and also have no technical possibility to do it.
     
  48. evilgoldfish

    evilgoldfish

    Joined:
    Oct 20, 2010
    Posts:
    33
    Great thanks ;)
     
  49. Adiel

    Adiel

    Joined:
    Feb 20, 2012
    Posts:
    8
    Hi, I was wondering if this plugin would work with QR pictures that aren't black&white or in invert colors.
     
  50. PAX

    PAX

    Joined:
    Oct 12, 2010
    Posts:
    54
    You are free to do image preprocessing before reading the code.