我正在尝试实现如下功能
I am trying to implement some function like below
为此,我尝试使用 三次插值
和 Catmull 插值
(分别检查两者以比较最佳结果),我不明白这些插值有什么影响在图像上显示以及我们如何在我们点击设置曲线的地方获得这些点值?以及我们需要单独定义图像上这些黑点的函数吗?
For this I am trying to use Cubic interpolation
and Catmull interpolation
( check both separately to compare the best result) , what i am not understanding is what impact these interpolation show on image and how we can get these points values where we clicked to set that curve ? and do we need to define the function these black points on the image separately ?
我正在从这些资源中获得帮助
I am getting help from these resources
来源 1
来源 2
大致相同的焦点
编辑
int main (int argc, const char** argv)
{
Mat input = imread ("E:\img2.jpg");
for(int i=0 ; i<input.rows ; i++)
{
for (int p=0;p<input.cols;p++)
{
//for(int t=0; t<input.channels(); t++)
//{
input.at<cv::Vec3b>(i,p)[0] = 255*correction(input.at<cv::Vec3b>(i,p)[0]/255.0,ctrl,N); //B
input.at<cv::Vec3b>(i,p)[1] = 255*correction(input.at<cv::Vec3b>(i,p)[1]/255.0,ctrl,N); //G
input.at<cv::Vec3b>(i,p)[2] = 255*correction(input.at<cv::Vec3b>(i,p)[2]/255.0,ctrl,N); //R
/