I am trying to display the images using the following method in c++ where rows and columns are the maximum number of rows and columns in the display window respectively.
Need help on how to maintain the aspect ratio of the image by showing in the same window dimensions where the dimensions are rows and columns.
void showImagesFromVector(vector<String> imagesVector, int rows, int columns) {
Mat resizedImage;
cv::resize(image, resizedImage, cv::Size(rows, columns), INTER_LINEAR);
imshow("image", resizedImage);
}