def __init__(self, config): """ Samples valid camera poses inside replica rooms. Works as the standard camera sampler, except the following differences: - Always sets the x and y coordinate of the camera location to a value uniformly sampled inside a rooms bounding box - The configured z coordinate of the configured camera location is used as relative to the floor - All sampled camera locations need to lie straight above the room's floor to be valid - Using the scene coverage/interestingness score in the ReplicaCameraSampler does not make much sense, as the 3D mesh is not split into individual objects. """ CameraSampler.__init__(self, config)
def __init__(self, config): CameraSampler.__init__(self, config) self.cams_per_square_meter = self.config.get_float( "cams_per_square_meter", 0.5) self.max_tries_per_room = self.config.get_int("max_tries_per_room", 10000) self.min_interest_score = self.config.get_float( "min_interest_score", 0.3) self.special_objects = self.config.get_list("special_objects", []) self.special_objects_weight = self.config.get_float( "special_objects_weight", 2) self.position_ranges = [ self.config.get_list("position_range_x", []), self.config.get_list("position_range_y", []), self.config.get_list("position_range_z", [1.4, 1.4]) ]
def __init__(self, config): """ Samples multiple cameras per room. Procedure per room: - sample positions in - send ray from position straight down and make sure it hits the room's floor first - send rays through the field of view to approximate a depth map and to make sure no obstacle is too close to the camera """ CameraSampler.__init__(self, config) self.camera_height = 1.55 # out of the suncg scn2cam self.camera_height_radius = 0.05 # out of the suncg scn2cam, -0.05 - +0.05 on the camera height added self.camera_rotation_angle_x = 78.6901 # out of the suncg scn2cam self.position_ranges = [ self.config.get_list("positon_range_x", []), self.config.get_list("positon_range_y", []), self.config.get_list("positon_range_z", [self.camera_height, self.camera_height]) ] self.rotation_ranges = [ self.config.get_list( "rotation_range_x", [self.camera_rotation_angle_x, self.camera_rotation_angle_x]), self.config.get_list("rotation_range_y", [0, 0]), self.config.get_list("rotation_range_z", []) ] self.sqrt_number_of_rays = self.config.get_int("sqrt_number_of_rays", 10) self.min_dist_to_obstacle = self.config.get_float( "min_dist_to_obstacle", 1) self.cams_per_square_meter = self.config.get_float( "cams_per_square_meter", 0.5) self.max_tries_per_room = self.config.get_int("max_tries_per_room", 10000) self.number_of_successfull_tries = self.config.get_int( 'sample_amount', 25) self.bvh_tree = None
def __init__(self, config): CameraSampler.__init__(self, config) self.used_floors = []
def __init__(self, config): CameraSampler.__init__(self, config)