ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Understanding visibility reasoning in CRAM

asked 2019-04-20 13:01:14 -0500

mgao gravatar image

I am trying to understand how visual perception of CRAM works. Following the tutorial about simple plans, I found this file where the actual perception seems to take place. In calculate-object-visibility, the comment states the following:

  ;; This method works by creating three rendered images. First it
  ;; renderes the object centered in the camera. Then it renders the
  ;; object with the correct camera. And finally it renders the
  ;; complete scene with each object in a different color. Everything
  ;; is rendered without lighting. To calculate the visibility ratio,
  ;; the ratio of visible pixels of `object' in the complete scene to
  ;; pixels that belong to the object (by using the first image) is
  ;; calculated. To calculate which objects are occluding `object',
  ;; image 2 is used. All pixels that are set there and don't belong
  ;; to `object' in image 3 are occluding pixels and hence the
  ;; corresponding object is occluding `object.

And have a bit of trouble understanding this procedure. I have rendered the images: "obj-total" in code / Image 1 "obj-only" in code / Image 2 "scene" in code / Image 3

After going through the code, my guess is that

  1. obj-total is an image with the object centered, so what the object would look like if it was in the center of the FOV. It acts as "base level" for the object's visibility

  2. scene is used to see what the robot can actually see, rather than a hypothetical "full view" on the object. The object-colored pixels are counted as the visible pixels

  3. the differences between obj-only and scene that are non-black pixels are occluding objects and their color is saved and mapped back to the objects.

Am I correct? And if so, what is the advantage of using the obj-total over just using the robot's view as base? I found this image from a different perspective rather confusing and I am still not sure if I understood it correctly, so any help is much appreciated!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-04-23 04:47:54 -0500

gaya gravatar image


The object centered view is generated for the cases when the object is completely not in camera view or only a part of it is visible. That is, the object is not occluded by other object but the robot is not looking at the object at all, it's not in the view. In that case the number of visible pixels of the object will be 0. Please refer to chapter "3.1.2 Visibility Computation" on page 126 (142) of @Lorenz's thesis for in detail explanations:

edit flag offensive delete link more

Question Tools


Asked: 2019-04-20 13:01:14 -0500

Seen: 92 times

Last updated: Apr 23 '19