Skip to content

Commit

Permalink
Merge pull request BVLC#21 from lionleaf/camera-casting-fix
Browse files Browse the repository at this point in the history
Compatibility fixes for newer numpy version
  • Loading branch information
yosinski committed Feb 22, 2016
2 parents ae8e7d4 + 79c686b commit c64939f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core.py
Expand Up @@ -526,8 +526,8 @@ def display_frame(self, frame):
self.panes['input'].data[:] = frame_disp

def draw_help(self):
self.help_buffer[:] *= .7
self.help_pane.data *= .7
self.help_buffer[:] = self.help_buffer[:] * .7
self.help_pane.data[:] = self.help_pane.data[:] * .7

#pane.data[:] = to_255(self.settings.window_background)
defaults = {'face': getattr(cv2, self.settings.caffevis_help_face),
Expand Down
2 changes: 1 addition & 1 deletion image_misc.py
Expand Up @@ -58,7 +58,7 @@ def read_cam_frame(cap, saveto = None):
frame = cv2_read_cap_rgb(cap, saveto = saveto)
frame = frame[:,::-1,:] # flip L-R for display
frame -= frame.min()
frame *= (255.0 / (frame.max() + 1e-6))
frame = frame * (255.0 / (frame.max() + 1e-6))
return frame

def crop_to_square(frame):
Expand Down

0 comments on commit c64939f

Please sign in to comment.