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

Method make_chip

dlib/image_processing/correlation_tracker.h:295–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293
294 template <typename image_type>
295 point_transform_affine make_chip (
296 const image_type& img,
297 drectangle p,
298 std::vector<matrix<std::complex<double> > >& chip
299 ) const
300 {
301 typedef typename image_traits<image_type>::pixel_type pixel_type;
302 array2d<pixel_type> temp;
303 const double padding = 1.4;
304 const chip_details details(p*padding, chip_dims(get_filter_size(), get_filter_size()));
305 extract_image_chip(img, details, temp);
306
307
308 chip.resize(32);
309 dlib::array<array2d<float> > hog;
310 extract_fhog_features(temp, hog, 1, 3,3 );
311 for (unsigned long i = 0; i < hog.size(); ++i)
312 assign_image(chip[i], pointwise_multiply(matrix_cast<double>(mat(hog[i])), mask));
313
314 assign_image(chip[31], temp);
315 assign_image(chip[31], pointwise_multiply(mat(chip[31]), mask)/255.0);
316
317 return inv(get_mapping_to_chip(details));
318 }
319
320 void make_target_location_image (
321 const dlib::vector<double,2>& p,

Callers

nothing calls this directly

Calls 10

extract_image_chipFunction · 0.85
extract_fhog_featuresFunction · 0.85
pointwise_multiplyFunction · 0.85
get_mapping_to_chipFunction · 0.85
chip_dimsClass · 0.50
assign_imageFunction · 0.50
matFunction · 0.50
invFunction · 0.50
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected