[Bug] Unstable edge detection causes distorted and skewed scans on Pixel 10 Pro (Android 17)

Open
#738 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, opencv

Research direction

Start by locating the camera preview’s edge detection and document corner detection entry points, then reproduce with a white or light-grey document on a black surface on the reported Pixel device. Compare the detected boundary with the document edges across the lighting and torch conditions in the report. Done means the boundary stays aligned with all four corners and the captured scan is rectangular and undistorted.

Written by the indexing model from the issue text.

Description

bug
Which app is your issue for

Document Scanner

Version

1.26.0.163

What platform are you using?

Android

OS Version

Android 17 (Build: DP11.260918.006)

What happened?

Describe the bug
The automatic edge detection (blue overlay polygon) fluctuates erratically and fails to reliably lock onto document borders, causing distorted, skewed, and incorrectly cropped output scans.

This behavior occurs consistently with both bright white and off-white/light-grey documents placed on a solid black background. Testing confirmed that the issue persists regardless of lighting conditions (tested with ambient room lighting, without ambient lighting, and with the built-in camera flash/torch enabled).

To Reproduce

  1. Open OSS Document Scanner.
  2. Place a white or off-white/light-grey document on a solid black surface.
  3. Aim the camera at the document (tested both with/without ambient light and with/without camera torch).
  4. Observe the blue detection boundary jittering and failing to align with the actual edges.
  5. Capture the scan.
  6. Observe the resulting output image being skewed and improperly cropped.

Expected behavior
Given the high contrast between the document and the black surface, edge detection should reliably lock onto all four corners and produce an undistorted, rectangular scan.

Environment

  • Device: Google Pixel 10 Pro
  • Package / Architecture: app-arm64-v8a-release.apk
Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct
Dominant language
C++
Stars
2.7k
Forks
153
Avg merge
9h 34m
Merged PRs (30d)
123

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ossappscollective/OSS-DocumentScanner

All issues in ossappscollective/OSS-DocumentScanner

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.