Ask Your Question

jan's profile - activity

2018-09-15 23:42:59 -0600 received badge  Notable Question (source)
2017-08-14 04:08:44 -0600 received badge  Popular Question (source)
2016-04-22 01:37:56 -0600 asked a question how can I use bow descriptors to find match?

Hello, I am having bow descriptors and vocabulary for my data set. And also have query image descriptor.The goal is to find out exact matching image of the query image from data set.so how can i find out match?

2016-03-21 02:28:30 -0600 commented answer how to find matching image

hello berak, I was wrong that problem was not related to push back......Its about bowDE.compute(img,keypoints,bowDescriptor) //error i googled and i got this...link text can't able to understand..... I change the type of bowDescriptor from cv_8U to cv_32F ...but not resolve.?plz help

2016-03-18 04:15:06 -0600 commented answer how to find matching image

hi berak,i define bowTrain as vector<mat>bowTrain and then trying to push back the descriptor matrix on bowTrain like bowTrain.push_back(bowDescriptor); is it my correct way? It's throwing error" Unhandled exception at 0x0f345a40 (opencv_features2d2411.dll) in BoFSURF.exe: 0xC0000005: Access violation reading location 0x00000014." plz help

2016-03-10 03:18:28 -0600 commented answer how to find matching image

hello berak, I have one problem with "vector<mat> bowtrain".Above in my code i am clustering dictionary in Mat.So how can i use it in "norm"function? please help

2016-03-07 03:24:35 -0600 received badge  Scholar (source)
2016-03-07 03:24:31 -0600 received badge  Supporter (source)
2016-03-03 05:14:08 -0600 commented answer how to find matching image

I don't understand which algorithms should I use to retrieve similar image?will you please give me some ideas?

2016-03-03 04:10:26 -0600 commented answer how to find matching image

in short i want content based image retrieval .So how can i do that.

2016-03-02 23:34:11 -0600 commented answer how to find matching image

No,I want to check that my query image is in my data set or not.if present then want to show on screen.

2016-03-02 07:04:59 -0600 asked a question how to find matching image

Hello,

i want to extract similar image from vocabulary that was created in above code.this code run successfully creating two descriptors file.My question is that I don't understand that file "descriptr.yml" contains extracted features of query image or matched features of query image with vocabulary. Please help

my code is...

#include "stdafx.h"
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv2/nonfree/features2d.hpp>

using namespace cv;
using namespace std;

#define DICTIONARY_BUILD 0 // set DICTIONARY_BUILD 1 to do Step 1, otherwise it goes to step 2

