mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
merged
This commit is contained in:
commit
692ddb8c18
@ -410,8 +410,8 @@ namespace dlib
|
||||
auto_mutex M(m);
|
||||
assign_image_scaled(img,new_img);
|
||||
rectangle old(rect);
|
||||
rect.set_right(rect.left()+img.nc()-1);
|
||||
rect.set_bottom(rect.top()+img.nr()-1);
|
||||
rect.set_right(rect.left()+num_columns(img)-1);
|
||||
rect.set_bottom(rect.top()+num_rows(img)-1);
|
||||
parent.invalidate_rectangle(rect+old);
|
||||
}
|
||||
|
||||
|
@ -681,7 +681,7 @@ namespace dlib
|
||||
{
|
||||
const long x = p.x();
|
||||
const long y = p.y();
|
||||
rectangle rect(x,y,img.nc()+x-1,img.nr()+y-1);
|
||||
rectangle rect(x,y,num_columns(img)+x-1,num_rows(img)+y-1);
|
||||
rectangle area = c.intersect(rect).intersect(area_);
|
||||
if (area.is_empty())
|
||||
return;
|
||||
@ -709,11 +709,11 @@ namespace dlib
|
||||
)
|
||||
{
|
||||
const rectangle area = c.intersect(rect).intersect(area_);
|
||||
if (area.is_empty() || img.size() == 0)
|
||||
if (area.is_empty() || num_columns(img) * num_rows(img) == 0)
|
||||
return;
|
||||
|
||||
const matrix<long,1> x = matrix_cast<long>(round(linspace(0, img.nc()-1, rect.width())));
|
||||
const matrix<long,1> y = matrix_cast<long>(round(linspace(0, img.nr()-1, rect.height())));
|
||||
const matrix<long,1> x = matrix_cast<long>(round(linspace(0, num_columns(img)-1, rect.width())));
|
||||
const matrix<long,1> y = matrix_cast<long>(round(linspace(0, num_rows(img)-1, rect.height())));
|
||||
|
||||
for (long row = area.top(); row <= area.bottom(); ++row)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ using namespace dlib;
|
||||
|
||||
|
||||
|
||||
// The rear view vehicle detector network
|
||||
// The front and rear view vehicle detector network
|
||||
template <long num_filters, typename SUBNET> using con5d = con<num_filters,5,5,2,2,SUBNET>;
|
||||
template <long num_filters, typename SUBNET> using con5 = con<num_filters,5,5,1,1,SUBNET>;
|
||||
template <typename SUBNET> using downsampler = relu<affine<con5d<32, relu<affine<con5d<32, relu<affine<con5d<16,SUBNET>>>>>>>>>;
|
||||
|
Loading…
Reference in New Issue
Block a user