fpstracker-1.0.0
توضیحات
A Python package to detect and calculate the webcam frame rate per second in any system.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | fpstracker-1.0.0 |
| نام | fpstracker |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Naveen kumar S <snaveenkumar343@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/fpstracker/ |
| مجوز | - |
# 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()
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl fpstracker-1.0.0:
pip install fpstracker-1.0.0.whl
نصب پکیج tar.gz fpstracker-1.0.0:
pip install fpstracker-1.0.0.tar.gz