python_ performance FPS

PS

Name: frames per second (Frames Per Second )

For details see Wikipedia: https://baike.baidu.com/item/FPS/3227416?fr=aladdin

Content extraction:

1. graphics field. The number of frames transmitted per second picture, animation or video picture

2. gaming. Often called (the unit "refresh rate" within Hz) - one second screen, number of scans, generally installed when the optional graphics card and monitor will be noted that the refresh rate, typically 75Hz ( = 75 frame / sec)

 

effect:

FPS is a measure for storing, displaying the number of motion video information. The more frames per second displayed more smoothly; FPS low, will lead to flickering display ineffective

- "usually FPS> = 30 frame;

- "There are some computer video field, FPS = 15

- "movie fps is generally 24

- "game is generally 75

 

 

Factors:

1. The resolution of the same, FPS the higher the better. Is higher, the graphics processing power requirements of higher resolution by the same general test Devices, respectively verification fps

Graphics processing capability (not the amount of pixel graphics processing within seconds) = the image resolution xFPS

- "play the game, the greater the resolution, the less fluent; display refresh rate is 70Hz or more, 85Hz is better

- "during the game, 30Hz no Caton; to achieve a smooth level of FPS needs to 60Hz.

 

 

adb obtain performance data FPS

Introduction: SurfaceFlinger is a system service, management Android frame buffer.

adb shell dumpsys SurfaceFlinger  --latency  com.driftking.thumbracing/com.cmcm.skidstorm.UnityPlayerActivity

 

python get fps performance data

 Tripartite module: pip install opencv-python

Installation failed Reference: https://blog.csdn.net/qq_38632611/article/details/83478592 

 

python After reading the video frames in real time calculation fps Method

https://blog.csdn.net/weixin_43534925/article/details/83449815

 

# - * - Coding: UTF-. 8 - * - 
Import CV2 

# reading video 
CAP = cv2.VideoCapture ( " ../VID_20190823_163025.mp4 " )
 # Get FPS (frames per second (Frames Per Second)) 
FPS = cap.get (cv2.CAP_PROP_FPS)
 # acquires the total number of frames 
totalFrameNumber = cap.get (cv2.CAP_PROP_FRAME_COUNT)
 Print (FPS)
 Print (totalFrameNumber)
 # current read into the first few frames 
COUNT = 0 

# if less than the total number of frames is read an image of 
the while COUNT < totalFrameNumber:
     # an image reading an 
    RET, frame = cap.read ()
     #Save the image as a jpg format each frame (the row may be selected as desired retention) 
    cv2.imwrite (STR (COUNT) + ' .jpg ' , Frame)
     # display frame to the image 
    cv2.imshow ( ' Video ' , Frame ) 
    COUNT = COUNT +. 1
     # delay period of 33ms (1s➗30 frame) and then read the next frame, if it is not a normal video display can not 
    cv2.waitKey (33 is ) 

cap.release ()

 

Guess you like

Origin www.cnblogs.com/lily-20141202/p/11401209.html