Skip to content

xphoto fix inpaint fsr #3336

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

Merged
merged 1 commit into from
Oct 3, 2022
Merged

Conversation

berak
Copy link
Contributor

@berak berak commented Aug 24, 2022

resolves #2855

use a temporal Mat header for convertTo()

Pull Request Readiness Checklist

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch ? ?
    (this goes to the 4.x branch, there is no fsr inpainting in 3.4)
  • There is a reference to the original bug report and related work

@berak berak force-pushed the xphoto_fix_inpaint_fsr branch from cb23a0e to 4fe1b50 Compare August 24, 2022 11:25
@berak berak force-pushed the xphoto_fix_inpaint_fsr branch from 4fe1b50 to be8db6a Compare August 29, 2022 13:37
@@ -767,7 +767,7 @@ void inpaint_fsr(const Mat &src, const Mat &mask, Mat &dst, const int algorithmT
CV_Error(Error::StsUnsupportedFormat, "Unsupported source image format!");
break;
}
src.convertTo(src, CV_8U, 1/257.0);
src.convertTo(src, CV_8U, 1/255.0);
Copy link
Contributor

Choose a reason for hiding this comment

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

In case if you want to get only higher 8 bits of value, the multiplier should be 1/256.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, 16 bit block ...

@berak berak force-pushed the xphoto_fix_inpaint_fsr branch from be8db6a to 4057993 Compare September 29, 2022 13:04
@asmorkalov asmorkalov self-assigned this Sep 29, 2022
@asmorkalov asmorkalov merged commit c4027ab into opencv:4.x Oct 3, 2022
@berak berak deleted the xphoto_fix_inpaint_fsr branch October 5, 2022 11:23
@alalek alalek mentioned this pull request Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in inpaint_fsr function for 16 bits / 32 bits / 64 bits images
2 participants