Closed MahdiHoseiniTabar closed 9 months ago
I suspect that the video
height
and width
settings might influence the videoHeight
and videoWidth
attributes (i.e. the intrinsic resolution) of the video. If that is the case then the resolution might be too low to detect Code-128 but still sufficient to detect QR codes.
Could you therefore please also log videoEl.videoHeight
and videoEl.videoWidth
to see whether that is true?
Another test for my hypothesis would be to test whether other bar codes such as ean_13
also cannot be detected.
Thanks for your reply.
I printed videoEl.videoWidth
and videoEl.videoHeight
and see 640 x 480
so you are right.
I changed MediaTrackConstraints
for video and set width: { exact: 1920 }, height: { exact: 1080 }
now intrinsic resolution is 1920 x 1080
but steel cannot be detected code_128 :(
I take a picture from code_128
with great camera and the zoomed picture of code_128
be detected.
I tested ean_13
and be detected easily.
Have any solution?
Have you tried setting your width and height to the same values? I have found that an even numbered width/height along with an aspect ratio of one improves detection for code_128
.
No activity here for the last four weeks, so closing. Please reopen if necessary.
I used this library to recognize _qrcode and barcode with format _code128. It works for _qrcode but failed to recognize barcode with format _code128 it on Safari.
this is my code:
Is there a way to detect code_128 barcode on Safari?