图片尺寸信息。
1 2 3 4 5 6 7 8 9 10 11 | namespace MxBase{ struct ImageSize { size_t height; size_t width; ImageSize() = default; ImageSize(size_t height, size_t width) { this->width = width; this->height = height; } } |
1 2 3 4 5 6 7 8 9 10 11 12 | namespace MxTools{ struct ImageSize { size_t height; size_t width; size_t area; ImageSize(int height, int width) { this->width = static_cast<size_t>(width); this->height = static_cast<size_t>(height); this->area = static_cast<size_t>(height * width); } } |
参数名 |
说明 |
---|---|
height |
图片的高。 |
width |
图片的宽。 |
area |
图片面积。 |