爱雨天 2021-11-27 16:44 采纳率: 87.5%
浏览 85
已结题

Enabled backends是什么原因,怎么解决

img


#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>


using namespace cv;
using namespace std;

double alpha,bele;
//分离图像通道
vector<Mat> channels;


Mat frame;
Mat frame2;
Mat frame3;





void text(int, void*)
{
    alpha = 0;
    bele = 1.0;

    split(frame, channels);
    if (1)
        frame2 = channels.at(2) - channels.at(0);
    else
        frame2= channels.at(0) - channels.at(2);


    threshold(frame2,frame3,127,255,THRESH_BINARY);
    Mat element = getStructuringElement(MORPH_ELLIPSE,Size(3,3));

    dilate(frame3,frame3,element);

    vector<vector<Point>> lightContours;

    findContours(frame, lightContours, RETR_EXTERNAL, CHAIN_APPROX_SIMPLE);



    imshow("frame",frame );
}

int main(int, void*)
{
    VideoCapture capture("D:/1/1.avi");

   
    while (1)
    {
        
        capture >> frame;
        int i = 0;
        int max = 1;


        

  
            //imshow("red", channels.at(2));
           // imshow("green", channels.at(1));
            //imshow("blue", channels.at(0));

            
         

            Mat  midImage1 = channels.at(0) - channels.at(2);
            threshold(midImage1, midImage1, 100, 255, THRESH_BINARY);
            imshow("origina222", midImage1);


            namedWindow("测试窗口", WINDOW_NORMAL);
            //创建滑动条
            createTrackbar("数字:", "测试窗口:", &i, max, text);
            text(i, 0);



            if (waitKey(30) >= 0)
                break;

    }
    return 0;
}

  • 写回答

1条回答 默认 最新

  • 「已注销」 2021-11-28 15:54
    关注

    Enabled backends不知道具体什么问题啊

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月9日
  • 已采纳回答 12月1日
  • 创建了问题 11月27日

悬赏问题

  • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
  • ¥15 NX MCD仿真与博途通讯不了啥情况
  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改