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

Adding new image processing function (contrast stretch). #635

Conversation

Salmanshams67
Copy link

which is inspired by OpenCV library.

Copy link

codecov bot commented Mar 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.43%. Comparing base (9ab86a8) to head (5b4d394).

Additional details and impacted files
@@           Coverage Diff           @@
##           legacy     #635   +/-   ##
=======================================
  Coverage   84.43%   84.43%           
=======================================
  Files         163      163           
  Lines        5698     5698           
  Branches     1424     1424           
=======================================
  Hits         4811     4811           
  Misses        790      790           
  Partials       97       97           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Salmanshams67
Copy link
Author

Salmanshams67 commented Mar 4, 2024

@targos, @lpatiny, @stropitek, @JulDenereaz, I have raised one PR, please check, it is running fine on every other version except (12.x).

@Salmanshams67

This comment was marked as resolved.

@stropitek
Copy link
Contributor

There is no need to ping everyone, people like me who are watching the project will get notified even if you don't.

I think to justify adding this to image-js, it has to be a standard algorithm with a standard name. From what I see it's not based on the opencv library but on an opencv tutorial.

I think "contrast stretching" is a generic term used for any method that widens the range of values used by the image's pixels but it could be anything, including non-linear stretching. Therefore I am not in favor of adding this to image-js.

@Salmanshams67
Copy link
Author

@stropitek, pardon me, about the function name, I shall make the changes accordingly.

@Salmanshams67
Copy link
Author

@stropitek, Isn't "linearContrastStretch" a more descriptive name that explicitly mentions contrast stretching in a linear manner, or we can use "convertScaleAbs" as openCV. (If you have any other name suggestion, kindly mention).

@Salmanshams67
Copy link
Author

@stropitek, a gentle reminder.

@stropitek
Copy link
Contributor

stropitek commented Mar 19, 2024

I think that as is the case for opencv, this should be in a tutorial rather than in the API of image-js, because it is too specific and can already be done in a few lines of code with the current API.

Thank you for your willingness to contribute, I'm closing the PR.

@stropitek stropitek closed this Mar 19, 2024
@Salmanshams67
Copy link
Author

Salmanshams67 commented Mar 19, 2024 via email

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.

None yet

2 participants