def create_default_scan_dataset(unique_id = DATASET_ID, z_above_floor=1.32): dataset = scan_dataset() dataset.table_plane_translation = np.matrix([0,0,0]).T # approximate height of hokuyo above the ground, assume it to be fixed for now. dataset.ground_plane_translation = np.matrix([0,0,z_above_floor]).T dataset.ground_plane_rotation = '' #expects a 3x3 numpy matrix #pc.scan_dataset.is_test_set = True dataset.is_labeled = IS_LABELED dataset.id = unique_id return dataset
def slot_import_image(self): fileName = QtGui.QFileDialog.getOpenFileName(self,"Open Image", self.path, "Image Files (*.png)") print "Import image into new dataset:" + fileName name = ut.formatted_time() new_dataset = scan_dataset.scan_dataset() new_dataset.id = name new_dataset.image_filename = 'data/'+name+'_image.png' shutil.copy(fileName,self.path+'/'+new_dataset.image_filename) self.scans_database.add_dataset(new_dataset) #proceed to new dataset: while True == self.slot_next_dataset(): pass
def slot_import_image(self): fileName = QtGui.QFileDialog.getOpenFileName(self, "Open Image", self.path, "Image Files (*.png)") print "Import image into new dataset:" + fileName name = ut.formatted_time() new_dataset = scan_dataset.scan_dataset() new_dataset.id = name new_dataset.image_filename = 'data/' + name + '_image.png' shutil.copy(fileName, self.path + '/' + new_dataset.image_filename) self.scans_database.add_dataset(new_dataset) #proceed to new dataset: while True == self.slot_next_dataset(): pass