What happens to exception when C + + uses similar OpenCV encapsulation libraries?

Source: Internet
Author: User

Previously written code exception is F10 look at the variable to find the error. Now with the OpenCV library, the exception information is too limited, do not know how to deal with, tried a lot of programs are abnormal interruption.

For example, this piece of code is wrong?

Include <iostream>include <opencv2/opencv.hpp>

using namespace CV;
using namespace Std;

void Meanstddev_test ()
{

Constchar* imagename ="Boy";Generate grayscale graph Mat img = imread (imagename); Mat Gray, Color;cvtcolor (img, Gray, Cv_rgb2gray);cout <<"Channel:" << gray.channels () <<ENDL; Mat Tmp_m, TMP_SD; double m = 0, SD = 0;m = Mean (gray) [ Span class= "Hljs-number" >0]; cout <<  "Mean:" << m < < endl;meanstddev (Gray, Tmp_m, tmp_sd); m = Tmp_m.at< Double> (0, 0); sd = tmp_sd.at< double> (0, 0); cout << " Mean: "www.rcsx.org  << m << ENDL;   

}

int main () {

meanStdDev_test();waitKey();

}


Find c:/build/below ... No such path?

What happens to exception when C + + uses similar OpenCV encapsulation libraries?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.