| 52 | |
| 53 | |
| 54 | Data Augmentations::Resize(Data mData, int width, int height, float probability) { |
| 55 | float rand_number = RandomNum<float>(0, 1); |
| 56 | if (rand_number <= probability) { |
| 57 | |
| 58 | float h_scale = height * 1.0 / mData.image.rows; |
| 59 | float w_scale = width * 1.0 / mData.image.cols; |
| 60 | |
| 61 | cv::resize(mData.image, mData.image, cv::Size(width, height)); |
| 62 | cv::resize(mData.mask, mData.mask, cv::Size(width, height)); |
| 63 | } |
| 64 | return mData; |
| 65 | } |
| 66 | |
| 67 | Data Augmentations::HorizontalFlip(Data mData, float probability) { |
| 68 | float rand_number = RandomNum<float>(0, 1); |
nothing calls this directly
no outgoing calls
no test coverage detected