Attention! This forum will be made read-only by Dec-20. Please migrate to https://forum.opencv.org. Most of existing active users should've received invitation by e-mail.
Ask Your Question
0

Save two different images displayed at separate imshow?

asked 2016-03-20 14:27:43 -0500

215 gravatar image

How do i store two different images at the same time, when a key is pressed?

edit retag flag offensive close merge delete

Comments

2

I'm not sure to understand your question :

imshow("First image",img1);
imshow("Second image",img2);
c=waitKey(0);
if (c=='s')
{
imwrite("imag1.jpg",img1);
imwrite("imag2.jpg",img2);
}
LBerger gravatar imageLBerger ( 2016-03-20 14:58:42 -0500 )edit

exactly .... :|

215 gravatar image215 ( 2016-03-20 15:01:56 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-20 15:03:22 -0500

Tetragramm gravatar image

See the documentation of waitKey to see how to wait for the key to be pressed.

See imwrite for how to save an image.

And HERE is a tutorial that does part of what you want.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-03-20 14:27:43 -0500

Seen: 109 times

Last updated: Mar 20 '16