Combining multiple blocks into one image
Hello,
I had 256x256 image which I successfully split into 32x32 blocks. So in total I have 64 blocks. I did some operations on these blocks obtained. And now I want to combine these 64 32x32 blocks into 256x256 image. Here is the code I tried but in vain. Any help would be appreciated.
//combine blocks
for ( int y= 0; y<256; y+=smallBlock.height )
{
for ( int x= 0 ; x<256; x+=smallBlock.width )
{
cv::Rect rcn=cv::Rect(x,y,smallBlock.width,smallBlock.height);
smallBlock.copyTo(rcn);
}
}
Here smallBlock has height 32 and width 32.