Ask Your Question

Revision history [back]

Hi again: If i change

//At this point, we should to build the index of the big  matrix
Index fln = new Index(supermatrix, 4);

//Retrieve The Rows supermatrix
Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(observedDescriptors, indices, dist, k, 12);

to

//At this point, we should to build the index of the big  matrix
Index fln = new Index(observedDescriptors, 4);

//Retrieve The Rows supermatrix

Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(supermatrix, indices, dist, k, 20);

Indices and dist have values but the following code has output many rare values: for (int i = 0; i < indices.Rows; i++){
if (dist.Data[i, 0] < 0.8 * dist.Data[i, 1]){ Debug.WriteLine("This Point Is Good"); Debug.WriteLine("The image most similar is" + i); } }

This Point Is Good The image most similar is11 This Point Is Good The image most similar is12 This Point Is Good The image most similar is25 This Point Is Good The image most similar is27 This Point Is Good The image most similar is30 This Point Is Good The image most similar is31 ................................ ................................

All points in dist are similar?

Hi again: If i change

//At this point, we should to build the index of the big  matrix
Index fln = new Index(supermatrix, 4);

//Retrieve The Rows supermatrix
Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(observedDescriptors, indices, dist, k, 12);

to

//At this point, we should to build the index of the big  matrix
Index fln = new Index(observedDescriptors, 4);

//Retrieve The Rows supermatrix

Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(supermatrix, indices, dist, k, 20);

Indices and dist have values but the following code has output many rare values: values:

 for (int i = 0; i < indices.Rows; i++){ 
if (dist.Data[i, 0] < 0.8 * dist.Data[i, 1]){ Debug.WriteLine("This Point Is Good"); Debug.WriteLine("The image most similar is" + i); } }

} This Point Is Good The image most similar is11 This Point Is Good The image most similar is12 This Point Is Good The image most similar is25 This Point Is Good The image most similar is27 This Point Is Good The image most similar is30 This Point Is Good The image most similar is31 ................................ ................................

................................

All points in dist are similar?
I think that i have a big error in the code.

Hi again: If i change

//At this point, we should to build the index of the big  matrix
Index fln = new Index(supermatrix, 4);

//Retrieve The Rows supermatrix
Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(observedDescriptors, indices, dist, k, 12);

to

//At this point, we should to build the index of the big  matrix
Index fln = new Index(observedDescriptors, 4);

//Retrieve The Rows supermatrix

Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(supermatrix, indices, dist, k, 20);

I think that this line it's incorrect, i think that the index should be built with supermatrix Index fln = new Index(observedDescriptors, 4);

Indices and dist have values but the following code has output many rare values:

 for (int i = 0; i < indices.Rows; i++){                
           if (dist.Data[i, 0] < 0.8 * dist.Data[i, 1]){
                        Debug.WriteLine("This Point Is Good");
                        Debug.WriteLine("The image most similar is" + i);
         }
    }


This Point Is Good
The image most similar is11
This Point Is Good
The image most similar is12
This Point Is Good
The image most similar is25
This Point Is Good
The image most similar is27
This Point Is Good
The image most similar is30
This Point Is Good
The image most similar is31
................................
................................

All points in dist are similar?
I think that i have a big error in the code.

Hi again: If i change

//At this point, we should to build the index of the big  matrix
Index fln = new Index(supermatrix, 4);

//Retrieve The Rows supermatrix
Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(observedDescriptors, indices, dist, k, 12);

to

//At this point, we should to build the index of the big  matrix
Index fln = new Index(observedDescriptors, 4);

//Retrieve The Rows supermatrix

Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(supermatrix, indices, dist, k, 20);

I think that this line it's incorrect, i think that the index should be built with supermatrix Index fln = new Index(observedDescriptors, 4); //What it's the correct line? Index fln = new Index(supermatrix, 4);

Indices and dist have values but the following code has output many rare values:

 for (int i = 0; i < indices.Rows; i++){                
           if (dist.Data[i, 0] < 0.8 * dist.Data[i, 1]){
                        Debug.WriteLine("This Point Is Good");
                        Debug.WriteLine("The image most similar is" + i);
         }
    }


This Point Is Good
The image most similar is11
This Point Is Good
The image most similar is12
This Point Is Good
The image most similar is25
This Point Is Good
The image most similar is27
This Point Is Good
The image most similar is30
This Point Is Good
The image most similar is31
................................
................................

All points in dist are similar?
I think that i have a big error in the code.

Hi again: If i change

//At this point, we should to build the index of the big  matrix
Index fln = new Index(supermatrix, 4);

//Retrieve The Rows supermatrix
Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(observedDescriptors, indices, dist, k, 12);

to

//At this point, we should to build the index of the big  matrix
Index fln = new Index(observedDescriptors, 4);

//Retrieve The Rows supermatrix

Matrix<int> indices = new Matrix<int>(supermatrix.Rows, k);
Matrix<float> dist = new Matrix<float>(supermatrix.Rows, k);

fln.KnnSearch(supermatrix, indices, dist, k, 20);

I think that this line it's incorrect, i think that the index should be built with supermatrix supermatrix

Index fln = new Index(observedDescriptors, 4); //What it's the correct line?
 Index fln = new Index(supermatrix, 4);

4);

Indices and dist have values but the following code has output many rare values:

 for (int i = 0; i < indices.Rows; i++){                
           if (dist.Data[i, 0] < 0.8 * dist.Data[i, 1]){
                        Debug.WriteLine("This Point Is Good");
                        Debug.WriteLine("The image most similar is" + i);
         }
    }


This Point Is Good
The image most similar is11
This Point Is Good
The image most similar is12
This Point Is Good
The image most similar is25
This Point Is Good
The image most similar is27
This Point Is Good
The image most similar is30
This Point Is Good
The image most similar is31
................................
................................

All points in dist are similar?
I think that i have a big error in the code.