Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

cpoerschke
Copy link
Contributor

Problem: the model_visualization.avi with XVID codec did (silently) not work whereas model_visualization.mp4 with H264 does work.

Proposed solution: make the video codec configurable (defaulting to existing behaviour) and error-log-and-exit if the output video file could not be opened.

Usage example

(The "happy fish" image does not have the 20x20 size of the "profile face" model but it seems nonetheless suitable for smoke test use.)

opencv_build/bin/opencv_visualisation \
--image=opencv/samples/data/HappyFish.jpg \
--model=opencv/data/haarcascades/haarcascade_profileface.xml \
--data=temp_data/ \
--ext=mp4 --fourcc=H264 --fps=42

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 Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the 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

@asmorkalov asmorkalov added the category: apps OpenCV builtin tools label Jun 6, 2022
@asmorkalov
Copy link
Contributor

Thanks for the contribution! Looks good to me.

@asmorkalov asmorkalov self-requested a review June 7, 2022 05:49
@asmorkalov asmorkalov self-requested a review June 17, 2022 08:56
Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov
Copy link
Contributor

Tested manually with Ubuntu 18.04 amd64.

@alalek alalek merged commit db5b22e into opencv:3.4 Jun 17, 2022
@alalek alalek mentioned this pull request Jun 26, 2022
@alalek alalek mentioned this pull request Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: apps OpenCV builtin tools feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants