https://mynt-eye-s-sdk.readthedocs.io/zh_CN/latest/src/sdk/install_ubuntu_src.html
提前安装好了opencv4.5 ,没有执行官网opencv安装版本
opencv默认支持3.4.3 4.0以上有问题。
https://zhuanlan.zhihu.com/p/260648124
获取相机参数
https://mynt-eye-s-sdk.readthedocs.io/zh_CN/latest/src/sdk/data/get_img_params.html
I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 5.15.0-57-generic version 5.15.0 Device descriptors: name: MYNT-EYE-D1000 serial_number: 2038375335485017002A0053 firmware_version: 1.1 hardware_version: 2.0 spec_version: 1.0 lens_type: 0000 imu_type: 0000 nominal_baseline: 120 -------------------------------------------------------------------------------- Index | Device Information -------------------------------------------------------------------------------- 0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B01-B0135P-BL60U-016-003-EnDepthPostProcess-ISO_Plugout2M, serial_number: 2038375335485017002A0053 -------------------------------------------------------------------------------- Auto select a device to open, index: 0 -------------------------------------------------------------------------------- Index | Color Stream Information -------------------------------------------------------------------------------- 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV 1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV 2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV 3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV 4 | index: 4, width: 640, height: 480, format: STREAM_YUYV 5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG 6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG 7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG -------------------------------------------------------------------------------- Index | Depth Stream Information -------------------------------------------------------------------------------- 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV 1 | index: 1, width: 640, height: 480, format: STREAM_YUYV -------------------------------------------------------------------------------- Open device: index = 0, name =/dev/video0, type = 2, pid = 288, vid = 7758, fw_version = SICI-B01-B0135P-BL60U-016-003-EnDepthPostProcess-ISO_Plugout2M, sn = 2038375335485017002A0053
获取相机内参
I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 5.15.0-57-generic version 5.15.0 Device descriptors: name: MYNT-EYE-D1000 serial_number: 2038375335485017002A0053 firmware_version: 1.1 hardware_version: 2.0 spec_version: 1.0 lens_type: 0000 imu_type: 0000 nominal_baseline: 120 -------------------------------------------------------------------------------- Index | Device Information -------------------------------------------------------------------------------- 0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B01-B0135P-BL60U-016-003-EnDepthPostProcess-ISO_Plugout2M, serial_number: 2038375335485017002A0053 -------------------------------------------------------------------------------- Auto select a device to open, index: 0 -------------------------------------------------------------------------------- Index | Color Stream Information -------------------------------------------------------------------------------- 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV 1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV 2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV 3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV 4 | index: 4, width: 640, height: 480, format: STREAM_YUYV 5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG 6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG 7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG -------------------------------------------------------------------------------- Index | Depth Stream Information -------------------------------------------------------------------------------- 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV 1 | index: 1, width: 640, height: 480, format: STREAM_YUYV -------------------------------------------------------------------------------- Open device: 0, /dev/video0 I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 5.15.0-57-generic version 5.15.0 D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled -- Framerate: 10 D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV -- Depth Stream: 1280x720 YUYV D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0 -- IR intensity: 0 D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10 D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10 Open device success VGA Intrinsics left: {width: [640], height: [480], fx: [349.59170532226562500], fy: [349.49414062500000000], cx: [326.53961181640625000], cy: [240.40493774414062500], coeffs: [-0.28721237182617188, 0.07200241088867188, 0.00011825561523438, 0.00017929077148438, 0.00000000000000000], p: [349.19995117187500000, 0.00000000000000000, 330.08923339843750000, 0.00000000000000000, 0.00000000000000000, 349.19995117187500000, 237.28100585937500000, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00000000000000000, 0.00000000000000000], r: [0.99999248981475830, 0.00368022918701172, 0.00117945671081543, -0.00367796421051025, 0.99999141693115234, -0.00188422203063965, -0.00118649005889893, 0.00187981128692627, 0.99999749660491943]} VGA Intrinsics right: {width: [640], height: [480], fx: [348.74938964843750000], fy: [348.96490478515625000], cx: [339.29870605468750000], cy: [233.68577575683593750], coeffs: [-0.27040863037109375, 0.05755615234375000, -0.00054931640625000, -0.00159454345703125, 0.00000000000000000], p: [349.19995117187500000, 0.00000000000000000, 330.08923339843750000, -36787.46484375000000000, 0.00000000000000000, 349.19995117187500000, 237.28100585937500000, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00000000000000000, 0.00000000000000000], r: [0.99997079372406006, 0.00163900852203369, -0.00745952129364014, -0.00162494182586670, 0.99999678134918213, 0.00188815593719482, 0.00746262073516846, -0.00187587738037109, 0.99997031688690186]} VGA Extrinsics left to right: {rotation: [0.99996042251586914, 0.00206911563873291, 0.00864517688751221, -0.00203669071197510, 0.99999082088470459, -0.00375831127166748, -0.00865292549133301, 0.00374054908752441, 0.99995553493499756], translation: [-120.68329620361328125, 0.00000000000000000, 0.00000000000000000]} HD Intrinsics left: {width: [1280], height: [720], fx: [660.97204589843750000], fy: [660.83355712890625000], cx: [658.22747802734375000], cy: [359.27322387695312500], coeffs: [-0.26206970214843750, 0.06326675415039062, 0.00044250488281250, -0.00125885009765625, 0.00000000000000000], p: [698.40002441406250000, 0.00000000000000000, 650.59252929687500000, 0.00000000000000000, 0.00000000000000000, 698.40002441406250000, 359.90551757812500000, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00000000000000000, 0.00000000000000000], r: [0.99989712238311768, 0.00130283832550049, 0.01428377628326416, -0.00130116939544678, 0.99999904632568359, -0.00012624263763428, -0.01428401470184326, 0.00010764598846436, 0.99989795684814453]} HD Intrinsics right: {width: [1280], height: [720], fx: [655.00463867187500000], fy: [656.09667968750000000], cx: [679.02935791015625000], cy: [358.59570312500000000], coeffs: [-0.23860549926757812, 0.04351425170898438, 0.00036621093750000, -0.00272750854492188, 0.00000000000000000], p: [698.40002441406250000, 0.00000000000000000, 650.59252929687500000, -73080.18750000000000000, 0.00000000000000000, 698.40002441406250000, 359.90551757812500000, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00000000000000000, 0.00000000000000000], r: [0.99999904632568359, -0.00111353397369385, -0.00074267387390137, 0.00111365318298340, 0.99999928474426270, 0.00011646747589111, 0.00074255466461182, -0.00011730194091797, 0.99999964237213135]} HD Extrinsics left to right: {rotation: [0.99988412857055664, 0.00241661071777344, 0.01502621173858643, -0.00241291522979736, 0.99999701976776123, -0.00025951862335205, -0.01502680778503418, 0.00022315979003906, 0.99988698959350586], translation: [-120.61023712158203125, 0.00000000000000000, 0.00000000000000000]} If you cant't have a clear understanding of the info,you can read the ROS-doc (http://docs.ros.org/melodic/api/sensor_msgs/html/msg/CameraInfo.html) to learn more. Image params saved to image_params.params in current folder.
获取IMU数据
I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 5.15.0-57-generic version 5.15.0 Device descriptors: name: MYNT-EYE-D1000 serial_number: 2038375335485017002A0053 firmware_version: 1.1 hardware_version: 2.0 spec_version: 1.0 lens_type: 0000 imu_type: 0000 nominal_baseline: 120 -------------------------------------------------------------------------------- Index | Device Information -------------------------------------------------------------------------------- 0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B01-B0135P-BL60U-016-003-EnDepthPostProcess-ISO_Plugout2M, serial_number: 2038375335485017002A0053 -------------------------------------------------------------------------------- Auto select a device to open, index: 0 -------------------------------------------------------------------------------- Index | Color Stream Information -------------------------------------------------------------------------------- 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV 1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV 2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV 3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV 4 | index: 4, width: 640, height: 480, format: STREAM_YUYV 5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG 6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG 7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG -------------------------------------------------------------------------------- Index | Depth Stream Information -------------------------------------------------------------------------------- 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV 1 | index: 1, width: 640, height: 480, format: STREAM_YUYV -------------------------------------------------------------------------------- Open device: 0, /dev/video0 I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 5.15.0-57-generic version 5.15.0 D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled -- Framerate: 10 D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV -- Depth Stream: 1280x720 YUYV D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0 -- IR intensity: 0 D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10 D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10 Open device success Motion Intrinsics: {accel: {scale: [1.00317999725240359, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00861000000000001, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00470999999999999], assembly: [1.00000000000000000, 0.00085884600000000, -0.00202021000000000, 0.00000000000000000, 1.00000000000000000, -0.00080973100000000, -0.00000000000000000, 0.00000000000000000, 1.00000000000000000], drift: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], noise: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], bias: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], x: [-0.01131940000000000, 0.00000000000000000], y: [0.01742160000000000, 0.00000000000000000], z: [0.00241730000000000, 0.00000000000000000]}, gyro: {scale: [1.00019999999999998, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.01283999999999996, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00022999999999995], assembly: [1.00000000000000000, -0.00346967000000000, 0.00034115400000000, 0.00040295900000000, 1.00000000000000000, 0.00121646000000000, -0.00095181100000000, 0.00156171000000000, 1.00000000000000000], drift: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], noise: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], bias: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], x: [0.12286872000000000, 0.00000000000000000], y: [0.02694554900000000, 0.00000000000000000], z: [-0.02692005500000000, 0.00000000000000000]}} Motion Extrinsics left to imu: {rotation: [0.99996651999999997, 0.00430873000000000, 0.00695718000000000, 0.00434878000000000, -0.99997400999999997, -0.00575128000000000, 0.00693222000000000, 0.00578135000000000, -0.99995926000000002], translation: [-47.77362000000000108, -2.23730999999999991, -1.60071000000000008]} Imu params saved to imu_params.params in current folder.