opencv3.1

Piping pi's opencv video to ffmpeg for Youtube streaming

徘徊边缘 提交于 2019-12-21 21:42:37
问题 This is a small python3 script reading off picam using OpenCV : #picamStream.py import sys, os from picamera.array import PiRGBArray from picamera import PiCamera import time import cv2 # initialize the camera and grab a reference to the raw camera capture camera = PiCamera() camera.resolution = (960, 540) camera.framerate = 30 rawCapture = PiRGBArray(camera, size=(960, 540)) # allow the camera to warmup time.sleep(0.1) # capture frames from the camera for frame in camera.capture_continuous

error with cv2.face.mindistancepredictcollector()

放肆的年华 提交于 2019-12-21 20:24:07
问题 I have installed opencv 3.1.0 with extra modules, but when I try to use >>> s = cv2.face.MinDistancePredictCollector() it returns an error Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> s.MinDistancePredictCollector() AttributeError: 'module' object has no attribute 'MinDistancePredictCollector' I also checked the documentation: >>> help(cv2.face) Help on module cv2.face in cv2: NAME cv2.face FILE (built-in) FUNCTIONS StandardCollector_create(...) StandardCollector

OpenCV 3.1 ANN predict returns nan

吃可爱长大的小学妹 提交于 2019-12-18 18:32:01
问题 I am trying to implement Neural network with OpenCV ANN Library. I had a working solution, but after upgrading to OpenCV 3.1 it stopped working. So I created a simplified code for testing, but problem still remains. ANN is successfully trained, but when I try to call predict with row from trainData, it returns Mat of nan values. The code is cv::Ptr< cv::ml::ANN_MLP > nn = cv::ml::ANN_MLP::create(); nn->setActivationFunction(cv::ml::ANN_MLP::SIGMOID_SYM); nn->setTrainMethod(cv::ml::ANN_MLP:

OpenCV 3.1 ANN predict returns nan

自古美人都是妖i 提交于 2019-12-18 18:31:52
问题 I am trying to implement Neural network with OpenCV ANN Library. I had a working solution, but after upgrading to OpenCV 3.1 it stopped working. So I created a simplified code for testing, but problem still remains. ANN is successfully trained, but when I try to call predict with row from trainData, it returns Mat of nan values. The code is cv::Ptr< cv::ml::ANN_MLP > nn = cv::ml::ANN_MLP::create(); nn->setActivationFunction(cv::ml::ANN_MLP::SIGMOID_SYM); nn->setTrainMethod(cv::ml::ANN_MLP:

OpenCV Error: Assertion failed (L.channels() == 1 && I.channels() == 1) in connectedComponents_sub1 [closed]

萝らか妹 提交于 2019-12-13 09:00:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I got the following error in OpenCV (python) and have googled a lot but have not been able to resolve. I would be grateful if anyone could provide me with some clue. OpenCV Error: Assertion failed (L.channels() == 1 && I.channels() == 1) in connectedComponents_sub1, file /home/snoopy/opencv- 3.1.0/modules

In Android OpenCV Color Blob Detector is crashing by giving fatal error

前提是你 提交于 2019-12-12 04:33:55
问题 I'm using Color Blob detector Sample code of OpenCV (Sample Code), but app is crashing at Core.multiply(contour, new Scalar(4,4), contour); giving some fatal error libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 11016 (Thread-4857) and detailed Log is available to get idea of exact reason. In some other part of code I was using Core.add(fg, bg, markers); and app was giving same fatal error there as well. What is the issue? Please guide towards the solution. I 'm using openCV(3

cv2 getTrackbarPos not working

假装没事ソ 提交于 2019-12-12 03:56:22
问题 Working with opencv3.1 as cv2 in python 2.7.12. The problem I'm having right now is that, though I am following multiple sets of instructions that all seem to use the same setup as myself or at least a very similar one. I am mainly going by these two examples: openCV.org and CodeGenerater's Blogspot tutorial. I did not forget to make a callback function or to use cv2.getTrackbarPos . I feel there must be something wrong with the specific order I do it in or the image display loop. Here is

How to include and use OpenCv3.1.0 library to CUDA file(.cu)?

纵饮孤独 提交于 2019-12-12 03:18:45
问题 I tried to implement my own kernel to median filter like this pseudo code: //main.cpp #include "opencv2/opencv.hpp" cv::Mat inputMat = cv::imread() cudaMedianCaller (inputMat, kernelMat) //medianFilter.h #include "opencv2/opencv.hpp" cudaMedianCaller (const cv::Mat& inputMat, cv::Mat& kernelMat); //medianFilter.cu cudaMedianCaller (const cv::Mat& inputMat, cv::Mat& kernelMat) { kernelMedianFilter<<< , >>> (uchar3* d_inputMat, uchar* d_kernelMat) } __global__ void kernelMedianFilter (uchar3* d

Detecting colored circle and it's center using OpenCV

别说谁变了你拦得住时间么 提交于 2019-12-11 08:54:33
问题 I am trying to detect BLUE colored CIRCLE and it's CENTER. Then draw a circle on the detected circle and a very small circle on it's center. But I get a few errors. (I am using OpenCV 3.1.0, Python 2.7 Anaconda 64 bits, PyCharm as an IDE) (Please help me using python codes) I run the following code: import cv2 import numpy as np cap = cv2.VideoCapture(0) if cap.isOpened(): while(True): frame, _ = cap.read() # blurring the frame that's captured frame_gau_blur = cv2.GaussianBlur(frame, (3, 3),

Undefined references in static OpenCV libraries

大憨熊 提交于 2019-12-11 06:24:44
问题 I have a project in C++ that uses OpenCV 3.1 and works fine using shared libaries. But now I want to compile it using static libraries (located in a folder within the project directory) because I want to be able to export it (and also edit and recompile if necessary) where OpenCV is not installed. I have recompiled OpenCV this time setting shared libs to NO: make -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX=~/Desktop/ocv .. Then I took my required libraries: