Ask Your Question

Dawit's profile - activity

2016-02-11 11:13:53 -0600 received badge  Nice Answer (source)
2014-05-20 02:52:54 -0600 commented question Dense Optical Flow (DualTVL1) in NDK

Ok. Thanks.

2014-05-20 01:54:09 -0600 commented answer Looking for information regarding how to use DenseOpticalFlow

if you are familiar with it could you help me with this :) http://answers.opencv.org/question/33589/dense-optical-flow-dualtvl1-in-ndk/

2014-05-19 03:50:34 -0600 commented answer Looking for information regarding how to use DenseOpticalFlow

ok didn't see the date.

2014-05-19 03:48:00 -0600 asked a question Dense Optical Flow (DualTVL1) in NDK

i want to compute Dense Optical Flow using OpenCV android NDK but i can only find Video.calcOpticalFlowFarneback dense optical flow function which doesn't give me the result i want.

anyone who can tell me how to find createOptFlow_DualTVL1() function in Android NDK. i am using OpenCV-2.4.5-android-sdk.

Thanks in advance

2014-04-04 09:18:46 -0600 answered a question Looking for information regarding how to use DenseOpticalFlow
Mat New_Previous_Gray (holds the previous image)
Mat New_Current_Gray (holds the current image)
Mat_<Point2f> Optical_Flow;
Ptr<DenseOpticalFlow> tvl1 = createOptFlow_DualTVL1();  
tvl1->calc(New_Previous_Gray, New_Current_Gray, Optical_Flow); 
for(int y = 0; y < Optical_Flow.cols; y++)
{
   for(int x = 0; x < Optical_Flow.rows; x++)
   {
      const Point2f& flow_xy = Optical_Flow.at<Point2f>(x, y);
      int Vel_x = flow_xy.x;
      int Vel_y = flow_xy.y;
      Pxl_Distance = sqrt(double(((abs(Vel_x) * abs(Vel_x)) + (abs(Vel_y) * abs(Vel_y)))));
   }
}

so i could get the velocity for every pixel in "Pxl_Distance".

hope this sample code is clear cheers.

2014-04-04 09:13:46 -0600 answered a question Optical flow Dual TV L1 working in realtime

I have used DualTV1 actually i'm still using it since i need to compute dense optical flow (velocty of every pixel). As far i know using DualTV1 for real time (10fps)is quite impossible in standard computer since it is compute the velocity if every pixel for every frame. here is what some one advice me if it helps.

http://stackoverflow.com/questions/19309567/speeding-up-optical-flow-createoptflow-dualtvl1

2014-04-04 08:41:18 -0600 asked a question Dense Optical Flow in JavaCV (DualTVL1)

I have implemented dense optical flow to compute the velocity of every pixel in c++ using OpenCV 2.4.8 previously. This example helps me a lot (https://github.com/Itseez/opencv/blob/master/samples/cpp/tvl1_optical_flow.cpp). Now I want to convert my code to javaCV but i could’t. my code in c++ using OpenCV is like this:

Mat New_Previous_Gray (holds the previous image)
Mat New_Current_Gray (holds the current image)
Mat_<Point2f> Optical_Flow;
Ptr<DenseOpticalFlow> tvl1 = createOptFlow_DualTVL1();  
tvl1->calc(New_Previous_Gray, New_Current_Gray, Optical_Flow); 
for(int y = 0; y < Optical_Flow.cols; y++)
{
   for(int x = 0; x < Optical_Flow.rows; x++)
   {
      const Point2f& flow_xy = Optical_Flow.at<Point2f>(x, y);
      int Vel_x = flow_xy.x;
      int Vel_y = flow_xy.y;
      Pxl_Distance = sqrt(double(((abs(Vel_x) * abs(Vel_x)) + (abs(Vel_y) * abs(Vel_y)))));
   }
}

so i could get the velocity for every pixel in "Pxl_Distance".

Now I want to do the same thing in JavaCv but so far what what i could do is:

CvMat pFrame = pFrameGray.asCvMat();
CvMat cFrame = pFrameGray.asCvMat();
CvMat flow = Flowipl.asCvMat();
cvConvertImage(pFrame, pFrame, CV_CVTIMG_FLIP);
cvConvertImage(cFrame, cFrame, CV_CVTIMG_FLIP);
cvConvertImage(flow, flow, CV_CVTIMG_FLIP); 
DenseOpticalFlow tvl1 = createOptFlow_DualTVL1();
tvl1.calc(pFrame, cFrame, flow);

But when i view the pixel values of "flow"(CvMat) all are 0. i don't know what i have done wrong or if am doing it right when i compute the DenseOpticalFlow in the first place. i need help. i already spend too much time on this. Thanks in advance.

2014-04-03 23:01:53 -0600 commented question calcOpticalFlowFarneback with JavaCV

Hello, did you manage to solve this issue? I'm having the same problem.

2013-11-25 10:28:50 -0600 received badge  Teacher (source)
2013-10-15 03:28:33 -0600 received badge  Necromancer (source)
2013-10-14 23:16:06 -0600 answered a question How to change the parameters of the Optical Flow Dual TV L1 implementation of OpenCV 2.4.4?

_flow->getDouble("tau"); // to get the value _flow->set("tau",0.125); // to change the value

Cheers

2013-10-14 21:30:50 -0600 commented question How to change the parameters of the Optical Flow Dual TV L1 implementation of OpenCV 2.4.4?

I am having the same problem. did you find any solution?