Skip to content

Commit

Permalink
Invert 32F depth images so that closer is lighter and farther is darker
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jeronimo <[email protected]>
  • Loading branch information
Michael Jeronimo committed Oct 28, 2020
1 parent fafe2ee commit 9f26c06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rqt_bag_plugins/src/rqt_bag_plugins/image_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def imgmsg_to_pil(img_msg, rgba=True):
if pil_img.mode == 'F':
pil_img = pil_img.point(lambda i: i * (1. / 256.)).convert('L')
pil_img = ImageOps.autocontrast(pil_img)
pil_img = ImageOps.invert(pil_img)

if rgba and pil_img.mode != 'RGBA':
pil_img = pil_img.convert('RGBA')
Expand Down

0 comments on commit 9f26c06

Please sign in to comment.