Why cv_kit exists¶
OpenCV has a mature Python binding in cv2. cv_kit is useful when a pipeline
needs to keep image data in C++:
- A ROS 2 subscription delivers a C++
sensor_msgs::msg::Image.cv_kitwraps itsdatabuffer as acv::Matwithout copying it. - C++
cv::ORBextracts features from that Mat. The descriptor Mat can then go to DBoW2 throughdbow_kit, still in C++. - Python controls the pipeline, while the image and descriptors stay in C++.
This avoids converting the ROS image to NumPy before using OpenCV. A CUDA-enabled
OpenCV build can also be selected through create_orb(..., use_cuda=...) without
changing the rest of the pipeline. See REPORT.md and the
vision loop-closure tutorial for details.