odometry python sample got rid of scale parameter

pull/22150/head
Rostislav Vasilikhin 3 years ago
parent 770c0d1416
commit 4e1ce3e0eb
  1. 9
      samples/python/odometry.py

@ -35,7 +35,7 @@ def main():
args = parser.parse_args()
if args.algo == "RGB_DEPTH" or args.algo == "DEPTH" or args.algo == "SCALE" or args.algo == "":
if args.algo == "RGB_DEPTH" or args.algo == "DEPTH" or args.algo == "":
source_depth_frame = cv.samples.findFile(args.source_depth_frame)
destination_depth_frame = cv.samples.findFile(args.destination_depth_frame)
depth1 = cv.imread(source_depth_frame, cv.IMREAD_ANYDEPTH).astype(np.float32)
@ -62,13 +62,6 @@ def main():
Rt = np.zeros((4, 4))
odometry.compute(depth1, rgb1, depth2, rgb2, Rt)
print("Rt:\n {}".format(Rt))
if args.algo == "SCALE" or args.algo == "":
print(args.algo)
odometry = cv.Odometry()
Rt = np.zeros((4, 4))
scale = np.zeros((1, 1))
odometry.compute(depth1, depth2*1.05, Rt, scale)
print("Rt:\n {}\nScale: {}".format(Rt, scale))
if __name__ == '__main__':

Loading…
Cancel
Save