Skip to main content

A Python package to detect and calculate the webcam frame rate per second in any system.

Project description

FPS Tracker

fps_tracker helps to detect and measure the webcam's frame rate per second in any system

This frame rate depends on both the computational speed and the webcam's capability as usual.

You can install using pip:

pip3 install fpstracker

Import package:

import cv2
import time
from fpstracker import Tracker

You can call the module using the syntax:

trackfps.FPS(img, pos1, Average_FPS, pos2)
  • img is the frame in which the FPS will be calculated and displayed
  • pos1 is the pixel position of the measured FPS in text
  • Average_FPS is the average FPS measured for every 5 seconds. This argument is optional and default is set to True
  • pos2 is the pixel postion of the average FPS in text

Sample python program:

import cv2
import time
from fpstracker import Tracker
cap = cv2.VideoCapture(0)
trackfps = Tracker()
while True:
    ret, image = cap.read()
    img = trackfps.FPS(img = image)
    cv2.imshow('Frames', img)
    k = cv2.waitKey(1)
    if k & 0xFF == 27:
        break
cv2.destroyAllWindows()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fpstracker-1.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fpstracker-1.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file fpstracker-1.0.0.tar.gz.

File metadata

  • Download URL: fpstracker-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for fpstracker-1.0.0.tar.gz
Algorithm Hash digest
SHA256 10de5c5d677468808df6244c8e168afd5d21e66f251696727e3b4df45c6889e1
MD5 9f6592008faa06db3c438110b0dcdfea
BLAKE2b-256 775bb374e996f9a0240af376918368ee1b28b1899f91db33ecd7b095a6ccbe3e

See more details on using hashes here.

File details

Details for the file fpstracker-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fpstracker-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for fpstracker-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 391268e985cfbd9a0554a3c6e0518cce33967ef3d29bb69b1cb4324cd46e6157
MD5 11e43149b194b3386fcba4027d63be24
BLAKE2b-256 c2ee664d58339470a4c027a6260cd0a51bfc18442567da2c90b7ae1e4dbdaf30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page