ivapylibs / Surveillance

The surveillance system for the SuperviseIt project
0 stars 1 forks source link

Tabletop region confirmation #27

Open pv33 opened 2 years ago

pv33 commented 2 years ago

Is there code to test out the tabletop layer? I see options to visualize the hand and the puzzle, and imagine you are working towards a robot layer visualization. But what about the final tabletop layer visualization?

Shouldn't that have been done to confirm that nothing passes through? I suspect that it was not done because the system is not truly layered. Something recognized as foreground and part of the puzzle, but then later removed from the puzzle piece using bad morphological operations does not get kicked back to the background. Rather it is a puzzle region that simply does not map to any layers.

Of course, that might induce duplication code for the puzzle board processing to prevent from happening.

Please answer question about testing or debug code to visualize the final residual.

yiyeChen commented 2 years ago

Similar to the hand tracking the tabletop layer is also removed from the current rosbag runner.

This can be done easily. Inside the ImageListener, the background layer can be retrieved with the API:

bgImg = self.surv.scene_interpreter.get_layer("bg", mask_only=False, BEV_rectify=False).

Then the just show the image using the display API:

display_images_cv([bgImg[:, :, ::-1]], ratio=0.5, window_name="Background layer")

yiyeChen commented 2 years ago

As explained in the issue #28 , the visualization of the tabletop region can be done with the following line:

self.surv.scene_interpreter.vis_layer_realtime(layer_name="bg", BEV_rectify=False, \
      window_name="Background(Tabletop)", ratio=0.5)