- 617
- 0
- 约2.16千字
- 约 72页
- 2020-10-22 发布于广东
- 举报
目录 ;2;o 10.3 CalcEMD2 ;;对 aperture_size=1 则给出最快计算结果,相当于对图像采用如下内核做卷积: ;;;8;;10;11;12;src
输入图像.
dst
提取的四边形. map_matrix
3 × 2 变换矩阵 [A|b] (见讨论).
函数 cvGetQuadrangleSubPix 以子象素精度从图像 src 中提取四边形,使用子 象素精度,并且将结果存储于 dst ,计算公式是:
dst(x + width(dst) / 2,y + height(dst) / 2) = src(A11x + A12y + b1,A21x + A22y + b2)
其中 A 和 b 均来自映射矩阵(译者注:A, b 为几何形变参数) ,映射矩阵为: ;14;;;;;;20;#include cv.h #include highgui.h
int main(int argc, char** argv)
{
IplImage* src;
if( argc == 2 (src=cvLoadImage(argv[1],1) != 0 )
{
IplImage* dst = cvCreateImage( cvSize(256,256), 8, 3 );
IplImage* src2 = cvCreateImage( cvGetSize(src), 8, 3 );
cvLogPolar( src, dst, cvPoint2D32f(src-width/2,src-height/2),
40, CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS );
cvLogPolar( dst, src2, cvPoint2D32f(src-width/2,src-height/2),
40, CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS+CV_WARP_INVERSE_MAP );
cvNamedWindow( log-polar, 1 );
cvShowImage( log-polar, dst );
cvNamedWindow( inverse log-polar, 1 );
cvShowImage( inverse log-polar, src2 );
cvWaitKey();
}
return 0;
}
And this is what the program displays when opencv/samples/c/fruits.jpg is passed to it ;22;23;24;25;26;27;28;对象素值平方的积分图像,W+1×H+1(译者注:原文的公式应该写成 (W+1)×(H+1),避免误会), 单通道,32 位整数或 double 精度的浮点数 (64f).
tilted_sum
旋转 45 度的积分图像,单通道,32 位整数或 double 精度的浮点数 (64f).
函数 cvIntegral 计算一次或高次积分图像: ;30;31;32; threshold_type=CV_THRESH_TOZERO:
dst(x,y) = src(x,y), if (x,y)threshold
0, otherwise
threshold_type=CV_THRESH_TOZERO_INV: dst(x,y) = 0, if src(x,y)threshold
src(x,y), otherwise
下面是图形化的阈值描述: ;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;这是函数所用的样本图像: ;;51;52;53;下面用户自定义距离的的距离域示例 (黑点 (0) 在白色方块中间): 用户自定 义 3×3 mask (a=1, b=1.5) ;55;56;57;58;59;60;CV_COMP_CORREL
CV_COMP_CHISQR
CV_COMP_INTERSECT
CV_COMP_BHATTACHARYYA
函数 cvCompareHist 采用下面指定的方法比较两个稠密直方图(H1 表示 第一个, H2 表示第二个):
Correlation (method=CV_COMP_CORREL): ;62;63;64
原创力文档

文档评论(0)