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 #3723

Merged
merged 4 commits into from
Apr 22, 2024
Merged

5.x merge 4.x #3723

merged 4 commits into from
Apr 22, 2024

Commits on Apr 16, 2024

  1. Configuration menu
    Copy the full SHA
    a2ba3e9 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Merge pull request opencv#3722 from mshabunin:fix-features2d-test

    xfeatures2d: reduce test avg memory consumption
    asmorkalov authored Apr 17, 2024
    Configuration menu
    Copy the full SHA
    5cc1a44 View commit details
    Browse the repository at this point in the history
  2. Merge pull request opencv#3641 from simutisernestas:4.x

    Camera spatial velocity computation through interaction matrix opencv#3641
    
    ### Feature
    
    The code computed camera spatial velocity given two images, pixels depth, camera matrix and the timestamp between the images. This is enabled by, so called, interaction matrix (usually utilized in visual servoing applications) relating pixel plane velocities to the camera spatial velocity in 3D i.e., twist - velocity and angular rate of the camera. The inverse problem can be solved by sampling pixel & their velocities to solve least-squares for twist. The relationship can be seen below in the picture.
    
    ![image](https://github.com/opencv/opencv_contrib/assets/35775651/b83179ba-9d5a-4324-863a-4ad6e158564a)
    
    The code does not include a proper example and is not tested but if there is interest I could contribute more appealing example and use case for camera velocity computation. However, I attach below a dummy example with random data simply to make sure that it's running as is. I have used this before in aiding UAV localization and thought someone else might benefit from it being integrated into `opencv`. 
    
    ```c++
    #include "opencv2/rgbd/twist.hpp"
    #include "opencv2/core.hpp"
    #include "opencv2/imgproc.hpp"
    
    int main()
    {
        using namespace cv::rgbd;
        Twist t;
    
        // create two random image
        cv::Mat im0(480, 640, CV_8UC1);
        cv::Mat im1(480, 640, CV_8UC1);
        cv::Mat depths0(480, 640, CV_32F);
        cv::Mat K = cv::Mat::eye(3, 3, CV_32F);
    
        cv::theRNG().state = time(0);
        cv::randn(im0, 0, 255);
        cv::randn(im1, 0, 255);
        cv::randn(depths0, 0, 100);
    
        cv::Vec6d twist = t.compute(im0, im1, depths0, K, 0.1);
    
        return 0;
    }
    
    ```
    
    References
    1. Chaumette, François, and Seth Hutchinson. "Visual servo control. I. Basic approaches." IEEE Robotics & Automation Magazine 13.4 (2006): 82-90.
    2. https://robotacademy.net.au/lesson/image-based-visual-servoing/
    
    ### Pull Request Readiness Checklist
    
    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
    - [ ] 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
    simutisernestas authored Apr 17, 2024
    Configuration menu
    Copy the full SHA
    ac994ed View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Merge branch 4.x

    asmorkalov committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    1400863 View commit details
    Browse the repository at this point in the history