Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 01 20:09
    rollingversions[bot] commented #120
  • Dec 01 20:09
    snyk-bot opened #120
  • Dec 01 20:09

    ericblade on snyk-upgrade-519d1e7d4ee1c2a80934b2965feca8c5

    fix: upgrade @testing-library/j… (compare)

  • Dec 01 20:09

    ericblade on snyk-upgrade-519d1e7d4ee1c2a80934b2965feca8c5

    (compare)

  • Dec 01 20:09
    rollingversions[bot] commented #119
  • Dec 01 20:09
    snyk-bot opened #119
  • Dec 01 20:09

    ericblade on snyk-upgrade-9f2c3c9cc2e2b069caa78adb804c2ce6

    fix: upgrade @testing-library/r… (compare)

  • Dec 01 20:09

    ericblade on snyk-upgrade-9f2c3c9cc2e2b069caa78adb804c2ce6

    (compare)

  • Dec 01 20:09
    rollingversions[bot] commented #118
  • Dec 01 20:09
    snyk-bot opened #118
  • Dec 01 20:09

    ericblade on snyk-upgrade-746052d01c766e00b31179efb5026927

    fix: upgrade snyk from 1.742.0 … (compare)

  • Dec 01 20:09

    ericblade on snyk-upgrade-746052d01c766e00b31179efb5026927

    (compare)

  • Nov 24 21:25

    ericblade on snyk-upgrade-efab3a56c291c493a8a70cb1f4975430

    fix: upgrade snyk from 1.742.0 … (compare)

  • Nov 24 21:25

    ericblade on snyk-upgrade-efab3a56c291c493a8a70cb1f4975430

    (compare)

  • Nov 18 00:25

    ericblade on snyk-upgrade-a64939259e5c4e20ba838875e658d7ae

    fix: upgrade snyk from 1.742.0 … (compare)

  • Nov 18 00:25

    ericblade on snyk-upgrade-a64939259e5c4e20ba838875e658d7ae

    (compare)

  • Nov 17 18:24
    ericblade commented #390
  • Nov 17 18:23
    ericblade commented #390
  • Nov 17 03:19
    Extarys commented #390
  • Nov 17 03:18
    Extarys commented #390
