Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.x merge 4.x #3885

Merged
merged 15 commits into from
Feb 24, 2025
Merged

5.x merge 4.x #3885

merged 15 commits into from
Feb 24, 2025

Conversation

asmorkalov
Copy link
Contributor

@asmorkalov asmorkalov commented Feb 18, 2025

Extra: opencv/opencv_extra#1237
Main repo: opencv/opencv#26939

Note: Have to add opencv_dnn to ML module samples dependency list to resolve in-tree build issues.

#3867 from cudawarped:cudacodec_enable_win32_ffmpeg_features
#3868 from cudawarped:cudacodec_videowriter_add_full_range_flag
#3870 from vrabaud:remove_c
#3876 from tomoaki0705:warning_endif_directive
#3880 from cudawarped:cudacodec_fix_videowriter_version_checks
#3882 from cudawarped:cudacodec_videowriter_h265_quicktime_compatibility

Previous "Merge 4.x": #3871

cudawarped and others added 14 commits January 9, 2025 07:55
The cvInvSqrt code replacement is taken from 5.x
…_ffmpeg_features

`cudacodec`: Enable features available with updated ffmpeg dll
… the yuv frames passed to VideoWriter occupy the full or limited range as defined by the Annex E of the ITU-T Specification.
…add_full_range_flag

`cudacodec::VideoWriter` add flag for writing full range luma chroma video
Fix bugs in checker_detector.cpp after resolving conflicts from PR opencv#3599 opencv#3877

### This is the pull request for fixing some bugs in "Color Checker detection"

+ The link to pretrained tensorflow model for detecting Macbeth Color-checker:
 https://drive.google.com/drive/folders/1JNWlmyfZKxiYQoYk6f0RzcGtHuiZq1Pz

#### 1, Detecting color-checker using Neural network
 When loading the pretrained Macbeth color-checker detector model, and set it successfully to CCheckerDetector,
```
Ptr<CCheckerDetector> detector = CCheckerDetector::create();
    if (!detector->setNet(net))
    {
         cout << "Loading Model failed: Aborting" << endl;
         return 0;
    }
```
then 
```
if(!detector->process(image, cv::mcc::MCC24, color_checker_roi, 1, true, params)) {
        std::cout<<"Color-checker not found\n";
}
Ptr<mcc::CChecker> checker = detector->getBestColorChecker();
Ptr<CCheckerDraw> cdraw = CCheckerDraw::create(checker);
cdraw->draw(image);
```
+ problem 1:
cdraw function failed to draw the correct result due to the following code block failed to update box in checker:
```
for (Ptr<CChecker> checker : checkers){
  for (cv::Point2f &corner : checker->getBox())
      corner += static_cast<cv::Point2f>(region.tl() + innerRegion.tl());
   ...
}
```
the corrected and test pass version is:
```
for (Ptr<CChecker>& checker : checkers){
    std::vector<cv::Point2f> restore_box;
    for (cv::Point2f& corner : checker->getBox()) {
       corner += static_cast<cv::Point2f>(region.tl() + innerRegion.tl());
       restore_box.emplace_back(corner);
    }
   checker->setBox(restore_box);
}
...
```
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
…ter_version_checks

cudacodec: fix VideoWriter version check bug introduced in opencv#3711
…h265_quicktime_compatibility

`cudacodec` - VideoWriter h265 QuickTime compatibility
@asmorkalov asmorkalov merged commit 6de28c2 into opencv:5.x Feb 24, 2025
11 checks passed
@opencv-alalek opencv-alalek removed their request for review February 26, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants