|
本帖最后由 creation0 于 2016-2-16 23:47 编辑
结构定义:
typedef struct CvPoint
{
int x;
int y;
}
CvPoint;
typedef struct CvScalar
{
double val[4];
}
CvScalar;
函数原型:
CVAPI(void) cvLine( CvArr* img, CvPoint pt1, CvPoint pt2,
CvScalar color, int thickness CV_DEFAULT(1),
int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) );
CVAPI(void) cvCircle( CvArr* img, CvPoint center, int radius,
CvScalar color, int thickness CV_DEFAULT(1),
int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0));
在MASM32中使用时,
结构定义:
CvPoint struc
x dd 0
y dd 0
CvPoint ends
CvScalar struc
val dq 4 dup (0)
CvScalar ends
变量定义:
local lpIplImage, pt1: CvPoint, pt2: CvPoint, color: CvScalar, radius
变量pt1,pt2, radius,color赋值:
...
调用:
invoke cvLine, lpIplImage, addr pt1, addr pt2, addr color, 1, 8, 0
结果图片上啥都没画上
调用:
invoke cvCircle, lpIplImage, addr pt1, radius, addr color, 1, 8, 0
结果图片上除了左侧多了1条细细的黑色竖线贯穿图片,其它也啥都没有
注:windows XP, openCV2.4.11
请帮忙分析一下问题所在,不胜感谢!!! |
|