Ask Your Question

kzbr93's profile - activity

2017-12-07 17:47:55 -0600 commented question drawMatches bug

@yes123, could you please explain more

2017-11-27 16:39:50 -0600 commented question how to make bounding box on surf features ?

@berak ok lets make it simple, i store the image of the object and try to track it, in a video !! i am trying to do it b

2017-11-26 07:30:49 -0600 commented question how to make bounding box on surf features ?

eventually its making that green color bounding box in whole of my current frame, then whats the use of those feature ma

2017-11-26 07:29:34 -0600 commented question how to make bounding box on surf features ?

@berak sorry i think i am not able to put my question properly, its not just about human faces, and i know that SURF wor

2017-11-26 07:28:50 -0600 commented question how to make bounding box on surf features ?

@berak sorry i think i am not able to put my question properly, its not just about human faces, and i know that SURF wor

2017-11-26 07:28:48 -0600 edited question how to make bounding box on surf features ?

how to make bounding box on surf features ? Hello all, i am working on SURF features and i will be glad if someone coul

2017-11-24 16:29:57 -0600 commented question how to make bounding box on surf features ?

i have video frames, is there then any other way i can make a bounding box on objects approaching near ??

2017-11-24 16:28:38 -0600 commented question how to make bounding box on surf features ?

@berak thanks for the reply, but i was wondering what is the use of feature points if we cannot distinguish those with r

2017-11-24 14:03:26 -0600 edited question how to make bounding box on surf features ?

how to make bounding box on surf features ? Hello all, i am working on SURF features and i will be glad if someone coul

2017-11-24 13:44:37 -0600 asked a question how to make bounding box on surf features ?

how to make bounding box on surf features ? Hello all, i am working on SURF features and i will be glad if someone coul

2017-05-17 10:22:10 -0600 commented question increase the size of features,surf!!

it should not something impossible, they came out with algorithm which is tested... so i think its just a matter of time..

2017-05-17 10:01:16 -0600 commented question increase the size of features,surf!!

what i could do is, compare the previous frame with that of current, and do a template matching, what say ??

2017-05-17 09:34:09 -0600 commented question increase the size of features,surf!!

http://citeseerx.ist.psu.edu/viewdoc/... this is what i mean from scale expansion @berak

2017-05-17 08:36:45 -0600 commented question increase the size of features,surf!!

and motive is to compare current frame with that of previous and analyse, if the drone or vehicle is approaching towards an obstacle, its features diameter increases , i.e. the obstacle is getting bigger for the vehicle, and we need to avoid those points which are not growing in size or can not be considered as obstacle,, am i clear now ?

2017-05-17 08:34:10 -0600 commented question increase the size of features,surf!!

i am trying to do obstacke avoidance using SURF features detector

2017-05-17 07:09:45 -0600 commented question increase the size of features,surf!!

then if i could do this then all the features of a table,window , wall etc unless my vehicle is getting closer to it wont be considered as obstacle. . i hope i am clear

2017-05-17 07:07:36 -0600 commented question increase the size of features,surf!!

no i mean size of the feature by a factor of say 1.2 or some thing,, only those feature then i need to display whole size is changing , or the object is approaching near

2017-05-17 06:06:58 -0600 asked a question increase the size of features,surf!!

hello guys, i am working on algorithm based on SURF feature detector, and i need to increase the size of the feature if the object in the frame is getting closer and ignore those features whose size is not changing...

so far i have this code :..

#include <iostream>
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/xfeatures2d.hpp>
#include <opencv2/calib3d.hpp>





using namespace cv;
using namespace std;
using namespace cv::xfeatures2d;

