您的位置:首页 > 运维架构

opencv IplImage矩阵元素赋值

2014-05-25 15:42 204 查看
创建IplImage结构体,对任意像素作赋值操作。

void DrawPoint(IplImage* img,CvPoint point,CvScalar color)
{
	int step = img->widthStep;
	unsigned char* ImgData;
	ImgData = (unsigned char *)img->imageData;
	for(int i=0;i<3;i++)
	{
		ImgData[point.y*step+point.x*3+i]=MyValue;
	}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: