Beispiel #1
0
#is not specified, it will be manually defined
lakes.setColourrange(maxcol, mincol)

#Set mask and image with maximum area of interest
lakes.setMax(camamask, maxim)

#Set px plotting extent for easier colourrange definition and area verification
lakes.setPXExt(pxext[0], pxext[1], pxext[2], pxext[3])

#Set polygon threshold (i.e. number of polygons kept)
lakes.setThreshold(threshold)

#-------------------------   Calculate areas   --------------------------------

#Calculate real areas
areas = lakes.calcAutoAreas(colour, verify)

##Import data from file
#areas = lakes.importData(destination)

#----------------------------   Export data   ---------------------------------

#Get area data for writing to files
xyzareas = [item[0][0] for item in areas]  #XYZ areas
xyzpts = [item[0][1] for item in areas]  #XYZ coords
uvareas = [item[1][0] for item in areas]  #UV areas
uvpts = [item[1][1] for item in areas]  #UV coords

#Get camera and dem information for writing to files
matrix, tancorr, radcorr = cameraenvironment.getCalibdata()  #CV2 calib
imn = lakes.getImageNames()  #Img names