Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
24cb30fe
Commit
24cb30fe
authored
Jun 20, 2011
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed errors and warnings when building with MSVC
parent
3b2d4b57
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
9 deletions
+14
-9
dist.h
modules/flann/include/opencv2/flann/dist.h
+9
-4
dynamic_bitset.h
modules/flann/include/opencv2/flann/dynamic_bitset.h
+1
-1
flann.hpp
modules/flann/include/opencv2/flann/flann.hpp
+1
-1
hierarchical_clustering_index.h
...ann/include/opencv2/flann/hierarchical_clustering_index.h
+1
-1
lsh_table.h
modules/flann/include/opencv2/flann/lsh_table.h
+2
-2
No files found.
modules/flann/include/opencv2/flann/dist.h
View file @
24cb30fe
...
...
@@ -34,7 +34,12 @@
#include <cmath>
#include <cstdlib>
#include <string.h>
#ifdef _MSC_VER
typedef
unsigned
uint32_t
;
typedef
unsigned
__int64
uint64_t
;
#else
#include <stdint.h>
#endif
#include "defines.h"
...
...
@@ -150,10 +155,10 @@ struct L2
/* Process 4 items with each loop for efficiency. */
while
(
a
<
lastgroup
)
{
diff0
=
a
[
0
]
-
b
[
0
]
;
diff1
=
a
[
1
]
-
b
[
1
]
;
diff2
=
a
[
2
]
-
b
[
2
]
;
diff3
=
a
[
3
]
-
b
[
3
]
;
diff0
=
(
ResultType
)(
a
[
0
]
-
b
[
0
])
;
diff1
=
(
ResultType
)(
a
[
1
]
-
b
[
1
])
;
diff2
=
(
ResultType
)(
a
[
2
]
-
b
[
2
])
;
diff3
=
(
ResultType
)(
a
[
3
]
-
b
[
3
])
;
result
+=
diff0
*
diff0
+
diff1
*
diff1
+
diff2
*
diff2
+
diff3
*
diff3
;
a
+=
4
;
b
+=
4
;
...
...
modules/flann/include/opencv2/flann/dynamic_bitset.h
View file @
24cb30fe
...
...
@@ -138,7 +138,7 @@ public:
*/
bool
test
(
size_t
index
)
const
{
return
(
b
ool
)(
bitset_
[
index
/
cell_bit_size_
]
&
(
size_t
(
1
)
<<
(
index
%
cell_bit_size_
)))
;
return
(
b
itset_
[
index
/
cell_bit_size_
]
&
(
size_t
(
1
)
<<
(
index
%
cell_bit_size_
)))
!=
0
;
}
private
:
...
...
modules/flann/include/opencv2/flann/flann.hpp
View file @
24cb30fe
...
...
@@ -57,7 +57,7 @@ namespace cvflann
FLANN_DEPRECATED
inline
void
set_distance_type
(
flann_distance_t
distance_type
,
int
order
=
0
)
{
flann_distance_type_
()
=
distance_type
;
flann_distance_type_
()
=
(
flann_distance_t
)((
size_t
)
distance_type
+
order
*
0
)
;
}
}
...
...
modules/flann/include/opencv2/flann/hierarchical_clustering_index.h
View file @
24cb30fe
...
...
@@ -224,7 +224,7 @@ private:
// Repeat several trials
double
bestNewPot
=
-
1
;
int
bestNewIndex
;
int
bestNewIndex
=
0
;
for
(
int
localTrial
=
0
;
localTrial
<
numLocalTries
;
localTrial
++
)
{
// Choose our center - have to be slightly careful to return a valid answer even accounting
...
...
modules/flann/include/opencv2/flann/lsh_table.h
View file @
24cb30fe
...
...
@@ -46,7 +46,7 @@
#include <map>
#endif
#include <math.h>
#include <std
int
.h>
#include <std
def
.h>
#include "dynamic_bitset.h"
#include "matrix.h"
...
...
@@ -385,7 +385,7 @@ inline size_t LshTable<unsigned char>::getKey(const unsigned char* feature) cons
size_t
mask_block
=
*
pmask_block
;
while
(
mask_block
)
{
// Get the lowest set bit in the mask block
size_t
lowest_bit
=
mask_block
&
(
-
mask_block
);
size_t
lowest_bit
=
mask_block
&
(
-
(
ptrdiff_t
)
mask_block
);
// Add it to the current subsignature if necessary
subsignature
+=
(
feature_block
&
lowest_bit
)
?
bit_index
:
0
;
// Reset the bit in the mask block
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment