| 2021 | typename interpolation_type |
| 2022 | > |
| 2023 | void insert_image_chip ( |
| 2024 | image_type1& image, |
| 2025 | const image_type2& chip, |
| 2026 | const chip_details& location, |
| 2027 | const interpolation_type& interp |
| 2028 | ) |
| 2029 | { |
| 2030 | image_view<image_type1> vimg(image); |
| 2031 | const_image_view<image_type2> vchip(chip); |
| 2032 | DLIB_CASSERT(static_cast<unsigned long>(vchip.nr()) == location.rows && |
| 2033 | static_cast<unsigned long>(vchip.nc()) == location.cols, |
| 2034 | "The chip and the location do not have the same size.") |
| 2035 | const auto tf = get_mapping_to_chip(location); |
| 2036 | for (long r = 0; r < vimg.nr(); ++r) |
| 2037 | { |
| 2038 | for (long c = 0; c < vimg.nc(); ++c) |
| 2039 | { |
| 2040 | interp(vchip, tf(dpoint(c, r)), vimg[r][c]); |
| 2041 | } |
| 2042 | } |
| 2043 | } |
| 2044 | |
| 2045 | // ---------------------------------------------------------------------------------------- |
| 2046 |
no test coverage detected