Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Difference of frame size and cv::Mat size

Dear all,

I am extracting frames from a video stream of approximately 2 minutes at 25fps. Total size of the video is 4.4MB. I calculate size of individual frame as follows:

I convert the file size into KBytes(4.41024) and calculate size of individual frame in KBytes. (4.41024) / (120*25) = 1.5 KBytes (size of one frame)

In OpenCV, I get the following frame data: Rows: 288 Cols: 352 Channels: 3 Size: [352 x 288] step: 1056 (# of bytes occupied by each row)

If I calculate size of one frame in Bytes: 1056*288 =304128 Bytes = 297KB

Could you please comments on this size calculation and explain the difference of size?

Regards,

click to hide/show revision 2
retagged

updated 2014-05-24 01:25:33 -0600

berak gravatar image

Difference of frame size and cv::Mat size

Dear all,

I am extracting frames from a video stream of approximately 2 minutes at 25fps. Total size of the video is 4.4MB. I calculate size of individual frame as follows:

I convert the file size into KBytes(4.41024) and calculate size of individual frame in KBytes. (4.41024) / (120*25) = 1.5 KBytes (size of one frame)

In OpenCV, I get the following frame data: Rows: 288 Cols: 352 Channels: 3 Size: [352 x 288] step: 1056 (# of bytes occupied by each row)

If I calculate size of one frame in Bytes: 1056*288 =304128 Bytes = 297KB

Could you please comments on this size calculation and explain the difference of size?

Regards,