[Resolved] Why does scikit-image return the frame count of a video as a float?

skimage.io.Video works by using OpenCV, and for frame_count it uses OpenCV’s function GetCaptureProperty which always returns a double no matter what property is passed.

This function, in turn, calls another function based on how/where the video capture was created. As an example, it could be based on GStreamer, which will always return an integer for frame_count. When using QuickTime instead, frame_count is defined as movieDuration*movieFPS/1000 and therefore is a floating-point value.

Read more here: Source link