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

a few bugs fixed! #25

Open
chenyyx opened this issue Dec 12, 2019 · 0 comments
Open

a few bugs fixed! #25

chenyyx opened this issue Dec 12, 2019 · 0 comments

Comments

@chenyyx
Copy link

chenyyx commented Dec 12, 2019

Hi Matthew,
Great piece of code. And thanks for putting this together from the Switching Eds blog post.

And I found some wrong in the codes, its confused me a lot, then i fixed that. See below.
im1 ---
001_im1

im2 ---
002_im2

output ---
009_output_im_t

======================
that's because output_im(type is np.float64), some pixels value out of range(0~255)!!!
We only need to add two line scripts as below to before this code line output_im_t = output_im.astype(np.uint8) .

output_im = np.maximum(output_im, 0) output_im = np.minimum(output_im, 255)

that's make it! :)
008_output_im

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

No branches or pull requests

1 participant