Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Jan 12, 2021
2 parents 941a979 + fbcc532 commit d3bc563
Show file tree
Hide file tree
Showing 10 changed files with 472 additions and 1,633 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,9 @@ endif()
if(CMAKE_GENERATOR MATCHES Xcode)
status(" Xcode:" ${XCODE_VERSION})
endif()
if(NOT CMAKE_GENERATOR MATCHES "Xcode|Visual Studio")
if(CMAKE_GENERATOR MATCHES "Xcode|Visual Studio|Multi-Config")
status(" Configuration:" ${CMAKE_CONFIGURATION_TYPES})
else()
status(" Configuration:" ${CMAKE_BUILD_TYPE})
endif()

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* Homepage: <https://opencv.org>
* Courses: <https://opencv.org/courses>
* Docs: <https://docs.opencv.org/master/>
* Q&A forum: <http://answers.opencv.org>
* Q&A forum: <https://forum.opencv.org>
* previous forum (read only): <http://answers.opencv.org>
* Issue tracking: <https://github.com/opencv/opencv/issues>
* Additional OpenCV functionality: <https://github.com/opencv/opencv_contrib>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ <h2>Template Match Example</h2>
utils.loadCode('codeSnippet', 'codeEditor');
utils.loadImageToCanvas('lena.jpg', 'imageCanvasInput');
utils.loadImageToCanvas('lenaFace.png', 'templateCanvasInput');
utils.addFileInputHandler('fileInput', 'canvasInput');
utils.addFileInputHandler('fileInput', 'imageCanvasInput');
utils.addFileInputHandler('templateFileInput', 'templateCanvasInput');

let tryIt = document.getElementById('tryIt');
tryIt.addEventListener('click', () => {
Expand Down
2 changes: 1 addition & 1 deletion doc/js_tutorials/js_setup/js_usage/js_usage.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ In this tutorial, we just show a cv.Mat on screen. To show a cv.Mat, you need a

You can use cv.imshow to show cv.Mat on the canvas.
@code{.js}
cv.imshow(mat, "outputCanvas");
cv.imshow("outputCanvas", mat);
@endcode

Putting all of the steps together, the final index.html is shown below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ scale invariant.

![image](images/sift_scale_invariant.jpg)

So, in 2004, **D.Lowe**, University of British Columbia, came up with a new algorithm, Scale
In 2004, **D.Lowe**, University of British Columbia, came up with a new algorithm, Scale
Invariant Feature Transform (SIFT) in his paper, **Distinctive Image Features from Scale-Invariant
Keypoints**, which extract keypoints and compute its descriptors. *(This paper is easy to understand
and considered to be best material available on SIFT. So this explanation is just a short summary of
and considered to be best material available on SIFT. This explanation is just a short summary of
this paper)*.

There are mainly four steps involved in SIFT algorithm. We will see them one-by-one.
Expand Down Expand Up @@ -102,16 +102,17 @@ reasons. In that case, ratio of closest-distance to second-closest distance is t
greater than 0.8, they are rejected. It eliminates around 90% of false matches while discards only
5% correct matches, as per the paper.

So this is a summary of SIFT algorithm. For more details and understanding, reading the original
paper is highly recommended. Remember one thing, this algorithm is patented. So this algorithm is
included in [the opencv contrib repo](https://github.com/opencv/opencv_contrib)
This is a summary of SIFT algorithm. For more details and understanding, reading the original
paper is highly recommended.

SIFT in OpenCV
--------------

So now let's see SIFT functionalities available in OpenCV. Let's start with keypoint detection and
draw them. First we have to construct a SIFT object. We can pass different parameters to it which
are optional and they are well explained in docs.
Now let's see SIFT functionalities available in OpenCV. Note that these were previously only
available in [the opencv contrib repo](https://github.com/opencv/opencv_contrib), but the patent
expired in the year 2020. So they are now included in the main repo. Let's start with keypoint
detection and draw them. First we have to construct a SIFT object. We can pass different
parameters to it which are optional and they are well explained in docs.
@code{.py}
import numpy as np
import cv2 as cv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ First you apply the transform:
- *theta*: The resolution of the parameter \f$\theta\f$ in radians. We use **1 degree**
(CV_PI/180)
- *threshold*: The minimum number of intersections to "*detect*" a line
- *minLinLength*: The minimum number of points that can form a line. Lines with less than
- *minLineLength*: The minimum number of points that can form a line. Lines with less than
this number of points are disregarded.
- *maxLineGap*: The maximum gap between two points to be considered in the same line.

Expand Down
Loading

0 comments on commit d3bc563

Please sign in to comment.