| 148 | |
| 149 | template<class pixel_type> |
| 150 | void test_load_save_frame(const std::string& filename) |
| 151 | { |
| 152 | matrix<pixel_type> img1, img2; |
| 153 | img1 = get_random_image<pixel_type>(); |
| 154 | |
| 155 | save_frame(img1, filename, {{"qmin", "1"}, {"qmax", "1"}}); |
| 156 | load_frame(img2, filename); |
| 157 | |
| 158 | DLIB_TEST(img1.nr() == img2.nr()); |
| 159 | DLIB_TEST(img1.nc() == img2.nc()); |
| 160 | const double similarity = psnr(img1, img2); |
| 161 | DLIB_TEST_MSG(similarity > 20.0, "psnr " << similarity); |
| 162 | } |
| 163 | |
| 164 | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 165 | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected