MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / border_image

Function border_image

yolo_detector/darknet_opt/src/image.c:106–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106image border_image(image a, int border)
107{
108 image b = make_image(a.w + 2*border, a.h + 2*border, a.c);
109 int x,y,k;
110 for(k = 0; k < b.c; ++k){
111 for(y = 0; y < b.h; ++y){
112 for(x = 0; x < b.w; ++x){
113 float val = get_pixel_extend(a, x - border, y - border, k);
114 if(x - border < 0 || x - border >= a.w || y - border < 0 || y - border >= a.h) val = 1;
115 set_pixel(b, x, y, k, val);
116 }
117 }
118 }
119 return b;
120}
121
122image tile_images(image a, image b, int dx)
123{

Callers 1

get_labelFunction · 0.85

Calls 3

make_imageFunction · 0.85
get_pixel_extendFunction · 0.85
set_pixelFunction · 0.85

Tested by

no test coverage detected