CMake Error. how can I solve.

asked 2016-08-20 06:49:51 -0500

ramasamy-rudram gravatar image

updated 2016-08-20 06:50:21 -0500

CMake Warning (dev) in C:/OpenCV2.2/OpenCVConfig.cmake: Syntax Warning in cmake code at

C:/OpenCV2.2/OpenCVConfig.cmake:87:40

Argument not separated from preceding token by whitespace. Call Stack (most recent call first): CMakeLists.txt:45 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

edit retag flag offensive close merge delete

Comments

step1: please get a recent opencv version. throw away opencv2.2, it's useless.

berak gravatar imageberak ( 2016-08-20 06:58:48 -0500 )edit

I used OpenCV2.4.13 and I got OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)size.p[0] && (unsigned)(i1DataType<_Tp>::channels) < (unsigned)(size.p[1]channels()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3) - 1))*4) & 15) == elemSize1()) in cv::Mat::at, file D:\Ram\Software\OpenCV2.4.13\opencv\build\include\opencv2/core/mat.hpp, line 538

while trying to compile the below piece of code.

myfile << shape.part(i); //std::string num = std::to_string(shape.part(i)); for (int i = 0; i < 68; i++) { myfile << shape.part(i); /fwrite(num, 40, 1, fp);/

            }

How can I solve it

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-20 07:01:56 -0500 )edit

that is an error in your program, and not in the opencv libs.

also, please put that into your other question. (but i doubt, that the code you show is related to the error)

berak gravatar imageberak ( 2016-08-20 07:05:08 -0500 )edit

I have this code following the above,

CvPoint P1; P1.x = 200; P1.y = 417;

        cv::Mat image;
        image.at<cv::Vec3b>(P1.y, P1.x);

        image.at<cv::Vec3b>(P1.y, P1.x)[0] = 140;
        image.at<cv::Vec3b>(P1.y, P1.x)[1] = 160;
        image.at<cv::Vec3b>(P1.y, P1.x)[2] = 160;
ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-20 07:18:25 -0500 )edit

The following isn't related to OpenCV though, Now it's throwing while compiling D:\Ram\Projects\DLib19\dlib-19.0\examples\face_landmark_detection_exram.cpp(109): error C2872: 'rectangle' : ambiguous symbol [D:\Ram\Projects\DLib19\dlib-19.0\examples\build\face_landmark_detection_exram.vcxproj] could be 'rectangle' or 'd:\ram\software\dlib\dlib-19.0\dlib\geometry/rectangle.h(20) : dlib::rectangle' D:\Ram\Projects\DLib19\dlib-19.0\examples\face_landmark_detection_exram.cpp(109): error C2923: 'std::vector' : 'cv::rec tangle' is not a valid template type argument for parameter '_Ty' [D:\Ram\Projects\DLib19\dlib-19.0\examples\build\face _landmark_detection_exram.vcxproj]

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-20 08:08:23 -0500 )edit

please stop throwing tons of (unrelated) code at comments, that's not how it works here.

and again, -- this is opencv, not dlib. (please finally understand this..)

berak gravatar imageberak ( 2016-08-20 09:00:59 -0500 )edit

I'm really sorry about it.Since I felt I could get some kinda help here also, I'm asking in this forum. I will make sure not to overload with DLib questions.

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-20 09:19:11 -0500 )edit
berak gravatar imageberak ( 2016-08-20 09:40:42 -0500 )edit

This is throwing about 20 errors. Including error C4430: missing type specifier - int assumed.

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-20 10:05:26 -0500 )edit