加入红绿灯识别结果显示,方便我们查看效果 if(redCount == 0 && greenCount == 0) { cv::putText(frame, "lights out", Point(40, 150), cv::FONT_HERSHEY_SIMPLEX, 2, cv::Scalar(255, 255, 255), 8, 8, 0); }else if(redCount > greenCount) { cv::putText(frame, "red light", Point...
首先要复杂的街景中检测出红绿灯的矩形区域,将其设为ROI区域后再对局部图像进行颜色识别。