Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is the solution to do 16x16 and then 8x8.

for (int i = 0; i < height-16; i += 16) {

   for (int j = 0; j < width-16; j+= 16) 
   {
      Mat block = dctImage(Rect(j, i, 8, 8));

      vector<Mat> planes; 

      split(block, planes);
    }

}

This is the solution to do 16x16 and then 8x8.

for (int i = 0; i < height-16; i += 16)
{ 

 for (int j = 0; j < width-16; j+= 16)
{
Mat block = dctImage(Rect(j, i, 8, 8));
vector<Mat> planes;
split(block, planes);
}
}

}