/** @function main */
int main( int argc, char** argv )
{


     VideoCapture cap(0);
     //Mat curr, prev;
     if(!cap.isOpened())return -1;
     Mat frame;
    Mat prevframe;

    while (cap.isOpened()) {
        cap.read(frame);


        // more code goes here which I haven't written here

        frame.copyTo(prevframe); // set previous frame to current frame
        //imshow("Video current", frame);
       // imshow("Videoprevious", frame);

        char key = waitKey(33);
        if (key == 'q')
        {
            break;
        }

  //-- Step 1: Detect the keypoints using SURF Detector
  int minHessian = 100;

  Ptr<SURF> detector = SURF::create( minHessian );
  detector->setHessianThreshold(minHessian);

  std::vector<KeyPoint> keypoints1,keypoints2;
  Mat descriptors_1, descriptors_2;

  detector->detectAndCompute( frame, Mat(), keypoints1, descriptors_1 );
  detector->detectAndCompute( prevframe, Mat(), keypoints2, descriptors_2 );

  //-- Step 2: Matching descriptor vectors using FLANN matcher
  FlannBasedMatcher matcher;
  std::vector< DMatch > matches;
  matcher.match( descriptors_1, descriptors_2, matches );
  double max_dist = 0; double min_dist = 100;

  //-- Quick calculation of max and min distances between keypoints
  for( int i = 0; i < descriptors_1.rows; i++ )
  { double dist = matches[i].distance;
    if( dist < min_dist ) min_dist = dist;
    if( dist > max_dist ) max_dist = dist;
  }

  //-- Draw only "good" matches (i.e. whose distance is less than 2*min_dist,
  //-- or a small arbitary value ( 0.02 ) in the event that min_dist is very
  //-- small)
  //-- PS.- radiusMatch can also be used here.


  std::vector< DMatch > good_matches;
  for( int i = 0; i < descriptors_1.rows; i++ )
  { if( matches[i].distance <= max(2*min_dist, 0.02) )
    { good_matches.push_back( matches[i]);}
  }
  //-- Draw only "good" matches
  Mat img_matches;
  drawMatches( frame, keypoints1, prevframe, keypoints2,
               good_matches, img_matches, Scalar::all(-1), Scalar::all(-1),
               vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );

  //-- Show detected matches

  imshow( "Good Matches", img_matches );
  if( (good_matches.size() >=20)){

        for( unsigned int i = 0; i < good_matches.size(); i++ )
        {

        }
  }

    }
    waitKey(0);
    return 0;
}

please help

thanks all

2017-05-17 04:17:58 -0600 received badge  Enthusiast
2017-05-16 03:38:42 -0600 commented question DSO missing from command line !!

its done berak, thanks

2017-05-16 03:35:21 -0600 commented question DSO missing from command line !!

i tried adding opencv_flann it didnt work

2017-05-16 03:07:21 -0600 asked a question DSO missing from command line !!

http://answers.ros.org/question/26179... please help me out guys ..

thanks

2017-05-09 06:29:57 -0600 commented question error using MIL tracker,opencv_contrib

it worked,, i had to do,, sudo apt-get update and sudo apt-get upgrade to resolve this , thanks @berak,, and sorry if i irritated you.. cheers

2017-05-09 06:01:04 -0600 commented question error using MIL tracker,opencv_contrib

just final step :)

2017-05-09 06:00:47 -0600 commented question error using MIL tracker,opencv_contrib

@berak this is working fine, and build finished successfully ,, thanks,, but i am not able to run ./tracker its showing me ./tracker: error while loading shared libraries: libopencv_tracking.so.3.2: cannot open shared object file: No such file or directory

2017-05-09 04:41:19 -0600 commented question error using MIL tracker,opencv_contrib
2017-05-09 04:39:16 -0600 commented question error using MIL tracker,opencv_contrib

i did it,, now i am not getting any errors (thanks @berak) .. now its this https://pastebin.com/0kP3zzfi ,,

2017-05-08 11:46:54 -0600 commented question error using MIL tracker,opencv_contrib

tried that too,, not happening

2017-05-08 11:04:31 -0600 commented question error using MIL tracker,opencv_contrib

this is the code https://pastebin.com/bKi111q0 just giving error in create tracker

2017-05-08 11:03:07 -0600 commented question error using MIL tracker,opencv_contrib

Building file: ../src/tracker2.cpp Invoking: GCC C++ Compiler g++ -I/usr/local/lib -I/usr/local/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/tracker2.d" -MT"src/tracker2.d" -o "src/tracker2.o" "../src/tracker2.cpp" ../src/tracker2.cpp: In function ‘int main(int, char)’: ../src/tracker2.cpp:14:44: error: expected primary-expression before ‘const’ Ptr<tracker> tracker = Tracker::create(const String& TrackerMIL ); ^ make: * [src/tracker2.o] Error 1 src/subdir.mk:18: recipe for target 'src/tracker2.o' failed

17:01:53 Build Finished (took 914ms)

this is not the include error !! some small thing is really missing ..

2017-05-08 09:57:57 -0600 commented question error using MIL tracker,opencv_contrib

