Skip to content

Commit

Permalink
Changed scale factor for scaleAbs to display wider range of colors
Browse files Browse the repository at this point in the history
  • Loading branch information
zivsha committed Jan 10, 2018
1 parent 9f77c63 commit a22b44b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wrappers/python/examples/align-depth2color.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
bg_removed = np.where((depth_image_3d > clipping_distance) | (depth_image_3d <= 0), grey_color, color_image)

# Render images
depth_colormap = cv2.applyColorMap(cv2.convertScaleAbs(depth_image, None, 0.5, 0), cv2.COLORMAP_JET)
depth_colormap = cv2.applyColorMap(cv2.convertScaleAbs(depth_image, , alpha=0.03), cv2.COLORMAP_JET)
images = np.hstack((bg_removed, depth_colormap))
cv2.namedWindow('Align Example', cv2.WINDOW_AUTOSIZE)
cv2.imshow('Align Example', images)
Expand Down
2 changes: 1 addition & 1 deletion wrappers/python/examples/opencv_viewer_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
color_image = np.asanyarray(color_frame.get_data())

# Apply colormap on depth image (image must be converted to 8-bit per pixel first)
depth_colormap = cv2.applyColorMap(cv2.convertScaleAbs(depth_image, None, 0.5, 0), cv2.COLORMAP_JET)
depth_colormap = cv2.applyColorMap(cv2.convertScaleAbs(depth_image, alpha=0.03), cv2.COLORMAP_JET)

# Stack both images horizontally
images = np.hstack((color_image, depth_colormap))
Expand Down

0 comments on commit a22b44b

Please sign in to comment.