Skip to content

TickMeter: added FPS and AvgTime, improved docs, reformatted#17071

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
mshabunin:tickmeter-fps
Apr 17, 2020
Merged

TickMeter: added FPS and AvgTime, improved docs, reformatted#17071
opencv-pushbot merged 1 commit intoopencv:3.4from
mshabunin:tickmeter-fps

Conversation

@mshabunin
Copy link
Copy Markdown
Contributor

  • New TickMeter methods: getFPS, getAvgTimeSec and getAvgTimeMilli
  • Extracted code snippets from documentation
  • Minor formatting fixes

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under OpenCV (BSD) License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@mshabunin mshabunin force-pushed the tickmeter-fps branch 2 times, most recently from 2214030 to 3f6a79d Compare April 15, 2020 08:36
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Comment on lines +368 to +370
if (counter <= 0)
return 0.;
return getTimeMilli() / counter;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets reduce logic:

return getAvgTimeSec() * 1e3;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if should be removed too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

@opencv-pushbot opencv-pushbot merged commit e92f1ea into opencv:3.4 Apr 17, 2020
@alalek alalek mentioned this pull request Apr 21, 2020
@mshabunin mshabunin deleted the tickmeter-fps branch May 6, 2020 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants