Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 65176  / 1 Year ago, tue, march 7, 2023, 1:15:52

I have been having the exact same problem as described in this post
and someone in the answers suggested that you upgrade to opencv version 2.9. I was wondering how do that? I installed the version I have now by doing



sudo apt-get install python-opencv


Also, how can I check what version I'm running now? I'm on Ubuntu 13.10



EDIT:



After girardengo answer I know I'm on version 2.4.5 Thank you for that!


More From » python

 Answers
6

Before installing the development version of OpenCV, I'd suggest to use this code to set the capture size (from the link you posted I assume you're using python):



import cv2

cap = cv2.VideoCapture(device_no)
cap.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, width)
cap.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, height)


To install the development version of opencv (3.0.0-dev today) please follow the steps below:



cd $HOME
mkdir opencv_src
cd opencv_src/
git clone https://github.com/Itseez/opencv.git
cd opencv/
mkdir release
cd release/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

[#26042] Wednesday, March 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
darpose

Total Points: 424
Total Questions: 99
Total Answers: 121

Location: Jersey
Member since Fri, Oct 1, 2021
3 Years ago
darpose questions
Sun, Jan 23, 22, 04:32, 2 Years ago
Tue, Apr 25, 23, 23:44, 1 Year ago
Wed, Dec 15, 21, 14:42, 2 Years ago
Wed, Jun 2, 21, 23:41, 3 Years ago
;