Skip to content

a few bugs fixed! #25

@chenyyx

Description

@chenyyx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions