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

Skip to content

Conversation

rogday
Copy link
Member

@rogday rogday commented Jun 20, 2022

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

@rogday rogday added feature category: apps OpenCV builtin tools labels Jun 20, 2022
@alalek
Copy link
Member

alalek commented Jul 4, 2022

Need to squash commits and rebase this PR:

Conflicting files
apps/interactive-calibration/calibCommon.hpp
apps/interactive-calibration/calibPipeline.cpp
apps/interactive-calibration/main.cpp
apps/interactive-calibration/parametersController.cpp

Comment on lines +79 to +83
do
{
open_camera();
} while (!mCapture.isOpened() || !mCapture.grab());
Copy link
Member

Choose a reason for hiding this comment

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

Instead of blank screen for infinite period of time I prefer to see messages like these:

  • "Reopening camera (try #N) ..."

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, I added "trying to reopen" message only before the loop since thousands of messages/sec about which try it is aren't very informative in my opinion.

Copy link
Member

Choose a reason for hiding this comment

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

Why is not informative? It indicates that process hang or not.

To avoid thousands of messages/sec delay could be used, e.g. cv::waitKey() (also it reduce unnecessary CPU load)

Copy link
Member Author

Choose a reason for hiding this comment

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

Because there are no functions that can hang, I think.(correct me if I'm wrong). CPU load is not an issue because this application already uses all resources it can find. Artificial delay would only slow us down if errors are common enough, but pass quickly. But if the delay is too short - we'll get a lot of messages if the errors are rare, but last longer. How many ms do you have in mind for delay?

@opencv-pushbot opencv-pushbot merged commit 47a59d7 into opencv:4.x Aug 5, 2022
@rogday rogday deleted the force_reopen branch August 5, 2022 11:24
@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.

4 participants