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);
fprintf('Failed to open input image: %s.', inImgPath);
Create resize object.
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);