opencv4

How to pause and play with 'p' key using cv2.waitKey on qt application

旧街凉风 提交于 2021-02-15 06:48:22
问题 I am using below code. class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(640, 480) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(10, 10, 500, 300)) self.label.setText("") self.label.setObjectName("label") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton

OpenCV cv2.VideoCapture() stopping to read RTSP IP camera

青春壹個敷衍的年華 提交于 2021-02-10 04:45:09
问题 Hello im learning opencv and im reading a ip camera through rtsp:// videoStream = "rtsp://admin:123456@10.0.0.1:554/Streaming/Channels/1" capture = cv2.VideoCapture(videoStream) im reading this stream and im making a facial detection in opencv but after 1 or 2 minutes my script crashes whit a h264 message and my opencv code gives me a error: [h264 @ 0x27e49570] error while decoding MB 55 12, bytestream -12 no video and if i use a webcan it not happening some one can help me whit how is the

List available cameras OpenCV/Python

自古美人都是妖i 提交于 2021-02-05 05:43:52
问题 I have multiple webcams connected to my PC and I would like to select one camera based on its info (name, resolution etc.). Is there a way to list all the cameras available on a PC, instead of trying all the indices in cv2.VideoCapture()? 回答1: The answer is negative. OpenCV doesn't have a method for listing the available video capture devices on your system. If you look at the code you see how currently OpenCV handles invalid device indices that don't exist. For instance for MacOS here is the

/usr/bin/ld: cannot find -lopencv_nonfree

主宰稳场 提交于 2021-01-29 18:50:54
问题 I installed OpenCV 4.1 on Ubuntu 18.04 LTS. The problem is when I compile my project's CMake file, the output is: /usr/bin/ld: cannot find -lopencv_nonfree collect2: error: ld returned 1 exit status CMakeFiles/river_flow_velocity_estimation.dir/build.make:274: recipe for target 'river_flow_velocity_estimation' failed make[2]: *** [river_flow_velocity_estimation] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/river_flow_velocity_estimation.dir/all' failed make[1]: ***

OpenCV4 error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope

一个人想着一个人 提交于 2020-08-07 07:53:44
问题 I recently migrated from OpenCV3.3 to the latest version OpenCV4 on my Ubuntu 18.04 LTS. I have some persistent issues with the installation. My installation did not give any errors when I followed this installation tutorial. But whenever I include the module opencv2/highgui.hpp in my project, I get problems like below. This seems to be an issue caused by highgui.hpp when I followed this link. /home/arun/Documents/AutonomousLaneDetection/app/main.cpp: In function ‘int main(int, char**)’: