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
0e552ea6
Commit
0e552ea6
authored
Dec 30, 2013
by
Roman Donchenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
1acc1085
' into merge-2.4
parents
2de4ad05
1acc1085
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
hierarchical_clustering_index.h
...ann/include/opencv2/flann/hierarchical_clustering_index.h
+42
-0
imgproc_c.h
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
+1
-1
No files found.
modules/flann/include/opencv2/flann/hierarchical_clustering_index.h
View file @
0e552ea6
...
...
@@ -297,6 +297,11 @@ public:
trees_
=
get_param
(
params
,
"trees"
,
4
);
root
=
new
NodePtr
[
trees_
];
indices
=
new
int
*
[
trees_
];
for
(
int
i
=
0
;
i
<
trees_
;
++
i
)
{
root
[
i
]
=
NULL
;
indices
[
i
]
=
NULL
;
}
}
HierarchicalClusteringIndex
(
const
HierarchicalClusteringIndex
&
);
...
...
@@ -309,11 +314,34 @@ public:
*/
virtual
~
HierarchicalClusteringIndex
()
{
free_elements
();
if
(
root
!=
NULL
)
{
delete
[]
root
;
}
if
(
indices
!=
NULL
)
{
delete
[]
indices
;
}
}
/**
* Release the inner elements of indices[]
*/
void
free_elements
()
{
if
(
indices
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
trees_
;
++
i
)
{
if
(
indices
[
i
]
!=
NULL
)
{
delete
[]
indices
[
i
];
indices
[
i
]
=
NULL
;
}
}
}
}
/**
* Returns size of index.
*/
...
...
@@ -348,6 +376,9 @@ public:
if
(
branching_
<
2
)
{
throw
FLANNException
(
"Branching factor must be at least 2"
);
}
free_elements
();
for
(
int
i
=
0
;
i
<
trees_
;
++
i
)
{
indices
[
i
]
=
new
int
[
size_
];
for
(
size_t
j
=
0
;
j
<
size_
;
++
j
)
{
...
...
@@ -387,6 +418,17 @@ public:
load_value
(
stream
,
centers_init_
);
load_value
(
stream
,
leaf_size_
);
load_value
(
stream
,
memoryCounter
);
free_elements
();
if
(
root
!=
NULL
)
{
delete
[]
root
;
}
if
(
indices
!=
NULL
)
{
delete
[]
indices
;
}
indices
=
new
int
*
[
trees_
];
root
=
new
NodePtr
[
trees_
];
for
(
int
i
=
0
;
i
<
trees_
;
++
i
)
{
...
...
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
View file @
0e552ea6
...
...
@@ -364,7 +364,7 @@ CV_INLINE double cvContourPerimeter( const void* contour )
}
/* Calculates contour bound
n
ing rectangle (update=1) or
/* Calculates contour bounding rectangle (update=1) or
just retrieves pre-calculated rectangle (update=0) */
CVAPI
(
CvRect
)
cvBoundingRect
(
CvArr
*
points
,
int
update
CV_DEFAULT
(
0
)
);
...
...
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