Esempio n. 1
0
    def __configure_unlabelled_pre_processing_update(self):
        min_points_value = int(
            self.scrollAreaWidget_lidar_unlabelled.findChild(
                QLineEdit, "lineEdit_uniform_k_points").text())
        if min_points_value is not unlabelled_configure.getint(
                "Parameters", "uniform_down_k_point"):
            self.unlabelled_parameter_update = True
            unlabelled_configure.set("Parameters", "uniform_down_k_point",
                                     "%s" % min_points_value)

        distance_threshold_value = float(
            self.scrollAreaWidget_lidar_unlabelled.findChild(
                QLineEdit, "lineEdit_distance_threshold").text())
        if distance_threshold_value is not unlabelled_configure.getfloat(
                "Parameters", "distance_threshold"):
            self.unlabelled_parameter_update = True
            unlabelled_configure.set("Parameters", "distance_threshold",
                                     "%s" % distance_threshold_value)

        ground_threshold_value = float(
            self.scrollAreaWidget_lidar_unlabelled.findChild(
                QLineEdit, "lineEdit_ground_diff").text())
        if ground_threshold_value is not unlabelled_configure.getfloat(
                "Parameters", "ground_threshold"):
            self.unlabelled_parameter_update = True
            unlabelled_configure.set("Parameters", "ground_threshold",
                                     "%s" % ground_threshold_value)
Esempio n. 2
0
 def __init__(self):
     self.uniform_down_k_point = unlabelled_configure.getint(
         "Parameters", "uniform_down_k_point")
     self.distance_threshold = unlabelled_configure.getfloat(
         "Parameters", "distance_threshold")
     self.ransac_n = unlabelled_configure.getint("Parameters", "ransac_n")
     self.num_iterations = unlabelled_configure.getint(
         "Parameters", "num_iterations")
     self.ground_threshold = unlabelled_configure.getfloat(
         "Parameters", "ground_threshold")
     self.eps = unlabelled_configure.getfloat("Parameters", "eps")
     self.min_points = unlabelled_configure.getint("Parameters",
                                                   "min_points")
     self.rgbvi_threshold = unlabelled_configure.getfloat(
         "Parameters", "rgbvi_threshold")
     self.high_vegetation = None
     self.labels = None
Esempio n. 3
0
 def __configure_unlabelled_rgbvi_update(self):
     rgbvi_threshold_value = float(
         self.scrollAreaWidget_lidar_unlabelled.findChild(
             QLineEdit, "lineEdit_rgbvi").text())
     if rgbvi_threshold_value is not unlabelled_configure.getfloat(
             "Parameters", "rgbvi_threshold"):
         unlabelled_configure.set("Parameters", "rgbvi_threshold",
                                  "%s" % rgbvi_threshold_value)
Esempio n. 4
0
    def __process_test_unlabelled_data(self):

        self.statusBar().showMessage("Processing")
        self.timer.restart()

        self.unlabelled_pipeline = SegmentationProcessor()

        self.unlabelled_pipeline.uniform_down_k_point = unlabelled_configure.getint(
            "Parameters", "uniform_down_k_point")
        self.unlabelled_pipeline.distance_threshold = unlabelled_configure.getfloat(
            "Parameters", "distance_threshold")
        self.unlabelled_pipeline.ransac_n = unlabelled_configure.getint(
            "Parameters", "ransac_n")
        self.unlabelled_pipeline.num_iterations = unlabelled_configure.getint(
            "Parameters", "num_iterations")
        self.unlabelled_pipeline.ground_threshold = unlabelled_configure.getfloat(
            "Parameters", "ground_threshold")
        self.unlabelled_pipeline.eps = unlabelled_configure.getfloat(
            "Parameters", "eps")
        self.unlabelled_pipeline.min_points = unlabelled_configure.getint(
            "Parameters", "min_points")
        self.unlabelled_pipeline.rgbvi_threshold = unlabelled_configure.getfloat(
            "Parameters", "rgbvi_threshold")

        if self.unlabelled_parameter_update:
            self.unlabelled_parameter_update = False
            self.unlabelled_pipeline.pre_process_pc()

        self.unlabelled_pipeline.process_pc()

        self.plotter.plot_path = unlabelled_configure.get(
            "Constants", "plot_html_file_path")
        self.plotter.x = self.unlabelled_pipeline.high_vegetation[:, 0]
        self.plotter.y = self.unlabelled_pipeline.high_vegetation[:, 1]
        self.plotter.display_2d_pcd(1000, save_file=True, render="png")
        self.webEngineView.reload()
        self.webEngineView.setUrl(
            QUrl("file://" + os.path.abspath(
                unlabelled_configure.get("Constants", "plot_html_file_path"))))

        self.__test_output_update(
            cluster_time=0,
            number_of_clusters=np.amax(self.unlabelled_pipeline.labels.max()),
            total_time=self.timer.elapsed(),
        )
        self.statusBar().showMessage("Done")
Esempio n. 5
0
    def __configure_unlabelled_dbscan_update(self):
        eps_value = float(
            self.scrollAreaWidget_lidar_unlabelled.findChild(
                QLineEdit, "lineEdit_eps_unlabel").text())
        if eps_value is not unlabelled_configure.getfloat("Parameters", "eps"):
            unlabelled_configure.set("Parameters", "eps", "%s" % eps_value)

        min_points_value = int(
            self.scrollAreaWidget_lidar_unlabelled.findChild(
                QLineEdit, "lineEdit_min_sample_unlabel").text())
        if min_points_value is not unlabelled_configure.getint(
                "Parameters", "min_points"):
            unlabelled_configure.set("Parameters", "min_points",
                                     "%s" % min_points_value)