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
48125601
Commit
48125601
authored
Jul 18, 2011
by
Marius Muja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing ticket #1230
parent
39ec7099
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
config.h
modules/flann/include/opencv2/flann/config.h
+4
-1
saving.h
modules/flann/include/opencv2/flann/saving.h
+7
-4
No files found.
modules/flann/include/opencv2/flann/config.h
View file @
48125601
...
...
@@ -30,6 +30,9 @@
#ifndef OPENCV_FLANN_CONFIG_H_
#define OPENCV_FLANN_CONFIG_H_
#define FLANN_VERSION "1.6.10"
#ifdef FLANN_VERSION_
#undef FLANN_VERSION_
#endif
#define FLANN_VERSION_ "1.6.10"
#endif
/* OPENCV_FLANN_CONFIG_H_ */
modules/flann/include/opencv2/flann/saving.h
View file @
48125601
...
...
@@ -35,7 +35,10 @@
#include "general.h"
#include "nn_index.h"
#define FLANN_SIGNATURE "FLANN_INDEX"
#ifdef FLANN_SIGNATURE_
#undef FLANN_SIGNATURE_
#endif
#define FLANN_SIGNATURE_ "FLANN_INDEX"
namespace
cvflann
{
...
...
@@ -84,9 +87,9 @@ void save_header(FILE* stream, const NNIndex<Distance>& index)
{
IndexHeader
header
;
memset
(
header
.
signature
,
0
,
sizeof
(
header
.
signature
));
strcpy
(
header
.
signature
,
FLANN_SIGNATURE
);
strcpy
(
header
.
signature
,
FLANN_SIGNATURE
_
);
memset
(
header
.
version
,
0
,
sizeof
(
header
.
version
));
strcpy
(
header
.
version
,
FLANN_VERSION
);
strcpy
(
header
.
version
,
FLANN_VERSION
_
);
header
.
data_type
=
Datatype
<
typename
Distance
::
ElementType
>::
type
();
header
.
index_type
=
index
.
getType
();
header
.
rows
=
index
.
size
();
...
...
@@ -110,7 +113,7 @@ inline IndexHeader load_header(FILE* stream)
throw
FLANNException
(
"Invalid index file, cannot read"
);
}
if
(
strcmp
(
header
.
signature
,
FLANN_SIGNATURE
)
!=
0
)
{
if
(
strcmp
(
header
.
signature
,
FLANN_SIGNATURE
_
)
!=
0
)
{
throw
FLANNException
(
"Invalid index file, wrong signature"
);
}
...
...
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