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

Enhance Image Loading and Saving Functions #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GautamAnjali569
Copy link
Member

Summary:

This PR refactors image loading and saving functionality, improving error handling and adding support for indexed image saving and segmentation handling. It introduces a fallback mechanism for loading images, prioritizing jpeg4py and falling back to OpenCV.

Key Changes:

  1. Image Loading Enhancements:

    • default_image_loader: Tries jpeg4py, falls back to OpenCV if unavailable.
    • jpeg4py_loader & opencv_loader: Improved error handling.
    • jpeg4py_loader_w_failsafe: Failsafe loading with a fallback to OpenCV.
  2. Indexed Image Handling:

    • imread_indexed: Loads indexed images for segmentation annotations.
    • imwrite_indexed: Saves a 2D array as an indexed PNG with a default or custom color palette.
  3. Davis Palette: Added a predefined color palette for indexed images.

Error Handling:

  • Improved error messages for better debugging.

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

Successfully merging this pull request may close these issues.

1 participant