Skip to content

Commit

Permalink
trying to get input to not change - failed
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakpati committed Apr 29, 2021
1 parent 54886b6 commit e582cd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions BrainMaGe/utils/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ def process_image(image):
DESCRIPTION.
"""
to_return = image
new_image_temp = image[image >= image.mean()]
p1 = np.percentile(new_image_temp, 2)
p2 = np.percentile(new_image_temp, 95)
image[image > p2] = p2
image = (image - p1) / p2
return image
to_return[to_return > p2] = p2
to_return = (to_return - p1) / p2
return to_return


def padder_and_cropper(image, pad_info):
Expand Down

0 comments on commit e582cd7

Please sign in to comment.