Skip to content

Commit

Permalink
Merge branch '4.x' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldosc authored Jan 16, 2025
2 parents 0a18abb + 2af5458 commit e5d7b12
Show file tree
Hide file tree
Showing 519 changed files with 24,798 additions and 10,093 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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
- [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
- [ ] 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
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/PR-4.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
Ubuntu2004-x64:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U20.yaml@main

Ubuntu2204-x64:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U22.yaml@main

Ubuntu2404-x64:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U24.yaml@main

Ubuntu2004-x64-CUDA:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml@main

Expand All @@ -23,3 +29,10 @@ jobs:

macOS-X64:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-macOS-x86_64.yaml@main

Linux-RISC-V-Clang:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml@main

openEuler2203-x64:
if: "${{ contains(github.event.pull_request.labels.*.name, 'category: cann') }}"
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-O22-CANN.yaml@main
6 changes: 3 additions & 3 deletions modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ cmake -D OPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -D BUILD_opencv_<rep

- **aruco**: ArUco and ChArUco Markers — Augmented reality ArUco marker and "ChARUco" markers where ArUco markers embedded inside the white areas of the checker board.

- **barcode**: Barcode detecting and decoding methods.

- **bgsegm**: Background segmentation algorithm combining statistical background image estimation and per-pixel Bayesian segmentation.

- **bioinspired**: Biological Vision — Biologically inspired vision model: minimize noise and luminance variance, transient event segmentation, high dynamic range tone mapping methods.
Expand Down Expand Up @@ -74,7 +72,9 @@ cmake -D OPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -D BUILD_opencv_<rep

- **saliency**: Saliency API — Where humans would look in a scene. Has routines for static, motion and "objectness" saliency.

- **sfm**: Structure from Motion — This module contains algorithms to perform 3d reconstruction from 2d images. The core of the module is a light version of Libmv.
- **signal**: Signal processing algorithms

- **sfm**: Structure from Motion -- This module contains algorithms to perform 3d reconstruction from 2d images. The core of the module is a light version of Libmv.

- **shape**: Shape Distance and Matching

Expand Down
11 changes: 8 additions & 3 deletions modules/alphamat/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Computer Vision based Alpha Matting

![Trimap Alphamat Example from Askoy et al 2017](https://github.com/opencv/opencv_contrib/assets/810997/5cafae51-18e1-4e75-9035-6b40c9a064cb)



This project was part of the Google Summer of Code 2019.

####Student: Muskaan Kularia
####Mentor: Sunita Nayak
#### Student: Muskaan Kularia
#### Mentor: Sunita Nayak

***
Alphamatting is the problem of extracting the foreground from an image. Given the input of an image and its corresponding trimap, we try to extract the foreground from the background.

Expand All @@ -20,4 +25,4 @@ This project is implementation of "[Designing Effective Inter-Pixel Information

[4] Qifeng Chen, Dingzeyu Li, Chi-Keung Tang, "[KNN Matting](http://dingzeyu.li/files/knn-matting-tpami.pdf)", IEEE TPAMI, 2013.

[5] Yagiz Aksoy, "[Affinity Based Matting Toolbox](https://github.com/yaksoy/AffinityBasedMattingToolbox)".
[5] Yagiz Aksoy, "[Affinity Based Matting Toolbox](https://github.com/yaksoy/AffinityBasedMattingToolbox)".
29 changes: 0 additions & 29 deletions modules/aruco/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,2 @@
set(the_description "ArUco Marker Detection")
ocv_define_module(aruco opencv_core opencv_imgproc opencv_calib3d opencv_objdetect WRAP python java objc js)
ocv_include_directories(${CMAKE_CURRENT_BINARY_DIR})

ocv_add_testdata(samples/ contrib/aruco
FILES_MATCHING PATTERN "*yml"
)

ocv_add_testdata(tutorials/aruco_detection/images/ contrib/aruco
FILES_MATCHING PATTERN "singlemarkersoriginal.jpg"
)

ocv_add_testdata(tutorials/aruco_board_detection/images/ contrib/aruco
FILES_MATCHING PATTERN "gboriginal.png"
)

ocv_add_testdata(tutorials/charuco_detection/images/ contrib/aruco
FILES_MATCHING PATTERN "choriginal.jpg"
)

ocv_add_testdata(tutorials/charuco_detection/images/ contrib/aruco
FILES_MATCHING PATTERN "chocclusion_original.jpg"
)

ocv_add_testdata(tutorials/charuco_diamond_detection/images/ contrib/aruco
FILES_MATCHING PATTERN "diamondmarkers.png"
)

ocv_add_testdata(tutorials/aruco_calibration/images/ contrib/aruco
FILES_MATCHING REGEX "img_[0-9]+.jpg"
)
7 changes: 6 additions & 1 deletion modules/aruco/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ ArUco Marker Detection

**ArUco**

![markers](https://github.com/opencv/opencv_contrib/assets/810997/8d587456-f27f-49e4-9540-28a0477d43fc)

ArUco markers are easy to detect pattern grids that yield up to 1024 different patterns. They were built for augmented reality and later used for camera calibration. Since the grid uniquely orients the square, the detection algorithm can determing the pose of the grid.

**ChArUco**

![screen_charuco](https://github.com/opencv/opencv_contrib/assets/810997/64610da1-ee06-406c-a19b-006b02ac44fd)


ArUco markers were improved by interspersing them inside a checkerboard called ChArUco. Checkerboard corner intersections provide more stable corners because the edge location bias on one square is countered by the opposite edge orientation in the connecting square. By interspersing ArUco markers inside the checkerboard, each checkerboard corner gets a label which enables it to be used in complex calibration or pose scenarios where you cannot see all the corners of the checkerboard.

The smallest ChArUco board is 5 checkers and 4 markers called a "Diamond Marker".
The smallest ChArUco board is 5 checkers and 4 markers called a "Diamond Marker".
3 changes: 2 additions & 1 deletion modules/aruco/include/opencv2/aruco.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CV_EXPORTS_W void getBoardObjectAndImagePoints(const Ptr<Board> &board, InputArr
InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints);


/** @deprecated Use cv::solvePnP
/** @deprecated Use Board::matchImagePoints and cv::solvePnP
*/
CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
Expand All @@ -75,6 +75,7 @@ CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, c
* This function estimates a Charuco board pose from some detected corners.
* The function checks if the input corners are enough and valid to perform pose estimation.
* If pose estimation is valid, returns true, else returns false.
* @deprecated Use CharucoBoard::matchImagePoints and cv::solvePnP
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
*/
CV_EXPORTS_W bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds,
Expand Down
23 changes: 15 additions & 8 deletions modules/aruco/include/opencv2/aruco/aruco_calib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ namespace aruco {
* PatternPositionType defines center this system and axes direction.
* Axis X (red color) - first coordinate, axis Y (green color) - second coordinate,
* axis Z (blue color) - third coordinate.
* @sa estimatePoseSingleMarkers(), check tutorial_aruco_detection in aruco contrib
*
* @deprecated Use Board::matchImagePoints and cv::solvePnP
*
* @sa estimatePoseSingleMarkers()
*/
enum PatternPositionType {
/** @brief The marker coordinate system is centered on the middle of the marker.
*
* The coordinates of the four corners (CCW order) of the marker in its own coordinate system are:
* (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0),
* (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0).
*
* These pattern points define this coordinate system:
* ![Image with axes drawn](tutorials/images/singlemarkersaxes2.jpg)
*/
ARUCO_CCW_CENTER,
/** @brief The marker coordinate system is centered on the top-left corner of the marker.
Expand All @@ -35,9 +35,6 @@ enum PatternPositionType {
* (0, 0, 0), (markerLength, 0, 0),
* (markerLength, markerLength, 0), (0, markerLength, 0).
*
* These pattern points define this coordinate system:
* ![Image with axes drawn](tutorials/images/singlemarkersaxes.jpg)
*
* These pattern dots are convenient to use with a chessboard/ChArUco board.
*/
ARUCO_CW_TOP_LEFT_CORNER
Expand All @@ -50,7 +47,10 @@ enum PatternPositionType {
* rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further
* optimizes them (default false).
* @param solvePnPMethod Method for solving a PnP problem: see @ref calib3d_solvePnP_flags (default SOLVEPNP_ITERATIVE).
* @sa PatternPositionType, solvePnP(), check tutorial_aruco_detection in aruco contrib
*
* @deprecated Use Board::matchImagePoints and cv::solvePnP
*
* @sa PatternPositionType, solvePnP()
*/
struct CV_EXPORTS_W_SIMPLE EstimateParameters {
CV_PROP_RW PatternPositionType pattern;
Expand Down Expand Up @@ -95,6 +95,8 @@ struct CV_EXPORTS_W_SIMPLE EstimateParameters {
* This function calibrates a camera using an Aruco Board. The function receives a list of
* detected markers from several views of the Board. The process is similar to the chessboard
* calibration in calibrateCamera(). The function returns the final re-projection error.
*
* @deprecated Use Board::matchImagePoints and cv::solvePnP
*/
CV_EXPORTS_AS(calibrateCameraArucoExtended)
double calibrateCameraAruco(InputArrayOfArrays corners, InputArray ids, InputArray counter, const Ptr<Board> &board,
Expand All @@ -105,6 +107,7 @@ double calibrateCameraAruco(InputArrayOfArrays corners, InputArray ids, InputArr

/** @overload
* @brief It's the same function as #calibrateCameraAruco but without calibration error estimation.
* @deprecated Use Board::matchImagePoints and cv::solvePnP
*/
CV_EXPORTS_W double calibrateCameraAruco(InputArrayOfArrays corners, InputArray ids, InputArray counter,
const Ptr<Board> &board, Size imageSize, InputOutputArray cameraMatrix,
Expand Down Expand Up @@ -147,6 +150,8 @@ CV_EXPORTS_W double calibrateCameraAruco(InputArrayOfArrays corners, InputArray
* This function calibrates a camera using a set of corners of a Charuco Board. The function
* receives a list of detected corners and its identifiers from several views of the Board.
* The function returns the final re-projection error.
*
* @deprecated Use CharucoBoard::matchImagePoints and cv::solvePnP
*/
CV_EXPORTS_AS(calibrateCameraCharucoExtended)
double calibrateCameraCharuco(InputArrayOfArrays charucoCorners, InputArrayOfArrays charucoIds,
Expand All @@ -158,6 +163,8 @@ double calibrateCameraCharuco(InputArrayOfArrays charucoCorners, InputArrayOfArr

/**
* @brief It's the same function as #calibrateCameraCharuco but without calibration error estimation.
*
* @deprecated Use CharucoBoard::matchImagePoints and cv::solvePnP
*/
CV_EXPORTS_W double calibrateCameraCharuco(InputArrayOfArrays charucoCorners, InputArrayOfArrays charucoIds,
const Ptr<CharucoBoard> &board, Size imageSize,
Expand Down
2 changes: 2 additions & 0 deletions modules/aruco/include/opencv2/aruco/charuco.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ CV_EXPORTS_W void detectCharucoDiamond(InputArray image, InputArrayOfArrays mark
* @param borderBits width of the marker borders.
*
* This function return the image of a ChArUco marker, ready to be printed.
*
* @deprecated Use CharucoBoard::generateImage()
*/
CV_EXPORTS_W void drawCharucoDiamond(const Ptr<Dictionary> &dictionary, Vec4i ids, int squareLength,
int markerLength, OutputArray img, int marginSize = 0,
Expand Down
48 changes: 0 additions & 48 deletions modules/aruco/samples/aruco_samples_utility.hpp

This file was deleted.

Loading

0 comments on commit e5d7b12

Please sign in to comment.