Git Product home page Git Product logo

Comments (8)

yuriy-budiyev avatar yuriy-budiyev commented on May 28, 2024

Hi, normally it takes less than a second.
Which device is used for testing?
Try to update library to latest version (ZXing core updated).
And, maybe auto focus interval is too low, camera may not be able to focus.

from code-scanner.

danielto avatar danielto commented on May 28, 2024

Thank you for very quick response.

I am using the latest version 1.7.5 (also used 1.7.4. before). And I am testing on 3 devices: LG V10 (stock room 6.0), LG G3 (stock room 6.0) and LG G2 (lineage 7.1.1). The LG G2 is good. It usually takes only 2 seconds to scan the code. But the other 2 devices are still not good. Changing the autofocus interval to 4000ms makes no change.

Maybe it is problem with laser autofocus which these devices have. I will test it on different devices from different vendors and let you know.

Thanks one more time.

from code-scanner.

yuriy-budiyev avatar yuriy-budiyev commented on May 28, 2024

Latest version is 1.7.7
Also, you can use debug mode to see camera preview size and list of all avilable sizes, please tell me if you can, breakpoint here:

List<Camera.Size> sizes = parameters.getSupportedPreviewSizes();

from code-scanner.

danielto avatar danielto commented on May 28, 2024

These are available sizes for LG G3 device. I have updated to version 1.7.7

sizes = {ArrayList@7733}  size = 24
 0 = {Camera$Size@7736} a
  height = 1440
  this$0 = {Camera@7730} 
  width = 2560
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1952103153
 1 = {Camera$Size@7737} 
  height = 1440
  this$0 = {Camera@7730} 
  width = 1920
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1996281444
 2 = {Camera$Size@7738} 
  height = 1080
  this$0 = {Camera@7730} 
  width = 1920
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2018611291
 3 = {Camera$Size@7739} 
  height = 1080
  this$0 = {Camera@7730} 
  width = 1776
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1981284486
 4 = {Camera$Size@7740} 
  height = 1200
  this$0 = {Camera@7730} 
  width = 1600
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1980030165
 5 = {Camera$Size@7741} 
  height = 1080
  this$0 = {Camera@7730} 
  width = 1440
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2098773112
 6 = {Camera$Size@7742} 
  height = 960
  this$0 = {Camera@7730} 
  width = 1280
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2042928863
 7 = {Camera$Size@7743} 
  height = 800
  this$0 = {Camera@7730} 
  width = 1280
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1889101498
 8 = {Camera$Size@7744} 
  height = 720
  this$0 = {Camera@7730} 
  width = 1280
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2088319225
 9 = {Camera$Size@7745} 
  height = 720
  this$0 = {Camera@7730} 
  width = 960
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2022633420
 10 = {Camera$Size@7746} 
  height = 480
  this$0 = {Camera@7730} 
  width = 864
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1974735267
 11 = {Camera$Size@7747} 
  height = 720
  this$0 = {Camera@7730} 
  width = 880
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1914502190
 12 = {Camera$Size@7748} 
  height = 480
  this$0 = {Camera@7730} 
  width = 848
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1958818653
 13 = {Camera$Size@7749} 
  height = 480
  this$0 = {Camera@7730} 
  width = 800
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2060911712
 14 = {Camera$Size@7750} 
  height = 432
  this$0 = {Camera@7730} 
  width = 768
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1931603111
 15 = {Camera$Size@7751} 
  height = 480
  this$0 = {Camera@7730} 
  width = 720
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2075555042
 16 = {Camera$Size@7752} 
  height = 480
  this$0 = {Camera@7730} 
  width = 640
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2098753537
 17 = {Camera$Size@7753} 
  height = 432
  this$0 = {Camera@7730} 
  width = 576
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2001587764
 18 = {Camera$Size@7754} 
  height = 320
  this$0 = {Camera@7730} 
  width = 480
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1898738667
 19 = {Camera$Size@7755} 
  height = 288
  this$0 = {Camera@7730} 
  width = 384
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2113979606
 20 = {Camera$Size@7756} 
  height = 288
  this$0 = {Camera@7730} 
  width = 352
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -1976619749
 21 = {Camera$Size@7757} 
  height = 240
  this$0 = {Camera@7730} 
  width = 320
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2085183816
 22 = {Camera$Size@7758} 
  height = 160
  this$0 = {Camera@7730} 
  width = 240
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2089954159
 23 = {Camera$Size@7759} 
  height = 144
  this$0 = {Camera@7730} 
  width = 176
  shadow$_klass_ = {Class@7552} "class android.hardware.Camera$Size"
  shadow$_monitor_ = -2052202506

from code-scanner.

yuriy-budiyev avatar yuriy-budiyev commented on May 28, 2024

And which of them is selected as preview?
And tell frameWidth and frameHeight parameters of this method please.

from code-scanner.

yuriy-budiyev avatar yuriy-budiyev commented on May 28, 2024

Try 1.7.8
If not work, the problem isn't in preview size, I think.

from code-scanner.

danielto avatar danielto commented on May 28, 2024

With the newest version 1.7.8 the recognition speed is better. I can see, that the function

public static Point findSuitableImageSize(@NonNull Camera.Parameters parameters, int frameWidth, int frameHeight, float distortion)

is not called in this new version.

For version 1.7.7 the return value of this function is: new Point(1920, 1440).

Thank you for your help.

from code-scanner.

yuriy-budiyev avatar yuriy-budiyev commented on May 28, 2024

It is called, the same way as in older version (when camera initialization is needed)

Utils.findSuitableImageSize(parameters, portrait ? mHeight : mWidth, portrait ? mWidth : mHeight);

but it's body has changed.

from code-scanner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.