-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix akaze orientation (from upstream branch) #65
Conversation
@stephanemagnenat I have incorporated your changes along with my own. Could you please compare the Rust CV |
On my unpublished branch, I had the following code for Self(ImageBuffer::from_fn(width, height, |x, y| {
let x = x * 2;
let y = y * 2;
let mut sum = self.0.get_pixel(x, y).0[0];
let mut count = 1.0;
let horiz_ok = x + 1 < self.0.width();
let vert_ok = y + 1 < self.0.height();
if horiz_ok {
sum += self.0.get_pixel(x + 1, y).0[0];
count += 1.0;
}
if vert_ok {
sum += self.0.get_pixel(x, y + 1).0[0];
count += 1.0;
}
if vert_ok && horiz_ok {
sum += self.0.get_pixel(x + 1, y + 1).0[0];
count += 1.0;
}
Luma([sum / count])
})) It would be interesting to see which one is faster, compared to the one in this PR, that uses iterators and save tests in the inner loop, but touches the right pixels out of order. |
Further corrections in #66, with the debug dumps. |
Ok, now the push works, thanks! |
786d88a
to
2d01f6b
Compare
2d01f6b
to
2f46fb3
Compare
2f46fb3
to
40693d5
Compare
40693d5
to
d3d7594
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked and we're happy to merge. Thanks for all the hard work!
This is the same branch as #64 but added to the upstream repository as the original branch was not modifiable by maintainers.