openalpr / imageclipper

Based on https://code.google.com/p/imageclipper/ with enhancements
MIT License
10 stars 7 forks source link

Compile Error Mac OS Big Sur 11.1 #8

Open DaemonChoejur opened 3 years ago

DaemonChoejur commented 3 years ago
(alpr) Daemon-Hunter:imageclipper choejur$ make
Scanning dependencies of target imageclipper
[ 50%] Building CXX object CMakeFiles/imageclipper.dir/src/imageclipper.cpp.o
In file included from /Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:47:
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/cvdrawwatershed.h:72:5: error: no matching function for call to 'cvRectangle'
    cvRectangle( clone, cvPoint( rect.x, rect.y ), cvPoint( rect.x + rect.width, rect.y + rect.height ), CV_RGB(255, 255, 0), 1 );
    ^~~~~~~~~~~
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/imgproc/imgproc_c.h:1001:14: note: candidate function not viable: no known conversion from
      'cv::Scalar' (aka 'Scalar_<double>') to 'CvScalar' for 4th argument
CVAPI(void)  cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2,
             ^
In file included from /Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:49:
In file included from /Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:33:
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvcreateaffine.h:62:5: error: use of undeclared identifier '__BEGIN__'
    __BEGIN__;
    ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvcreateaffine.h:96:5: error: use of undeclared identifier '__END__'
    __END__;
    ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvcreateaffine.h:63:5: error: use of undeclared label 'exit'
    CV_ASSERT( rect.width > 0 && rect.height > 0 );
    ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2745:9: note: expanded from macro 'CV_ASSERT'
        CV_ERROR( CV_StsInternal, "Assertion: " #Condition " failed" ); \
        ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2714:5: note: expanded from macro 'CV_ERROR'
    __CV_EXIT__;                                                   \
    ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2750:33: note: expanded from macro '__CV_EXIT__'
#define __CV_EXIT__        goto exit
                                ^
In file included from /Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:49:
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:39:39: error: no viable conversion from 'cv::Scalar'
      (aka 'Scalar_<double>') to 'CvScalar'
                             CvScalar color = CV_RGB(255, 255, 255), 
                                      ^       ~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/types_c.h:1378:16: note: candidate constructor (the implicit copy constructor) not viable:
      no known conversion from 'cv::Scalar' (aka 'Scalar_<double>') to 'const CvScalar &' for 1st argument
typedef struct CvScalar
               ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/matx.hpp:173:27: note: candidate template ignored: could not match
      'Matx<type-parameter-0-0, 4, 1>' against 'CvScalar'
    template<typename T2> operator Matx<T2, m, n>() const;
                          ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/matx.hpp:395:27: note: candidate template ignored: could not match
      'Vec<type-parameter-0-0, 4>' against 'CvScalar'
    template<typename T2> operator Vec<T2, cn>() const;
                          ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/types.hpp:645:27: note: candidate template ignored: could not match
      'Scalar_<type-parameter-0-0>' against 'CvScalar'
    template<typename T2> operator Scalar_<T2>() const;
                          ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:39:39: note: passing argument to parameter 'color' here
                             CvScalar color = CV_RGB(255, 255, 255), 
                                      ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:39:39: error: missing default argument on parameter 'color'
                             CvScalar color = CV_RGB(255, 255, 255), 
                                      ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:46:47: error: no viable conversion from 'cv::Scalar'
      (aka 'Scalar_<double>') to 'CvScalar'
                                     CvScalar color = CV_RGB(255, 255, 0), 
                                              ^       ~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/types_c.h:1378:16: note: candidate constructor (the implicit copy constructor) not viable:
      no known conversion from 'cv::Scalar' (aka 'Scalar_<double>') to 'const CvScalar &' for 1st argument
typedef struct CvScalar
               ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/matx.hpp:173:27: note: candidate template ignored: could not match
      'Matx<type-parameter-0-0, 4, 1>' against 'CvScalar'
    template<typename T2> operator Matx<T2, m, n>() const;
                          ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/matx.hpp:395:27: note: candidate template ignored: could not match
      'Vec<type-parameter-0-0, 4>' against 'CvScalar'
    template<typename T2> operator Vec<T2, cn>() const;
                          ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/types.hpp:645:27: note: candidate template ignored: could not match
      'Scalar_<type-parameter-0-0>' against 'CvScalar'
    template<typename T2> operator Scalar_<T2>() const;
                          ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:46:47: note: passing argument to parameter 'color' here
                                     CvScalar color = CV_RGB(255, 255, 0), 
                                              ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:46:47: error: missing default argument on parameter 'color'
                                     CvScalar color = CV_RGB(255, 255, 0), 
                                              ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:84:5: error: use of undeclared identifier '__BEGIN__'
    __BEGIN__;
    ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:177:5: error: use of undeclared identifier '__END__'
    __END__;
    ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:85:5: error: use of undeclared label 'exit'
    CV_ASSERT( rect.width > 0 && rect.height > 0 );
    ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2745:9: note: expanded from macro 'CV_ASSERT'
        CV_ERROR( CV_StsInternal, "Assertion: " #Condition " failed" ); \
        ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2714:5: note: expanded from macro 'CV_ERROR'
    __CV_EXIT__;                                                   \
    ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2750:33: note: expanded from macro '__CV_EXIT__'
#define __CV_EXIT__        goto exit
                                ^
In file included from /Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:50:
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvcropimageroi.h:64:5: error: use of undeclared identifier '__BEGIN__'
    __BEGIN__;
    ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvcropimageroi.h:135:5: error: use of undeclared identifier '__END__'
    __END__;
    ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvcropimageroi.h:65:5: error: use of undeclared label 'exit'
    CV_ASSERT( rect.width > 0 && rect.height > 0 );
    ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2745:9: note: expanded from macro 'CV_ASSERT'
        CV_ERROR( CV_StsInternal, "Assertion: " #Condition " failed" ); \
        ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2714:5: note: expanded from macro 'CV_ERROR'
    __CV_EXIT__;                                                   \
    ^
/usr/local/Cellar/opencv@3/3.4.13_2/include/opencv2/core/core_c.h:2750:33: note: expanded from macro '__CV_EXIT__'
#define __CV_EXIT__        goto exit
                                ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:265:5: error: no matching function for call to 'cvShowImageAndRectangle'
    cvShowImageAndRectangle( param->w_name, param->img, 
    ^~~~~~~~~~~~~~~~~~~~~~~
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:201:13: note: candidate function not viable: requires at least 5
      arguments, but 4 were provided
CVAPI(void) cvShowImageAndRectangle( const char* w_name, 
            ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:396:28: warning: using the result of an assignment as a condition without
      parentheses [-Wparentheses]
                if( tmpimg = cvQueryFrame( param->cap ) )
                    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:396:28: note: place parentheses around the assignment to silence this
      warning
                if( tmpimg = cvQueryFrame( param->cap ) )
                           ^
                    (                                  )
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:396:28: note: use '==' to turn this assignment into an equality
      comparison
                if( tmpimg = cvQueryFrame( param->cap ) )
                           ^
                           ==
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:620:17: error: no matching function for call to 'cvShowImageAndRectangle'
                cvShowImageAndRectangle( param->w_name, param->img, 
                ^~~~~~~~~~~~~~~~~~~~~~~
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:201:13: note: candidate function not viable: requires at least 5
      arguments, but 4 were provided
CVAPI(void) cvShowImageAndRectangle( const char* w_name, 
            ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:691:9: error: no matching function for call to 'cvShowImageAndRectangle'
        cvShowImageAndRectangle( param->w_name, param->img, 
        ^~~~~~~~~~~~~~~~~~~~~~~
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:201:13: note: candidate function not viable: requires at least 5
      arguments, but 4 were provided
CVAPI(void) cvShowImageAndRectangle( const char* w_name, 
            ^
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/imageclipper.cpp:818:9: error: no matching function for call to 'cvShowImageAndRectangle'
        cvShowImageAndRectangle( param->w_name, param->img, 
        ^~~~~~~~~~~~~~~~~~~~~~~
/Users/choejur/Desktop/OpenALPR/utilities/imageclipper/src/opencvx/cvdrawrectangle.h:201:13: note: candidate function not viable: requires at least 5
      arguments, but 4 were provided
CVAPI(void) cvShowImageAndRectangle( const char* w_name, 
            ^
1 warning and 18 errors generated.
make[2]: *** [CMakeFiles/imageclipper.dir/src/imageclipper.cpp.o] Error 1
make[1]: *** [CMakeFiles/imageclipper.dir/all] Error 2
make: *** [all] Error 2
DaemonChoejur commented 3 years ago

@matthill