speed20: V通道反光剔除(高亮+低饱和像素标记为非赛道)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user