Skip to content

Commit

Permalink
Merge pull request #73 from portugueslab/optimise_prefilter
Browse files Browse the repository at this point in the history
Optimise the Prefilter
  • Loading branch information
nvbln authored May 26, 2022
2 parents b9ddcc7 + 1b178f9 commit 350481a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stytra/tracking/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ def _process(
if color_invert:
im = 255 - im
if clip > 0:
im = np.maximum(im, clip) - clip
# Maxval only exists because it is required,
# since we use cv2.THRES_TOZERO, we do not set things to maxval.
im = cv2.threshold(src=im, thresh=clip, maxval=255, type=cv2.THRESH_TOZERO)[
1
]

if self.set_diagnostic == "filtered":
self.diagnostic_image = im
Expand Down

0 comments on commit 350481a

Please sign in to comment.