int _tmain(int argc, _TCHAR* argv[])
{   
int minHessian = 400; //Hessian Threshold
#if DICTIONARY_BUILD == 1

    //Step 1 - Obtain the set of bags of features.

    //to store the input file names
char  filename[100]={};     
    //to store the current input image
    Mat input;  

    //To store the keypoints that will be extracted by SURF
    vector<KeyPoint> keypoints;
    //To store the SURF descriptor of current image
    Mat descriptor;
    //To store all the descriptors that are extracted from all the images.
    Mat featuresUnclustered;
    //The SURF feature extractor and descriptor 
    SurfDescriptorExtractor detector(minHessian,4,2,false);     

    //I select 20 (1000/50) images from 1000 images to extract feature descriptors and build the vocabulary
    for(int f=1;f<25;f++){      
        //create the file name of an image
        sprintf(filename,"C:\\harshada\\OpenCV BoFSURF\\Release\\image\\%i.jpg",f);
        //open the file
        input = imread(filename, CV_LOAD_IMAGE_GRAYSCALE); //Load as grayscale  
    //Mat img =cv::imread("C:\\harshada\\OpenCV BoFSURF\\Release\\image\\22.jpg");
    //cv::cvtColor(img,img,CV_BGR2GRAY);
        if(input.empty())
    {
        cout << "Error: Image cannot be loaded !" << endl;
        system("Pause");
        return -1;
    }
        //detect feature points
        detector.detect(input, keypoints);
        //compute the descriptors for each keypoint
        detector.compute(input, keypoints,descriptor);      
        //put the all feature descriptors in a single Mat object 
        featuresUnclustered.push_back(descriptor);      
        //print the percentage
        printf("%i percent done\n",f/10);
    }   


    //Construct BOWKMeansTrainer
    //the number of bags
    int dictionarySize=200;
    //define Term Criteria
    TermCriteria tc(CV_TERMCRIT_ITER,100,0.001);
    //retries number
    int retries=1;
    //necessary flags
    int flags=KMEANS_PP_CENTERS;
    //Create the BoW (or BoF) trainer
    BOWKMeansTrainer bowTrainer(dictionarySize,tc,retries,flags);
    bowTrainer.add(featuresUnclustered);
    if (featuresUnclustered.type() != CV_32F)
{
    featuresUnclustered.convertTo(featuresUnclustered, CV_32F);
}
Mat vocabulary = bowTrainer.cluster();
    //cluster the feature vectors
    //Mat dictionary=bowTrainer.cluster(featuresUnclustered);   
    //store the vocabulary
    FileStorage fs("C:\\harshada\\OpenCV BoFSURF\\Release\\image\\dictionary.yml", FileStorage::WRITE);
    fs << "vocabulary" << vocabulary;
    fs.release();

#else
    //Step 2 - Obtain the BoF descriptor for given image/video frame. 

    //prepare BOW descriptor extractor from the dictionary    
    Mat dictionary; 
    FileStorage fs("C:\\harshada\\OpenCV BoFSURF\\Release\\image\\dictionary.yml", FileStorage::READ);
    fs["vocabulary"] >> dictionary;
    fs.release();   

    //create a nearest neighbor matcher
    Ptr<DescriptorMatcher> matcher(new FlannBasedMatcher);
    //create SURF feature point extracter
    Ptr<FeatureDetector> detector(new SurfFeatureDetector(minHessian,4,2,false));
    //create SURF descriptor extractor
    Ptr<DescriptorExtractor> extractor(new SurfDescriptorExtractor(minHessian,4,2,false));  
    //create BoF (or BoW) descriptor extractor
    BOWImgDescriptorExtractor bowDE(extractor,matcher);
    //Set the dictionary with the vocabulary we created in the first step
    bowDE.setVocabulary(dictionary);

    //To store the image file name
    char * filename = new char[100 ...
(more)
2016-02-22 02:58:28 -0600 commented question extract exact match of image from dataset

no.Actually I am having same real part and data set (of images of same real part captured from different views like top view,bottom view etc ) so whenever i put real part in front of camera(in particular view) then my search engine should find the the exact image of that view to match.

2016-02-22 00:17:08 -0600 commented question extract exact match of image from dataset

image I am having the same real part with me and its images from different views(images are captured by camera).

2016-02-22 00:17:08 -0600 received badge  Enthusiast
2016-02-19 00:16:49 -0600 commented question extract exact match of image from dataset

i am having real part of bracket of vehicle and I captured images of that from different views and angles(side,top,bottom,front,different angles).So whenever I put that bracket in front of the camera (suppose front view in front of camera) exact (i.e front view)image should be extracted from the set of images.so how to do this?

2016-02-18 00:55:28 -0600 asked a question extract exact match of image from dataset

In my project I want to extract exact match of the image (coming through camera) from the data set.Data set contains the set of positive and negative images.Images in data set having small differences .So problem is that if i use "features detector "algorithm it gives me no of images but i ant exact match .how can i do this?

2016-02-03 21:46:51 -0600 commented question can not include xfeatures2d in opencv 3.0

I followed the instructions as per http://audhootchavancv.blogspot.in/20... .Instead of "face" module i was trying to add "xfeatures2d"module.but no success......

2016-02-03 04:17:06 -0600 asked a question can not include xfeatures2d in opencv 3.0

I installed opencv3.0 and cmake and also download opencv_contrib from git. After configuring opencv in cmake , i built ALL_BUILD.sln file in vs12.I got some errors like can not open opencv_xfeatures2d300d.lib

So how can i add extra modules of opencv especially xfeatures2d ? please help asap