I would like to do something like the following in order to display two images on the screen:
imshow("1", img1);
imshow('2', 'img2');
Is it possible to do that?
MatPlotLib with Python Create random data using numpy. Add a subplot to the current figure, nrows=1, ncols=4 and at index=1. Display data as an image, i.e., on a 2D regular raster, using imshow() method with cmap="Blues_r". Add a subplot to the current figure, nrows=1, ncols=4 and at index=2.
Yes, it is possible. The function void imshow(const string& winname, InputArray mat)
displays an image in the specified window, where -
The window is identified by its name. So to display two images(img1, img2), in two different window; use imshow
with different name like :-
imshow("1",img1);
imshow("2",img2);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With