Repository navigation
Android: scan dense codes at 1440x1080 instead of 640x480 - #6210
Merged
Merged
Conversation
A camera session opened with no preview size -- every Vision scanner -- analysed frames at 640x480 on Android. That is too few pixels per module for a dense code such as a PDF417: it read on a phone with a sharp lens and failed on others. The iOS port had the same default until #6159. - An NV21 session with no preview size now asks CameraX for 1440x1080, turned to the display's orientation. 4:3 on purpose: the Preview use case is 4:3, so the analysed field stays the one on screen. Other sessions keep 640x480, because each of their frames is compressed to JPEG on the analysis thread. - Half a request (one dimension zero) used to be paired with one default dimension; it now gets the whole default. - The NV21 array is handed back to the converter for the next frame, so the port allocates none per frame at the larger size, and the luma plane is copied a row at a time. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
Author
|
Compared 195 screenshots: 195 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A camera session opened with no preview size, which is every Vision scanner, analysed frames at 640x480 on Android. That is too few pixels per module for a dense code such as a PDF417: it read on a phone with a sharp lens and failed on others. The iOS port had the same default until #6159; that change did not touch Android.
What changes
CameraFramealready documents its arrays as valid only duringonFrame.A size the application asks for is passed through unchanged.
Testing
AndroidCameraFrameConverterTest: the size selection (default, portrait, JPEG, pass-through, half request) and the buffer reuse.AndroidCameraThreadingTeststill passes; its harness stubs the display read.scripts/camera-regressionsuite and a real scan on hardware. The size is a request to CameraX, which picks the nearest size the device supports.🤖 Generated with Claude Code