Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
68d4dd75
Commit
68d4dd75
authored
Jan 07, 2012
by
Davis King
Browse files
Fixed an array indexing bug.
parent
6e06db71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
dlib/image_processing/scan_image_pyramid.h
dlib/image_processing/scan_image_pyramid.h
+5
-3
No files found.
dlib/image_processing/scan_image_pyramid.h
View file @
68d4dd75
...
@@ -132,6 +132,7 @@ namespace dlib
...
@@ -132,6 +132,7 @@ namespace dlib
}
}
void
get_mapped_rect_and_metadata
(
void
get_mapped_rect_and_metadata
(
const
unsigned
long
number_pyramid_levels
,
rectangle
rect
,
rectangle
rect
,
rectangle
&
mapped_rect
,
rectangle
&
mapped_rect
,
detection_template
&
best_template
,
detection_template
&
best_template
,
...
@@ -594,7 +595,7 @@ namespace dlib
...
@@ -594,7 +595,7 @@ namespace dlib
rectangle
mapped_rect
;
rectangle
mapped_rect
;
detection_template
best_template
;
detection_template
best_template
;
unsigned
long
best_level
;
unsigned
long
best_level
;
get_mapped_rect_and_metadata
(
rect
,
mapped_rect
,
best_template
,
best_level
);
get_mapped_rect_and_metadata
(
max_pyramid_levels
,
rect
,
mapped_rect
,
best_template
,
best_level
);
return
mapped_rect
;
return
mapped_rect
;
}
}
...
@@ -606,6 +607,7 @@ namespace dlib
...
@@ -606,6 +607,7 @@ namespace dlib
>
>
void
scan_image_pyramid
<
Pyramid_type
,
Feature_extractor_type
>::
void
scan_image_pyramid
<
Pyramid_type
,
Feature_extractor_type
>::
get_mapped_rect_and_metadata
(
get_mapped_rect_and_metadata
(
const
unsigned
long
number_pyramid_levels
,
rectangle
rect
,
rectangle
rect
,
rectangle
&
mapped_rect
,
rectangle
&
mapped_rect
,
detection_template
&
best_template
,
detection_template
&
best_template
,
...
@@ -620,7 +622,7 @@ namespace dlib
...
@@ -620,7 +622,7 @@ namespace dlib
// for all the levels
// for all the levels
for
(
unsigned
long
l
=
0
;
l
<
max
_pyramid_levels
;
++
l
)
for
(
unsigned
long
l
=
0
;
l
<
number
_pyramid_levels
;
++
l
)
{
{
// Run the center point through the feature/image space transformation just to make
// Run the center point through the feature/image space transformation just to make
// sure we exactly replicate the procedure for shifting an object_box used elsewhere
// sure we exactly replicate the procedure for shifting an object_box used elsewhere
...
@@ -699,7 +701,7 @@ namespace dlib
...
@@ -699,7 +701,7 @@ namespace dlib
rectangle
mapped_rect
;
rectangle
mapped_rect
;
detection_template
best_template
;
detection_template
best_template
;
unsigned
long
best_level
;
unsigned
long
best_level
;
get_mapped_rect_and_metadata
(
rect
,
mapped_rect
,
best_template
,
best_level
);
get_mapped_rect_and_metadata
(
feats
.
size
(),
rect
,
mapped_rect
,
best_template
,
best_level
);
for
(
unsigned
long
j
=
0
;
j
<
best_template
.
rects
.
size
();
++
j
)
for
(
unsigned
long
j
=
0
;
j
<
best_template
.
rects
.
size
();
++
j
)
{
{
...
...
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