Load camera parameters from calibration

I made camera calibration, I received calibration files. I want to add them to my program. I didn`t find it on the internet. How I can load camera parameters from calibration to my program?

what did you do, exactly ? in which format are those files ? which language do you use ?

I use python. I have program which detect and track object, shows position and speed it. It is in real time. I made camera calibration in second program and I have files cam_mtx.npy, dist.npy, newcam_mtx.npy and roi.npy. Can I use those files to my program?

you can use numpy.load to retrieve the data

it’s unclear, what is inside those files. but you could try to improve your measurement by undistorting the image, which would need the intrinsic cam matrix and the distortion coeffs

Inside those files is what you writed: intrinsic cam matrix, the distortion coeffs. I will try use numpy.load to retrieve the data. Thanks

here’ sample undistortion code:

I loaded files and used this code

dst = cv.undistort(img, camera_matrix, dist_coefs, None, newcameramtx)

Works as I wanted

Thanks for help!

1 Like