#include <opencv2\opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
Mat frame(630, 891, CV_8UC1, Scalar::all(0));
int nWidthOfROI = 90;
for (int j = 0; j<frame.rows; j++)
{
uchar* data = frame.ptr<uchar>(j);
for (int i = 0; i<frame.cols; i ++)
{
if ((i / nWidthOfROI + j / nWidthOfROI) % 2)
{
data[i] = 255;
}
}
}
imshow("test", frame);
imwrite("C:/Users/Administrator/Desktop/11/board.jpg", frame);
waitKey(0);
return 0;
}
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
Mat frame(630, 891, CV_8UC1, Scalar::all(0));
int nWidthOfROI = 90;
for (int j = 0; j<frame.rows; j++)
{
uchar* data = frame.ptr<uchar>(j);
for (int i = 0; i<frame.cols; i ++)
{
if ((i / nWidthOfROI + j / nWidthOfROI) % 2)
{
data[i] = 255;
}
}
}
imshow("test", frame);
imwrite("C:/Users/Administrator/Desktop/11/board.jpg", frame);
waitKey(0);
return 0;
}