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

Method set_size

dlib/python/numpy_image.h:200–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 }
199
200 void set_size(size_t rows, size_t cols)
201 {
202 using basic_pixel_type = typename pixel_traits<pixel_type>::basic_pixel_type;
203 constexpr size_t channels = pixel_traits<pixel_type>::num;
204 if (channels != 1)
205 *this = py::array_t<basic_pixel_type, py::array::c_style>({rows, cols, channels});
206 else
207 *this = py::array_t<basic_pixel_type, py::array::c_style>({rows, cols});
208 }
209
210 private:
211 static py::array_t<typename pixel_traits<pixel_type>::basic_pixel_type, py::array::c_style> convert_to_numpy(matrix<pixel_type>&& img)

Callers 1

set_image_sizeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected