Incorrect camera intrinsics (projection params) for rgb camera
Closed this issue · 2 comments
When accessing the camera projection params and retrieving intrinsics, the rgb camera params are not properly resized. In the following code
import pyark
reader = pyark.datatools.sensors.RecordFileReader()
reader.openFile('example_annotation.vrs')
deviceModel = pyark.datatools.sensors.DeviceModel.fromJson(pyark.datatools.sensors.getCalibrationFromVrsFile(reader))
projection_params = deviceModel.getCameraCalib('camera-rgb').projectionModel.projection_params
The fx (fy), cx, and cy parameters are not properly aligned with the image height width. It seems like the original image resolution was 2880 x 2880 but the image size retrieved using CameraPlayer.getConfigRecord
gives a resolution of 1408 x 1408. For some reason it seems like the following line of function did not run.
https://github.com/facebookresearch/Aria_data_tools/blob/main/src/sensors/models/DeviceModel.cpp#L530
@jonathanzhang99 You have correctly followed the steps in the documentation. The issue is that there is an extra step of scaling and cropping camera calibration which the documentation you have followed doesn’t reflect. The better way of loading device model without worrying about this detail is to use AriaVrsDataProvider
class to open a VRS file and load the calibration sensor data. AriaVrsDataProvider::loadDeviceModel
internally calls tryCropAndScaleRgbCameraCalibration
that will crop and scale RGB calibration.
Project Aria device calibration documentation you have followed will be modified as described above shortly. Meanwhile you can skip just that section and follow the "Load the device model" documentation to proceed with the rest of that documentation page. Thanks for the feedback!
thank you !! this is helpful