DebugObservation class
Observation wrapper to provide a simple interface for managing debug observations and caching the image.
NOTE: PIL.Image.Image.size is (width, height) while VisualSensor.resolution is (height, width)
Methods
- def create_image(self) -> None
- Creates a PIL Image from the ndarray which can then be shown/saved or otherwise processed.
- def get_image(self) -> PIL.Image.Image
- Retrieve the PIL Image.
- def save(self, output_path: str, prefix: str = '') -> str
- Save the Image as png to a given location.
- def show(self) -> None
- Display the image via PIL.
- def show_point(self, p_2d: numpy.ndarray) -> None
- Show the image with a 2D point marked on it as a blue circle.
Special methods
- def __init__(self, obs_data: numpy.ndarray) -> None
Method documentation
def habitat. sims. habitat_simulator. debug_visualizer. DebugObservation. save(self,
output_path: str,
prefix: str = '') -> str
Save the Image as png to a given location.
| Parameters | |
|---|---|
| output_path | Directory path for saving the image. |
| prefix | Optional prefix for output filename. Filename format: <prefix>month_day_year_hourminutesecondmicrosecond.png |
| Returns | file path of the saved image. |
def habitat. sims. habitat_simulator. debug_visualizer. DebugObservation. show_point(self,
p_2d: numpy.ndarray) -> None
Show the image with a 2D point marked on it as a blue circle.
| Parameters | |
|---|---|
| p_2d | The 2D pixel point in the image. |
def habitat. sims. habitat_simulator. debug_visualizer. DebugObservation. __init__(self,
obs_data: numpy.ndarray) -> None
| Parameters | |
|---|---|
| obs_data | The visual sensor observation output matrix. E.g. from sensor.get_observation() |