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

Improve image capture resizing #2742

Open
ctsims opened this issue Feb 15, 2024 · 2 comments
Open

Improve image capture resizing #2742

ctsims opened this issue Feb 15, 2024 · 2 comments
Labels
💎 Bounty Issues eligible for bounty rewards, inviting community collaboration bounty-sep-24 Bounties published in September 2024

Comments

@ctsims
Copy link
Member

ctsims commented Feb 15, 2024

Bug Description

The current naive strategy for downsampling captured images doesn't perform well when resizing images with light patterns, resulting in a stippled appearance.

Current Behavior

When images with light patterns are resized using the current downsampling strategy, the resized images appear stippled and amplify underlying shadow overlays like the image attached.

image

Expected Behavior

Resized images should maintain the quality of the original, without amplifying light patterns or shadow overlays.

Reproduction Steps

Note:

  • We currently don’t have a consistent method to reproduce this issue. To qualify for the bounty, please see the Acceptance Criteria.
  • These steps assume you have basic knowledge of navigating and using the CommCare platform. If you are unfamiliar with how to perform basic setup steps, a getting started guide is available here.
  1. Create a CCHQ app that captures images.
  2. Install the app on an Android device
  3. When you get to a screen with an image capture question, capture the photo by clicking a photo possibly with Light Patterns
  4. After form submission, navigate to Submit History report on HQ and download the attachment
    -Observe that the resized image of the above-given image exhibits a stippled appearance or amplified shadow overlays similar to the one attached above.

Possible Solution

Experiment with different platform methods for resizing images that do not amplify underlying shadow overlays. Potential solutions may include:

  1. Platform-Specific Methods: Utilize built-in platform-specific resizing methods that are known to preserve image quality better in these scenarios.
  2. Advanced Downsampling Algorithms: Explore and implement more sophisticated downsampling algorithms that are specifically designed to handle images with light patterns.

Acceptance Criteria

A successful pull request for this issue will be expected to contain the following:

  • A sample image which was captured in real usage of CommCare replicating the compression issues identified in the ticket, and the conditions under which the issue was replicated
    • Keep in mind that it may not be possible to replicate this issue on all devices
  • A description of the correction applied in code which prevents the issue
  • A sample of the same image after the fix is applied

Additional Information/Context

No response

Environment details (OS name and version, etc.)

No response

@kiran-tripathy kiran-tripathy added the bounty-sep-24 Bounties published in September 2024 label Aug 22, 2024
@kiran-tripathy
Copy link

/bounty $150

Copy link

algora-pbc bot commented Sep 17, 2024

💎 $150 bounty • Dimagi, Inc

This issue is eligible for rewards from CommCare's Open Source Bounty Program.

Contribution Prerequisites

Before you proceed, please read through the details of the CommCare Bounty Program

  1. Make sure that you meet the eligibility criteria and have fulfilled all the requirements
  2. We recommend creating appropriate accounts and signing the CLA ahead of time if you are planning on pursuing a bounty for your open source contribution

Steps to solve

  1. Start working: Comment /attempt #2742 with your implementation plan
  2. Submit work: Create a pull request including /claim #2742 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to dimagi/commcare-android!

Add a bountyShare on socials

@algora-pbc algora-pbc bot added the 💎 Bounty Issues eligible for bounty rewards, inviting community collaboration label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty Issues eligible for bounty rewards, inviting community collaboration bounty-sep-24 Bounties published in September 2024
Projects
None yet
Development

No branches or pull requests

2 participants