cv::FloatSize imageSize(640.0f, 480.0f);
cv::FloatSize imageSize(1280.0f, 720.0f); float aspectRatio = imageSize.width / imageSize.height;This example defines a FloatSize for an image with a size of 1280x720 pixels and calculates its aspect ratio by dividing the width by the height. Package library: OpenCV.