MCPcopy Create free account
hub / github.com/davisking/dlib / zero_border_pixels

Function zero_border_pixels

dlib/image_transforms/assign_image.h:287–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285 typename image_type
286 >
287 void zero_border_pixels (
288 image_type& img,
289 long x_border_size,
290 long y_border_size
291 )
292 {
293 DLIB_ASSERT( x_border_size >= 0 && y_border_size >= 0,
294 "\tvoid zero_border_pixels(img, p, border_size)"
295 << "\n\tYou have given an invalid border_size"
296 << "\n\tx_border_size: " << x_border_size
297 << "\n\ty_border_size: " << y_border_size
298 );
299
300 typename image_traits<image_type>::pixel_type zero_pixel;
301 assign_pixel_intensity(zero_pixel, 0);
302 assign_border_pixels(img, x_border_size, y_border_size, zero_pixel);
303 }
304
305// ----------------------------------------------------------------------------------------
306

Calls 13

assign_pixel_intensityFunction · 0.85
assign_border_pixelsFunction · 0.85
get_rectFunction · 0.85
assign_all_pixelsFunction · 0.85
assign_pixelFunction · 0.85
intersectMethod · 0.45
is_emptyMethod · 0.45
topMethod · 0.45
ncMethod · 0.45
bottomMethod · 0.45
leftMethod · 0.45
rightMethod · 0.45

Tested by 2

test_border_enumeratorFunction · 0.68
test_zero_border_pixelsFunction · 0.68