Exemplo n.º 1
0
pxcoords = [item[1][1] for item in lines]
xyzcoords = [item[0][1] for item in lines]

# Print start frame map, used for Design 4 artifact creation
Utilities.plotLineXYZ(xyzcoords[0],
                      cam.getDEM(),
                      show=False,
                      save=destination + 'Tracked_xyz_' + start_frame_name)

# Write line coordinates to txt file
# FileHandler.writeLineCoords(pxcoords, xyzcoords, imn,
#                             destination + 'TESTuvcoord.txt',
#                             destination + 'TESTxyzcoords.txt')

# -----------------------   Create Contour From Line   -------------------------
line = Contours.line_from_coords(pxcoords)
cameraMatrix = cam.getCamMatrixCV2()
distortP = cam.getDistortCoeffsCV2()

current_imgset = terminus._imageSet
image = current_imgset[0].getImageCorr(cameraMatrix, distortP)

# -----------------------   Set Snake Parameters   -------------------------
ends = 'free'
alpha = 0.01  # Lower than 1 is ideal
beta = 0.5  # Lower than 1 is ideal
w_line = -10  # Must be negative
w_edge = 20  # Must be positive
gamma = 0.01  # Time Stepping, no reason to change
convergence = 0.01  # Lower than 1 is ideal