basicly write a bicubic algorithm without function provided by OpenCV
- The code makes use of two libraries: and <opencv2/opencv.hpp>.
- hfuction Function: This function calculates the weights for bicubic interpolation based on the given distance x. It uses different formulas for different distance intervals, as shown below:
- The MOZU bird photo input size: 378x283; output size: 1024x720.
- I selected a 4x4 area in the same position of two resized images and printed their grayscale values, as shown in the illustration below. It can be found that there is a slight difference with the built-in function of OpenCV, which may be caused by a different approximation method, within a reasonable range.