Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cropped scan area #15

Closed
araimbekoff opened this issue Jan 17, 2018 · 12 comments
Closed

cropped scan area #15

araimbekoff opened this issue Jan 17, 2018 · 12 comments

Comments

@araimbekoff
Copy link

Hi! this is nice code.
Well, how a can i to transfer the scan area to the decoder?
eg:
if the aspect ratio of the video stream is 1280x720, then I want to scan only 600x600 in the middle of the video

@gruhn
Copy link
Owner

gruhn commented Jan 17, 2018

You can't at the moment. Why do you want to do that?

@araimbekoff
Copy link
Author

My application displays a scanner for the entire page.
For best focus, hold the camera at a distance of 30 cm.
If several codes enter the lens, the scanner is confused.

Well, I would be fine to control the scan area)

@gruhn
Copy link
Owner

gruhn commented Jan 17, 2018

Hmmm, I don't really understand. Is this feature required for your use case? If you just want to visually highlight the scanning process, like WhatsApp does it, you can do so. You could just visually pretend the scanning area is cropped. I bet your users won't mind if scanning actually works outside the marked bounds too.

How do you imagine to control the scan area? I guess we could create a new prop which allows defining a custom scan area. The rest would be a matter of changing like three lines of code. I'd prefer to keep this components API as simple as possible though. So convince me this is super useful 😁

If several codes enter the lens, the scanner is confused.

I'm not sure how other QR code reader applications handle this. I assumed that most users intuitively understand that this is a problem and will actively try to focus one QR code at a time.

What do you think?

@araimbekoff
Copy link
Author

Thanks for the answer!
For example, this can help users who work with a mass of goods on storage racks that need to be scanned on site. Therefore, pruning the scan area is important to me.
Of course, this is an isolated case.
It would be great if I told the scanner: to transfer to the scan the square from the center, the size of 80% of the maximum side (height or width)

@gruhn
Copy link
Owner

gruhn commented Jan 17, 2018

Sorry, I still don't get it :S

For example, this can help users who work with a mass of goods on storage racks that need to be scanned on site. Therefore, pruning the scan area is important to me.

Why do users who work with a lot of goods, need a pruned scan area. Do you mean scanning performance is increased that way so users can scan many QR codes faster?

@araimbekoff
Copy link
Author

Imagine that the codes are located with such intensity)
image

@gruhn
Copy link
Owner

gruhn commented Jan 18, 2018

Ok, I understand what you mean now. I thought cropped-scan-area and multiple-qrcodes-in-focus were two different issues.

So your users actually have to scan single QR codes from a surface that's so tightly packed?

(I'm just trying to think of other possible solutions here)

@araimbekoff
Copy link
Author

Yes exactly!
I hope you show me the right decision)

@metalmini
Copy link

I am facing the same issue. And yes, getting closer to the code with your camera will solve this problem.

Maybe it would help to first recognise the image and then tap the screen to do the actual decoding? This way the user gets a chance to highlight the correct code before actually doing something with it.

@gruhn
Copy link
Owner

gruhn commented Apr 4, 2019

Can you please elaborate the setting where you intend to use your application. I still have a hard time picturing real world use case for this.

  • Why would you pack a surface with QR codes so tightly?
  • Can't you just add more space between QR codes?
  • If this is a common use case, can you reference other applications which solved this problem?
  • Would it be helpful if you could zoom the camera?

@metalmini
Copy link

I would have never thought of this, but one of our clients is facing this problem. I will try to explain, even though i completely agree with you.

The QR codes will serve as a reference link (like the links on the bottom of a wiki article), but these codes will be printed on a manual or training. The client wants them to be pretty small and close to each other. By small i mean, a tad smaller then an inch (2 cm).

In another case they want the qr codes to be inserted in excel and the rows are pretty close to each other. The size makes them look like bullet points.

@gruhn
Copy link
Owner

gruhn commented Apr 12, 2019

Hmm, I still can't picture a context where you want to solve a problem this way.

What kind of problem are your clients trying to solve with this approach exactly? How did they come up with this idea? Is there an application that handles such situations similarly?

This sounds like a very specific edge case to me. I really need to understand this better because I don't think it's a good idea to introduce additional complexity to the components API (no extra props, events, ...) unless it's beneficial for a broader range of use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants