This commit is contained in:
Davis King 2017-11-20 18:48:45 -05:00
commit 4d5c77cacb
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ If you aren't reporting a bug or problem with dlib then delete this template and
<!-- ================================================================ -->
<!-- Delete the above instructions and then provide a general summary of the issue in the Title above -->
<!-- Delete the above instructions and then provide a general summary of the issue in the Title above. Then fill out the template below. -->
## Expected Behavior
<!--- Tell us what should happen. What were you doing? What part of dlib are you using? What do you think should happen? -->

View File

@ -145,7 +145,7 @@ namespace dlib
)
{
typedef op_heatmap<image_type> op;
if (img.size() != 0)
if (num_columns(img) * num_rows(img) != 0)
return matrix_op<op>(op(img,max(mat(img)),min(mat(img))));
else
return matrix_op<op>(op(img,0,0));
@ -255,7 +255,7 @@ namespace dlib
)
{
typedef op_jet<image_type> op;
if (img.size() != 0)
if (num_columns(img) * num_rows(img) != 0)
return matrix_op<op>(op(img,max(mat(img)),min(mat(img))));
else
return matrix_op<op>(op(img,0,0));