Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ cv::LUT()-插值参数是什么?_C++_Opencv - Fatal编程技术网

C++ cv::LUT()-插值参数是什么?

C++ cv::LUT()-插值参数是什么?,c++,opencv,C++,Opencv,根据查找表在8位数组中进行替换,并将结果存储在dst中 opencv对插值参数不起作用。它的用途是什么?可以为它传递哪些值?它似乎是多余的(或者可能是为将来的扩展保留的) 如果您查看该函数的实现,您将看到以下内容(请注意函数体第二行中的断言!): void cv::LUT(输入阵列_src、输入阵列_LUT、输出阵列_dst、整数插值) { Mat src=_src.getMat(),lut=_lut.getMat(); CV_断言(插值==0); int cn=src.channels();

根据查找表在8位数组中进行替换,并将结果存储在dst中

opencv对
插值
参数不起作用。它的用途是什么?可以为它传递哪些值?

它似乎是多余的(或者可能是为将来的扩展保留的)

如果您查看该函数的实现,您将看到以下内容(请注意函数体第二行中的断言!):

void cv::LUT(输入阵列_src、输入阵列_LUT、输出阵列_dst、整数插值)
{
Mat src=_src.getMat(),lut=_lut.getMat();
CV_断言(插值==0);
int cn=src.channels();
int lutcn=lut.channels();
CV|U断言((lutcn==cn | | lutcn==1)&&
lut.total()==256&&lut.isContinuous()&&
(src.depth()==CV|8U | src.depth()==CV|8S));
_create(src.dims,src.size,CV_MAKETYPE(lut.depth(),cn));
Mat dst=_dst.getMat();
LUTFunc func=lutTab[lut.depth()];
CV_断言(func!=0);
常数矩阵*数组[]={&src,&dst,0};
uchar*ptrs[2];
NaryMaterator it(阵列、PTR);
int len=(int)it.size;
对于(大小i=0;i
 void LUT(InputArray src, InputArray lut, OutputArray dst, int interpolation=0 )
void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst, int interpolation )
{
    Mat src = _src.getMat(), lut = _lut.getMat();
    CV_Assert( interpolation == 0 );
    int cn = src.channels();
    int lutcn = lut.channels();

    CV_Assert( (lutcn == cn || lutcn == 1) &&
        lut.total() == 256 && lut.isContinuous() &&
        (src.depth() == CV_8U || src.depth() == CV_8S) );
    _dst.create( src.dims, src.size, CV_MAKETYPE(lut.depth(), cn));
    Mat dst = _dst.getMat();

    LUTFunc func = lutTab[lut.depth()];
    CV_Assert( func != 0 );

    const Mat* arrays[] = {&src, &dst, 0};
    uchar* ptrs[2];
    NAryMatIterator it(arrays, ptrs);
    int len = (int)it.size;

    for( size_t i = 0; i < it.nplanes; i++, ++it )
        func(ptrs[0], lut.data, ptrs[1], len, cn, lutcn);
}