that was rude :(

2017-05-08 09:33:23 -0600 commented question error using MIL tracker,opencv_contrib

how can i solve this

2017-05-08 09:33:03 -0600 commented question error using MIL tracker,opencv_contrib

i solved the error now u«its just one thing if you can help @berak

Invoking: GCC C++ Linker g++ -L/usr/local/lib -L/usr/local/include -L/usr/include -o "tracker" ./src/tracker.o -lopencv_imgproc -lopencv_utility -lopencv_videoio -lopencv_highgui -lopencv_vedio -lopencv_core -lopencv_tracking /usr/bin/ld: cannot find -lopencv_utility /usr/bin/ld: cannot find -lopencv_vedio collect2: error: ld returned 1 exit status makefile:45: recipe for target 'tracker' failed make: * [tracker] Error 1

2017-05-08 06:54:24 -0600 commented question error using MIL tracker,opencv_contrib

i got the flow,, i have opencv3 which came with my ros kinect , and i need to buikd my opencv_contrib there ,,, opencv3 after locating is in /opt/ros/kinetic/share/opencv3 ..

2017-05-08 06:40:46 -0600 commented question error using MIL tracker,opencv_contrib

home/zubair/opencv_contrib/opencv_contrib/modules/tracking/include/opencv2/tracking/tracker.hpp:1341:56: error: template argument 1 is invalid CV_WRAP bool add(const Mat& image, std::vector<rect2d> boundingBox); ^ /home/zubair/opencv_contrib/opencv_contrib/modules/tracking/include/opencv2/tracking/tracker.hpp:1341:56: error: template argument 2 is invalid /home/zubair/opencv_contrib/opencv_contrib/modules/tracking/include/opencv2/tracking/tracker.hpp:1351:15: error: ‘Rect2d’ was not declared in this scope std::vector<rect2d> objects; ^

again, why am i getting errors in header file ? :(

2017-05-08 06:22:40 -0600 commented question error using MIL tracker,opencv_contrib

what should i do next to rectify the error ?

2017-05-08 06:21:40 -0600 commented question error using MIL tracker,opencv_contrib

yes berek so i have build all with opencv_contrib in opencv source folder

2017-05-08 06:16:07 -0600 commented question error using MIL tracker,opencv_contrib

i am follwoing the instruction here http://docs.opencv.org/3.2.0/de/d25/t... , so far its building good,, i will be back after its done

2017-05-08 05:51:54 -0600 commented question error using MIL tracker,opencv_contrib

where should the binaries be build ?

2017-05-08 05:46:05 -0600 commented question error using MIL tracker,opencv_contrib

zubair@zubair-X541UV:~/opencv_contrib$ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. CMake Error: The source directory "/home/zubair" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. zubair@zubair-X541UV:~/opencv_contrib$

this is what i got after i follwed this link http://docs.opencv.org/master/d7/d9f/...

2017-05-08 05:44:25 -0600 commented question error using MIL tracker,opencv_contrib

one thing berek,, in this link http://docs.opencv.org/master/d7/d9f/... ,, what should i add in place of cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. what path ??

2017-05-08 05:42:34 -0600 commented question error using MIL tracker,opencv_contrib

include for my opencv_contrib ?? you mean ?

2017-05-08 05:35:34 -0600 commented question error using MIL tracker,opencv_contrib

how should i undo the extra module which i added in existing opencv ?'' and how to install then from build ? :(

2017-05-08 05:34:21 -0600 commented question error using MIL tracker,opencv_contrib

zubair@zubair-X541UV:~$ g++ -I/usr/local/include g++: fatal error: no input files compilation terminated. zubair@zubair-X541UV:~$

it couldnt find

2017-05-08 05:33:18 -0600 commented question error using MIL tracker,opencv_contrib

i dont have a build folder ,, just a make file :(

2017-05-08 05:31:03 -0600 commented question error using MIL tracker,opencv_contrib

i actually just build the extra module .. from this link https://github.com/opencv/opencv_contrib ,,

2017-05-08 05:24:13 -0600 commented question error using MIL tracker,opencv_contrib

actually is just the problem with the tracking.hpp,, something is going wrong ..

2017-05-08 05:23:18 -0600 commented question error using MIL tracker,opencv_contrib

i did,, please check my comment .. i gave the whole error as pastebin link .