Ejemplo n.º 1
0
    def op_1(self):

        self.__op_begin()

        try:

            (child, queue) = sfire.gen_samples(
                sat_first_dname=str(self.__ui.high_1.text().toUtf8()),
                sat_second_dname=str(self.__ui.low_1.text().toUtf8()),
                shp_aoi_fname=str(self.__ui.aoi_1.text().toUtf8()),
                shp_forest_fname=str(self.__ui.forest_1.text().toUtf8()),
                out_fname=[
                    str(self.__ui.c1_1.text().toUtf8()),
                    str(self.__ui.c2_1.text().toUtf8()),
                    str(self.__ui.c3_1.text().toUtf8()),
                ],
            )

            self.__wait(child, queue)

        except:

            self.__message("Fail")

        self.__op_end()
Ejemplo n.º 2
0
	# Работа
	data_prefix = "/home/amv/trash/sda4/data/satellite/Landsat/TM/Мещера/"

else:

	# Дом
	data_prefix = "/home/amv/RGRTU/evm/data/satellite/Landsat/TM/Мещера/"

############################################################################

if argv[1] == "1":

	# Формирование обучающей выборки векторов (обучающего набора пикселей)

	(child, queue) = sfire.gen_samples(sat_first_dname = data_prefix + "/LT51760222007167MOR00/", sat_second_dname = data_prefix + "/LT51760222011210MOR00/",
						shp_aoi_fname = out_prefix + "/aoi/aoi.shp", shp_forest_fname = out_prefix + "/forest/forest.shp",
						out_fname = [ out_prefix + "/teach_0.bin", out_prefix + "/teach_1.bin", out_prefix + "/teach_2.bin" ])

elif argv[1] == "2":

	# Обучение машин опорных векторов

	(child, queue) = sfire.teach(in_fname = [ out_prefix + "/teach_0.bin", out_prefix + "/teach_1.bin", out_prefix + "/teach_2.bin" ],
						out_fname = [ out_prefix + "/svm_012.svm", out_prefix + "/svm_01.svm" ])

elif argv[1] == "3":

	# Обработка спутниковых снимков

	sat = "LT51760222006244MOR00" # 01.09.2006 - LandSat 5
#	sat = "LT51760222007167MOR00" # 16.06.2007 - LandSat 5