opticalflow

Finding distance travelled by robot using Optical Flow

只愿长相守 提交于 2019-12-09 07:18:28
问题 I'm working on a project right now in which we are developing an autonomous robot. I have to basically find out the distance travelled by the robot between any 2 intervals. I'm using OpenCV, and using the Optical Flow functions of OpenCV, I'm able to find out the velocity/distance of each pixel in 2 different images. Using this information, I want to be able to find out the distance travelled by the robot in the interval between those 2 images. I thought of a way in which we could develop an

Speed Up Optical Flow algorithm (If applicable) Python OpenCV

試著忘記壹切 提交于 2019-12-08 08:24:23
问题 I came across this interesting situation (Speeding up optical flow (createOptFlow_DualTVL1)) but it doesn't apply to my needs. My general problem is I want to speed up as much as possible the following code if it is applicable. Keep in mind, I want the frames to be grayscale and resize them to height = 300 while keeping aspect ratio locked. Also, I want to sample 2 frames per second from that video so I assume every video to be around 30fps . Finally, I want to use the TV-L1 optical flow

Determining if a feature is part of a moving object from sparse optical flow (KLT)

你。 提交于 2019-12-08 03:17:13
问题 I have done extracting optical flow from a sequence of images using KLT. The camera is on a moving vehicle capturing traffic scene. Now, I can obtain the matching results with no mismatched points. I just use the OpenCV functions (C++) to extract features and tracking. I have no problem with programming though. cvGoodFeaturesToTrack(), cvFindCornerSubPix(), cvCalcOpticalFlowPyrLK() Can anybody suggest what topic/paper should I look into to distinguish if the matched points I have are part of

Android: Using calcOpticalFlowPyrLK with MatOfPoint2f

♀尐吖头ヾ 提交于 2019-12-07 17:58:27
问题 I have been unable to use calcOpticalFlowPyrLK with MatOfPoint2f. I declared my types as follows: private Mat mPreviousGray; // previous gray-level image private List<MatOfPoint2f> points; // tracked features private MatOfPoint initial; // initial position of tracked points And use the following to find and track features (My code is based on a sample optical flow application in C++ by Robert Laganiere.) // Called whenever a new frame m is captured private void OpticalFlow(Mat m, int

Background subtraction and Optical flow for tracking object in OpenCV C++

假装没事ソ 提交于 2019-12-07 08:01:14
问题 I am working on a project to detect object of interest using background subtraction and track them using optical flow in OpenCV C++. I was able to detect the object of interest using background subtraction. I was able to implement OpenCV Lucas Kanade optical flow on separate program. But, I am stuck at how to these two program in a single program. frame1 holds the actual frame from the video, contours2 are the selected contours from the foreground object. To summarize, how do I feed the

optical flow .flo files

情到浓时终转凉″ 提交于 2019-12-06 09:21:17
问题 I have a few questions for doing optical flow projects. I use Python 2 (planning to use lasagne to use deep learning to learn optical flow), and don't know how to convert the c++ functions to that of python in visualization of the flows. I downloaded (from http://vision.middlebury.edu/flow/data/comp/zip/other-gt-flow.zip) some image pairs where I have to estimate their optical flow, and their ground truth flow (.flo file). The problem is, when I read the .flo file into the program, it is a

Optical Flow class in opencv(CalcOpticalFlowPyrLK) Parameters

让人想犯罪 __ 提交于 2019-12-06 08:14:16
I have a question concerning two parameters in CalcOpticalFlowPyrLK() class.Here is the link of the documentation: http://docs.opencv.org/trunk/modules/video/doc/motion_analysis_and_object_tracking.html?highlight=calcopticalflowpyrlk#cv2.calcOpticalFlowPyrLK The first parameter is the " err ". In the documentation this is defined as the tracking error of it's feature, but they don't give any details. Error in respect of what? Secondly the parameter "status".They define it as the state if a corresponding feature is found(1) or not(0). I have cases that the error of the tracking for a specific

How to draw Optical flow images from ocl::PyrLKOpticalFlow::dense()

时光毁灭记忆、已成空白 提交于 2019-12-06 08:07:33
How to draw Optical flow images from ocl::PyrLKOpticalFlow::dense() Which actually calculates both horizontal and vertical component of the Optical flow? So I don't know how to draw them. I'm new to opencv . Can anyone help me? Syntax : ocl::PyrLKOpticalFlow::dense(oclMat &prevImg, oclMat& nextImg, oclMat& u, oclMat &v,oclMat &err) Tobias Senst A well establische method used in the optical flow community is to display a motion vector field as a color coded image as you can see at one of the various data sets. E.g MPI dataset or the Middlebury dataset . Therefor you estimate the length and the

Optical Flow visualization

泄露秘密 提交于 2019-12-06 07:34:45
I am trying to visualize the output of calcOpticalFlowPyrLK() (OpenCv v3.0.0). I am not trying to draw whole image with optical flow, only the direction arrow. The problem is, I can't get to the output as in the examples. Every 10 frames I renew the points for the calculation of the flow. The function itself calcOpticalFlowPyrLK(CentroidFrOld, CentroidFrNow, mc, CornersCentroidNow, feat_found, feat_errors, Size(15, 15), 2, cvTermCriteria(CV_TERMCRIT_ITER | CV_TERMCRIT_EPS, 10, 0.03), 0); Where CentroidFrOld is grayscale frame, CentroidFrNow is grayscale frame+1, mc is a vector<Point2f> array

Accelerating OpticalFlow Algorithm - OpenCV

隐身守侯 提交于 2019-12-06 07:30:46
I am working on a project for estimating a UAV location using optical-flow algorithm. I am currently using cv::calcOpticalFlowFarneback for this purpose. My hardware is an Odroid U3 that will finally be connected to the UAV flight controller. The problem is that this method is really heavy for this hardware and I am looking for some other ways to optimize / accelerate it. Things that I've already tried: Reducing resolution to 320x240 or even 160x120. Using OpenCV TBB (compiled using WITH_TBB=ON BUILD_TBB=ON and adding -ltbb ). Changing optical-flow parameters as suggested here Adding the