Skip to content

Commit

Permalink
Merge pull request opencv#682 from jokereactive:ChAruCo_DocPatch
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Jun 20, 2016
2 parents 14f16b1 + f63c28a commit 51a4f6e
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 14 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ provides production quality support for this module.

### How to build OpenCV with extra modules

You can build OpenCV, so it will include the modules from this repository.
You can build OpenCV, so it will include the modules from this repository. Contrib modules are under constant development and it is recommended to use them alongside the master branch or latest releases of OpenCV.

Here is the CMake command for you:

```
Expand Down Expand Up @@ -46,10 +47,12 @@ If you prefer using the gui version of cmake (cmake-gui), then, you can add `ope

7. build the `opencv` core with the method you chose (make and make install if you chose Unix makfile at step 6)

8. to run, linker flags to contrib modules will need to be added to use them in your code/IDE. For example to use the aruco module, "-lopencv_aruco" flag will be added.

### Update the repository documentation

In order to keep a clean overview containing all contributed modules the following files need to be created/adapted.

1. Update the README.md file under the modules folder. Here you add your model with a single line description.

2. Add a README.md inside your own module folder. This README explains which functionality (seperate functions) is available, links to the corresponding samples and explains in somewhat more detail what the module is expected to do. If any extra requirements are needed to build the module without problems, add them here also.
2. Add a README.md inside your own module folder. This README explains which functionality (seperate functions) is available, links to the corresponding samples and explains in somewhat more detail what the module is expected to do. If any extra requirements are needed to build the module without problems, add them here also.
2 changes: 1 addition & 1 deletion modules/aruco/samples/calibrate_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const char* about =
const char* keys =
"{w | | Number of squares in X direction }"
"{h | | Number of squares in Y direction }"
"{l | | Marker side lenght (in meters) }"
"{l | | Marker side length (in meters) }"
"{s | | Separation between two consecutive markers in the grid (in meters) }"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
Expand Down
4 changes: 2 additions & 2 deletions modules/aruco/samples/calibrate_camera_charuco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const char* about =
const char* keys =
"{w | | Number of squares in X direction }"
"{h | | Number of squares in Y direction }"
"{sl | | Square side length (in pixels) }"
"{ml | | Marker side length (in pixels) }"
"{sl | | Square side length (in meters) }"
"{ml | | Marker side length (in meters) }"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
"DICT_6X6_50=8, DICT_6X6_100=9, DICT_6X6_250=10, DICT_6X6_1000=11, DICT_7X7_50=12,"
Expand Down
2 changes: 1 addition & 1 deletion modules/aruco/samples/create_board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const char* keys =
"{@outfile |<none> | Output image }"
"{w | | Number of markers in X direction }"
"{h | | Number of markers in Y direction }"
"{l | | Marker side lenght (in pixels) }"
"{l | | Marker side length (in pixels) }"
"{s | | Separation between two consecutive markers in the grid (in pixels)}"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
Expand Down
4 changes: 2 additions & 2 deletions modules/aruco/samples/create_board_charuco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const char* keys =
"{@outfile |<none> | Output image }"
"{w | | Number of squares in X direction }"
"{h | | Number of squares in Y direction }"
"{sl | | Square side lenght (in pixels) }"
"{ml | | Marker side lenght (in pixels) }"
"{sl | | Square side length (in pixels) }"
"{ml | | Marker side length (in pixels) }"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
"DICT_6X6_50=8, DICT_6X6_100=9, DICT_6X6_250=10, DICT_6X6_1000=11, DICT_7X7_50=12,"
Expand Down
4 changes: 2 additions & 2 deletions modules/aruco/samples/create_diamond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ namespace {
const char* about = "Create a ChArUco marker image";
const char* keys =
"{@outfile |<none> | Output image }"
"{sl | | Square side lenght (in pixels) }"
"{ml | | Marker side lenght (in pixels) }"
"{sl | | Square side length (in pixels) }"
"{ml | | Marker side length (in pixels) }"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
"DICT_6X6_50=8, DICT_6X6_100=9, DICT_6X6_250=10, DICT_6X6_1000=11, DICT_7X7_50=12,"
Expand Down
4 changes: 2 additions & 2 deletions modules/aruco/samples/detect_board_charuco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const char* about = "Pose estimation using a ChArUco board";
const char* keys =
"{w | | Number of squares in X direction }"
"{h | | Number of squares in Y direction }"
"{sl | | Square side lenght (in pixels) }"
"{ml | | Marker side lenght (in pixels) }"
"{sl | | Square side length (in meters) }"
"{ml | | Marker side length (in meters) }"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
"DICT_6X6_50=8, DICT_6X6_100=9, DICT_6X6_250=10, DICT_6X6_1000=11, DICT_7X7_50=12,"
Expand Down
4 changes: 2 additions & 2 deletions modules/aruco/samples/detect_diamonds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ using namespace cv;
namespace {
const char* about = "Detect ChArUco markers";
const char* keys =
"{sl | | Square side lenght (in pixels) }"
"{ml | | Marker side lenght (in pixels) }"
"{sl | | Square side length (in meters) }"
"{ml | | Marker side length (in meters) }"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
"DICT_6X6_50=8, DICT_6X6_100=9, DICT_6X6_250=10, DICT_6X6_1000=11, DICT_7X7_50=12,"
Expand Down
7 changes: 7 additions & 0 deletions modules/aruco/samples/detector_params.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
%YAML:1.0
nmarkers: 1024
adaptiveThreshWinSizeMin: 3
adaptiveThreshWinSizeMax: 23
adaptiveThreshWinSizeStep: 10
adaptiveThreshWinSize: 21
adaptiveThreshConstant: 7
minMarkerPerimeterRate: 0.03
Expand All @@ -8,10 +11,14 @@ polygonalApproxAccuracyRate: 0.05
minCornerDistance: 10.0
minDistanceToBorder: 3
minMarkerDistance: 10.0
minMarkerDistanceRate: 0.05
doCornerRefinement: false
cornerRefinementWinSize: 5
cornerRefinementMaxIterations: 30
cornerRefinementMinAccuracy: 0.1
markerBorderBits: 1
perspectiveRemovePixelPerCell: 8
perspectiveRemoveIgnoredMarginPerCell: 0.13
maxErroneousBitsInBorderRate: 0.04
minOtsuStdDev: 5.0
errorCorrectionRate: 0.6
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ The output image will be something like this:

A full working example of board creation is included in the ```create_board.cpp``` inside the module samples folder.

Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
"_output path_/aboard.png" -w=5 -h=7 -l=100 -s=10 -d=10
```

Finally, a full example of board detection:

``` c++
Expand Down Expand Up @@ -204,6 +209,12 @@ Sample video:
A full working example is included in the ```detect_board.cpp``` inside the module samples folder.
Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
-c="_path_"/calib.txt" "_path_/aboard.png" -w=5 -h=7 -l=100 -s=10 -d=10
```



Refine marker detection
-----
Expand Down
Binary file modified modules/aruco/tutorials/aruco_board_detection/images/board.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ Finally, the ```calibrationFlags``` parameter determines some of the options for

A full working example is included in the ```calibrate_camera_charuco.cpp``` inside the module samples folder.

Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
_output path_" -dp="_path_/detector_params.yml" -w=5 -h=7 -sl=0.04 -ml=0.02 -d=10
```
Calibration with ArUco Boards
Expand Down Expand Up @@ -100,3 +105,8 @@ The rest of parameters are the same than in ```calibrateCameraCharuco()```, exce
any ```Board``` object.
A full working example is included in the ```calibrate_camera.cpp``` inside the module samples folder.
Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
"_path_/calib.txt" -w=5 -h=7 -l=100 -s=10 -d=10
```
15 changes: 15 additions & 0 deletions modules/aruco/tutorials/aruco_detection/aruco_detection.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ The generated image is:
A full working example is included in the ```create_marker.cpp``` inside the module samples folder.
Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
"/Users/Sarthak/Dropbox/OpenCV_GSoC/marker.png" -d=10 -id=1
```

Marker Detection
------
Expand Down Expand Up @@ -226,6 +230,11 @@ output vector of rejected candidates.
A full working example is included in the ```detect_markers.cpp``` inside the module samples folder.
Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
-c="_path_/calib.txt" -d=10
```



Pose Estimation
Expand Down Expand Up @@ -331,6 +340,12 @@ Sample video:
A full working example is included in the ```detect_markers.cpp``` inside the module samples folder.
Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
-c="_path_/calib.txt" -d=10
```



Selecting a dictionary
------
Expand Down
Binary file modified modules/aruco/tutorials/aruco_detection/images/marker23.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ The output image will be something like this:

A full working example is included in the ```create_board_charuco.cpp``` inside the module samples folder.

Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
"_ output path_/chboard.png" -w=5 -h=7 -sl=200 -ml=120 -d=10
```


ChArUco Board Detection
------
Expand Down Expand Up @@ -240,6 +245,11 @@ Sample video:

A full working example is included in the ```detect_board_charuco.cpp``` inside the module samples folder.

Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
-c="_path_/calib.txt" -dp="_path_/detector_params.yml" -w=5 -h=7 -sl=0.04 -ml=0.02 -d=10
```

ChArUco Pose Estimation
------

Expand Down Expand Up @@ -312,3 +322,8 @@ A full example of ChArUco detection with pose estimation:
```

A full working example is included in the ```detect_board_charuco.cpp``` inside the module samples folder.

Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
"_path_/calib.txt" -dp="_path_/detector_params.yml" -w=5 -h=7 -sl=0.04 -ml=0.02 -d=10
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ The image produced will be:
A full working example is included in the ```create_diamond.cpp``` inside the module samples folder.
Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
"_path_/mydiamond.png" -sl=200 -ml=120 -d=10 -ids=45,68,28,74
```

ChArUco Diamond Detection
------
Expand Down Expand Up @@ -116,6 +120,10 @@ The result is the same that the one produced by ```drawDetectedMarkers()```, but

A full working example is included in the ```detect_diamonds.cpp``` inside the module samples folder.

Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
-c="_path_/calib.txt" -dp="_path_/detector_params.yml" -sl=0.04 -ml=0.02 -d=10
```

ChArUco Diamond Pose Estimation
------
Expand Down Expand Up @@ -159,3 +167,8 @@ Sample video:
@endhtmlonly
A full working example is included in the ```detect_diamonds.cpp``` inside the module samples folder.
Note: The samples now take input via commandline via the [OpenCV Commandline Parser](http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html#gsc.tab=0). For this file the example parameters will look like
``` c++
-c="_output path_/calib.txt" -dp="_path_/detector_params.yml" -sl=0.04 -ml=0.02 -d=10
```

0 comments on commit 51a4f6e

Please sign in to comment.