Main implementation details
This section introduces the overall processing flow and core modules of this project, and briefly explains them for further reading.
Overall code flow
Read the left and right images.
Call
StereoMatching
to generate a disparity map.Use
StixelEstimation
to extract Stixels.Use
StixelSegmentation
to cluster Stixels and generate candidate object regions.Perform visualization or subsequent analysis.
The following structure is for illustration only. For complete calling details, please refer to the special chapters of each module:
main.cpp
|---> StereoVisionForADAS
|---> StereoMatching
|---> StixelEstimation
|---> StixelSegmentation
Core module overview
StereoMatching Based on OpenCV, stereo matching and disparity map post-processing are implemented.
StereoVisionForADAS As the core management class, it encapsulates the processes of binocular camera initialization, disparity map generation and result visualization.
StixelEstimation The ground and object heights of each column are extracted through disparity information to obtain columnar pixel data.
StixelSegmentation Cluster analysis is performed on the above columnar pixels, and the bounding box of the candidate object is output.
Example call flow
The following code example shows a brief call of the main flow (for reference only):
int main() {
// Initialization and camera parameter configuration
StereoCamParam_t objParam = CStereoVisionForADAS::InitStereoParam(KITTI);
CStereoVisionForADAS objStereoVision(objParam);
// Read the image and execute the main flow
Mat imgLeft = imread("data/left/0000000000.png");
Mat imgRight = imread("data/right/0000000000.png");
objStereoVision.Objectness(imgLeft, imgRight);
objStereoVision.Display();
return 0;
}
Follow-up reading
Last updated