fix bug.
This commit is contained in:
1 parent
999d18ea14
commit
243d12d089
1 file changed
+2
@@ -128,9 +128,11 @@ bool ArmorFinder::findLightBlobs(const cv::Mat &src, LightBlobs &light_blobs) {
|
|||||||
|
|
||||||
|
|
||||||
cv::threshold(color_channel, src_bin_light, 200, 255, CV_THRESH_BINARY); // 二值化对应通道
|
cv::threshold(color_channel, src_bin_light, 200, 255, CV_THRESH_BINARY); // 二值化对应通道
|
||||||
|
if(src_bin_light.empty()) return false;
|
||||||
imagePreProcess(src_bin_light); // 开闭运算
|
imagePreProcess(src_bin_light); // 开闭运算
|
||||||
|
|
||||||
cv::threshold(color_channel, src_bin_dim, 160, 255, CV_THRESH_BINARY); // 二值化对应通道
|
cv::threshold(color_channel, src_bin_dim, 160, 255, CV_THRESH_BINARY); // 二值化对应通道
|
||||||
|
if(src_bin_dim.empty()) return false;
|
||||||
imagePreProcess(src_bin_dim); // 开闭运算
|
imagePreProcess(src_bin_dim); // 开闭运算
|
||||||
|
|
||||||
if(src_bin_light.size() == cv::Size(640, 480) && show_light_blobs) {
|
if(src_bin_light.size() == cv::Size(640, 480) && show_light_blobs) {
|
||||||
|
|||||||
Reference in new issue
Block a user