How to Detect Lanes with NXP Vision Toolbox

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to Detect Lanes with NXP Vision Toolbox

4,241 次查看
dumitru-daniel_
NXP Employee
NXP Employee

Lane Detection

The following livescript uses MATLAB functionalities to simulate the lane detection application.
Read input image.
inImgPath = 'data/lane_detection.jpg';
inImgUMat = nxpvt.imread(inImgPath);
if isempty(inImgUMat)
    fprintf('Failed to open input image: %s.', inImgPath);
    return;
end
nxpvt.imshow(inImgUMat);
pastedImage_1.png
Create resize object.
ratio = 1;
resizeObj = nxpvt.apexcv.Resize();
Apply Lanemarking algorithm to grayscale image.
laneVerticesAlgorithm = lanemarking_Algorithm(inImgUMat);
Add results on to the original image.
laneImageAlgorithm = nxpvt.cv.insertLines(inImgUMat, laneVerticesAlgorithm);
laneImageAlgorithm = Process(resizeObj, laneImageAlgorithm, ratio);
nxpvt.imshow(laneImageAlgorithm);
pastedImage_2.png
标签 (1)
0 回复数