Display 4 images and save as in a table (opencv , C++ )
Hello,
The code will read an image and cut into 4 parts so 4 small images. My problem is to display 4 images and save in a table.
I can display only the last image but not all with imshow : imshow ( "smallImages", cv::Mat ( image , rect ));
Please help me and think you.
for ( int y = 0 ; y < image . rows ; y += smallSize . height )
{
for ( int x = 0 ; x < image . cols ; x += smallSize . width )
{
cv :: Rect rect = cv :: Rect ( x , y , smallSize . width , smallSize . height );
smallImages . push_back ( cv :: Mat ( image , rect ));
imshow ( "smallImages", cv::Mat ( image , rect ));
}
}