feature2d ORB (Bug #2028)
Description
Hi Guys
I have problem with ORB under feature2d. This function has input bool use ProvidedKeypoints. I put this option true. In this case, It has to use my KeyPoints. The output no descriptor and makes the input KeyPoints becomes zeros. The function works great if the options is false which means that u can not input u keypoints. Is it right ?
This is my test code
1#include <C:\OpenCV2.4\build\include\opencv\cxcore.hpp>
2#include <C:\OpenCV2.4\build\include\opencv2\features2d\features2d.hpp>
3#include <C:\OpenCV2.4\build\include\opencv\highgui.h>
4#include <C:\OpenCV2.4\build\include\opencv2\imgproc\imgproc.hpp>
5#include <C:\OpenCV2.4\build\include\opencv2\flann\flann.hpp>
6#include <stdlib.h>
7#include <stdio.h>
8#include <iostream>
9#include <fstream>
10#include <string>
11#include <utility>
12
13using namespace std;
14using namespace cv;
15
16int main()
17{
18
19 // Read the image
20 Mat img1=imread("E:\\Boss_project\\DATABASE\\Multi-PIE\\pose_-45\\session1\\201_01_01_080_05.png");
21 Mat out1;
22 cvtColor(img1,out1,CV_RGB2GRAY);
23
24 // Read the detected facial features (Key Points)
25 string STRING;
26 int pos;
27 double y;
28 double x;
29 string y_str;
30 string x_str;
31
32 Mat disr1;
33 vector<KeyPoint> kp1;
34
35 ifstream infile;
36 infile.open ("E:\\Boss_project\\PNLL_A_B_C_output\\facialfeature_txt\\13991_L_pts-68.txt");
37 while(!infile.eof()) // To get you all the lines.
38 {
39 getline(infile,STRING); // Saves the line in STRING.
40 pos=STRING.find_last_of(" ");
41 if(pos>0)
42 {
43 y_str=(STRING.substr(pos));
44 x_str=(STRING.substr(0,pos-1));
45 istringstream (y_str) >> y;
46 istringstream (x_str) >> x;
47 KeyPoint c(x,y,200,0,0.1,0,-1);
48 kp1.push_back(c);
49 }
50 else
51 {
52 break;
53 }
54 }
55
56// Extract the descriptor around each facial point
57 ORB bob;
58 Mat mask(out1.rows,out1.cols,CV_32F,Scalar(1));
59 bob(out1,mask,kp1,disr1,true);
Associated revisions
Merge pull request #2028 from KonstantinMatskevich:ocl_tapi_morphology
History
Updated by Marina Kolpakova almost 13 years ago
- Description changed from Hi Guys I have problem with ORB under feature2d. This function has input boo... to Hi Guys I have problem with ORB under feature2d. This function has input boo... More
Updated by Eslam Mostafa almost 13 years ago
I am sorry, I solved. It is not debug.
Updated by Alexander Shishkov almost 13 years ago
- Status changed from Open to Cancelled
- Target version set to 2.4.2
- Assignee changed from Maria Dimashova to Alexander Shishkov