Ask Your Question

horizon1710's profile - activity

2017-06-16 17:39:47 -0500 received badge  Enthusiast
2017-06-08 09:39:50 -0500 commented question How to know if a camera is stationary or moving?

@berak When the camera is stationary and there are moving objects in scene, these approach (phase correlation) returns with motion. I only want to know if camera is moving.

2017-05-16 14:23:07 -0500 commented question How to know if a camera is stationary or moving?

@LBerger Yes but, even a stationary camera scene may change a lot between 2 sequential frames. How to use descriptors effectively?

2017-05-16 14:00:24 -0500 asked a question How to know if a camera is stationary or moving?

I would like to use a hybrid motion detection algorithm for both stationary and moving cameras. Before selecting the appropriate method for background subtraction, I need to know if camera is fixed or moving. I wish to use 2 frames (current and previous one) to figure it out but could not come up with a good solution.

I tried to search about the problem but my search attempts always brought irrelevant studies. So wanted to ask you for ideas.

Do you know any method for doing this or any idea?

Thanks in advance.

2017-05-09 09:17:43 -0500 received badge  Supporter (source)
2017-05-09 02:02:16 -0500 commented answer Strange Behaviour of OpenCV Functions (Dilate&Erode operations) out of IDE

Thanks for the information @berak.

I overlooked that a cv::Mat created in that way may contain uninitialized values. Yes, I know the difference between Debug and Release mode but this problem does not occur in debug or release mode in VS, only if you run it from outside(both debug and release). That was the thing I wonder why.

Thanks again.

2017-05-09 01:58:17 -0500 received badge  Scholar (source)
2017-05-08 10:19:50 -0500 received badge  Editor (source)
2017-05-08 10:17:43 -0500 asked a question Strange Behaviour of OpenCV Functions (Dilate&Erode operations) out of IDE

I have encountered a bizarre situation. In my project, I am using some morphological operations of OpenCV and they work well when I run the application by Visual Studio (in both Debug and Release modes) but whenever I run the application out of VS (how a release application supposed to be run), directly from a directory, the Erode and Dilate functions produce weird results. I followed the code by attaching the release app as a process to visual studio and debugged it, finally catched what causes this weirdness.

If I use erode and dilate functions like below:

cv::erode(l_Foreground, l_Foreground, cv::Mat(7, 7, CV_8U));

This works as expected in VS, but weird out of VS. With weird, I mean, the value "7", the size of cv::Mat parameters that given to cv::erode is ignored and it uses some default value or something itself and does not produce required results.

The problem is solved when I use this functions as below:

cv::Mat elementErode = cv::getStructuringElement(cv::MorphShapes::MORPH_RECT, cv::Size(7, 7));
cv::erode(l_Foreground, l_Foreground, elementErode);

It works correct everywhere, both in VS and out of VS. I followed the dll calls and both by VS and out of VS runs call the same dlls.

I am using VS2010 and OpenCV 3.1.0.

Any idea about this strange situation?

Thanks in advance.