Skip to content

Commit

Permalink
roi and nroi can be applied together
Browse files Browse the repository at this point in the history
  • Loading branch information
carienmol committed Sep 13, 2023
1 parent 10213ae commit bfaf72c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions birdwatcher/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,9 @@ def apply_backgroundsegmenter(self, bgs, fgmask=None, learningRate=-1.0,
firstframe = self.peek_frame()
completeframe = np.zeros((firstframe.shape[0],
firstframe.shape[1]), dtype=np.uint8)
h1,h2,w1,w2 = roi

for frame in self._frames:
if roi is not None:
h1,h2,w1,w2 = roi
frame = frame[h1:h2, w1:w2]
mask = bgs.apply(frame=frame, fgmask=fgmask,
learningRate=learningRate)
Expand Down

0 comments on commit bfaf72c

Please sign in to comment.