Questions tagged [opticalflow]

Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer (an eye or a camera) and the scene.

400 questions
4
votes
1 answer

Calculating camera motion out of corresponding 3d point sets

I am having a little problem. I wrote a program that extracts a set of three-dimensional points in each frame using a camera and depth information. The points are in the camera coordinate system, which means the origin is at the camera center, x is…
4
votes
2 answers

Quiver plot with optical flow?

Recently I'm working in cloud motion tracking using images, but in many examples when is used in video implementations shows a quiver plot that moves according the object tracked. Quiver documentations takes four argumets principally ([X, Y], U, V),…
Chacho Fuva
  • 353
  • 1
  • 4
  • 17
4
votes
4 answers

Opencv consecutive frames capture from webcam

I'm developing a realtime opticalflow app with Opencv (C++). I don't understand how capture two consecutive frames to apply Lucas-Kanade Tracking method. This don't work: CvCapture* capture = cvCaptureFromCAM(1); IplImage *imgA=cvQueryFrame( capture…
EnneKappa
  • 231
  • 1
  • 4
  • 13
4
votes
0 answers

Calculate actual velocity using optical flow Lucas-Kanade and EmguCV

How to calculate the actual speed of all moving objects on video using the Lucals-kanade algorithm to calculate the optical flow ? I need to do this on this video. The camera is fixed in one place (Fig. 1) I find the key points and track them using…
Sterben
  • 53
  • 1
  • 8
4
votes
1 answer

What exactly is the output when we run the dense optical flow (farnnback)?

I have been running the Python implementation code of Dense Optical Flow given in the official documentation page. At one particular line of the code, they use mag, ang = cv2.cartToPolar(flow[...,0], flow[...,1]). When I print the values of mag, I…
AdaMStrange
  • 41
  • 1
  • 3
4
votes
0 answers

estimateRigidTransform on dense optical flow in OpenCV

I am trying to implement the algorithm described by Wand and Adelson (1993) in the paper Layered Representation for Motion Analysis, a summary of the paper can be found in any lecture on Computer Vision, this one is from the CS department at the…
Mahdi Chamseddine
  • 387
  • 1
  • 6
  • 20
4
votes
1 answer

Structure from Motion with Optical Flow

Let say I have a video from a drive recorder. I want to construct the recorded scene's points cloud using structure from motion technique. First I need to track some points. Which algorithm can yield a better result? By using the sparse optical flow…
4
votes
0 answers

Warp images using motion maps generated by opticalFlowLKDoG (Matlab 2015A)

This question is based on a modified Matlab code from the online documentation for the optical flow system objects in version 2015a as appears in opticalFlowLK class clc; clearvars; close all; inputVid = VideoReader('viptraffic.avi'); opticFlow =…
CV_User
  • 1,183
  • 2
  • 12
  • 20
4
votes
0 answers

Finding vector direction using Optical Flow in OpenCV (Python)

I am struggling (and trying to learn) with understanding the concept of using the Lucas-Kanade Optical Flow function in OpenCV to find the directional movement of the 'good points to track'. I've been told I need to calculate the direction of…
eejays
  • 41
  • 1
  • 3
4
votes
2 answers

Optical flow vs keypoint matching: what are the differences?

I've spent some months studying and making experiments with the process of keypoint detection, description and matching. In the last period, I'm also into the concepts behind augmented reality, precisely the "markerless" recognition and pose…
TheUnexpected
  • 3,077
  • 6
  • 32
  • 62
4
votes
2 answers

Remove outliers from Lucas-Kanade optical flow

There are similar questions on SO, but I didn't find the answer I wanted. I need to implement a robust optical flow in order to track features on a (detected) face. I use goodFeaturesToTrack/SURF (I haven't yet decided which is best) to get the…
joanna
  • 743
  • 3
  • 13
  • 27
4
votes
1 answer

Detect motion with moving camera

How can I track objects movement when the camera is moving. Example if the camera is inside a vehicle. So far I have tied the algorithms in Optical Flow in Emgu Cv. I want to get the horizontal movement of object. But they don't give enough results…
user3600631
  • 101
  • 8
4
votes
1 answer

OpenCV time to contact with optical flow

I'm trying to write a program with C++ and OpenCV that calculates the remaining time (frames) until a collision with an object. As a sample video I have a camera moving towards a blackboard. My approach on this is the following: detect features…
roboneko42
  • 111
  • 1
  • 1
  • 6
4
votes
1 answer

OpenCV's calcOpticalFlowPyrLK throws exception

I have been trying to form a small optical flow example with OpenCV for a while now. Everything works except the function call calcOpticalFlowPyrLK, which prints the following failed assertion in the console window: OpenCV Error: Assertion failed…
Suedocode
  • 2,504
  • 3
  • 23
  • 41
4
votes
2 answers

Android: Using calcOpticalFlowPyrLK with MatOfPoint2f

I have been unable to use calcOpticalFlowPyrLK with MatOfPoint2f. I declared my types as follows: private Mat mPreviousGray; // previous gray-level image private List points; // tracked features private…
user1378489
  • 125
  • 2
  • 8
1 2
3
26 27