本文介紹了三次和 catmull 樣條對圖像的影響的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我正在嘗試實現如下功能
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
/
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!