Ask Your Question
0

‘MARKER_CROSS’ was not declared in this scope

asked 2019-07-08 07:42:18 -0500

sonicmaster gravatar image

updated 2019-07-09 21:44:00 -0500

supra56 gravatar image

I was trying to add a cross on my screen, I even included all the necessary headers but no use. I'm using opencv 2.4.9 version with opencv on ubuntu 14.04

please help me out!!!!

this is my code...:

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

using namespace cv;
using namespace std;


int main()
 {
      VideoCapture cap(0);

      while(true)
      {

    Mat frame;
    // Capture frame-by-frame
    //cap >> frame;

    // If the frame is empty, break immediately
    //if (frame.empty())
      //break;

      drawMarker(frame, Point(200,200),  Scalar(0, 0, 255), MARKER_CROSS, 20, 1, 8);
      imshow(" figure ",frame);

      char c=(char)waitKey(25);
         if(c==27)
          break;

          }

           cap.release();
        destroyAllWindows();

      return 0;
     }
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-07-08 07:48:15 -0500

berak gravatar image

updated 2019-07-08 07:48:50 -0500

I'm using opencv 2.4.9

please do not try with such an outdated, and no more maintained version.

any more recent release will have it

edit flag offensive delete link more

Comments

1

Does ubuntu14.04 support all new opencv versions??

sonicmaster gravatar imagesonicmaster ( 2019-07-08 08:04:25 -0500 )edit
1

yes. but you'll have to build it from github src. opencv does not maintain any prebuilt packages.

berak gravatar imageberak ( 2019-07-08 08:06:44 -0500 )edit

ok thank u i will try it

sonicmaster gravatar imagesonicmaster ( 2019-07-08 23:33:27 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-08 07:42:18 -0500

Seen: 25 times

Last updated: Jul 09