r/computervision • u/AthleteIll4964 • 26d ago
Help: Project Integrating Imatest IT SDK with OpenCV for Distortion Correction: Math/Coefficient Hand-off Question
Hi everyone,
I am building an automated calibration and real-time distortion correction pipeline. I am using the Imatest IT SDK/API (no GUI/Master) to detect/analyze lens distortion from calibration targets, and I want to pass those results directly to OpenCV (cv2.initUndistortRectifyMap + cv2.remap) to render the corrected frames in real time.
I know OpenCV uses inverse mapping for rendering to avoid holes/artifacts, while Imatest uses forward mapping equations (Brown-Conrady model) to model the physical lens distortion during optimization.
My questions regarding the API hand-off are:
- Coefficient Alignment: Since Imatest calculates forward coefficients (k₁, k₂, k₃, p₁, p₂), can I pass these directly into OpenCV's distortion vector D? Does OpenCV expect the forward coefficients and then handle the mathematical inversion internally during initUndistortRectifyMap?
- Normalization & Scale: Are there specific configuration flags I need to pass to the Imatest IT SDK (via .ini or JSON config) to ensure its output units/normalization (camera matrix K and distortion D) match OpenCV’s focal-length-relative coordinate scaling 1:1?
- Best Practices: If anyone has done this specific Imatest IT SDK → OpenCV pipeline automation before, are there any hidden gotchas (like sign conventions or coordinate system flips) I should watch out for in the JSON/XML API payload?
Thanks in advance for the help!!
