用到的opencv接口记录

[TOC]

一、基本操作

1. 遍历像素

1
2
3
4
5
6
7
8
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
{
int index = i*cols + j;
image.ptr<uchar>(i)[j] = 255;
}
}

2. 显示图像并且保持图像比例

1
2
3
4
namedWindow("window", WINDOW_NORMAL | WINDOW_KEEPRATIO);
imshow("window", image);
waitKey();
destroyAllWindows();
# 图像

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×