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

image: implement image getter and setter for dev purpose #230

Merged
merged 4 commits into from
Jan 26, 2025

Conversation

edgarriba
Copy link
Member

This pull request includes several changes to the Image struct in the kornia-image crate, focusing on improving the API and adding new functionalities. The most important changes include updating the get_pixel method, adding a new set_pixel method, and renaming test functions to follow a consistent naming convention.

API Improvements:

  • Updated the get_pixel method to return a reference to the pixel value instead of a copy.
  • Added a new set_pixel method to allow setting the pixel value at given coordinates.

Documentation:

  • Updated the documentation for the get_pixel method to recommend using the get method for better performance.

Tests:

Code Examples:

  • Updated code examples in the ops.rs and threshold.rs files to reflect the changes in the get_pixel method's return type. [1] [2]

Copy link
Member

@johnnv1 johnnv1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@edgarriba edgarriba merged commit 03a0b2c into main Jan 26, 2025
11 checks passed
@edgarriba edgarriba deleted the image-getters branch January 26, 2025 09:06
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.

2 participants