Answers for "error: ‘CAP_PROP_FPS’ was not declared in this scope"

C
0

error: ‘CAP_PROP_FPS’ was not declared in this scope

PROBLEM:
--------
prashad@ubuntu:~/test/open_camera$ g++ -g read_video_file_opencv.cpp `pkg-config --cflags --libs opencv` 
read_video_file_opencv.cpp: In function ‘int main(int, char**)’:
read_video_file_opencv.cpp:24:23: error: ‘CAP_PROP_FPS’ was not declared in this scope
  double fps = cap.get(CAP_PROP_FPS);
                       ^~~~~~~~~~~~
read_video_file_opencv.cpp:24:23: note: suggested alternative: ‘CV_CAP_PROP_FPS’
  double fps = cap.get(CAP_PROP_FPS);
                       ^~~~~~~~~~~~
                       CV_CAP_PROP_FPS
SOLUTION:
---------
Try to replace CAP_PROP_FPS to CV_CAP_PROP_FPS   <<< "CV_" prefix helps. compilation would be success
Posted by: Guest on September-24-2020

Code answers related to "error: ‘CAP_PROP_FPS’ was not declared in this scope"

Code answers related to "C"

Browse Popular Code Answers by Language