Problem with copying a block of data
I am trying to process an image frame in blocks of size 16 x 16. However, when I try to copy data in blocks I am only getting the data from the last block for each image. To verify if I am getting the data correctly I am displaying each block. Can anyone please point out my mistake. Thank you.
for(int y=1; y<pels.y; y=y+block_size)
{
for(int x=1; x<pels.x; x=x+block_size)
{
difference_frame(Range(y,y+block_size-1),Range(x,x+block_size-1)).copyTo(Src);
imshow("Block of Data",Src);
}
}
Range(y,y+block_size)
would be correctwaitKey()
immediately after the imshow