mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
odometry python sample got rid of scale parameter
This commit is contained in:
parent
770c0d1416
commit
4e1ce3e0eb
@ -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…
Reference in New Issue
Block a user