Ask Your Question

Giorgos_ts's profile - activity

2020-10-04 02:32:33 -0500 received badge  Notable Question (source)
2018-01-09 13:55:15 -0500 received badge  Famous Question (source)
2017-06-30 00:48:45 -0500 received badge  Popular Question (source)
2017-05-02 14:01:16 -0500 received badge  Notable Question (source)
2017-02-15 06:34:06 -0500 received badge  Popular Question (source)
2016-05-13 03:10:28 -0500 asked a question Object tracking when lost and found again

I am new to opencv. My objective is to perform object tracking and track a specific object. Save the features for example and re-track it if it's lost and found again in the plane. How can i perform that tracking ? And then how can i search for features ?

2016-04-30 11:33:58 -0500 asked a question Error when using cv::StereoBM

Hello , I am new to opencv . I am trying to create a disparity map as found in this tutorial : http://stackoverflow.com/questions/31... but i come up with following error :

undefined reference to `cv::StereoBM::create(int, int)' . Any help ?? What is missing ?

2016-04-24 10:39:22 -0500 received badge  Citizen Patrol (source)
2016-04-23 18:52:32 -0500 commented answer Optical flow based Obstacle Avoidance

Yes i can understand that larger optical flow equals closer distance from object. But do i simply have to divide the width of the camera view(e.g. 480pixels) by 2 ?

2016-04-23 14:23:33 -0500 commented answer Optical flow based Obstacle Avoidance

I can compute the optical flow but how can i tell right from left image? Or do you mean if the result is positive or negative ?

2016-04-23 11:15:41 -0500 commented answer Optical flow based Obstacle Avoidance

I have edited my question . @Tetragramm

2016-04-23 10:10:22 -0500 asked a question Optical flow based Obstacle Avoidance

Hello everyone , i am trying to build a obstacle avoiding robot with monocular vision and want to use the optical flow from the camera to make it take decisions and avoid some static obstacles in a room , such as walls , tables , chairs etc. How can i achieve it ?

EDIT : I have read several papers , they suggest an approach of comparing the optical flow vectors in the camera view and if the right one are bigger than the left , then turn left to avoid the obstacle. However , I have not been able to understand how I can achieve that using c++ .

2016-04-05 10:44:45 -0500 commented answer Formula to calculate the speed of moving vehicle using focal length in openCV

Yes it is the same , but now the object is approaching the camera not the opposite .

2016-04-04 16:31:32 -0500 commented answer How can i cluster moving objects in a video ?

@berak And then how can I visualize the effect of that procedure ? What am I going to do ?

2016-04-04 11:29:09 -0500 answered a question Error in Opencv instation (error: field 'cap' has incomplete type)

You are only installing the contrib package . Not the whole library. Try this :

sudo apt-get install build-essential

sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

sudo mkdir /opt/opencv-3.1.0

cd /opt/opencv-3.1.0

sudo git clone https://github.com/Itseez/opencv.git

sudo git clone https://github.com/Itseez/opencv_cont...

cd /opt/opencv-3.1.0/opencv sudo git checkout 3.1.0

cd /opt/opencv-3.1.0/opencv_contrib sudo git checkout 3.1.0

sudo mkdir /opt/opencv-3.1.0/opencv/release

cd /opt/opencv-3.1.0/opencv/release

sudo apt-get install qt5-default

sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -DWITH_OPENGL=ON -DWITH_QT=ON -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv-3.1.0/opencv_contrib/modules ..

sudo make

sudo make install

pkg-config --modversion opencv

2016-04-04 07:37:23 -0500 commented answer "flow" in "calcOpticalFlowFarneback(...)

Actually I will just try for K=2 ( a kind of background substraction ) . Thanks i will try it .

2016-04-04 07:29:07 -0500 commented answer "flow" in "calcOpticalFlowFarneback(...)

So if I want to use k means to detect moving objects do i just give the vector (e.g. points ) as input ?

2016-04-04 06:18:41 -0500 commented answer "flow" in "calcOpticalFlowFarneback(...)

So , how can someone use LK to create a Mat flow similar to Farneback ? Simply by substructing the position coordinates ?

2016-04-04 06:17:24 -0500 received badge  Supporter (source)
2016-04-03 19:28:04 -0500 received badge  Scholar (source)
2016-04-03 19:27:06 -0500 commented question how can i detect eye blinking?

Try to be more specific . Provide the software you use and describe the problem etc.

2016-04-03 19:26:37 -0500 answered a question how can i detect eye blinking?

Try to be more specific . Provide the software you use and describe the problem etc.

2016-04-03 19:26:02 -0500 received badge  Critic (source)
2016-04-02 14:19:38 -0500 commented question installing extra modules

@berak No extra modules found in folder: /Downloads/opencv_contrib-master/modules . What has happened ??

2016-03-31 10:20:40 -0500 commented answer Formula to calculate the speed of moving vehicle using focal length in openCV

Y is for example the height of an object in real life . You have to have one unknown parameter . So you have to suppose the height of the object as known, e.g. of a traffic signs 40 cm radius or of a tree 5m height. Then x1,x2 are the dimensions of the tree for example in two images , if you open it via paint for example you can see how many pixel each object takes . It is logical that the size of the objects in pixels grow as the camera approaches the real object .

2016-03-26 09:32:19 -0500 commented question Difference between Point and Point2f

Ok thank you ! For example when i use : Mat A ; A.at<point2f>(y,x); what result do i get ?

2016-03-26 08:50:12 -0500 asked a question Difference between Point and Point2f

Hello I am new to opencv and I want to understand the difference of use of Point and Point2f .Can anyone please explain that and also give an example ?

2016-03-26 07:46:17 -0500 commented answer Formula to calculate the speed of moving vehicle using focal length in openCV

Glad i helped ! :) Hope i will get voted up

2016-03-24 12:25:57 -0500 received badge  Editor (source)
2016-03-24 12:25:00 -0500 answered a question Formula to calculate the speed of moving vehicle using focal length in openCV

image description

In this image : f stands for focal length , q1,q2 distances of an object from the camera , y a dimension of the object and x1,x2 the real size of the object in an image.

Let Dq=q1-q2 : image description , where k is the size of the CCD of the camera , so Px1,Px2 are the pixel sizes in the image .

In that way , between two successive frames you can compute :

Dq and divide it by the time between two successive frames to find the velocity .

Basic assumption is that the camera is centered in the middle of the car and that there are no turns etc. in the road .

2016-03-24 06:29:19 -0500 asked a question Using k means for image clustering

I am using c++,OpenCV library and in my software, I have estimated the optical flow in a video. Now, I want to group some moving objects, e.g. moving cars. I have used a dense optical flow algorithm (Farneback).

My first thoughts so far are to use "k means" algorithm to do the clustering.

I have thought of using the results of the Farneback optical flow to compute the displacement of the frames in each direction as following :

E.g. :

Let Dx be the displacement in x direction( either positive or negative) and Dy the displacement in y direction(either positive or negative) .

Then i pass the array [Dx,Dy] as an input to k means with k=2 clusters. I hope this will give a rough background / foreground substraction .

However i am facing problems in computing the displacemet because the output of calcOpticalFlowFarneback is InputOutputArray flow . Should I access this array using a function like that for example ? :

findDisplacements(const Mat& flow, int step) {

const Point2f& Dx,Dy;

const Point2f& fxy = flow.at<point2f>(y, x);

Dx=Point(cvRound(x+fxy.x))-Point(x,y);

Dy=Point(cvRound(y+fxy.y))-Point(y,x);

}

2016-03-22 07:22:25 -0500 commented question error: (-215) scn == 3 || scn == 4 in function cv::ipp_cvtColor

How can i check if the video is encoded ? I happens with all videos not only with one particular .

2016-03-21 16:24:42 -0500 asked a question error: (-215) scn == 3 || scn == 4 in function cv::ipp_cvtColor

I am trying to use following code :

import numpy as np

import cv2

cap=cv2.VideoCapture('video.avi')

ret, old_frame = cap.read()

old_gray = cv2.cvtColor(old_frame, cv2.COLOR_BGR2GRAY)

And I end up with following error :

error: (-215) scn == 3 || scn == 4 in function cv::ipp_cvtColor

What could be the cause ? If i change the input of cap from .avi file to 0 (default camera) the programm works fine. Any suggestions? Thanks in advance !

2016-03-16 12:28:32 -0500 answered a question How can i cluster moving objects in a video ?

Ok I have decided to solve the problem with a static camera at first. I have computed the optical flow and i want to use this information to cluster the image. How can i take that into consideration in kmeans function ? Should i include the optical flow result in the Input Array of the function ?

2016-03-16 12:15:42 -0500 received badge  Enthusiast
2016-03-09 03:32:56 -0500 received badge  Student (source)
2016-03-08 10:42:02 -0500 asked a question How can i cluster moving objects in a video ?

I am relative new to opencv .
I have computed the optical flow but i need to use this information to detect the moving objects. How can i achieve that ? The camera is also moving in my problem. Should i try background substraction ?

Thank you in advance !