Gabriel Balint
@zadof
Wouldn't the image you see in the live feed give you that understanding?
Eric Blade
@ericblade
just something to try, i don't know the iphone at all, last iOS device i owned was an iPad 2
i know i've got an ios user on my application that says the scanner works great, we're scanning UPC/EAN codes with it
Gabriel Balint
@zadof
I see, on iPhone we get better results overall, but still not great, I think it is because of the lack of focus control, and ability to read blurry barcodes
Eric Blade
@ericblade
so, there are two things i do know about iOS wrt quagga, one is that the newest version of iOS if you use a "max 100" aspect ratio constraint, it'll actually give you a 100 aspect ratio image, which is just a black screen. no idea how/why it does that. Also, some combinations of iOS hardware/software will refuse to do certain camera resolutions that are commonly possible other devices, like 640x480
unfortunately, there is no focus control available to the HTML media apis right now
Gabriel Balint
@zadof
you are right on that aspect ratio, by default, so when you go on the demo site from QuaggaJS, the camera doesn't work, is blurry, but when you do it from your code, it works fine, but smaller barcodes you have to get them really focused so you can read them
Eric Blade
@ericblade
if you have another way of accessing the camera images (such as via a native plugin, if something like PhoneGap offers that, i'm not sure) that does allow for focus control, you could capture images some other fashion and pass them to QUagga.decodeSingle
yeaa.. small barcodes, you can try to tune the settings for, adjusting the patchsize and such, or using locate: false, with an area parameter in the config
Gabriel Balint
@zadof
tried them all for hours :) Is quaggajs applying any sharpening to the image before processing it?
Eric Blade
@ericblade
i do know of one person who reported to me that they can use autofocus on their device (it's an offbrand Android if I remember correctly) by opening their camera app and leaving it running with auto-focus enabled before opening my app
I'm not aware of anything. There is a singleChannel parameter i believe it's called, that forces it to only use a single channel of the image for data.. i've just .. not really had too many problems, using just a single setting, with common UPC/EAN codes.. so i haven't explored too much
i do only have a handful of users for my application, but this is what i use
            inputStream: {
                type: 'LiveStream',
                constraints: {
                    width: 640,
                    height: 480,
                    ...(cameraId && { deviceId: cameraId }),
                    ...(!cameraId && { facingMode: 'environment' }),
                },
                target: scannerRef.current,
            },
            locator: {
                patchSize: 'medium',
                halfSample: true,
            },
            numOfWorkers: 0,
            decoder: {
                // readers: ['qr-code-reader'],
                readers: ['upc_reader', 'ean_reader'],
            },
            locate: true,
        }, (err) => {
Gabriel Balint
@zadof
I see, we're using on code128, and when you have a small label and a few digits there, the lines are really close to each other, so any blur makes it harder
those codes you mention work fine
Eric Blade
@ericblade
i get the impression that code128 is quite well tested (as opposed to code32, which is new to the lib, and a few others that don't see much use at all that were put in by the original author).. however, you're right that code128 can be quite small, i used it in a business not long ago, because it was able to reproduce a lot of information in a short space. but i never had need to read it with quagga so i never tried
i know the readme, and i have said "try higher resolution so the image comes out better", but something to also try is lower resolution so that the barcode isn't so small. might help? not sure
and if you can get away with setting a locate area, and turning off auto-locate, then you're eliminating a large chunk of the work that makes things break sometimes
Gabriel Balint
@zadof
been trying them, I tried some commercial ones as well, found one that works instantly, all the others have a hard time
128 works, but if it's small enough and the image get a little blurry, it wont work
Lukas Visinskis
@LukasVisinskis_twitter
Hi guys, do you know if it's possible to choose what rear camera to initialize? Currently on my mobile device the app picks ultrawide lens which distorts the image and it doesn't read barcode at all.
Gabriel Balint
@zadof
I think you can provide a name of the camera to use, so you probably need a selection screen where the user picks the camera from the list
I don't think you have an automatic way to pick the "good" camera
Lukas Visinskis
@LukasVisinskis_twitter

@zadof Yeah I guess I can make a camera picker and alert users that ultrawide camera might not work for them. And yeah I agree, I can't think of a method to pick "good" camera as well.

What really bothers me is that every single other app(instagram, snapchat, myfitnesspal and etc.) They always seem to open "good" rear camera never ultrawide and never telephoto.

Is it different with native apps?

Gabriel Balint
@zadof
Not sure exactly, they just go by the name and try to pick the right one, might have some more info to go by, not sure about that
Eric Blade
@ericblade
@LukasVisinskis_twitter sorry, i don't always notice that people have popped into the chat!
I have yet to figure out if there's some way to determine a good way to ignore ultrawide and telephoto camera designations. My assumption is that there should be a way to filter them using the constraints, but unfortunately, it seems that the only obvious way there is to get a list of cameras using the anemic MediaDevices.enumerateDevices() call (which is wrapped in Quagga) and use that to fill a selector for the user.
@LukasVisinskis_twitter @zadof there is also this mess from the scandit library: https://unpkg.com/browse/scandit-sdk@4.6.1/src/lib/cameraAccess.ts
i'm not entirely certain what a lot of it actually achieves, but so far my experience has been that the last rear camera in the list is almost always the one we want, and that the only useful descriptions we get on most devices is "rear" or "front", with no further information
Eric Blade
@ericblade
unfortunately, my experience is only with about 4 android devices
on top of that mess of it being notoriously difficult to pick the "right" camera, on mobile, Chrome doesn't even prompt for camera permission until you actually attempt to use a camera, so you can't get an accurate listing of devices until after you've already tried to use the camera.
Eric Blade
@ericblade
it might be worth defaulting to "last rear" like at least part of that scandit code seems to do. but also allowing user to provide a setting to change it
Eric Blade
@ericblade
i am right now adding ability to do Quagga.CameraAccess.request(null) to allow you to open (and then call release() immediately after) the camera without a video element available, to see if that will work for asking permission on mobile before calling enumerateVideoDevices
1.3.1 has been published to npm, i haven't actually tested that this new ability actually works in achieving that goal on mobile chrome quite yet, though.
Stridesdata
@Stridesdata
Good Day everyone..
How does one implement this on a laravel project?
@ericblade Good morning,
can this be used on a laravel project?
Eric Blade
@ericblade
@Stridesdata laravel is php, server side.. quagga is javascript... can run on browser side?
Eric Blade
@ericblade
so i don't understand where you're confused, usually you'd be running the scanner on the browser, so it's completely separate from the server side
Stridesdata
@Stridesdata
@ericblade
Its a wonderful thing you did continuing the project from serratus. I have implemented the old quagga on my vuejs project using sinata's input. I have some important questions, what are the benefits of Switching from quagga1 to quagga2?
What is the best way to add Qr code to my vue project
Eric Blade
@ericblade
@Stridesdata overall.. well, not a whole lot, really. there's the ability to add the qr plugin that i wrote to it, though. :-)
better typescript support, much much newer depdendencies
a lot easier to do work inside. not a lot user facing though
Katharina Bogad
@mistressofjellyfish
So I'm currently entering the worst-idea-of-2021 contest and compiled libdmtx with emscripten to wasm. My ultimate goal is to just basically do what the qr plugin does and shove the pixel data to libdmtx which then does detection and recognition. So far I have sucessfully compiled libdmtx to js and wasm and now have a module I can import \o/
now I just have to figure out how to get typescript running :joy:
Eric Blade
@ericblade
@mistressofjellyfish that sounds interesting.... sorry i didn't check in for a long time here, i usually only check in when i get a notification... and apparently i didn't receive one for this, or missed it
i wonder how difficult it would be to get the barcode area finder in Quagga to detect QR and DMX there
Chyslain Nsufeu
@chyslain_gitlab
I am using the Quagga library to read and decode an image's barcode. Everything works fine on all devices except the camera on the device with Android 11. The screen just froze with the image. However, in the background, the application did its job. it is fine. The application read the barcode, decode and return the right value but the camera freeze the screen.
MrKneetjie
@MrKneetjie
Hello @ericblade are you active here ?
Gustavo
@gustavinho_f:matrix.org
[m]
QuaggaJS cannot read Interleaved 2 of 5, someone with this issue too?