Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, November 9, 2018 8:33:06 AM(UTC)

Mikael  
Mikael

Groups: Registered
Posts: 20

Thanks: 1 times

Hi,

I was wondering how I can get the best performance reading barcodes from the AVFoundation camera feed? The camera is currently serving up 1080*1920 images that I'm converting to JPEGs and passing to RasterCodecs.Load with a LeadRect off the focus area.

I've set BarcodeEngine.Reader.ImageType = BarcodeImageType.Picture.

Your Demo on the App Store is able to read a specific bad EAN13 that my current configuration won't.

How can I increase the hit chance? Should I activate video stabilization on iOS? Should I configure the RasterCodecs in a specific way? Should I convert the image to greyscale?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, November 9, 2018 12:29:07 PM(UTC)

Joe Z  
Joe Z

Groups: Registered, Tech Support, Administrators
Posts: 63

Thanks: 2 times
Was thanked: 4 time(s) in 4 post(s)

Mikael,

Could you clarify what you mean by "LeadRect of the focus area"? Are you passing "LeadRect.Empty" to pass the whole image? Or another value? Could you also provide the additional configuration options that you've set for the BarcodeReader? Have you setup the specific symbologies you're trying to recognize?

The BarcodeReader Class documentation page linked below contains detailed information regarding improving barcode recognition.

BarcodeReader Class:
https://www.leadtools.com/help/leadtools/v20/dh/ba/barcodereader.html

You may want to try enabling options within the OneDBarcodeReadOptions class such as the EnableDoublePass property or the SeachDirection property.

OneDBarcodeReadOptions Class Members:
https://www.leadtools.com/help/leadtools/v20/dh/ba/onedbarcodereadoptions--members.html

Finally, you may also want to consider adding image processing functions on the captured frames. The BarcodeReader converts the images to B/W internally, so there is no need to convert your image to grayscale. However if the barcode is distorted or contains too much noise, you can consider our image processing functions such as the MinimumCommand Class or our various noise removal functions.

MinimumCommand Class:
https://www.leadtools.co...h/po/minimumcommand.html

Removing Noise:
https://www.leadtools.co...h/to/removing-noise.html
Joe Zhan
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
thanks 1 user thanked Joe Z for this useful post.
Mikael on 11/9/2018(UTC)
 
#3 Posted : Tuesday, November 13, 2018 4:46:06 PM(UTC)

Mikael  
Mikael

Groups: Registered
Posts: 20

Thanks: 1 times

Joe,

Why doesn't Leadtools provide wrappers for the iOS and Android camera/video that are optimized for the purpose of reading barcodes?

There's a lot of work involved in configuring the camera/video feed on each platform, trying to jump between as few hoops as possible from the raw data to a RasterImage and trying to get focused and clear images to pass to the BarcodeReader class. In one way I do understand that you haven't provided it because of the reasons I just laid out, but, you at least know how to use your libraries in an efficient way; you know how your algorithms work and how you could configure the camera video feed to work with your stuff.

I've got my iOS wrapper working decently with your SDK, it's matching the speed of your sample app on AppStore, but it took me a day or so just tweaking it, and that's on an iPhone 7, I don't know how well it'll perform on older models.

The next step that i'm dealing with at the moment is creating the Android wrapper, and trying to get that working decently with your SDK. Unfortunately (or fortunately depending on how you see it), I currently only have access to an old Samsung S4 phone. I'm currently able to read 1-1.5 frame(s)/sec with all the steps needed from video feed to RasterImage and then passing it off to the BarcodeReader, with a low hit/scan chance. There's probably a lot of things I can do to speed it up, multiple frame buffers, parallel/multi threaded image scanning... lower resolutions, applying image processing?

I've tried some other scanning libraries where they had pre-implemented camera/video wrappers that were tweaked to work with their barcode reading algorithms.

Update:
Got the speed up on the S4 by taking the Nv21 video buffer and creating a RasterImage using RasterImage.CreateFromYUVData (skipping previous steps where I created a YuvImage and compressed that as a Jpeg to a memory stream, which I then passed to RasterCodecs.Load to get a RasterImage). Once I get the RasterImage I then apply a Crop- and RotateCommand before passing it off to the BarcodeReader.

Edited by user Wednesday, November 14, 2018 4:53:17 PM(UTC)  | Reason: Not specified

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.159 seconds.