speed20: V通道反光剔除(高亮+低饱和像素标记为非赛道)

This commit is contained in:
spdis
2026-07-06 18:35:46 +08:00
parent a43ff769d4
commit b69a5ff5bc
+6
View File
@@ -76,6 +76,12 @@ cv::Mat image_binerize(cv::Mat &frame)
cv::bitwise_or(output, binarizedFrame, output);
// V 通道反光剔除: 高亮度(V>180) 且 低饱和度(S<40) → 白反光,标记为非赛道
cv::Mat hi_v, lo_s;
cv::threshold(hsvChannels[2], hi_v, 180, 255, cv::THRESH_BINARY);
cv::threshold(hsvChannels[1], lo_s, 40, 255, cv::THRESH_BINARY_INV);
output.setTo(0, hi_v & lo_s);
return output;
}