error: ‘CV_LOAD_IMAGE_UNCHANGED’ was not declared in this scope

1-Error Insert image description here
2-Error cause
Opencv4.x and above, some macros and API names have been changed and need to be changed to new ones
3-Solution

 CV_LOAD_IMAGE_UNCHANGED 改为 cv::IMREAD_UNCHANGED
   CV_LOAD_IMAGE_GRAYSCALE  改为 cv::IMREAD_GRAYSCALE
   CV_LOAD_IMAGE_COLOR    改为 cv::IMREAD_COLOR
   CV_LOAD_IMAGE_ANYDEPTH   改为 cv::IMREAD_ANYDEPTH

   
   
    
    

    LINK

    1-Error Insert image description here
    2-Error cause
    Opencv4.x and above, some macros and API names have been changed and need to be changed to new ones
    3-Solution

     CV_LOAD_IMAGE_UNCHANGED 改为 cv::IMREAD_UNCHANGED
       CV_LOAD_IMAGE_GRAYSCALE  改为 cv::IMREAD_GRAYSCALE
       CV_LOAD_IMAGE_COLOR    改为 cv::IMREAD_COLOR
       CV_LOAD_IMAGE_ANYDEPTH   改为 cv::IMREAD_ANYDEPTH
    
       
       
      
      

      Guess you like

      Origin blog.csdn.net/luoganttcc/article/details/131741961