Skip to content

Commit 1afde8e

Browse files
committed
Merge branch '4.x' into remap_relative
2 parents 4867c06 + b236c71 commit 1afde8e

File tree

212 files changed

+5976
-5498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+5976
-5498
lines changed

.github/workflows/PR-4.x.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
Ubuntu2204-x64:
1616
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U22.yaml@main
1717

18+
Ubuntu2404-x64:
19+
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U24.yaml@main
20+
1821
Ubuntu2004-x64-CUDA:
1922
uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml@main
2023

modules/alphamat/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# Computer Vision based Alpha Matting
22

3+
![Trimap Alphamat Example from Askoy et al 2017](https://github.com/opencv/opencv_contrib/assets/810997/5cafae51-18e1-4e75-9035-6b40c9a064cb)
4+
5+
6+
37
This project was part of the Google Summer of Code 2019.
48

5-
####Student: Muskaan Kularia
6-
####Mentor: Sunita Nayak
9+
#### Student: Muskaan Kularia
10+
#### Mentor: Sunita Nayak
11+
712
***
813
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.
914

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

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

23-
[5] Yagiz Aksoy, "[Affinity Based Matting Toolbox](https://github.com/yaksoy/AffinityBasedMattingToolbox)".
28+
[5] Yagiz Aksoy, "[Affinity Based Matting Toolbox](https://github.com/yaksoy/AffinityBasedMattingToolbox)".

modules/aruco/CMakeLists.txt

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,2 @@
11
set(the_description "ArUco Marker Detection")
22
ocv_define_module(aruco opencv_core opencv_imgproc opencv_calib3d opencv_objdetect WRAP python java objc js)
3-
ocv_include_directories(${CMAKE_CURRENT_BINARY_DIR})
4-
5-
ocv_add_testdata(samples/ contrib/aruco
6-
FILES_MATCHING PATTERN "*yml"
7-
)
8-
9-
ocv_add_testdata(tutorials/aruco_detection/images/ contrib/aruco
10-
FILES_MATCHING PATTERN "singlemarkersoriginal.jpg"
11-
)
12-
13-
ocv_add_testdata(tutorials/aruco_board_detection/images/ contrib/aruco
14-
FILES_MATCHING PATTERN "gboriginal.png"
15-
)
16-
17-
ocv_add_testdata(tutorials/charuco_detection/images/ contrib/aruco
18-
FILES_MATCHING PATTERN "choriginal.jpg"
19-
)
20-
21-
ocv_add_testdata(tutorials/charuco_detection/images/ contrib/aruco
22-
FILES_MATCHING PATTERN "chocclusion_original.jpg"
23-
)
24-
25-
ocv_add_testdata(tutorials/charuco_diamond_detection/images/ contrib/aruco
26-
FILES_MATCHING PATTERN "diamondmarkers.png"
27-
)
28-
29-
ocv_add_testdata(tutorials/aruco_calibration/images/ contrib/aruco
30-
FILES_MATCHING REGEX "img_[0-9]+.jpg"
31-
)

modules/aruco/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ ArUco Marker Detection
33

44
**ArUco**
55

6+
![markers](https://github.com/opencv/opencv_contrib/assets/810997/8d587456-f27f-49e4-9540-28a0477d43fc)
7+
68
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.
79

810
**ChArUco**
911

12+
![screen_charuco](https://github.com/opencv/opencv_contrib/assets/810997/64610da1-ee06-406c-a19b-006b02ac44fd)
13+
14+
1015
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.
1116

12-
The smallest ChArUco board is 5 checkers and 4 markers called a "Diamond Marker".
17+
The smallest ChArUco board is 5 checkers and 4 markers called a "Diamond Marker".

modules/aruco/include/opencv2/aruco.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ CV_EXPORTS_W void getBoardObjectAndImagePoints(const Ptr<Board> &board, InputArr
5252
InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints);
5353

5454

55-
/** @deprecated Use cv::solvePnP
55+
/** @deprecated Use Board::matchImagePoints and cv::solvePnP
5656
*/
5757
CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
5858
InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
@@ -75,6 +75,7 @@ CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, c
7575
* This function estimates a Charuco board pose from some detected corners.
7676
* The function checks if the input corners are enough and valid to perform pose estimation.
7777
* If pose estimation is valid, returns true, else returns false.
78+
* @deprecated Use CharucoBoard::matchImagePoints and cv::solvePnP
7879
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
7980
*/
8081
CV_EXPORTS_W bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds,

modules/aruco/include/opencv2/aruco/aruco_calib.hpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ namespace aruco {
1616
* PatternPositionType defines center this system and axes direction.
1717
* Axis X (red color) - first coordinate, axis Y (green color) - second coordinate,
1818
* axis Z (blue color) - third coordinate.
19-
* @sa estimatePoseSingleMarkers(), check tutorial_aruco_detection in aruco contrib
19+
*
20+
* @deprecated Use Board::matchImagePoints and cv::solvePnP
21+
*
22+
* @sa estimatePoseSingleMarkers()
2023
*/
2124
enum PatternPositionType {
2225
/** @brief The marker coordinate system is centered on the middle of the marker.
2326
*
2427
* The coordinates of the four corners (CCW order) of the marker in its own coordinate system are:
2528
* (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0),
2629
* (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0).
27-
*
28-
* These pattern points define this coordinate system:
29-
* ![Image with axes drawn](tutorials/images/singlemarkersaxes2.jpg)
3030
*/
3131
ARUCO_CCW_CENTER,
3232
/** @brief The marker coordinate system is centered on the top-left corner of the marker.
@@ -35,9 +35,6 @@ enum PatternPositionType {
3535
* (0, 0, 0), (markerLength, 0, 0),
3636
* (markerLength, markerLength, 0), (0, markerLength, 0).
3737
*
38-
* These pattern points define this coordinate system:
39-
* ![Image with axes drawn](tutorials/images/singlemarkersaxes.jpg)
40-
*
4138
* These pattern dots are convenient to use with a chessboard/ChArUco board.
4239
*/
4340
ARUCO_CW_TOP_LEFT_CORNER
@@ -50,7 +47,10 @@ enum PatternPositionType {
5047
* rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further
5148
* optimizes them (default false).
5249
* @param solvePnPMethod Method for solving a PnP problem: see @ref calib3d_solvePnP_flags (default SOLVEPNP_ITERATIVE).
53-
* @sa PatternPositionType, solvePnP(), check tutorial_aruco_detection in aruco contrib
50+
*
51+
* @deprecated Use Board::matchImagePoints and cv::solvePnP
52+
*
53+
* @sa PatternPositionType, solvePnP()
5454
*/
5555
struct CV_EXPORTS_W_SIMPLE EstimateParameters {
5656
CV_PROP_RW PatternPositionType pattern;
@@ -95,6 +95,8 @@ struct CV_EXPORTS_W_SIMPLE EstimateParameters {
9595
* This function calibrates a camera using an Aruco Board. The function receives a list of
9696
* detected markers from several views of the Board. The process is similar to the chessboard
9797
* calibration in calibrateCamera(). The function returns the final re-projection error.
98+
*
99+
* @deprecated Use Board::matchImagePoints and cv::solvePnP
98100
*/
99101
CV_EXPORTS_AS(calibrateCameraArucoExtended)
100102
double calibrateCameraAruco(InputArrayOfArrays corners, InputArray ids, InputArray counter, const Ptr<Board> &board,
@@ -105,6 +107,7 @@ double calibrateCameraAruco(InputArrayOfArrays corners, InputArray ids, InputArr
105107

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

159164
/**
160165
* @brief It's the same function as #calibrateCameraCharuco but without calibration error estimation.
166+
*
167+
* @deprecated Use CharucoBoard::matchImagePoints and cv::solvePnP
161168
*/
162169
CV_EXPORTS_W double calibrateCameraCharuco(InputArrayOfArrays charucoCorners, InputArrayOfArrays charucoIds,
163170
const Ptr<CharucoBoard> &board, Size imageSize,

modules/aruco/include/opencv2/aruco/charuco.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ CV_EXPORTS_W void detectCharucoDiamond(InputArray image, InputArrayOfArrays mark
9696
* @param borderBits width of the marker borders.
9797
*
9898
* This function return the image of a ChArUco marker, ready to be printed.
99+
*
100+
* @deprecated Use CharucoBoard::generateImage()
99101
*/
100102
CV_EXPORTS_W void drawCharucoDiamond(const Ptr<Dictionary> &dictionary, Vec4i ids, int squareLength,
101103
int markerLength, OutputArray img, int marginSize = 0,

modules/aruco/perf/perf_precomp.hpp

Lines changed: 0 additions & 9 deletions
This file was deleted.

modules/aruco/samples/aruco_samples_utility.hpp

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)