#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace cv;
static Scalar GRID_EMPTY_COLOR = Scalar(0x33, 0x33, 0x33, 0xFF);
int main( int argc, char** argv )
{
//read image
Mat img;
string filename="lena.jpg";
img=imread(filename,CV_LOAD_IMAGE_COLOR);
Size size(img.cols, img.rows);
Mat mRgba15;
mRgba15.create(size, CV_MAKETYPE(img.depth(), 3));
Mat cells[16];
Mat mCells15[16];
int rows = img.rows;
int cols = img.cols;
rows = rows - rows%4;
cols = cols - cols%4;
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
int k = i * 4 + j;</