mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Compare commits
234 Commits
3.4.18
...
4.0.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a2b3c8d4c | |||
| edacd91a27 | |||
| 5dd46b54c1 | |||
| ea502b6e84 | |||
| 954536073d | |||
| cc45c10f3d | |||
| 13aa23f706 | |||
| 78b51fb574 | |||
| f0ddc2a53c | |||
| d5d059690f | |||
| fd832bb57d | |||
| 09cb329d73 | |||
| 4a9291fd89 | |||
| 5115e5decb | |||
| 1ed9ff17e1 | |||
| f1fdfa1a51 | |||
| 0f3fe957f5 | |||
| fc4679d4cf | |||
| 35c53204cb | |||
| f731515628 | |||
| 59bf2a34fa | |||
| abbb73e894 | |||
| dada5a422d | |||
| 8bb3d363a4 | |||
| 1522722fab | |||
| 8f1f4273a2 | |||
| a9c8a526cf | |||
| 699db77293 | |||
| 690fb0544c | |||
| ae4c72a153 | |||
| ea92c2b1a6 | |||
| 9ac7aea930 | |||
| 5f17cc1abd | |||
| 8f6695acc7 | |||
| 9524abcd28 | |||
| 83efde6243 | |||
| 8eb987e393 | |||
| 2c6ab65476 | |||
| 66fdddc339 | |||
| 5575171652 | |||
| a8b0db4e5d | |||
| e104fcc000 | |||
| e4f71994c2 | |||
| 29e88e50ff | |||
| 852f061b26 | |||
| f0d277e452 | |||
| 2e8483bd1c | |||
| 3eec8fd0eb | |||
| d8d025c33b | |||
| 8811dabbac | |||
| efca746d36 | |||
| e0f524d3b7 | |||
| d1c842cf29 | |||
| 4d23a5d92d | |||
| 0739d1c2eb | |||
| 475c775b25 | |||
| b7e8ce4523 | |||
| e8fcd721b8 | |||
| ef5579dc86 | |||
| 84ae8097b1 | |||
| 295b988657 | |||
| 68942affdb | |||
| e0980c4d73 | |||
| c5920df159 | |||
| 86ddff0b88 | |||
| 908978d00b | |||
| a956732874 | |||
| 879e046b22 | |||
| 5fb0f34e8a | |||
| 861415133e | |||
| fce75cd858 | |||
| b6d5565df1 | |||
| 53ad291ef1 | |||
| 145d3ba99d | |||
| e6171d17f8 | |||
| aa1c86f95e | |||
| 699565828d | |||
| 38de2a8754 | |||
| 8b661cde15 | |||
| e628fd7bce | |||
| 808ba552c5 | |||
| a024593fa6 | |||
| 87b5737293 | |||
| b80c978f5d | |||
| 10ae0c4364 | |||
| cb3ae1232b | |||
| e73e393c82 | |||
| b01f63835e | |||
| 6d7f5871db | |||
| 89720ae24d | |||
| 9097ccf515 | |||
| dca657a2fd | |||
| df8b057b44 | |||
| 64b3c1e691 | |||
| 15aee09c7f | |||
| 80610ca054 | |||
| fd0df5a89b | |||
| b487e2df0b | |||
| c6ed2bf9aa | |||
| 40b1dc12de | |||
| 8eba3c1e7e | |||
| b50c70bbfa | |||
| af021e79d9 | |||
| 73bfe68821 | |||
| 4a73b4859f | |||
| f5d181db3a | |||
| da7e1cfb49 | |||
| 43b64140ae | |||
| d74b98c3d9 | |||
| e0bfe44cac | |||
| 10fb88d027 | |||
| f826709452 | |||
| f10fd64630 | |||
| 09837928d9 | |||
| dce4e94f02 | |||
| ee6415bd1c | |||
| 78835ad87a | |||
| 4e6be21a44 | |||
| f89e4e7dd0 | |||
| dfa8467a08 | |||
| 669ee0415a | |||
| 367668710c | |||
| 94dea84915 | |||
| 9f1218b00b | |||
| fcfa488250 | |||
| 2bbe31a8f6 | |||
| 7cdb0eafeb | |||
| 90f47eb952 | |||
| 15e57d28f5 | |||
| 532eace7d6 | |||
| d4ac4fcde1 | |||
| c1db75e0c7 | |||
| acfdd0e1fc | |||
| 9fb8f6347f | |||
| 7f73b105ca | |||
| ae8dcdf40d | |||
| ee1e1ce377 | |||
| 6d165dae5e | |||
| 335e61dc47 | |||
| 64380baa85 | |||
| b5eb65e53e | |||
| f1ca05c822 | |||
| 900df21b7d | |||
| 93bad514a8 | |||
| d8cd1d8fcc | |||
| 6356403964 | |||
| e8a14a775e | |||
| 7b90a1e85a | |||
| 49283ec035 | |||
| 7d4bb9428b | |||
| 76eb389761 | |||
| e9a1ccb89a | |||
| db262fa76a | |||
| 4e59d6fd12 | |||
| e136c11c7c | |||
| 0e80f56e44 | |||
| 94758c18de | |||
| e76b375a31 | |||
| 9f5f64e14e | |||
| 4eb2966559 | |||
| 293facbae7 | |||
| 053259fd92 | |||
| da41ac9e60 | |||
| 82c477c9f7 | |||
| 57bead3a5e | |||
| d044ac1c66 | |||
| 9787ab598b | |||
| 7e9b5d9e30 | |||
| 3d141280aa | |||
| 9df7517dea | |||
| 4560909a5e | |||
| 3f65924c45 | |||
| 5e31c82b5b | |||
| 4382bdc859 | |||
| fa66c6b797 | |||
| 2da96be217 | |||
| 43f821afb9 | |||
| 3165baa1f1 | |||
| 9a8a964b69 | |||
| 17888ce0fd | |||
| 051b40f956 | |||
| cc8db99695 | |||
| b39cd06249 | |||
| 46def2fdc1 | |||
| 2195f0cc62 | |||
| 387e92353c | |||
| 2047abd9c3 | |||
| 64f2b1b250 | |||
| 577546ccd9 | |||
| e858c21e1f | |||
| 0d6518aaa0 | |||
| d1a598c652 | |||
| bfc227b8d4 | |||
| 45dd575ed2 | |||
| 80709697e5 | |||
| 1b53a4fccc | |||
| 4bb220bb90 | |||
| e1b3cf5c14 | |||
| 0f298a4203 | |||
| 5e68f35500 | |||
| ba1bd64bf9 | |||
| db88cd1b25 | |||
| 936d2963a2 | |||
| 4378b4d03d | |||
| 6ddef3b7a9 | |||
| 68c92908d5 | |||
| 51e543050c | |||
| 000a13b6a3 | |||
| 84b3b5b4a4 | |||
| 4e83f4c579 | |||
| cd2b188c9a | |||
| 1e0a60be2a | |||
| fc5bba66af | |||
| 4d7d630e92 | |||
| 4b2d1aaeea | |||
| 7e5581cd86 | |||
| 8b6a6d4546 | |||
| 7ae83df8aa | |||
| 779a42678d | |||
| 10ba6a93a6 | |||
| c917be2189 | |||
| c6aa97c9aa | |||
| 250941bd47 | |||
| 5b17a60dde | |||
| b07f772f36 | |||
| d4688e6474 | |||
| e7e29cb63c | |||
| ca922443db | |||
| 2385a5870e | |||
| e567135ed3 | |||
| 98c8584b88 | |||
| 2b2fa58f97 | |||
| 2d54fed3cc | |||
| 964a4d75b4 |
@@ -2,6 +2,14 @@
|
|||||||
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
|
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
|
||||||
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
|
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
|
||||||
|
|
||||||
|
Please:
|
||||||
|
|
||||||
|
* Read the documentation to test with the latest developer build.
|
||||||
|
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
|
||||||
|
* Try to be as detailed as possible in your report.
|
||||||
|
* Report only one problem per created issue.
|
||||||
|
|
||||||
|
|
||||||
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
|
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@@ -27,4 +35,4 @@ This is a template helping you to create an issue which can be processed as quic
|
|||||||
// C++ code example
|
// C++ code example
|
||||||
```
|
```
|
||||||
or attach as .txt or .zip file
|
or attach as .txt or .zip file
|
||||||
-->
|
-->
|
||||||
|
|||||||
Vendored
+22
-36
@@ -151,6 +151,10 @@ void div(const Size2D &size,
|
|||||||
typedef typename internal::VecTraits<T>::vec128 vec128;
|
typedef typename internal::VecTraits<T>::vec128 vec128;
|
||||||
typedef typename internal::VecTraits<T>::vec64 vec64;
|
typedef typename internal::VecTraits<T>::vec64 vec64;
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
|
||||||
|
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (scale == 0.0f ||
|
if (scale == 0.0f ||
|
||||||
(std::numeric_limits<T>::is_integer &&
|
(std::numeric_limits<T>::is_integer &&
|
||||||
(scale * std::numeric_limits<T>::max()) < 1.0f &&
|
(scale * std::numeric_limits<T>::max()) < 1.0f &&
|
||||||
@@ -311,6 +315,10 @@ void recip(const Size2D &size,
|
|||||||
typedef typename internal::VecTraits<T>::vec128 vec128;
|
typedef typename internal::VecTraits<T>::vec128 vec128;
|
||||||
typedef typename internal::VecTraits<T>::vec64 vec64;
|
typedef typename internal::VecTraits<T>::vec64 vec64;
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
|
||||||
|
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (scale == 0.0f ||
|
if (scale == 0.0f ||
|
||||||
(std::numeric_limits<T>::is_integer &&
|
(std::numeric_limits<T>::is_integer &&
|
||||||
scale < 1.0f &&
|
scale < 1.0f &&
|
||||||
@@ -463,8 +471,6 @@ void div(const Size2D &size,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float32x4_t v_zero = vdupq_n_f32(0.0f);
|
|
||||||
|
|
||||||
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
||||||
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
||||||
|
|
||||||
@@ -485,9 +491,7 @@ void div(const Size2D &size,
|
|||||||
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
||||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||||
|
|
||||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
vst1q_f32(dst + j, vmulq_f32(v_src0, internal::vrecpq_f32(v_src1)));
|
||||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
|
||||||
vreinterpretq_u32_f32(vmulq_f32(v_src0, internal::vrecpq_f32(v_src1))), v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < roiw64; j += 2)
|
for (; j < roiw64; j += 2)
|
||||||
@@ -495,14 +499,12 @@ void div(const Size2D &size,
|
|||||||
float32x2_t v_src0 = vld1_f32(src0 + j);
|
float32x2_t v_src0 = vld1_f32(src0 + j);
|
||||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||||
|
|
||||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
vst1_f32(dst + j, vmul_f32(v_src0, internal::vrecp_f32(v_src1)));
|
||||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
|
||||||
vreinterpret_u32_f32(vmul_f32(v_src0, internal::vrecp_f32(v_src1))), v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < size.width; j++)
|
for (; j < size.width; j++)
|
||||||
{
|
{
|
||||||
dst[j] = src1[j] ? src0[j] / src1[j] : 0.0f;
|
dst[j] = src0[j] / src1[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -523,10 +525,8 @@ void div(const Size2D &size,
|
|||||||
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
||||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||||
|
|
||||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
vst1q_f32(dst + j, vmulq_f32(vmulq_n_f32(v_src0, scale),
|
||||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
internal::vrecpq_f32(v_src1)));
|
||||||
vreinterpretq_u32_f32(vmulq_f32(vmulq_n_f32(v_src0, scale),
|
|
||||||
internal::vrecpq_f32(v_src1))), v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < roiw64; j += 2)
|
for (; j < roiw64; j += 2)
|
||||||
@@ -534,15 +534,13 @@ void div(const Size2D &size,
|
|||||||
float32x2_t v_src0 = vld1_f32(src0 + j);
|
float32x2_t v_src0 = vld1_f32(src0 + j);
|
||||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||||
|
|
||||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
vst1_f32(dst + j, vmul_f32(vmul_n_f32(v_src0, scale),
|
||||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
internal::vrecp_f32(v_src1)));
|
||||||
vreinterpret_u32_f32(vmul_f32(vmul_n_f32(v_src0, scale),
|
|
||||||
internal::vrecp_f32(v_src1))), v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < size.width; j++)
|
for (; j < size.width; j++)
|
||||||
{
|
{
|
||||||
dst[j] = src1[j] ? src0[j] * scale / src1[j] : 0.0f;
|
dst[j] = src0[j] * scale / src1[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -620,8 +618,6 @@ void reciprocal(const Size2D &size,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float32x4_t v_zero = vdupq_n_f32(0.0f);
|
|
||||||
|
|
||||||
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
||||||
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
||||||
|
|
||||||
@@ -639,23 +635,19 @@ void reciprocal(const Size2D &size,
|
|||||||
|
|
||||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||||
|
|
||||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
vst1q_f32(dst + j, internal::vrecpq_f32(v_src1));
|
||||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
|
||||||
vreinterpretq_u32_f32(internal::vrecpq_f32(v_src1)), v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < roiw64; j += 2)
|
for (; j < roiw64; j += 2)
|
||||||
{
|
{
|
||||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||||
|
|
||||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
vst1_f32(dst + j, internal::vrecp_f32(v_src1));
|
||||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
|
||||||
vreinterpret_u32_f32(internal::vrecp_f32(v_src1)), v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < size.width; j++)
|
for (; j < size.width; j++)
|
||||||
{
|
{
|
||||||
dst[j] = src1[j] ? 1.0f / src1[j] : 0;
|
dst[j] = 1.0f / src1[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -673,25 +665,19 @@ void reciprocal(const Size2D &size,
|
|||||||
|
|
||||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||||
|
|
||||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
vst1q_f32(dst + j, vmulq_n_f32(internal::vrecpq_f32(v_src1), scale));
|
||||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
|
||||||
vreinterpretq_u32_f32(vmulq_n_f32(internal::vrecpq_f32(v_src1),
|
|
||||||
scale)),v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < roiw64; j += 2)
|
for (; j < roiw64; j += 2)
|
||||||
{
|
{
|
||||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||||
|
|
||||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
vst1_f32(dst + j, vmul_n_f32(internal::vrecp_f32(v_src1), scale));
|
||||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
|
||||||
vreinterpret_u32_f32(vmul_n_f32(internal::vrecp_f32(v_src1),
|
|
||||||
scale)), v_mask)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; j < size.width; j++)
|
for (; j < size.width; j++)
|
||||||
{
|
{
|
||||||
dst[j] = src1[j] ? scale / src1[j] : 0;
|
dst[j] = scale / src1[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+6
-6
@@ -1,9 +1,9 @@
|
|||||||
# Binaries branch name: ffmpeg/3.4_20180608
|
# Binaries branch name: ffmpeg/master_20180918
|
||||||
# Binaries were created for OpenCV: f5ddbbf65937d8f44e481e4ee1082961821f5c62
|
# Binaries were created for OpenCV: e628fd7bce2b5d64c36b5bdc55a37c0ae78bc907
|
||||||
ocv_update(FFMPEG_BINARIES_COMMIT "8041bd6f5ad37045c258904ba3030bb3442e3911")
|
ocv_update(FFMPEG_BINARIES_COMMIT "c88df798e9dc3d63840f913714563a730245464a")
|
||||||
ocv_update(FFMPEG_FILE_HASH_BIN32 "fa5a2a4e2f37defcb95bde8ed145c2b3")
|
ocv_update(FFMPEG_FILE_HASH_BIN32 "48c95ce37d5aa6b15b3ad116e331ebc1")
|
||||||
ocv_update(FFMPEG_FILE_HASH_BIN64 "2cc08fc4fef8199fe80e0f126684834f")
|
ocv_update(FFMPEG_FILE_HASH_BIN64 "d33eca57ae1cfd6287b975b98125f7a3")
|
||||||
ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")
|
ocv_update(FFMPEG_FILE_HASH_CMAKE "5fd49e1b84e9f402ca155e27c92d2ce9")
|
||||||
|
|
||||||
function(download_win_ffmpeg script_var)
|
function(download_win_ffmpeg script_var)
|
||||||
set(${script_var} "" PARENT_SCOPE)
|
set(${script_var} "" PARENT_SCOPE)
|
||||||
|
|||||||
Vendored
+1
-1
@@ -431,7 +431,7 @@ int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah,
|
|||||||
return CV_HAL_ERROR_OK;
|
return CV_HAL_ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ovx_hal_warpPerspectve(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4])
|
int ovx_hal_warpPerspective(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4])
|
||||||
{
|
{
|
||||||
if (skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(aw, ah))
|
if (skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(aw, ah))
|
||||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||||
|
|||||||
Vendored
+2
-2
@@ -27,7 +27,7 @@ int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t
|
|||||||
int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn);
|
int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn);
|
||||||
int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, double inv_scale_x, double inv_scale_y, int interpolation);
|
int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, double inv_scale_x, double inv_scale_y, int interpolation);
|
||||||
int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[6], int interpolation, int borderType, const double borderValue[4]);
|
int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[6], int interpolation, int borderType, const double borderValue[4]);
|
||||||
int ovx_hal_warpPerspectve(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4]);
|
int ovx_hal_warpPerspective(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4]);
|
||||||
|
|
||||||
struct cvhalFilter2D;
|
struct cvhalFilter2D;
|
||||||
int ovx_hal_filterInit(cvhalFilter2D **filter_context, uchar *kernel_data, size_t kernel_step, int kernel_type, int kernel_width, int kernel_height,
|
int ovx_hal_filterInit(cvhalFilter2D **filter_context, uchar *kernel_data, size_t kernel_step, int kernel_type, int kernel_width, int kernel_height,
|
||||||
@@ -97,7 +97,7 @@ int ovx_hal_integral(int depth, int sdepth, int, const uchar * a, size_t astep,
|
|||||||
//#undef cv_hal_warpAffine
|
//#undef cv_hal_warpAffine
|
||||||
//#define cv_hal_warpAffine ovx_hal_warpAffine
|
//#define cv_hal_warpAffine ovx_hal_warpAffine
|
||||||
//#undef cv_hal_warpPerspective
|
//#undef cv_hal_warpPerspective
|
||||||
//#define cv_hal_warpPerspective ovx_hal_warpPerspectve
|
//#define cv_hal_warpPerspective ovx_hal_warpPerspective
|
||||||
|
|
||||||
#undef cv_hal_filterInit
|
#undef cv_hal_filterInit
|
||||||
#define cv_hal_filterInit ovx_hal_filterInit
|
#define cv_hal_filterInit ovx_hal_filterInit
|
||||||
|
|||||||
+27
-30
@@ -149,7 +149,6 @@ endif()
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Detect compiler and target platform architecture
|
# Detect compiler and target platform architecture
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
OCV_OPTION(ENABLE_CXX11 "Enable C++11 compilation mode" "${OPENCV_CXX11}")
|
|
||||||
include(cmake/OpenCVDetectCXXCompiler.cmake)
|
include(cmake/OpenCVDetectCXXCompiler.cmake)
|
||||||
ocv_cmake_hook(POST_DETECT_COMPILER)
|
ocv_cmake_hook(POST_DETECT_COMPILER)
|
||||||
|
|
||||||
@@ -253,8 +252,8 @@ OCV_OPTION(WITH_WIN32UI "Build with Win32 UI Backend support" ON
|
|||||||
OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O" OFF IF APPLE )
|
OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O" OFF IF APPLE )
|
||||||
OCV_OPTION(WITH_QTKIT "Use QTKit Video I/O backend" OFF IF APPLE )
|
OCV_OPTION(WITH_QTKIT "Use QTKit Video I/O backend" OFF IF APPLE )
|
||||||
OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS AND NOT WINRT) )
|
OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS AND NOT WINRT) )
|
||||||
|
OCV_OPTION(WITH_HPX "Include Ste||ar Group HPX support" OFF)
|
||||||
OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF)
|
OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF)
|
||||||
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF (WIN32 AND NOT WINRT) )
|
|
||||||
OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" ON IF (NOT WIN32 OR MINGW) )
|
OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" ON IF (NOT WIN32 OR MINGW) )
|
||||||
OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) )
|
OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) )
|
||||||
OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
|
OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
|
||||||
@@ -271,6 +270,7 @@ OCV_OPTION(WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON
|
|||||||
OCV_OPTION(WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
|
OCV_OPTION(WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
|
||||||
OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON IF (WIN32 AND NOT WINRT) )
|
OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON IF (WIN32 AND NOT WINRT) )
|
||||||
OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF (WIN32 AND NOT WINRT) )
|
OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF (WIN32 AND NOT WINRT) )
|
||||||
|
OCV_OPTION(WITH_LIBREALSENSE "Include Intel librealsense support" OFF IF (NOT WITH_INTELPERC) )
|
||||||
OCV_OPTION(WITH_VA "Include VA support" OFF IF (UNIX AND NOT ANDROID) )
|
OCV_OPTION(WITH_VA "Include VA support" OFF IF (UNIX AND NOT ANDROID) )
|
||||||
OCV_OPTION(WITH_VA_INTEL "Include Intel VA-API/OpenCL support" OFF IF (UNIX AND NOT ANDROID) )
|
OCV_OPTION(WITH_VA_INTEL "Include Intel VA-API/OpenCL support" OFF IF (UNIX AND NOT ANDROID) )
|
||||||
OCV_OPTION(WITH_MFX "Include Intel Media SDK support" OFF IF ((UNIX AND NOT ANDROID) OR (WIN32 AND NOT WINRT AND NOT MINGW)) )
|
OCV_OPTION(WITH_MFX "Include Intel Media SDK support" OFF IF ((UNIX AND NOT ANDROID) OR (WIN32 AND NOT WINRT AND NOT MINGW)) )
|
||||||
@@ -282,6 +282,7 @@ OCV_OPTION(WITH_PROTOBUF "Enable libprotobuf" ON
|
|||||||
OCV_OPTION(WITH_IMGCODEC_HDR "Include HDR support" ON)
|
OCV_OPTION(WITH_IMGCODEC_HDR "Include HDR support" ON)
|
||||||
OCV_OPTION(WITH_IMGCODEC_SUNRASTER "Include SUNRASTER support" ON)
|
OCV_OPTION(WITH_IMGCODEC_SUNRASTER "Include SUNRASTER support" ON)
|
||||||
OCV_OPTION(WITH_IMGCODEC_PXM "Include PNM (PBM,PGM,PPM) and PAM formats support" ON)
|
OCV_OPTION(WITH_IMGCODEC_PXM "Include PNM (PBM,PGM,PPM) and PAM formats support" ON)
|
||||||
|
OCV_OPTION(WITH_IMGCODEC_PFM "Include PFM formats support" ON)
|
||||||
OCV_OPTION(WITH_QUIRC "Include library QR-code decoding" ON)
|
OCV_OPTION(WITH_QUIRC "Include library QR-code decoding" ON)
|
||||||
|
|
||||||
# OpenCV build components
|
# OpenCV build components
|
||||||
@@ -373,8 +374,6 @@ endif()
|
|||||||
|
|
||||||
if(ANDROID OR WIN32)
|
if(ANDROID OR WIN32)
|
||||||
ocv_update(OPENCV_DOC_INSTALL_PATH doc)
|
ocv_update(OPENCV_DOC_INSTALL_PATH doc)
|
||||||
else()
|
|
||||||
ocv_update(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
|
if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
|
||||||
@@ -414,8 +413,6 @@ if(ANDROID)
|
|||||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "sdk/etc/testdata")
|
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "sdk/etc/testdata")
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "testdata")
|
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "testdata")
|
||||||
else()
|
|
||||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "share/OpenCV/testdata")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
@@ -428,6 +425,7 @@ if(ANDROID)
|
|||||||
ocv_update(OPENCV_INCLUDE_INSTALL_PATH sdk/native/jni/include)
|
ocv_update(OPENCV_INCLUDE_INSTALL_PATH sdk/native/jni/include)
|
||||||
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native)
|
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native)
|
||||||
ocv_update(OPENCV_OTHER_INSTALL_PATH sdk/etc)
|
ocv_update(OPENCV_OTHER_INSTALL_PATH sdk/etc)
|
||||||
|
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/licenses")
|
||||||
else()
|
else()
|
||||||
set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib")
|
set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib")
|
||||||
ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}")
|
ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}")
|
||||||
@@ -443,42 +441,40 @@ else()
|
|||||||
ocv_update(OPENCV_JAR_INSTALL_PATH java)
|
ocv_update(OPENCV_JAR_INSTALL_PATH java)
|
||||||
ocv_update(OPENCV_OTHER_INSTALL_PATH etc)
|
ocv_update(OPENCV_OTHER_INSTALL_PATH etc)
|
||||||
ocv_update(OPENCV_CONFIG_INSTALL_PATH ".")
|
ocv_update(OPENCV_CONFIG_INSTALL_PATH ".")
|
||||||
|
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include")
|
||||||
|
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/licenses")
|
||||||
else()
|
else()
|
||||||
|
# Note: layout differs from OpenCV 3.4
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX})
|
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/opencv4")
|
||||||
ocv_update(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH})
|
ocv_update(OPENCV_LIB_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}")
|
||||||
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples)
|
ocv_update(OPENCV_CONFIG_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/cmake/opencv4")
|
||||||
ocv_update(OPENCV_JAR_INSTALL_PATH share/OpenCV/java)
|
ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/opencv4/3rdparty")
|
||||||
ocv_update(OPENCV_OTHER_INSTALL_PATH share/OpenCV)
|
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4/samples")
|
||||||
|
ocv_update(OPENCV_DOC_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/doc/opencv4")
|
||||||
if(NOT DEFINED OPENCV_CONFIG_INSTALL_PATH)
|
ocv_update(OPENCV_JAR_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/java/opencv4")
|
||||||
math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
|
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4/testdata")
|
||||||
if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX)
|
ocv_update(OPENCV_OTHER_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4")
|
||||||
ocv_update(OPENCV_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}/cmake/opencv)
|
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/licenses/opencv4")
|
||||||
else()
|
|
||||||
ocv_update(OPENCV_CONFIG_INSTALL_PATH share/OpenCV)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_update(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}")
|
ocv_update(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}")
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
|
||||||
if(INSTALL_TO_MANGLED_PATHS)
|
if(INSTALL_TO_MANGLED_PATHS)
|
||||||
set(OPENCV_INCLUDE_INSTALL_PATH ${OPENCV_INCLUDE_INSTALL_PATH}/opencv-${OPENCV_VERSION})
|
|
||||||
foreach(v
|
foreach(v
|
||||||
|
OPENCV_INCLUDE_INSTALL_PATH
|
||||||
|
# file names include version (.so/.dll): OPENCV_LIB_INSTALL_PATH
|
||||||
|
OPENCV_CONFIG_INSTALL_PATH
|
||||||
OPENCV_3P_LIB_INSTALL_PATH
|
OPENCV_3P_LIB_INSTALL_PATH
|
||||||
OPENCV_SAMPLES_SRC_INSTALL_PATH
|
OPENCV_SAMPLES_SRC_INSTALL_PATH
|
||||||
OPENCV_CONFIG_INSTALL_PATH
|
|
||||||
OPENCV_DOC_INSTALL_PATH
|
OPENCV_DOC_INSTALL_PATH
|
||||||
OPENCV_JAR_INSTALL_PATH
|
# JAR file name includes version: OPENCV_JAR_INSTALL_PATH
|
||||||
OPENCV_TEST_DATA_INSTALL_PATH
|
OPENCV_TEST_DATA_INSTALL_PATH
|
||||||
OPENCV_OTHER_INSTALL_PATH
|
OPENCV_OTHER_INSTALL_PATH
|
||||||
)
|
)
|
||||||
string(REPLACE "OpenCV" "OpenCV-${OPENCV_VERSION}" ${v} "${${v}}")
|
string(REGEX REPLACE "opencv[0-9]*" "opencv-${OPENCV_VERSION}" ${v} "${${v}}")
|
||||||
string(REPLACE "opencv" "opencv-${OPENCV_VERSION}" ${v} "${${v}}")
|
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -1014,9 +1010,6 @@ string(STRIP "${OPENCV_COMPILER_STR}" OPENCV_COMPILER_STR)
|
|||||||
status("")
|
status("")
|
||||||
status(" C/C++:")
|
status(" C/C++:")
|
||||||
status(" Built as dynamic libs?:" BUILD_SHARED_LIBS THEN YES ELSE NO)
|
status(" Built as dynamic libs?:" BUILD_SHARED_LIBS THEN YES ELSE NO)
|
||||||
if(ENABLE_CXX11 OR HAVE_CXX11)
|
|
||||||
status(" C++11:" HAVE_CXX11 THEN YES ELSE NO)
|
|
||||||
endif()
|
|
||||||
status(" C++ Compiler:" ${OPENCV_COMPILER_STR})
|
status(" C++ Compiler:" ${OPENCV_COMPILER_STR})
|
||||||
status(" C++ flags (Release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
|
status(" C++ flags (Release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
|
||||||
status(" C++ flags (Debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
|
status(" C++ flags (Debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
|
||||||
@@ -1230,6 +1223,10 @@ if(WITH_IMGCODEC_PXM OR DEFINED HAVE_IMGCODEC_PXM)
|
|||||||
status(" PXM:" HAVE_IMGCODEC_PXM THEN "YES" ELSE "NO")
|
status(" PXM:" HAVE_IMGCODEC_PXM THEN "YES" ELSE "NO")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_IMGCODEC_PFM OR DEFINED HAVE_IMGCODEC_PFM)
|
||||||
|
status(" PFM:" HAVE_IMGCODEC_PFM THEN "YES" ELSE "NO")
|
||||||
|
endif()
|
||||||
|
|
||||||
# ========================== VIDEO IO ==========================
|
# ========================== VIDEO IO ==========================
|
||||||
status("")
|
status("")
|
||||||
status(" Video I/O:")
|
status(" Video I/O:")
|
||||||
@@ -1351,7 +1348,7 @@ endif()
|
|||||||
# Order is similar to CV_PARALLEL_FRAMEWORK in core/src/parallel.cpp
|
# Order is similar to CV_PARALLEL_FRAMEWORK in core/src/parallel.cpp
|
||||||
ocv_build_features_string(parallel_status EXCLUSIVE
|
ocv_build_features_string(parallel_status EXCLUSIVE
|
||||||
IF HAVE_TBB THEN "TBB (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})"
|
IF HAVE_TBB THEN "TBB (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})"
|
||||||
IF HAVE_CSTRIPES THEN "C="
|
IF HAVE_HPX THEN "HPX"
|
||||||
IF HAVE_OPENMP THEN "OpenMP"
|
IF HAVE_OPENMP THEN "OpenMP"
|
||||||
IF HAVE_GCD THEN "GCD"
|
IF HAVE_GCD THEN "GCD"
|
||||||
IF WINRT OR HAVE_CONCURRENCY THEN "Concurrency"
|
IF WINRT OR HAVE_CONCURRENCY THEN "Concurrency"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
### Resources
|
### Resources
|
||||||
|
|
||||||
* Homepage: <http://opencv.org>
|
* Homepage: <https://opencv.org>
|
||||||
* Docs: <http://docs.opencv.org/master/>
|
* Docs: <https://docs.opencv.org/master/>
|
||||||
* Q&A forum: <http://answers.opencv.org>
|
* Q&A forum: <http://answers.opencv.org>
|
||||||
* Issue tracking: <https://github.com/opencv/opencv/issues>
|
* Issue tracking: <https://github.com/opencv/opencv/issues>
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ void calib::calibDataController::filterFrames()
|
|||||||
worstElemIndex = i;
|
worstElemIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showOverlayMessage(cv::format("Frame %d is worst", worstElemIndex + 1));
|
showOverlayMessage(cv::format("Frame %zu is worst", worstElemIndex + 1));
|
||||||
|
|
||||||
if(mCalibData->imagePoints.size()) {
|
if(mCalibData->imagePoints.size()) {
|
||||||
mCalibData->imagePoints.erase(mCalibData->imagePoints.begin() + worstElemIndex);
|
mCalibData->imagePoints.erase(mCalibData->imagePoints.begin() + worstElemIndex);
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ cv::Mat CalibProcessor::processFrame(const cv::Mat &frame)
|
|||||||
saveFrameData();
|
saveFrameData();
|
||||||
bool isFrameBad = checkLastFrame();
|
bool isFrameBad = checkLastFrame();
|
||||||
if (!isFrameBad) {
|
if (!isFrameBad) {
|
||||||
std::string displayMessage = cv::format("Frame # %d captured", std::max(mCalibData->imagePoints.size(),
|
std::string displayMessage = cv::format("Frame # %zu captured", std::max(mCalibData->imagePoints.size(),
|
||||||
mCalibData->allCharucoCorners.size()));
|
mCalibData->allCharucoCorners.size()));
|
||||||
if(!showOverlayMessage(displayMessage))
|
if(!showOverlayMessage(displayMessage))
|
||||||
showCaptureMessage(frame, displayMessage);
|
showCaptureMessage(frame, displayMessage);
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ using cv::ParallelLoopBody;
|
|||||||
#include "boost.h"
|
#include "boost.h"
|
||||||
#include "cascadeclassifier.h"
|
#include "cascadeclassifier.h"
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include "cxmisc.h"
|
|
||||||
|
|
||||||
#include "cvconfig.h"
|
#include "cvconfig.h"
|
||||||
|
|
||||||
|
|||||||
@@ -2033,7 +2033,8 @@ typedef CvANN_MLP NeuralNet_MLP;
|
|||||||
typedef CvGBTreesParams GradientBoostingTreeParams;
|
typedef CvGBTreesParams GradientBoostingTreeParams;
|
||||||
typedef CvGBTrees GradientBoostingTrees;
|
typedef CvGBTrees GradientBoostingTrees;
|
||||||
|
|
||||||
template<> void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const;
|
template<> struct DefaultDeleter<CvDTreeSplit>{ void operator ()(CvDTreeSplit* obj) const; };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|||||||
@@ -1880,10 +1880,7 @@ double CvDTree::calc_node_dir( CvDTreeNode* node )
|
|||||||
namespace cv
|
namespace cv
|
||||||
{
|
{
|
||||||
|
|
||||||
template<> void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const
|
void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const { fastFree(obj); }
|
||||||
{
|
|
||||||
fastFree(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
DTreeBestSplitFinder::DTreeBestSplitFinder( CvDTree* _tree, CvDTreeNode* _node)
|
DTreeBestSplitFinder::DTreeBestSplitFinder( CvDTree* _tree, CvDTreeNode* _node)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
if(WIN32)
|
|
||||||
find_path( CSTRIPES_LIB_DIR
|
|
||||||
NAMES "C=.lib"
|
|
||||||
DOC "The path to C= lib and dll")
|
|
||||||
if(CSTRIPES_LIB_DIR)
|
|
||||||
ocv_include_directories("${CSTRIPES_LIB_DIR}/..")
|
|
||||||
link_directories("${CSTRIPES_LIB_DIR}")
|
|
||||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} "C=")
|
|
||||||
set(HAVE_CSTRIPES 1)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
@@ -70,6 +70,12 @@ if(CUDA_FOUND)
|
|||||||
unset(CUDA_ARCH_PTX CACHE)
|
unset(CUDA_ARCH_PTX CACHE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
SET(DETECT_ARCHS_COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run")
|
||||||
|
if(WIN32 AND CMAKE_LINKER) #Workaround for VS cl.exe not being in the env. path
|
||||||
|
get_filename_component(host_compiler_bindir ${CMAKE_LINKER} DIRECTORY)
|
||||||
|
SET(DETECT_ARCHS_COMMAND ${DETECT_ARCHS_COMMAND} "-ccbin" "${host_compiler_bindir}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(__cuda_arch_ptx "")
|
set(__cuda_arch_ptx "")
|
||||||
if(CUDA_GENERATION STREQUAL "Fermi")
|
if(CUDA_GENERATION STREQUAL "Fermi")
|
||||||
set(__cuda_arch_bin "2.0")
|
set(__cuda_arch_bin "2.0")
|
||||||
@@ -82,10 +88,11 @@ if(CUDA_FOUND)
|
|||||||
elseif(CUDA_GENERATION STREQUAL "Volta")
|
elseif(CUDA_GENERATION STREQUAL "Volta")
|
||||||
set(__cuda_arch_bin "7.0")
|
set(__cuda_arch_bin "7.0")
|
||||||
elseif(CUDA_GENERATION STREQUAL "Auto")
|
elseif(CUDA_GENERATION STREQUAL "Auto")
|
||||||
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
|
execute_process( COMMAND ${DETECT_ARCHS_COMMAND}
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
|
||||||
RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
|
RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
|
||||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
string(REGEX REPLACE ".*\n" "" _nvcc_out "${_nvcc_out}") #Strip leading warning messages, if any
|
||||||
if(NOT _nvcc_res EQUAL 0)
|
if(NOT _nvcc_res EQUAL 0)
|
||||||
message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
|
message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
|
||||||
else()
|
else()
|
||||||
@@ -99,10 +106,11 @@ if(CUDA_FOUND)
|
|||||||
set(__cuda_arch_bin "3.2")
|
set(__cuda_arch_bin "3.2")
|
||||||
set(__cuda_arch_ptx "")
|
set(__cuda_arch_ptx "")
|
||||||
elseif(AARCH64)
|
elseif(AARCH64)
|
||||||
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
|
execute_process( COMMAND ${DETECT_ARCHS_COMMAND}
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
|
||||||
RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
|
RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
|
||||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
string(REGEX REPLACE ".*\n" "" _nvcc_out "${_nvcc_out}") #Strip leading warning messages, if any
|
||||||
if(NOT _nvcc_res EQUAL 0)
|
if(NOT _nvcc_res EQUAL 0)
|
||||||
message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
|
message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
|
||||||
set(__cuda_arch_bin "5.3 6.2 7.0")
|
set(__cuda_arch_bin "5.3 6.2 7.0")
|
||||||
@@ -240,7 +248,7 @@ if(CUDA_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX OR APPLE)
|
if(UNIX OR APPLE)
|
||||||
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC)
|
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC --std=c++11)
|
||||||
endif()
|
endif()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only)
|
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only)
|
||||||
|
|||||||
@@ -166,14 +166,11 @@ if(CMAKE_VERSION VERSION_LESS "3.1")
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CXX11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
#cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
if(CMAKE_CXX11_COMPILE_FEATURES)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11
|
set(HAVE_CXX11 ON)
|
||||||
if(CMAKE_CXX11_COMPILE_FEATURES)
|
|
||||||
set(HAVE_CXX11 ON)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
if(NOT HAVE_CXX11)
|
if(NOT HAVE_CXX11)
|
||||||
ocv_check_compiler_flag(CXX "" HAVE_CXX11 "${OpenCV_SOURCE_DIR}/cmake/checks/cxx11.cpp")
|
ocv_check_compiler_flag(CXX "" HAVE_CXX11 "${OpenCV_SOURCE_DIR}/cmake/checks/cxx11.cpp")
|
||||||
@@ -185,3 +182,6 @@ if(NOT HAVE_CXX11)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
if(NOT HAVE_CXX11)
|
||||||
|
message(FATAL_ERROR "OpenCV 4.x requires C++11")
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -52,5 +52,18 @@ if(HAVE_QT AND ${VTK_VERSION} VERSION_GREATER "6.0.0" AND NOT ${VTK_QT_VERSION}
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
try_compile(VTK_COMPILE_STATUS
|
||||||
|
"${OpenCV_BINARY_DIR}"
|
||||||
|
"${OpenCV_SOURCE_DIR}/cmake/checks/vtk_test.cpp"
|
||||||
|
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${VTK_INCLUDE_DIRS}"
|
||||||
|
LINK_LIBRARIES ${VTK_LIBRARIES}
|
||||||
|
OUTPUT_VARIABLE OUTPUT
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ${VTK_COMPILE_STATUS})
|
||||||
|
message(STATUS "VTK support is disabled. Compilation of the sample code has failed.")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(HAVE_VTK ON)
|
set(HAVE_VTK ON)
|
||||||
message(STATUS "Found VTK ${VTK_VERSION} (${VTK_USE_FILE})")
|
message(STATUS "Found VTK ${VTK_VERSION} (${VTK_USE_FILE})")
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Main variables:
|
||||||
|
# LIBREALSENSE_LIBRARIES and LIBREALSENSE_INCLUDE to link Intel librealsense modules
|
||||||
|
# HAVE_LIBREALSENSE for conditional compilation OpenCV with/without librealsense
|
||||||
|
|
||||||
|
find_path(LIBREALSENSE_INCLUDE_DIR "librealsense2/rs.hpp" PATHS "$ENV{LIBREALSENSE_INCLUDE}" DOC "Path to librealsense interface headers")
|
||||||
|
find_library(LIBREALSENSE_LIBRARIES "realsense2" PATHS "$ENV{LIBREALSENSE_LIB}" DOC "Path to librealsense interface libraries")
|
||||||
|
|
||||||
|
if(LIBREALSENSE_INCLUDE_DIR AND LIBREALSENSE_LIBRARIES)
|
||||||
|
set(HAVE_LIBREALSENSE TRUE)
|
||||||
|
else()
|
||||||
|
set(HAVE_LIBREALSENSE FALSE)
|
||||||
|
message( WARNING, " librealsense include directory (set by LIBREALSENSE_INCLUDE_DIR variable) is not found or does not have librealsense include files." )
|
||||||
|
endif() #if(LIBREALSENSE_INCLUDE_DIR AND LIBREALSENSE_LIBRARIES)
|
||||||
|
|
||||||
|
mark_as_advanced(FORCE LIBREALSENSE_LIBRARIES LIBREALSENSE_INCLUDE_DIR)
|
||||||
@@ -268,3 +268,8 @@ if(WITH_IMGCODEC_PXM)
|
|||||||
elseif(DEFINED WITH_IMGCODEC_PXM)
|
elseif(DEFINED WITH_IMGCODEC_PXM)
|
||||||
set(HAVE_IMGCODEC_PXM OFF)
|
set(HAVE_IMGCODEC_PXM OFF)
|
||||||
endif()
|
endif()
|
||||||
|
if(WITH_IMGCODEC_PFM)
|
||||||
|
set(HAVE_IMGCODEC_PFM ON)
|
||||||
|
elseif(DEFINED WITH_IMGCODEC_PFM)
|
||||||
|
set(HAVE_IMGCODEC_PFM OFF)
|
||||||
|
endif()
|
||||||
@@ -7,6 +7,13 @@ if(WITH_TBB)
|
|||||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectTBB.cmake")
|
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectTBB.cmake")
|
||||||
endif(WITH_TBB)
|
endif(WITH_TBB)
|
||||||
|
|
||||||
|
# --- HPX ---
|
||||||
|
if(WITH_HPX)
|
||||||
|
find_package(HPX REQUIRED)
|
||||||
|
ocv_include_directories(${HPX_INCLUDE_DIRS})
|
||||||
|
set(HAVE_HPX TRUE)
|
||||||
|
endif(WITH_HPX)
|
||||||
|
|
||||||
# --- IPP ---
|
# --- IPP ---
|
||||||
if(WITH_IPP)
|
if(WITH_IPP)
|
||||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIPP.cmake")
|
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIPP.cmake")
|
||||||
@@ -93,22 +100,15 @@ if(WITH_CLP)
|
|||||||
endif()
|
endif()
|
||||||
endif(WITH_CLP)
|
endif(WITH_CLP)
|
||||||
|
|
||||||
# --- C= ---
|
|
||||||
if(WITH_CSTRIPES AND NOT HAVE_TBB)
|
|
||||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectCStripes.cmake")
|
|
||||||
else()
|
|
||||||
set(HAVE_CSTRIPES 0)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# --- GCD ---
|
# --- GCD ---
|
||||||
if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
|
if(APPLE AND NOT HAVE_TBB)
|
||||||
set(HAVE_GCD 1)
|
set(HAVE_GCD 1)
|
||||||
else()
|
else()
|
||||||
set(HAVE_GCD 0)
|
set(HAVE_GCD 0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# --- Concurrency ---
|
# --- Concurrency ---
|
||||||
if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
|
if(MSVC AND NOT HAVE_TBB)
|
||||||
set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
|
set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
|
||||||
file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
|
file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
|
||||||
try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
|
try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
|
||||||
|
|||||||
@@ -310,6 +310,11 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
|
# --- Intel librealsense ---
|
||||||
|
if(WITH_LIBREALSENSE)
|
||||||
|
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindLibRealsense.cmake")
|
||||||
|
endif(WITH_LIBREALSENSE)
|
||||||
|
|
||||||
# --- Intel Perceptual Computing SDK ---
|
# --- Intel Perceptual Computing SDK ---
|
||||||
if(WITH_INTELPERC)
|
if(WITH_INTELPERC)
|
||||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIntelPerCSDK.cmake")
|
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIntelPerCSDK.cmake")
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ if(ANDROID)
|
|||||||
string(REPLACE "opencv_" "" OPENCV_MODULES_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
|
string(REPLACE "opencv_" "" OPENCV_MODULES_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
|
||||||
|
|
||||||
if(BUILD_FAT_JAVA_LIB)
|
if(BUILD_FAT_JAVA_LIB)
|
||||||
set(OPENCV_LIBS_CONFIGMAKE java3)
|
set(OPENCV_LIBS_CONFIGMAKE java4)
|
||||||
else()
|
else()
|
||||||
set(OPENCV_LIBS_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
|
set(OPENCV_LIBS_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ endif()
|
|||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# Part 1/3: ${BIN_DIR}/OpenCVConfig.cmake -> For use *without* "make install"
|
# Part 1/3: ${BIN_DIR}/OpenCVConfig.cmake -> For use *without* "make install"
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_CONFIG_FILE_INCLUDE_DIR}\" \"${OpenCV_SOURCE_DIR}/include\" \"${OpenCV_SOURCE_DIR}/include/opencv\"")
|
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_CONFIG_FILE_INCLUDE_DIR}\" \"${OpenCV_SOURCE_DIR}/include\"")
|
||||||
|
|
||||||
foreach(m ${OPENCV_MODULES_BUILD})
|
foreach(m ${OPENCV_MODULES_BUILD})
|
||||||
if(EXISTS "${OPENCV_MODULE_${m}_LOCATION}/include")
|
if(EXISTS "${OPENCV_MODULE_${m}_LOCATION}/include")
|
||||||
@@ -68,7 +68,7 @@ configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.
|
|||||||
# Part 2/3: ${BIN_DIR}/unix-install/OpenCVConfig.cmake -> For use *with* "make install"
|
# Part 2/3: ${BIN_DIR}/unix-install/OpenCVConfig.cmake -> For use *with* "make install"
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
file(RELATIVE_PATH OpenCV_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/${OPENCV_CONFIG_INSTALL_PATH}/" ${CMAKE_INSTALL_PREFIX})
|
file(RELATIVE_PATH OpenCV_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/${OPENCV_CONFIG_INSTALL_PATH}/" ${CMAKE_INSTALL_PREFIX})
|
||||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}\" \"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}/opencv\"")
|
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}\"")
|
||||||
|
|
||||||
if(USE_IPPICV)
|
if(USE_IPPICV)
|
||||||
file(RELATIVE_PATH IPPICV_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}" "${IPPICV_INSTALL_PATH}")
|
file(RELATIVE_PATH IPPICV_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}" "${IPPICV_INSTALL_PATH}")
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ endmacro()
|
|||||||
if(NOT DEFINED CMAKE_HELPER_SCRIPT)
|
if(NOT DEFINED CMAKE_HELPER_SCRIPT)
|
||||||
|
|
||||||
if(INSTALL_TO_MANGLED_PATHS)
|
if(INSTALL_TO_MANGLED_PATHS)
|
||||||
set(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
|
ocv_update(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
|
||||||
else()
|
else()
|
||||||
set(OPENCV_PC_FILE_NAME opencv.pc)
|
ocv_update(OPENCV_PC_FILE_NAME opencv4.pc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# build the list of opencv libs and dependencies for all modules
|
# build the list of opencv libs and dependencies for all modules
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
set(MIN_VER_CMAKE 2.8.12.2)
|
set(MIN_VER_CMAKE 3.5.1)
|
||||||
set(MIN_VER_CUDA 6.5)
|
set(MIN_VER_CUDA 6.5)
|
||||||
set(MIN_VER_PYTHON2 2.7)
|
set(MIN_VER_PYTHON2 2.7)
|
||||||
set(MIN_VER_PYTHON3 3.2)
|
set(MIN_VER_PYTHON3 3.2)
|
||||||
|
|||||||
@@ -1145,6 +1145,11 @@ function(ocv_add_perf_tests)
|
|||||||
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${perf_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_PERF_${the_module}_DEPS})
|
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${perf_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_PERF_${the_module}_DEPS})
|
||||||
add_dependencies(opencv_perf_tests ${the_target})
|
add_dependencies(opencv_perf_tests ${the_target})
|
||||||
|
|
||||||
|
if(HAVE_HPX)
|
||||||
|
message("Linking HPX to Perf test of module ${name}")
|
||||||
|
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
|
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
|
||||||
set_source_files_properties(${OPENCV_PERF_${the_module}_SOURCES} ${${the_target}_pch}
|
set_source_files_properties(${OPENCV_PERF_${the_module}_SOURCES} ${${the_target}_pch}
|
||||||
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
|
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
|
||||||
@@ -1230,6 +1235,11 @@ function(ocv_add_accuracy_tests)
|
|||||||
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${test_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_TEST_${the_module}_DEPS})
|
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${test_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_TEST_${the_module}_DEPS})
|
||||||
add_dependencies(opencv_tests ${the_target})
|
add_dependencies(opencv_tests ${the_target})
|
||||||
|
|
||||||
|
if(HAVE_HPX)
|
||||||
|
message("Linking HPX to Perf test of module ${name}")
|
||||||
|
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
|
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
|
||||||
set_source_files_properties(${OPENCV_TEST_${the_module}_SOURCES} ${${the_target}_pch}
|
set_source_files_properties(${OPENCV_TEST_${the_module}_SOURCES} ${${the_target}_pch}
|
||||||
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
|
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
|
||||||
|
|||||||
@@ -1111,7 +1111,7 @@ function(ocv_install_3rdparty_licenses library)
|
|||||||
get_filename_component(name "${filename}" NAME)
|
get_filename_component(name "${filename}" NAME)
|
||||||
install(
|
install(
|
||||||
FILES "${filename}"
|
FILES "${filename}"
|
||||||
DESTINATION "${OPENCV_OTHER_INSTALL_PATH}/licenses"
|
DESTINATION "${OPENCV_LICENSES_INSTALL_PATH}"
|
||||||
COMPONENT licenses
|
COMPONENT licenses
|
||||||
RENAME "${library}-${name}"
|
RENAME "${library}-${name}"
|
||||||
OPTIONAL)
|
OPTIONAL)
|
||||||
|
|||||||
@@ -1,14 +1,25 @@
|
|||||||
#include <stdio.h>
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
std::ostringstream arch;
|
||||||
|
std::list<std::string> archs;
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (cudaSuccess != cudaGetDeviceCount(&count)){return -1;}
|
if (cudaSuccess != cudaGetDeviceCount(&count)){ return -1; }
|
||||||
if (count == 0) {return -1;}
|
if (count == 0) { return -1; }
|
||||||
for (int device = 0; device < count; ++device)
|
for (int device = 0; device < count; ++device)
|
||||||
{
|
{
|
||||||
cudaDeviceProp prop;
|
cudaDeviceProp prop;
|
||||||
if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue;}
|
if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue; }
|
||||||
printf("%d.%d ", prop.major, prop.minor);
|
arch << prop.major << "." << prop.minor;
|
||||||
|
archs.push_back(arch.str());
|
||||||
|
arch.str("");
|
||||||
}
|
}
|
||||||
|
archs.unique(); #Some devices might have the same arch
|
||||||
|
for (std::list<std::string>::iterator it=archs.begin(); it!=archs.end(); ++it)
|
||||||
|
std::cout << *it << " ";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#include <vtkSmartPointer.h>
|
||||||
|
#include <vtkTransform.h>
|
||||||
|
#include <vtkMath.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -46,9 +46,6 @@
|
|||||||
/* Cocoa API */
|
/* Cocoa API */
|
||||||
#cmakedefine HAVE_COCOA
|
#cmakedefine HAVE_COCOA
|
||||||
|
|
||||||
/* C= */
|
|
||||||
#cmakedefine HAVE_CSTRIPES
|
|
||||||
|
|
||||||
/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/
|
/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/
|
||||||
#cmakedefine HAVE_CUBLAS
|
#cmakedefine HAVE_CUBLAS
|
||||||
|
|
||||||
@@ -147,6 +144,9 @@
|
|||||||
/* OpenNI library */
|
/* OpenNI library */
|
||||||
#cmakedefine HAVE_OPENNI2
|
#cmakedefine HAVE_OPENNI2
|
||||||
|
|
||||||
|
/* librealsense library */
|
||||||
|
#cmakedefine HAVE_LIBREALSENSE
|
||||||
|
|
||||||
/* PNG codec */
|
/* PNG codec */
|
||||||
#cmakedefine HAVE_PNG
|
#cmakedefine HAVE_PNG
|
||||||
|
|
||||||
@@ -171,6 +171,9 @@
|
|||||||
/* Intel Threading Building Blocks */
|
/* Intel Threading Building Blocks */
|
||||||
#cmakedefine HAVE_TBB
|
#cmakedefine HAVE_TBB
|
||||||
|
|
||||||
|
/* Ste||ar Group High Performance ParallelX */
|
||||||
|
#cmakedefine HAVE_HPX
|
||||||
|
|
||||||
/* TIFF codec */
|
/* TIFF codec */
|
||||||
#cmakedefine HAVE_TIFF
|
#cmakedefine HAVE_TIFF
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,12 @@ if(DOXYGEN_FOUND)
|
|||||||
|
|
||||||
set(OPENCV_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0" CACHE STRING "URI to a MathJax installation")
|
set(OPENCV_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0" CACHE STRING "URI to a MathJax installation")
|
||||||
|
|
||||||
|
set(OPENCV_DOCS_EXCLUDE_CUDA ON)
|
||||||
|
if(";${OPENCV_MODULES_EXTRA};" MATCHES ";cudev;")
|
||||||
|
set(OPENCV_DOCS_EXCLUDE_CUDA OFF)
|
||||||
|
list(APPEND CMAKE_DOXYGEN_ENABLED_SECTIONS "CUDA_MODULES")
|
||||||
|
endif()
|
||||||
|
|
||||||
# gathering headers
|
# gathering headers
|
||||||
set(paths_include)
|
set(paths_include)
|
||||||
set(paths_doc)
|
set(paths_doc)
|
||||||
@@ -39,6 +45,15 @@ if(DOXYGEN_FOUND)
|
|||||||
if(EXISTS "${header_dir}")
|
if(EXISTS "${header_dir}")
|
||||||
list(APPEND paths_include "${header_dir}")
|
list(APPEND paths_include "${header_dir}")
|
||||||
list(APPEND deps ${header_dir})
|
list(APPEND deps ${header_dir})
|
||||||
|
if(OPENCV_DOCS_EXCLUDE_CUDA)
|
||||||
|
if(EXISTS "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda")
|
||||||
|
list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda")
|
||||||
|
endif()
|
||||||
|
file(GLOB list_cuda_files "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/*cuda*.hpp")
|
||||||
|
if(list_cuda_files)
|
||||||
|
list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST ${list_cuda_files})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
# doc folder
|
# doc folder
|
||||||
set(docs_dir "${OPENCV_MODULE_opencv_${m}_LOCATION}/doc")
|
set(docs_dir "${OPENCV_MODULE_opencv_${m}_LOCATION}/doc")
|
||||||
@@ -125,6 +140,8 @@ if(DOXYGEN_FOUND)
|
|||||||
# set export variables
|
# set export variables
|
||||||
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${faqfile} ; ${paths_include} ; ${paths_hal_interface} ; ${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial} ; ${tutorial_contrib_root}")
|
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${faqfile} ; ${paths_include} ; ${paths_hal_interface} ; ${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial} ; ${tutorial_contrib_root}")
|
||||||
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial}")
|
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial}")
|
||||||
|
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXCLUDE_LIST "${CMAKE_DOXYGEN_EXCLUDE_LIST}")
|
||||||
|
string(REPLACE ";" " " CMAKE_DOXYGEN_ENABLED_SECTIONS "${CMAKE_DOXYGEN_ENABLED_SECTIONS}")
|
||||||
# TODO: remove paths_doc from EXAMPLE_PATH after face module tutorials/samples moved to separate folders
|
# TODO: remove paths_doc from EXAMPLE_PATH after face module tutorials/samples moved to separate folders
|
||||||
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXAMPLE_PATH "${example_path} ; ${paths_doc} ; ${paths_sample}")
|
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXAMPLE_PATH "${example_path} ; ${paths_doc} ; ${paths_sample}")
|
||||||
set(CMAKE_DOXYGEN_LAYOUT "${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml")
|
set(CMAKE_DOXYGEN_LAYOUT "${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml")
|
||||||
|
|||||||
+5
-2
@@ -85,7 +85,7 @@ GENERATE_TODOLIST = YES
|
|||||||
GENERATE_TESTLIST = YES
|
GENERATE_TESTLIST = YES
|
||||||
GENERATE_BUGLIST = YES
|
GENERATE_BUGLIST = YES
|
||||||
GENERATE_DEPRECATEDLIST= YES
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
ENABLED_SECTIONS =
|
ENABLED_SECTIONS = @CMAKE_DOXYGEN_ENABLED_SECTIONS@
|
||||||
MAX_INITIALIZER_LINES = 30
|
MAX_INITIALIZER_LINES = 30
|
||||||
SHOW_USED_FILES = YES
|
SHOW_USED_FILES = YES
|
||||||
SHOW_FILES = YES
|
SHOW_FILES = YES
|
||||||
@@ -104,7 +104,7 @@ INPUT = @CMAKE_DOXYGEN_INPUT_LIST@
|
|||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS =
|
FILE_PATTERNS =
|
||||||
RECURSIVE = YES
|
RECURSIVE = YES
|
||||||
EXCLUDE =
|
EXCLUDE = @CMAKE_DOXYGEN_EXCLUDE_LIST@
|
||||||
EXCLUDE_SYMLINKS = NO
|
EXCLUDE_SYMLINKS = NO
|
||||||
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/*
|
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/*
|
||||||
EXCLUDE_SYMBOLS = cv::DataType<*> cv::traits::* int void CV__*
|
EXCLUDE_SYMBOLS = cv::DataType<*> cv::traits::* int void CV__*
|
||||||
@@ -240,6 +240,9 @@ PREDEFINED = __cplusplus=1 \
|
|||||||
CV_PROP_RW= \
|
CV_PROP_RW= \
|
||||||
CV_WRAP= \
|
CV_WRAP= \
|
||||||
CV_WRAP_AS(x)= \
|
CV_WRAP_AS(x)= \
|
||||||
|
CV_WRAP_MAPPABLE(x)= \
|
||||||
|
CV_WRAP_PHANTOM(x)= \
|
||||||
|
CV_WRAP_DEFAULT(x)= \
|
||||||
CV_CDECL= \
|
CV_CDECL= \
|
||||||
CV_Func = \
|
CV_Func = \
|
||||||
CV_DO_PRAGMA(x)= \
|
CV_DO_PRAGMA(x)= \
|
||||||
|
|||||||
+7
-2
@@ -1016,20 +1016,25 @@
|
|||||||
year = {2017},
|
year = {2017},
|
||||||
organization = {IEEE}
|
organization = {IEEE}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ARTICLE{gonzalez,
|
@ARTICLE{gonzalez,
|
||||||
title={Digital Image Fundamentals, Digital Imaging Processing},
|
title={Digital Image Fundamentals, Digital Imaging Processing},
|
||||||
author={Gonzalez, Rafael C and others},
|
author={Gonzalez, Rafael C and others},
|
||||||
year={1987},
|
year={1987},
|
||||||
publisher={Addison Wesley Publishing Company}
|
publisher={Addison Wesley Publishing Company}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ARTICLE{gruzman,
|
@ARTICLE{gruzman,
|
||||||
title={Цифровая обработка изображений в информационных системах},
|
title={Цифровая обработка изображений в информационных системах},
|
||||||
author={Грузман, И.С. and Киричук, В.С. and Косых, В.П. and Перетягин, Г.И. and Спектор, А.А.},
|
author={Грузман, И.С. and Киричук, В.С. and Косых, В.П. and Перетягин, Г.И. and Спектор, А.А.},
|
||||||
year={2000},
|
year={2000},
|
||||||
publisher={Изд-во НГТУ Новосибирск}
|
publisher={Изд-во НГТУ Новосибирск}
|
||||||
}
|
}
|
||||||
|
@INPROCEEDINGS{duda2018,
|
||||||
|
title = {Accurate Detection and Localization of Checkerboard Corners for Calibration},
|
||||||
|
year = {2018},
|
||||||
|
booktitle = {29th British Machine Vision Conference. British Machine Vision Conference (BMVC-29), September 3-6, Newcastle, United Kingdom},
|
||||||
|
publisher = {BMVA Press},
|
||||||
|
author = {Alexander Duda and Udo Frese},
|
||||||
|
}
|
||||||
|
|
||||||
@book{jahne2000computer,
|
@book{jahne2000computer,
|
||||||
title={Computer vision and applications: a guide for students and practitioners},
|
title={Computer vision and applications: a guide for students and practitioners},
|
||||||
|
|||||||
@@ -20,20 +20,20 @@ A simple example on extending C++ functions to Python can be found in official P
|
|||||||
documentation[1]. So extending all functions in OpenCV to Python by writing their wrapper functions
|
documentation[1]. So extending all functions in OpenCV to Python by writing their wrapper functions
|
||||||
manually is a time-consuming task. So OpenCV does it in a more intelligent way. OpenCV generates
|
manually is a time-consuming task. So OpenCV does it in a more intelligent way. OpenCV generates
|
||||||
these wrapper functions automatically from the C++ headers using some Python scripts which are
|
these wrapper functions automatically from the C++ headers using some Python scripts which are
|
||||||
located in modules/python/src2. We will look into what they do.
|
located in `modules/python/src2`. We will look into what they do.
|
||||||
|
|
||||||
First, modules/python/CMakeFiles.txt is a CMake script which checks the modules to be extended to
|
First, `modules/python/CMakeFiles.txt` is a CMake script which checks the modules to be extended to
|
||||||
Python. It will automatically check all the modules to be extended and grab their header files.
|
Python. It will automatically check all the modules to be extended and grab their header files.
|
||||||
These header files contain list of all classes, functions, constants etc. for that particular
|
These header files contain list of all classes, functions, constants etc. for that particular
|
||||||
modules.
|
modules.
|
||||||
|
|
||||||
Second, these header files are passed to a Python script, modules/python/src2/gen2.py. This is the
|
Second, these header files are passed to a Python script, `modules/python/src2/gen2.py`. This is the
|
||||||
Python bindings generator script. It calls another Python script modules/python/src2/hdr_parser.py.
|
Python bindings generator script. It calls another Python script `modules/python/src2/hdr_parser.py`.
|
||||||
This is the header parser script. This header parser splits the complete header file into small
|
This is the header parser script. This header parser splits the complete header file into small
|
||||||
Python lists. So these lists contain all details about a particular function, class etc. For
|
Python lists. So these lists contain all details about a particular function, class etc. For
|
||||||
example, a function will be parsed to get a list containing function name, return type, input
|
example, a function will be parsed to get a list containing function name, return type, input
|
||||||
arguments, argument types etc. Final list contains details of all the functions, structs, classes
|
arguments, argument types etc. Final list contains details of all the functions, enums, structs,
|
||||||
etc. in that header file.
|
classes etc. in that header file.
|
||||||
|
|
||||||
But header parser doesn't parse all the functions/classes in the header file. The developer has to
|
But header parser doesn't parse all the functions/classes in the header file. The developer has to
|
||||||
specify which functions should be exported to Python. For that, there are certain macros added to
|
specify which functions should be exported to Python. For that, there are certain macros added to
|
||||||
@@ -44,15 +44,15 @@ macros will be given in next session.
|
|||||||
|
|
||||||
So header parser returns a final big list of parsed functions. Our generator script (gen2.py) will
|
So header parser returns a final big list of parsed functions. Our generator script (gen2.py) will
|
||||||
create wrapper functions for all the functions/classes/enums/structs parsed by header parser (You
|
create wrapper functions for all the functions/classes/enums/structs parsed by header parser (You
|
||||||
can find these header files during compilation in the build/modules/python/ folder as
|
can find these header files during compilation in the `build/modules/python/` folder as
|
||||||
pyopencv_generated_\*.h files). But there may be some basic OpenCV datatypes like Mat, Vec4i,
|
pyopencv_generated_\*.h files). But there may be some basic OpenCV datatypes like Mat, Vec4i,
|
||||||
Size. They need to be extended manually. For example, a Mat type should be extended to Numpy array,
|
Size. They need to be extended manually. For example, a Mat type should be extended to Numpy array,
|
||||||
Size should be extended to a tuple of two integers etc. Similarly, there may be some complex
|
Size should be extended to a tuple of two integers etc. Similarly, there may be some complex
|
||||||
structs/classes/functions etc. which need to be extended manually. All such manual wrapper functions
|
structs/classes/functions etc. which need to be extended manually. All such manual wrapper functions
|
||||||
are placed in modules/python/src2/cv2.cpp.
|
are placed in `modules/python/src2/cv2.cpp`.
|
||||||
|
|
||||||
So now only thing left is the compilation of these wrapper files which gives us **cv2** module. So
|
So now only thing left is the compilation of these wrapper files which gives us **cv2** module. So
|
||||||
when you call a function, say res = equalizeHist(img1,img2) in Python, you pass two numpy arrays and
|
when you call a function, say `res = equalizeHist(img1,img2)` in Python, you pass two numpy arrays and
|
||||||
you expect another numpy array as the output. So these numpy arrays are converted to cv::Mat and
|
you expect another numpy array as the output. So these numpy arrays are converted to cv::Mat and
|
||||||
then calls the equalizeHist() function in C++. Final result, res will be converted back into a Numpy
|
then calls the equalizeHist() function in C++. Final result, res will be converted back into a Numpy
|
||||||
array. So in short, almost all operations are done in C++ which gives us almost same speed as that
|
array. So in short, almost all operations are done in C++ which gives us almost same speed as that
|
||||||
@@ -67,19 +67,19 @@ Header parser parse the header files based on some wrapper macros added to funct
|
|||||||
Enumeration constants don't need any wrapper macros. They are automatically wrapped. But remaining
|
Enumeration constants don't need any wrapper macros. They are automatically wrapped. But remaining
|
||||||
functions, classes etc. need wrapper macros.
|
functions, classes etc. need wrapper macros.
|
||||||
|
|
||||||
Functions are extended using CV_EXPORTS_W macro. An example is shown below.
|
Functions are extended using `CV_EXPORTS_W` macro. An example is shown below.
|
||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );
|
CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );
|
||||||
@endcode
|
@endcode
|
||||||
Header parser can understand the input and output arguments from keywords like
|
Header parser can understand the input and output arguments from keywords like
|
||||||
InputArray, OutputArray etc. But sometimes, we may need to hardcode inputs and outputs. For that,
|
InputArray, OutputArray etc. But sometimes, we may need to hardcode inputs and outputs. For that,
|
||||||
macros like CV_OUT, CV_IN_OUT etc. are used.
|
macros like `CV_OUT`, `CV_IN_OUT` etc. are used.
|
||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
CV_EXPORTS_W void minEnclosingCircle( InputArray points,
|
CV_EXPORTS_W void minEnclosingCircle( InputArray points,
|
||||||
CV_OUT Point2f& center, CV_OUT float& radius );
|
CV_OUT Point2f& center, CV_OUT float& radius );
|
||||||
@endcode
|
@endcode
|
||||||
For large classes also, CV_EXPORTS_W is used. To extend class methods, CV_WRAP is used.
|
For large classes also, `CV_EXPORTS_W` is used. To extend class methods, `CV_WRAP` is used.
|
||||||
Similarly, CV_PROP is used for class fields.
|
Similarly, `CV_PROP` is used for class fields.
|
||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
class CV_EXPORTS_W CLAHE : public Algorithm
|
class CV_EXPORTS_W CLAHE : public Algorithm
|
||||||
{
|
{
|
||||||
@@ -90,9 +90,9 @@ public:
|
|||||||
CV_WRAP virtual double getClipLimit() const = 0;
|
CV_WRAP virtual double getClipLimit() const = 0;
|
||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
Overloaded functions can be extended using CV_EXPORTS_AS. But we need to pass a new name so that
|
Overloaded functions can be extended using `CV_EXPORTS_AS`. But we need to pass a new name so that
|
||||||
each function will be called by that name in Python. Take the case of integral function below. Three
|
each function will be called by that name in Python. Take the case of integral function below. Three
|
||||||
functions are available, so each one is named with a suffix in Python. Similarly CV_WRAP_AS can be
|
functions are available, so each one is named with a suffix in Python. Similarly `CV_WRAP_AS` can be
|
||||||
used to wrap overloaded methods.
|
used to wrap overloaded methods.
|
||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
//! computes the integral image
|
//! computes the integral image
|
||||||
@@ -107,9 +107,9 @@ CV_EXPORTS_AS(integral3) void integral( InputArray src, OutputArray sum,
|
|||||||
OutputArray sqsum, OutputArray tilted,
|
OutputArray sqsum, OutputArray tilted,
|
||||||
int sdepth = -1, int sqdepth = -1 );
|
int sdepth = -1, int sqdepth = -1 );
|
||||||
@endcode
|
@endcode
|
||||||
Small classes/structs are extended using CV_EXPORTS_W_SIMPLE. These structs are passed by value
|
Small classes/structs are extended using `CV_EXPORTS_W_SIMPLE`. These structs are passed by value
|
||||||
to C++ functions. Examples are KeyPoint, Match etc. Their methods are extended by CV_WRAP and
|
to C++ functions. Examples are `KeyPoint`, `Match` etc. Their methods are extended by `CV_WRAP` and
|
||||||
fields are extended by CV_PROP_RW.
|
fields are extended by `CV_PROP_RW`.
|
||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
class CV_EXPORTS_W_SIMPLE DMatch
|
class CV_EXPORTS_W_SIMPLE DMatch
|
||||||
{
|
{
|
||||||
@@ -125,8 +125,8 @@ public:
|
|||||||
CV_PROP_RW float distance;
|
CV_PROP_RW float distance;
|
||||||
};
|
};
|
||||||
@endcode
|
@endcode
|
||||||
Some other small classes/structs can be exported using CV_EXPORTS_W_MAP where it is exported to a
|
Some other small classes/structs can be exported using `CV_EXPORTS_W_MAP` where it is exported to a
|
||||||
Python native dictionary. Moments() is an example of it.
|
Python native dictionary. `Moments()` is an example of it.
|
||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
class CV_EXPORTS_W_MAP Moments
|
class CV_EXPORTS_W_MAP Moments
|
||||||
{
|
{
|
||||||
@@ -142,6 +142,41 @@ public:
|
|||||||
So these are the major extension macros available in OpenCV. Typically, a developer has to put
|
So these are the major extension macros available in OpenCV. Typically, a developer has to put
|
||||||
proper macros in their appropriate positions. Rest is done by generator scripts. Sometimes, there
|
proper macros in their appropriate positions. Rest is done by generator scripts. Sometimes, there
|
||||||
may be an exceptional cases where generator scripts cannot create the wrappers. Such functions need
|
may be an exceptional cases where generator scripts cannot create the wrappers. Such functions need
|
||||||
to be handled manually, to do this write your own pyopencv_*.hpp extending headers and put them into
|
to be handled manually, to do this write your own `pyopencv_*.hpp` extending headers and put them into
|
||||||
misc/python subdirectory of your module. But most of the time, a code written according to OpenCV
|
misc/python subdirectory of your module. But most of the time, a code written according to OpenCV
|
||||||
coding guidelines will be automatically wrapped by generator scripts.
|
coding guidelines will be automatically wrapped by generator scripts.
|
||||||
|
|
||||||
|
More advanced cases involves providing Python with additional features that does not exist
|
||||||
|
in the C++ interface such as extra methods, type mappings, or to provide default arguments.
|
||||||
|
We will take `UMat` datatype as an example of such cases later on.
|
||||||
|
First, to provide Python-specific methods, `CV_WRAP_PHANTOM` is utilized in a similar manner to
|
||||||
|
`CV_WRAP`, except that it takes the method header as its argument, and you would need to provide
|
||||||
|
the method body in your own `pyopencv_*.hpp` extension. `UMat::queue()` and `UMat::context()` are
|
||||||
|
an example of such phantom methods that does not exist in C++ interface, but are needed to handle
|
||||||
|
OpenCL functionalities at the Python side.
|
||||||
|
Second, if an already-existing datatype(s) is mappable to your class, it is highly preferable to
|
||||||
|
indicate such capacity using `CV_WRAP_MAPPABLE` with the source type as its argument,
|
||||||
|
rather than crafting your own binding function(s). This is the case of `UMat` which maps from `Mat`.
|
||||||
|
Finally, if a default argument is needed, but it is not provided in the native C++ interface,
|
||||||
|
you can provide it for Python side as the argument of `CV_WRAP_DEFAULT`. As per the `UMat::getMat`
|
||||||
|
example below:
|
||||||
|
@code{.cpp}
|
||||||
|
class CV_EXPORTS_W UMat
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//! Mat is mappable to UMat.
|
||||||
|
// You would need to provide `static bool cv_mappable_to(const Ptr<Mat>& src, Ptr<UMat>& dst)`
|
||||||
|
CV_WRAP_MAPPABLE(Ptr<Mat>);
|
||||||
|
|
||||||
|
/! returns the OpenCL queue used by OpenCV UMat.
|
||||||
|
// You would need to provide the method body in the binder code
|
||||||
|
CV_WRAP_PHANTOM(static void* queue());
|
||||||
|
|
||||||
|
//! returns the OpenCL context used by OpenCV UMat
|
||||||
|
// You would need to provide the method body in the binder code
|
||||||
|
CV_WRAP_PHANTOM(static void* context());
|
||||||
|
|
||||||
|
//! The wrapped method become equvalent to `get(int flags = ACCESS_RW)`
|
||||||
|
CV_WRAP_AS(get) Mat getMat(int flags CV_WRAP_DEFAULT(ACCESS_RW)) const;
|
||||||
|
};
|
||||||
|
@endcode
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import cv2 as cv
|
|||||||
|
|
||||||
img = cv.imread('star.jpg',0)
|
img = cv.imread('star.jpg',0)
|
||||||
ret,thresh = cv.threshold(img,127,255,0)
|
ret,thresh = cv.threshold(img,127,255,0)
|
||||||
im2,contours,hierarchy = cv.findContours(thresh, 1, 2)
|
contours,hierarchy = cv.findContours(thresh, 1, 2)
|
||||||
|
|
||||||
cnt = contours[0]
|
cnt = contours[0]
|
||||||
M = cv.moments(cnt)
|
M = cv.moments(cnt)
|
||||||
|
|||||||
+4
-4
@@ -17,7 +17,7 @@ detection and recognition.
|
|||||||
|
|
||||||
- For better accuracy, use binary images. So before finding contours, apply threshold or canny
|
- For better accuracy, use binary images. So before finding contours, apply threshold or canny
|
||||||
edge detection.
|
edge detection.
|
||||||
- Since OpenCV 3.2, findContours() no longer modifies the source image but returns a modified image as the first of three return parameters.
|
- Since OpenCV 3.2, findContours() no longer modifies the source image.
|
||||||
- In OpenCV, finding contours is like finding white object from black background. So remember,
|
- In OpenCV, finding contours is like finding white object from black background. So remember,
|
||||||
object to be found should be white and background should be black.
|
object to be found should be white and background should be black.
|
||||||
|
|
||||||
@@ -29,11 +29,11 @@ import cv2 as cv
|
|||||||
im = cv.imread('test.jpg')
|
im = cv.imread('test.jpg')
|
||||||
imgray = cv.cvtColor(im, cv.COLOR_BGR2GRAY)
|
imgray = cv.cvtColor(im, cv.COLOR_BGR2GRAY)
|
||||||
ret, thresh = cv.threshold(imgray, 127, 255, 0)
|
ret, thresh = cv.threshold(imgray, 127, 255, 0)
|
||||||
im2, contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
|
contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
|
||||||
@endcode
|
@endcode
|
||||||
See, there are three arguments in **cv.findContours()** function, first one is source image, second
|
See, there are three arguments in **cv.findContours()** function, first one is source image, second
|
||||||
is contour retrieval mode, third is contour approximation method. And it outputs a modified image, the contours and
|
is contour retrieval mode, third is contour approximation method. And it outputs the contours and hierarchy.
|
||||||
hierarchy. contours is a Python list of all the contours in the image. Each individual contour is a
|
Contours is a Python list of all the contours in the image. Each individual contour is a
|
||||||
Numpy array of (x,y) coordinates of boundary points of the object.
|
Numpy array of (x,y) coordinates of boundary points of the object.
|
||||||
|
|
||||||
@note We will discuss second and third arguments and about hierarchy in details later. Until then,
|
@note We will discuss second and third arguments and about hierarchy in details later. Until then,
|
||||||
|
|||||||
+3
-3
@@ -39,7 +39,7 @@ import numpy as np
|
|||||||
img = cv.imread('star.jpg')
|
img = cv.imread('star.jpg')
|
||||||
img_gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
|
img_gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
|
||||||
ret,thresh = cv.threshold(img_gray, 127, 255,0)
|
ret,thresh = cv.threshold(img_gray, 127, 255,0)
|
||||||
im2,contours,hierarchy = cv.findContours(thresh,2,1)
|
contours,hierarchy = cv.findContours(thresh,2,1)
|
||||||
cnt = contours[0]
|
cnt = contours[0]
|
||||||
|
|
||||||
hull = cv.convexHull(cnt,returnPoints = False)
|
hull = cv.convexHull(cnt,returnPoints = False)
|
||||||
@@ -93,9 +93,9 @@ img2 = cv.imread('star2.jpg',0)
|
|||||||
|
|
||||||
ret, thresh = cv.threshold(img1, 127, 255,0)
|
ret, thresh = cv.threshold(img1, 127, 255,0)
|
||||||
ret, thresh2 = cv.threshold(img2, 127, 255,0)
|
ret, thresh2 = cv.threshold(img2, 127, 255,0)
|
||||||
im2,contours,hierarchy = cv.findContours(thresh,2,1)
|
contours,hierarchy = cv.findContours(thresh,2,1)
|
||||||
cnt1 = contours[0]
|
cnt1 = contours[0]
|
||||||
im2,contours,hierarchy = cv.findContours(thresh2,2,1)
|
contours,hierarchy = cv.findContours(thresh2,2,1)
|
||||||
cnt2 = contours[0]
|
cnt2 = contours[0]
|
||||||
|
|
||||||
ret = cv.matchShapes(cnt1,cnt2,1,0.0)
|
ret = cv.matchShapes(cnt1,cnt2,1,0.0)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ gives us a feature vector containing 64 values. This is the feature vector we us
|
|||||||
|
|
||||||
Finally, as in the previous case, we start by splitting our big dataset into individual cells. For
|
Finally, as in the previous case, we start by splitting our big dataset into individual cells. For
|
||||||
every digit, 250 cells are reserved for training data and remaining 250 data is reserved for
|
every digit, 250 cells are reserved for training data and remaining 250 data is reserved for
|
||||||
testing. Full code is given below, you also can download it from [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ml/py_svm_opencv/hogsvm.py):
|
testing. Full code is given below, you also can download it from [here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/py_svm_opencv/hogsvm.py):
|
||||||
|
|
||||||
@include samples/python/tutorial_code/ml/py_svm_opencv/hogsvm.py
|
@include samples/python/tutorial_code/ml/py_svm_opencv/hogsvm.py
|
||||||
|
|
||||||
|
|||||||
@@ -77,13 +77,13 @@ Source code
|
|||||||
|
|
||||||
You may also find the source code in the `samples/cpp/tutorial_code/calib3d/camera_calibration/`
|
You may also find the source code in the `samples/cpp/tutorial_code/calib3d/camera_calibration/`
|
||||||
folder of the OpenCV source library or [download it from here
|
folder of the OpenCV source library or [download it from here
|
||||||
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp). The program has a
|
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp). The program has a
|
||||||
single argument: the name of its configuration file. If none is given then it will try to open the
|
single argument: the name of its configuration file. If none is given then it will try to open the
|
||||||
one named "default.xml". [Here's a sample configuration file
|
one named "default.xml". [Here's a sample configuration file
|
||||||
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/calib3d/camera_calibration/in_VID5.xml) in XML format. In the
|
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/calib3d/camera_calibration/in_VID5.xml) in XML format. In the
|
||||||
configuration file you may choose to use camera as an input, a video file or an image list. If you
|
configuration file you may choose to use camera as an input, a video file or an image list. If you
|
||||||
opt for the last one, you will need to create a configuration file where you enumerate the images to
|
opt for the last one, you will need to create a configuration file where you enumerate the images to
|
||||||
use. Here's [an example of this ](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/calib3d/camera_calibration/VID5.xml).
|
use. Here's [an example of this ](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/calib3d/camera_calibration/VID5.xml).
|
||||||
The important part to remember is that the images need to be specified using the absolute path or
|
The important part to remember is that the images need to be specified using the absolute path or
|
||||||
the relative one from your application's working directory. You may find all this in the samples
|
the relative one from your application's working directory. You may find all this in the samples
|
||||||
directory mentioned above.
|
directory mentioned above.
|
||||||
|
|||||||
@@ -33,19 +33,19 @@ Source Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
Download the source code from
|
Download the source code from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp).
|
||||||
@include cpp/tutorial_code/core/AddingImages/AddingImages.cpp
|
@include cpp/tutorial_code/core/AddingImages/AddingImages.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
Download the source code from
|
Download the source code from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/core/AddingImages/AddingImages.java).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/core/AddingImages/AddingImages.java).
|
||||||
@include java/tutorial_code/core/AddingImages/AddingImages.java
|
@include java/tutorial_code/core/AddingImages/AddingImages.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
Download the source code from
|
Download the source code from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/core/AddingImages/adding_images.py).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/core/AddingImages/adding_images.py).
|
||||||
@include python/tutorial_code/core/AddingImages/adding_images.py
|
@include python/tutorial_code/core/AddingImages/adding_images.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ We need two source images (\f$f_{0}(x)\f$ and \f$f_{1}(x)\f$). So, we load them
|
|||||||
@snippet python/tutorial_code/core/AddingImages/adding_images.py load
|
@snippet python/tutorial_code/core/AddingImages/adding_images.py load
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
We used the following images: [LinuxLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/LinuxLogo.jpg) and [WindowsLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/WindowsLogo.jpg)
|
We used the following images: [LinuxLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/LinuxLogo.jpg) and [WindowsLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/WindowsLogo.jpg)
|
||||||
|
|
||||||
@warning Since we are *adding* *src1* and *src2*, they both have to be of the same size
|
@warning Since we are *adding* *src1* and *src2*, they both have to be of the same size
|
||||||
(width and height) and type.
|
(width and height) and type.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp)
|
||||||
|
|
||||||
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
|
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
|
||||||
@include samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp
|
@include samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp
|
||||||
@@ -66,7 +66,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java)
|
||||||
|
|
||||||
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
|
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
|
||||||
@include samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java
|
@include samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java
|
||||||
@@ -74,7 +74,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py)
|
||||||
|
|
||||||
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
|
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
|
||||||
@include samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py
|
@include samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py
|
||||||
@@ -284,15 +284,15 @@ and are not intended to be used as a replacement of a raster graphics editor!**
|
|||||||
### Code
|
### Code
|
||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp).
|
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp).
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/ChangingContrastBrightnessImageDemo.java).
|
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/ChangingContrastBrightnessImageDemo.java).
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.py).
|
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.py).
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
Code for the gamma correction:
|
Code for the gamma correction:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Source code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can [download this from here
|
You can [download this from here
|
||||||
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp) or
|
](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp) or
|
||||||
find it in the
|
find it in the
|
||||||
`samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp` of the
|
`samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp` of the
|
||||||
OpenCV source code library.
|
OpenCV source code library.
|
||||||
@@ -27,7 +27,7 @@ OpenCV source code library.
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can [download this from here
|
You can [download this from here
|
||||||
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/core/discrete_fourier_transform/DiscreteFourierTransform.java) or
|
](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/core/discrete_fourier_transform/DiscreteFourierTransform.java) or
|
||||||
find it in the
|
find it in the
|
||||||
`samples/java/tutorial_code/core/discrete_fourier_transform/DiscreteFourierTransform.java` of the
|
`samples/java/tutorial_code/core/discrete_fourier_transform/DiscreteFourierTransform.java` of the
|
||||||
OpenCV source code library.
|
OpenCV source code library.
|
||||||
@@ -35,7 +35,7 @@ OpenCV source code library.
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can [download this from here
|
You can [download this from here
|
||||||
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.py) or
|
](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.py) or
|
||||||
find it in the
|
find it in the
|
||||||
`samples/python/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.py` of the
|
`samples/python/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.py` of the
|
||||||
OpenCV source code library.
|
OpenCV source code library.
|
||||||
@@ -222,7 +222,7 @@ An application idea would be to determine the geometrical orientation present in
|
|||||||
example, let us find out if a text is horizontal or not? Looking at some text you'll notice that the
|
example, let us find out if a text is horizontal or not? Looking at some text you'll notice that the
|
||||||
text lines sort of form also horizontal lines and the letters form sort of vertical lines. These two
|
text lines sort of form also horizontal lines and the letters form sort of vertical lines. These two
|
||||||
main components of a text snippet may be also seen in case of the Fourier transform. Let us use
|
main components of a text snippet may be also seen in case of the Fourier transform. Let us use
|
||||||
[this horizontal ](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/imageTextN.png) and [this rotated](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/imageTextR.png)
|
[this horizontal ](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/imageTextN.png) and [this rotated](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/imageTextR.png)
|
||||||
image about a text.
|
image about a text.
|
||||||
|
|
||||||
In case of the horizontal text:
|
In case of the horizontal text:
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ Source code
|
|||||||
-----------
|
-----------
|
||||||
|
|
||||||
You can [download this from here
|
You can [download this from here
|
||||||
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp) or find it in the
|
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp) or find it in the
|
||||||
`samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp` of the OpenCV source code
|
`samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp` of the OpenCV source code
|
||||||
library.
|
library.
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ three major ways of going through an image pixel by pixel. To make things a litt
|
|||||||
will make the scanning for each image using all of these methods, and print out how long it took.
|
will make the scanning for each image using all of these methods, and print out how long it took.
|
||||||
|
|
||||||
You can download the full source code [here
|
You can download the full source code [here
|
||||||
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp) or look it up in
|
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp) or look it up in
|
||||||
the samples directory of OpenCV at the cpp tutorial code for the core section. Its basic usage is:
|
the samples directory of OpenCV at the cpp tutorial code for the core section. Its basic usage is:
|
||||||
@code{.bash}
|
@code{.bash}
|
||||||
how_to_scan_images imageName.jpg intValueToReduce [G]
|
how_to_scan_images imageName.jpg intValueToReduce [G]
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ Goal
|
|||||||
The goal of this tutorial is to show you how to use the OpenCV `parallel_for_` framework to easily
|
The goal of this tutorial is to show you how to use the OpenCV `parallel_for_` framework to easily
|
||||||
parallelize your code. To illustrate the concept, we will write a program to draw a Mandelbrot set
|
parallelize your code. To illustrate the concept, we will write a program to draw a Mandelbrot set
|
||||||
exploiting almost all the CPU load available.
|
exploiting almost all the CPU load available.
|
||||||
The full tutorial code is [here](https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
|
The full tutorial code is [here](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
|
||||||
If you want more information about multithreading, you will have to refer to a reference book or course as this tutorial is intended
|
If you want more information about multithreading, you will have to refer to a reference book or course as this tutorial is intended
|
||||||
to remain simple.
|
to remain simple.
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ C++ 11 standard allows to simplify the parallel implementation by get rid of the
|
|||||||
Results
|
Results
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
You can find the full tutorial code [here](https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
|
You can find the full tutorial code [here](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
|
||||||
The performance of the parallel implementation depends of the type of CPU you have. For instance, on 4 cores / 8 threads
|
The performance of the parallel implementation depends of the type of CPU you have. For instance, on 4 cores / 8 threads
|
||||||
CPU, you can expect a speed-up of around 6.9X. There are many factors to explain why we do not achieve a speed-up of almost 8X.
|
CPU, you can expect a speed-up of around 6.9X. There are many factors to explain why we do not achieve a speed-up of almost 8X.
|
||||||
Main reasons should be mostly due to:
|
Main reasons should be mostly due to:
|
||||||
|
|||||||
+2
-2
@@ -88,7 +88,7 @@ L = Mat(pI);
|
|||||||
A case study
|
A case study
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Now that you have the basics done [here's](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp)
|
Now that you have the basics done [here's](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp)
|
||||||
an example that mixes the usage of the C interface with the C++ one. You will also find it in the
|
an example that mixes the usage of the C interface with the C++ one. You will also find it in the
|
||||||
sample directory of the OpenCV source code library at the
|
sample directory of the OpenCV source code library at the
|
||||||
`samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp` .
|
`samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp` .
|
||||||
@@ -135,7 +135,7 @@ output:
|
|||||||
|
|
||||||
You may observe a runtime instance of this on the [YouTube
|
You may observe a runtime instance of this on the [YouTube
|
||||||
here](https://www.youtube.com/watch?v=qckm-zvo31w) and you can [download the source code from here
|
here](https://www.youtube.com/watch?v=qckm-zvo31w) and you can [download the source code from here
|
||||||
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp)
|
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp)
|
||||||
or find it in the
|
or find it in the
|
||||||
`samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp`
|
`samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp`
|
||||||
of the OpenCV source code library.
|
of the OpenCV source code library.
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can download this source code from [here
|
You can download this source code from [here
|
||||||
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp) or look in the
|
](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp) or look in the
|
||||||
OpenCV source code libraries sample directory at
|
OpenCV source code libraries sample directory at
|
||||||
`samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp`.
|
`samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp`.
|
||||||
@include samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
|
@include samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
|
||||||
@@ -41,7 +41,7 @@ OpenCV source code libraries sample directory at
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can download this source code from [here
|
You can download this source code from [here
|
||||||
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java) or look in the
|
](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java) or look in the
|
||||||
OpenCV source code libraries sample directory at
|
OpenCV source code libraries sample directory at
|
||||||
`samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java`.
|
`samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java`.
|
||||||
@include samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java
|
@include samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java
|
||||||
@@ -49,7 +49,7 @@ OpenCV source code libraries sample directory at
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can download this source code from [here
|
You can download this source code from [here
|
||||||
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py) or look in the
|
](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py) or look in the
|
||||||
OpenCV source code libraries sample directory at
|
OpenCV source code libraries sample directory at
|
||||||
`samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py`.
|
`samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py`.
|
||||||
@include samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py
|
@include samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py
|
||||||
|
|||||||
+1
-1
@@ -262,7 +262,7 @@ OpenCV offers support for output of other common OpenCV data structures too via
|
|||||||

|

|
||||||
|
|
||||||
Most of the samples here have been included in a small console application. You can download it from
|
Most of the samples here have been included in a small console application. You can download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/mat_the_basic_image_container/mat_the_basic_image_container.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/mat_the_basic_image_container/mat_the_basic_image_container.cpp)
|
||||||
or in the core section of the cpp samples.
|
or in the core section of the cpp samples.
|
||||||
|
|
||||||
You can also find a quick video demonstration of this on
|
You can also find a quick video demonstration of this on
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ a centric one.
|
|||||||
@snippet dnn/edge_detection.py Register
|
@snippet dnn/edge_detection.py Register
|
||||||
|
|
||||||
That's it! We've replaced an implemented OpenCV's layer to a custom one.
|
That's it! We've replaced an implemented OpenCV's layer to a custom one.
|
||||||
You may find a full script in the [source code](https://github.com/opencv/opencv/tree/3.4/samples/dnn/edge_detection.py).
|
You may find a full script in the [source code](https://github.com/opencv/opencv/tree/master/samples/dnn/edge_detection.py).
|
||||||
|
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ We will demonstrate results of this example on the following picture.
|
|||||||
Source Code
|
Source Code
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
We will be using snippets from the example application, that can be downloaded [here](https://github.com/opencv/opencv/blob/3.4/samples/dnn/classification.cpp).
|
We will be using snippets from the example application, that can be downloaded [here](https://github.com/opencv/opencv/blob/master/samples/dnn/classification.cpp).
|
||||||
|
|
||||||
@include dnn/classification.cpp
|
@include dnn/classification.cpp
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ Explanation
|
|||||||
[bvlc_googlenet.caffemodel](http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel)
|
[bvlc_googlenet.caffemodel](http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel)
|
||||||
|
|
||||||
Also you need file with names of [ILSVRC2012](http://image-net.org/challenges/LSVRC/2012/browse-synsets) classes:
|
Also you need file with names of [ILSVRC2012](http://image-net.org/challenges/LSVRC/2012/browse-synsets) classes:
|
||||||
[classification_classes_ILSVRC2012.txt](https://github.com/opencv/opencv/tree/3.4/samples/dnn/classification_classes_ILSVRC2012.txt).
|
[classification_classes_ILSVRC2012.txt](https://github.com/opencv/opencv/tree/master/samples/dnn/classification_classes_ILSVRC2012.txt).
|
||||||
|
|
||||||
Put these files into working dir of this program example.
|
Put these files into working dir of this program example.
|
||||||
|
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ MSBuild.exe /m:4 /t:Build /p:Configuration=Release .\\ALL_BUILD.vcxproj
|
|||||||
## Build OpenCV with Halide backend
|
## Build OpenCV with Halide backend
|
||||||
When you build OpenCV add the following configuration flags:
|
When you build OpenCV add the following configuration flags:
|
||||||
|
|
||||||
- `ENABLE_CXX11` - enable C++11 standard
|
|
||||||
|
|
||||||
- `WITH_HALIDE` - enable Halide linkage
|
- `WITH_HALIDE` - enable Halide linkage
|
||||||
|
|
||||||
- `HALIDE_ROOT_DIR` - path to Halide build directory
|
- `HALIDE_ROOT_DIR` - path to Halide build directory
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ Source Code
|
|||||||
-----------
|
-----------
|
||||||
|
|
||||||
Use a universal sample for object detection models written
|
Use a universal sample for object detection models written
|
||||||
[in C++](https://github.com/opencv/opencv/blob/3.4/samples/dnn/object_detection.cpp) and
|
[in C++](https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp) and
|
||||||
[in Python](https://github.com/opencv/opencv/blob/3.4/samples/dnn/object_detection.py) languages
|
[in Python](https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.py) languages
|
||||||
|
|
||||||
Usage examples
|
Usage examples
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ You can find the images (*graf1.png*, *graf3.png*) and homography (*H1to3p.xml*)
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/features2D/AKAZE_match.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/features2D/AKAZE_match.cpp)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/cpp/tutorial_code/features2D/AKAZE_match.cpp
|
@include samples/cpp/tutorial_code/features2D/AKAZE_match.cpp
|
||||||
@@ -40,7 +40,7 @@ You can find the images (*graf1.png*, *graf3.png*) and homography (*H1to3p.xml*)
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/features2D/akaze_matching/AKAZEMatchDemo.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/features2D/akaze_matching/AKAZEMatchDemo.java)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/java/tutorial_code/features2D/akaze_matching/AKAZEMatchDemo.java
|
@include samples/java/tutorial_code/features2D/akaze_matching/AKAZEMatchDemo.java
|
||||||
@@ -48,7 +48,7 @@ You can find the images (*graf1.png*, *graf3.png*) and homography (*H1to3p.xml*)
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/features2D/akaze_matching/AKAZE_match.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/features2D/akaze_matching/AKAZE_match.py)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/python/tutorial_code/features2D/akaze_matching/AKAZE_match.py
|
@include samples/python/tutorial_code/features2D/akaze_matching/AKAZE_match.py
|
||||||
|
|||||||
@@ -24,19 +24,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/feature_description/SURF_matching_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/features2D/feature_description/SURF_matching_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/features2D/feature_description/SURF_matching_Demo.cpp
|
@include samples/cpp/tutorial_code/features2D/feature_description/SURF_matching_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/features2D/feature_description/SURFMatchingDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/features2D/feature_description/SURFMatchingDemo.java)
|
||||||
@include samples/java/tutorial_code/features2D/feature_description/SURFMatchingDemo.java
|
@include samples/java/tutorial_code/features2D/feature_description/SURFMatchingDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/features2D/feature_description/SURF_matching_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/features2D/feature_description/SURF_matching_Demo.py)
|
||||||
@include samples/python/tutorial_code/features2D/feature_description/SURF_matching_Demo.py
|
@include samples/python/tutorial_code/features2D/feature_description/SURF_matching_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -22,19 +22,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/feature_detection/SURF_detection_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/features2D/feature_detection/SURF_detection_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/features2D/feature_detection/SURF_detection_Demo.cpp
|
@include samples/cpp/tutorial_code/features2D/feature_detection/SURF_detection_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/features2D/feature_detection/SURFDetectionDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/features2D/feature_detection/SURFDetectionDemo.java)
|
||||||
@include samples/java/tutorial_code/features2D/feature_detection/SURFDetectionDemo.java
|
@include samples/java/tutorial_code/features2D/feature_detection/SURFDetectionDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/features2D/feature_detection/SURF_detection_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/features2D/feature_detection/SURF_detection_Demo.py)
|
||||||
@include samples/python/tutorial_code/features2D/feature_detection/SURF_detection_Demo.py
|
@include samples/python/tutorial_code/features2D/feature_detection/SURF_detection_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -45,19 +45,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.cpp
|
@include samples/cpp/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/features2D/feature_flann_matcher/SURFFLANNMatchingDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/features2D/feature_flann_matcher/SURFFLANNMatchingDemo.java)
|
||||||
@include samples/java/tutorial_code/features2D/feature_flann_matcher/SURFFLANNMatchingDemo.java
|
@include samples/java/tutorial_code/features2D/feature_flann_matcher/SURFFLANNMatchingDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.py)
|
||||||
@include samples/python/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.py
|
@include samples/python/tutorial_code/features2D/feature_flann_matcher/SURF_FLANN_matching_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -20,19 +20,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp
|
@include samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/features2D/feature_homography/SURFFLANNMatchingHomographyDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/features2D/feature_homography/SURFFLANNMatchingHomographyDemo.java)
|
||||||
@include samples/java/tutorial_code/features2D/feature_homography/SURFFLANNMatchingHomographyDemo.java
|
@include samples/java/tutorial_code/features2D/feature_homography/SURFFLANNMatchingHomographyDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.py)
|
||||||
@include samples/python/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.py
|
@include samples/python/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ For detailed explanations about the theory, please refer to a computer vision co
|
|||||||
* An Invitation to 3-D Vision: From Images to Geometric Models, @cite Ma:2003:IVI
|
* An Invitation to 3-D Vision: From Images to Geometric Models, @cite Ma:2003:IVI
|
||||||
* Computer Vision: Algorithms and Applications, @cite RS10
|
* Computer Vision: Algorithms and Applications, @cite RS10
|
||||||
|
|
||||||
The tutorial code can be found [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/Homography).
|
The tutorial code can be found [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/features2D/Homography).
|
||||||
The images used in this tutorial can be found [here](https://github.com/opencv/opencv/tree/3.4/samples/data) (`left*.jpg`).
|
The images used in this tutorial can be found [here](https://github.com/opencv/opencv/tree/master/samples/data) (`left*.jpg`).
|
||||||
|
|
||||||
Basic theory {#tutorial_homography_Basic_theory}
|
Basic theory {#tutorial_homography_Basic_theory}
|
||||||
------------
|
------------
|
||||||
|
|||||||
@@ -17,19 +17,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp
|
@include samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/TrackingMotion/corner_subpixels/CornerSubPixDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/TrackingMotion/corner_subpixels/CornerSubPixDemo.java)
|
||||||
@include samples/java/tutorial_code/TrackingMotion/corner_subpixels/CornerSubPixDemo.java
|
@include samples/java/tutorial_code/TrackingMotion/corner_subpixels/CornerSubPixDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/TrackingMotion/corner_subpixels/cornerSubPix_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/TrackingMotion/corner_subpixels/cornerSubPix_Demo.py)
|
||||||
@include samples/python/tutorial_code/TrackingMotion/corner_subpixels/cornerSubPix_Demo.py
|
@include samples/python/tutorial_code/TrackingMotion/corner_subpixels/cornerSubPix_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -21,21 +21,21 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp)
|
||||||
|
|
||||||
@include samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
|
@include samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/TrackingMotion/generic_corner_detector/CornerDetectorDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/TrackingMotion/generic_corner_detector/CornerDetectorDemo.java)
|
||||||
|
|
||||||
@include samples/java/tutorial_code/TrackingMotion/generic_corner_detector/CornerDetectorDemo.java
|
@include samples/java/tutorial_code/TrackingMotion/generic_corner_detector/CornerDetectorDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/TrackingMotion/generic_corner_detector/cornerDetector_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/TrackingMotion/generic_corner_detector/cornerDetector_Demo.py)
|
||||||
|
|
||||||
@include samples/python/tutorial_code/TrackingMotion/generic_corner_detector/cornerDetector_Demo.py
|
@include samples/python/tutorial_code/TrackingMotion/generic_corner_detector/cornerDetector_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|||||||
+3
-3
@@ -16,19 +16,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/TrackingMotion/goodFeaturesToTrack_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/TrackingMotion/goodFeaturesToTrack_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/TrackingMotion/goodFeaturesToTrack_Demo.cpp
|
@include samples/cpp/tutorial_code/TrackingMotion/goodFeaturesToTrack_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/TrackingMotion/good_features_to_track/GoodFeaturesToTrackDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/TrackingMotion/good_features_to_track/GoodFeaturesToTrackDemo.java)
|
||||||
@include samples/java/tutorial_code/TrackingMotion/good_features_to_track/GoodFeaturesToTrackDemo.java
|
@include samples/java/tutorial_code/TrackingMotion/good_features_to_track/GoodFeaturesToTrackDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/TrackingMotion/good_features_to_track/goodFeaturesToTrack_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/TrackingMotion/good_features_to_track/goodFeaturesToTrack_Demo.py)
|
||||||
@include samples/python/tutorial_code/TrackingMotion/good_features_to_track/goodFeaturesToTrack_Demo.py
|
@include samples/python/tutorial_code/TrackingMotion/good_features_to_track/goodFeaturesToTrack_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -120,19 +120,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp
|
@include samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/TrackingMotion/harris_detector/CornerHarrisDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/TrackingMotion/harris_detector/CornerHarrisDemo.java)
|
||||||
@include samples/java/tutorial_code/TrackingMotion/harris_detector/CornerHarrisDemo.java
|
@include samples/java/tutorial_code/TrackingMotion/harris_detector/CornerHarrisDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/TrackingMotion/harris_detector/cornerHarris_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/TrackingMotion/harris_detector/cornerHarris_Demo.py)
|
||||||
@include samples/python/tutorial_code/TrackingMotion/harris_detector/cornerHarris_Demo.py
|
@include samples/python/tutorial_code/TrackingMotion/harris_detector/cornerHarris_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@cond CUDA_MODULES
|
||||||
Similarity check (PNSR and SSIM) on the GPU {#tutorial_gpu_basics_similarity}
|
Similarity check (PNSR and SSIM) on the GPU {#tutorial_gpu_basics_similarity}
|
||||||
===========================================
|
===========================================
|
||||||
@todo update this tutorial
|
@todo update this tutorial
|
||||||
@@ -24,7 +25,7 @@ The source code
|
|||||||
|
|
||||||
You may also find the source code and the video file in the
|
You may also find the source code and the video file in the
|
||||||
`samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity` directory of the OpenCV
|
`samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity` directory of the OpenCV
|
||||||
source library or download it from [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp).
|
source library or download it from [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp).
|
||||||
The full source code is quite long (due to the controlling of the application via the command line
|
The full source code is quite long (due to the controlling of the application via the command line
|
||||||
arguments and performance measurement). Therefore, to avoid cluttering up these sections with those
|
arguments and performance measurement). Therefore, to avoid cluttering up these sections with those
|
||||||
you'll find here only the functions itself.
|
you'll find here only the functions itself.
|
||||||
@@ -204,3 +205,4 @@ It may be just the improvement needed for your application to work. You may obse
|
|||||||
instance of this on the [YouTube here](https://www.youtube.com/watch?v=3_ESXmFlnvY).
|
instance of this on the [YouTube here](https://www.youtube.com/watch?v=3_ESXmFlnvY).
|
||||||
|
|
||||||
@youtube{3_ESXmFlnvY}
|
@youtube{3_ESXmFlnvY}
|
||||||
|
@endcond
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@cond CUDA_MODULES
|
||||||
Using a cv::cuda::GpuMat with thrust {#tutorial_gpu_thrust_interop}
|
Using a cv::cuda::GpuMat with thrust {#tutorial_gpu_thrust_interop}
|
||||||
===========================================
|
===========================================
|
||||||
|
|
||||||
@@ -68,3 +69,4 @@ Next we will determine how many values are greater than 0 by using thrust::count
|
|||||||
|
|
||||||
We will use those results to create an output buffer for storing the copied values, we will then use copy_if with the same predicate to populate the output buffer.
|
We will use those results to create an output buffer for storing the copied values, we will then use copy_if with the same predicate to populate the output buffer.
|
||||||
Lastly we will download the values into a CPU mat for viewing.
|
Lastly we will download the values into a CPU mat for viewing.
|
||||||
|
@endcond
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@cond CUDA_MODULES
|
||||||
GPU-Accelerated Computer Vision (cuda module) {#tutorial_table_of_content_gpu}
|
GPU-Accelerated Computer Vision (cuda module) {#tutorial_table_of_content_gpu}
|
||||||
=============================================
|
=============================================
|
||||||
|
|
||||||
@@ -20,3 +21,4 @@ run the OpenCV algorithms.
|
|||||||
|
|
||||||
This tutorial will show you how to wrap a GpuMat into a thrust iterator in order to be able to
|
This tutorial will show you how to wrap a GpuMat into a thrust iterator in order to be able to
|
||||||
use the functions in the thrust library.
|
use the functions in the thrust library.
|
||||||
|
@endcond
|
||||||
|
|||||||
@@ -27,19 +27,19 @@ Let's modify the program made in the tutorial @ref tutorial_adding_images. We wi
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp)
|
||||||
@include cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp
|
@include cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/highgui/trackbar/AddingImagesTrackbar.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/highgui/trackbar/AddingImagesTrackbar.java)
|
||||||
@include java/tutorial_code/highgui/trackbar/AddingImagesTrackbar.java
|
@include java/tutorial_code/highgui/trackbar/AddingImagesTrackbar.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/highgui/trackbar/AddingImagesTrackbar.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/highgui/trackbar/AddingImagesTrackbar.py)
|
||||||
@include python/tutorial_code/highgui/trackbar/AddingImagesTrackbar.py
|
@include python/tutorial_code/highgui/trackbar/AddingImagesTrackbar.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -81,19 +81,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- This code is in your OpenCV sample folder. Otherwise you can grab it from
|
- This code is in your OpenCV sample folder. Otherwise you can grab it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp
|
@include samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- This code is in your OpenCV sample folder. Otherwise you can grab it from
|
- This code is in your OpenCV sample folder. Otherwise you can grab it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgProc/BasicGeometricDrawing/BasicGeometricDrawing.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgProc/BasicGeometricDrawing/BasicGeometricDrawing.java)
|
||||||
@include samples/java/tutorial_code/ImgProc/BasicGeometricDrawing/BasicGeometricDrawing.java
|
@include samples/java/tutorial_code/ImgProc/BasicGeometricDrawing/BasicGeometricDrawing.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- This code is in your OpenCV sample folder. Otherwise you can grab it from
|
- This code is in your OpenCV sample folder. Otherwise you can grab it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/imgProc/BasicGeometricDrawing/basic_geometric_drawing.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/imgProc/BasicGeometricDrawing/basic_geometric_drawing.py)
|
||||||
@include samples/python/tutorial_code/imgProc/BasicGeometricDrawing/basic_geometric_drawing.py
|
@include samples/python/tutorial_code/imgProc/BasicGeometricDrawing/basic_geometric_drawing.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -65,19 +65,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial's code is shown below. You can also download it
|
This tutorial's code is shown below. You can also download it
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp
|
@include samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial's code is shown below. You can also download it
|
This tutorial's code is shown below. You can also download it
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/erosion_dilatation/MorphologyDemo1.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/erosion_dilatation/MorphologyDemo1.java)
|
||||||
@include samples/java/tutorial_code/ImgProc/erosion_dilatation/MorphologyDemo1.java
|
@include samples/java/tutorial_code/ImgProc/erosion_dilatation/MorphologyDemo1.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial's code is shown below. You can also download it
|
This tutorial's code is shown below. You can also download it
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/erosion_dilatation/morphology_1.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/erosion_dilatation/morphology_1.py)
|
||||||
@include samples/python/tutorial_code/imgProc/erosion_dilatation/morphology_1.py
|
@include samples/python/tutorial_code/imgProc/erosion_dilatation/morphology_1.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -98,7 +98,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp
|
@include samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp
|
||||||
@@ -106,7 +106,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgProc/Smoothing/Smoothing.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgProc/Smoothing/Smoothing.java)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/java/tutorial_code/ImgProc/Smoothing/Smoothing.java
|
@include samples/java/tutorial_code/ImgProc/Smoothing/Smoothing.java
|
||||||
@@ -114,7 +114,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/imgProc/Smoothing/smoothing.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/imgProc/Smoothing/smoothing.py)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/python/tutorial_code/imgProc/Smoothing/smoothing.py
|
@include samples/python/tutorial_code/imgProc/Smoothing/smoothing.py
|
||||||
@@ -221,7 +221,7 @@ already known by now.
|
|||||||
Results
|
Results
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- The code opens an image (in this case [lena.jpg](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/lena.jpg))
|
- The code opens an image (in this case [lena.jpg](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/lena.jpg))
|
||||||
and display it under the effects of the 4 filters explained.
|
and display it under the effects of the 4 filters explained.
|
||||||
- Here is a snapshot of the image smoothed using *medianBlur*:
|
- Here is a snapshot of the image smoothed using *medianBlur*:
|
||||||
|
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ Code
|
|||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- **Downloadable code**:
|
- **Downloadable code**:
|
||||||
- Click
|
- Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp)
|
||||||
for the basic version (explained in this tutorial).
|
for the basic version (explained in this tutorial).
|
||||||
- For stuff slightly fancier (using H-S histograms and floodFill to define a mask for the
|
- For stuff slightly fancier (using H-S histograms and floodFill to define a mask for the
|
||||||
skin area) you can check the [improved
|
skin area) you can check the [improved
|
||||||
demo](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo2.cpp)
|
demo](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo2.cpp)
|
||||||
- ...or you can always check out the classical
|
- ...or you can always check out the classical
|
||||||
[camshiftdemo](https://github.com/opencv/opencv/tree/3.4/samples/cpp/camshiftdemo.cpp)
|
[camshiftdemo](https://github.com/opencv/opencv/tree/master/samples/cpp/camshiftdemo.cpp)
|
||||||
in samples.
|
in samples.
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@@ -90,13 +90,13 @@ Code
|
|||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- **Downloadable code**:
|
- **Downloadable code**:
|
||||||
- Click
|
- Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/Histograms_Matching/back_projection/CalcBackProjectDemo1.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/Histograms_Matching/back_projection/CalcBackProjectDemo1.java)
|
||||||
for the basic version (explained in this tutorial).
|
for the basic version (explained in this tutorial).
|
||||||
- For stuff slightly fancier (using H-S histograms and floodFill to define a mask for the
|
- For stuff slightly fancier (using H-S histograms and floodFill to define a mask for the
|
||||||
skin area) you can check the [improved
|
skin area) you can check the [improved
|
||||||
demo](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/Histograms_Matching/back_projection/CalcBackProjectDemo2.java)
|
demo](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/Histograms_Matching/back_projection/CalcBackProjectDemo2.java)
|
||||||
- ...or you can always check out the classical
|
- ...or you can always check out the classical
|
||||||
[camshiftdemo](https://github.com/opencv/opencv/tree/3.4/samples/cpp/camshiftdemo.cpp)
|
[camshiftdemo](https://github.com/opencv/opencv/tree/master/samples/cpp/camshiftdemo.cpp)
|
||||||
in samples.
|
in samples.
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@@ -106,13 +106,13 @@ Code
|
|||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- **Downloadable code**:
|
- **Downloadable code**:
|
||||||
- Click
|
- Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/Histograms_Matching/back_projection/calcBackProject_Demo1.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/Histograms_Matching/back_projection/calcBackProject_Demo1.py)
|
||||||
for the basic version (explained in this tutorial).
|
for the basic version (explained in this tutorial).
|
||||||
- For stuff slightly fancier (using H-S histograms and floodFill to define a mask for the
|
- For stuff slightly fancier (using H-S histograms and floodFill to define a mask for the
|
||||||
skin area) you can check the [improved
|
skin area) you can check the [improved
|
||||||
demo](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/Histograms_Matching/back_projection/calcBackProject_Demo2.py)
|
demo](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/Histograms_Matching/back_projection/calcBackProject_Demo2.py)
|
||||||
- ...or you can always check out the classical
|
- ...or you can always check out the classical
|
||||||
[camshiftdemo](https://github.com/opencv/opencv/tree/3.4/samples/cpp/camshiftdemo.cpp)
|
[camshiftdemo](https://github.com/opencv/opencv/tree/master/samples/cpp/camshiftdemo.cpp)
|
||||||
in samples.
|
in samples.
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
|
|||||||
+3
-3
@@ -72,7 +72,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
|
@include samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
|
||||||
@@ -80,7 +80,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/Histograms_Matching/histogram_calculation/CalcHistDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/Histograms_Matching/histogram_calculation/CalcHistDemo.java)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/java/tutorial_code/Histograms_Matching/histogram_calculation/CalcHistDemo.java
|
@include samples/java/tutorial_code/Histograms_Matching/histogram_calculation/CalcHistDemo.java
|
||||||
@@ -88,7 +88,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/Histograms_Matching/histogram_calculation/calcHist_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/Histograms_Matching/histogram_calculation/calcHist_Demo.py)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/python/tutorial_code/Histograms_Matching/histogram_calculation/calcHist_Demo.py
|
@include samples/python/tutorial_code/Histograms_Matching/histogram_calculation/calcHist_Demo.py
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp
|
@include samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp
|
||||||
@@ -57,7 +57,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/Histograms_Matching/histogram_comparison/CompareHistDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/Histograms_Matching/histogram_comparison/CompareHistDemo.java)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/java/tutorial_code/Histograms_Matching/histogram_comparison/CompareHistDemo.java
|
@include samples/java/tutorial_code/Histograms_Matching/histogram_comparison/CompareHistDemo.java
|
||||||
@@ -65,7 +65,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/Histograms_Matching/histogram_comparison/compareHist_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/Histograms_Matching/histogram_comparison/compareHist_Demo.py)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/python/tutorial_code/Histograms_Matching/histogram_comparison/compareHist_Demo.py
|
@include samples/python/tutorial_code/Histograms_Matching/histogram_comparison/compareHist_Demo.py
|
||||||
|
|||||||
+3
-3
@@ -67,7 +67,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp
|
@include samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp
|
||||||
@@ -75,7 +75,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHistDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHistDemo.java)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/java/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHistDemo.java
|
@include samples/java/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHistDemo.java
|
||||||
@@ -83,7 +83,7 @@ Code
|
|||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHist_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHist_Demo.py)
|
||||||
|
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/python/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHist_Demo.py
|
@include samples/python/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHist_Demo.py
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ Code
|
|||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
|
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp)
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
|
@include samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ Code
|
|||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
|
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/tutorial_template_matching/MatchTemplateDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/tutorial_template_matching/MatchTemplateDemo.java)
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/java/tutorial_code/ImgProc/tutorial_template_matching/MatchTemplateDemo.java
|
@include samples/java/tutorial_code/ImgProc/tutorial_template_matching/MatchTemplateDemo.java
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ Code
|
|||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
|
|
||||||
- **Downloadable code**: Click
|
- **Downloadable code**: Click
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/match_template/match_template.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/match_template/match_template.py)
|
||||||
- **Code at glance:**
|
- **Code at glance:**
|
||||||
@include samples/python/tutorial_code/imgProc/match_template/match_template.py
|
@include samples/python/tutorial_code/imgProc/match_template/match_template.py
|
||||||
|
|
||||||
|
|||||||
@@ -48,19 +48,19 @@ The code corresponding to the previous example is shown below.
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgProc/HitMiss/HitMiss.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgProc/HitMiss/HitMiss.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgProc/HitMiss/HitMiss.cpp
|
@include samples/cpp/tutorial_code/ImgProc/HitMiss/HitMiss.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgProc/HitMiss/HitMiss.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgProc/HitMiss/HitMiss.java)
|
||||||
@include samples/java/tutorial_code/ImgProc/HitMiss/HitMiss.java
|
@include samples/java/tutorial_code/ImgProc/HitMiss/HitMiss.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/imgProc/HitMiss/hit_miss.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/imgProc/HitMiss/hit_miss.py)
|
||||||
@include samples/python/tutorial_code/imgProc/HitMiss/hit_miss.py
|
@include samples/python/tutorial_code/imgProc/HitMiss/hit_miss.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -71,19 +71,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- The tutorial code's is shown lines below. You can also download it from
|
- The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- The tutorial code's is shown lines below. You can also download it from
|
- The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgTrans/canny_detector/CannyDetectorDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgTrans/canny_detector/CannyDetectorDemo.java)
|
||||||
@include samples/java/tutorial_code/ImgTrans/canny_detector/CannyDetectorDemo.java
|
@include samples/java/tutorial_code/ImgTrans/canny_detector/CannyDetectorDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- The tutorial code's is shown lines below. You can also download it from
|
- The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ImgTrans/canny_detector/CannyDetector_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ImgTrans/canny_detector/CannyDetector_Demo.py)
|
||||||
@include samples/python/tutorial_code/ImgTrans/canny_detector/CannyDetector_Demo.py
|
@include samples/python/tutorial_code/ImgTrans/canny_detector/CannyDetector_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -52,19 +52,19 @@ The tutorial code's is shown lines below.
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgTrans/MakeBorder/CopyMakeBorder.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgTrans/MakeBorder/CopyMakeBorder.java)
|
||||||
@include samples/java/tutorial_code/ImgTrans/MakeBorder/CopyMakeBorder.java
|
@include samples/java/tutorial_code/ImgTrans/MakeBorder/CopyMakeBorder.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/ImgTrans/MakeBorder/copy_make_border.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/ImgTrans/MakeBorder/copy_make_border.py)
|
||||||
@include samples/python/tutorial_code/ImgTrans/MakeBorder/copy_make_border.py
|
@include samples/python/tutorial_code/ImgTrans/MakeBorder/copy_make_border.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -21,19 +21,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp).
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp).
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgTrans/distance_transformation/ImageSegmentationDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgTrans/distance_transformation/ImageSegmentationDemo.java)
|
||||||
@include samples/java/tutorial_code/ImgTrans/distance_transformation/ImageSegmentationDemo.java
|
@include samples/java/tutorial_code/ImgTrans/distance_transformation/ImageSegmentationDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ImgTrans/distance_transformation/imageSegmentation.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ImgTrans/distance_transformation/imageSegmentation.py)
|
||||||
@include samples/python/tutorial_code/ImgTrans/distance_transformation/imageSegmentation.py
|
@include samples/python/tutorial_code/ImgTrans/distance_transformation/imageSegmentation.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -68,19 +68,19 @@ The tutorial code's is shown in the lines below.
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/filter2D_demo.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/filter2D_demo.cpp)
|
||||||
@include cpp/tutorial_code/ImgTrans/filter2D_demo.cpp
|
@include cpp/tutorial_code/ImgTrans/filter2D_demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgTrans/Filter2D/Filter2D_Demo.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgTrans/Filter2D/Filter2D_Demo.java)
|
||||||
@include java/tutorial_code/ImgTrans/Filter2D/Filter2D_Demo.java
|
@include java/tutorial_code/ImgTrans/Filter2D/Filter2D_Demo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/ImgTrans/Filter2D/filter2D.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/ImgTrans/Filter2D/filter2D.py)
|
||||||
@include python/tutorial_code/ImgTrans/Filter2D/filter2D.py
|
@include python/tutorial_code/ImgTrans/Filter2D/filter2D.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -44,28 +44,28 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
The sample code that we will explain can be downloaded from
|
The sample code that we will explain can be downloaded from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/houghcircles.cpp).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/houghcircles.cpp).
|
||||||
A slightly fancier version (which shows trackbars for changing the threshold values) can be found
|
A slightly fancier version (which shows trackbars for changing the threshold values) can be found
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp).
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/houghcircles.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/houghcircles.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
The sample code that we will explain can be downloaded from
|
The sample code that we will explain can be downloaded from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgTrans/HoughCircle/HoughCircles.java).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgTrans/HoughCircle/HoughCircles.java).
|
||||||
@include samples/java/tutorial_code/ImgTrans/HoughCircle/HoughCircles.java
|
@include samples/java/tutorial_code/ImgTrans/HoughCircle/HoughCircles.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
The sample code that we will explain can be downloaded from
|
The sample code that we will explain can be downloaded from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/ImgTrans/HoughCircle/hough_circle.py).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/ImgTrans/HoughCircle/hough_circle.py).
|
||||||
@include samples/python/tutorial_code/ImgTrans/HoughCircle/hough_circle.py
|
@include samples/python/tutorial_code/ImgTrans/HoughCircle/hough_circle.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
Explanation
|
Explanation
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The image we used can be found [here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/smarties.png)
|
The image we used can be found [here](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/smarties.png)
|
||||||
|
|
||||||
#### Load an image:
|
#### Load an image:
|
||||||
|
|
||||||
|
|||||||
@@ -100,22 +100,22 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
The sample code that we will explain can be downloaded from
|
The sample code that we will explain can be downloaded from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/houghlines.cpp).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/houghlines.cpp).
|
||||||
A slightly fancier version (which shows both Hough standard and probabilistic
|
A slightly fancier version (which shows both Hough standard and probabilistic
|
||||||
with trackbars for changing the threshold values) can be found
|
with trackbars for changing the threshold values) can be found
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/HoughLines_Demo.cpp).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/HoughLines_Demo.cpp).
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/houghlines.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/houghlines.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
The sample code that we will explain can be downloaded from
|
The sample code that we will explain can be downloaded from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgTrans/HoughLine/HoughLines.java).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgTrans/HoughLine/HoughLines.java).
|
||||||
@include samples/java/tutorial_code/ImgTrans/HoughLine/HoughLines.java
|
@include samples/java/tutorial_code/ImgTrans/HoughLine/HoughLines.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
The sample code that we will explain can be downloaded from
|
The sample code that we will explain can be downloaded from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/ImgTrans/HoughLine/hough_lines.py).
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/ImgTrans/HoughLine/hough_lines.py).
|
||||||
@include samples/python/tutorial_code/ImgTrans/HoughLine/hough_lines.py
|
@include samples/python/tutorial_code/ImgTrans/HoughLine/hough_lines.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ Result
|
|||||||
section. It still implements the same stuff as above, only adding the Trackbar for the
|
section. It still implements the same stuff as above, only adding the Trackbar for the
|
||||||
Threshold.
|
Threshold.
|
||||||
|
|
||||||
Using an input image such as a [sudoku image](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/sudoku.png).
|
Using an input image such as a [sudoku image](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/sudoku.png).
|
||||||
We get the following result by using the Standard Hough Line Transform:
|
We get the following result by using the Standard Hough Line Transform:
|
||||||

|

|
||||||
And by using the Probabilistic Hough Line Transform:
|
And by using the Probabilistic Hough Line Transform:
|
||||||
|
|||||||
@@ -55,19 +55,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
-# The tutorial code's is shown lines below. You can also download it from
|
-# The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
-# The tutorial code's is shown lines below. You can also download it from
|
-# The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgTrans/LaPlace/LaplaceDemo.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgTrans/LaPlace/LaplaceDemo.java)
|
||||||
@include samples/java/tutorial_code/ImgTrans/LaPlace/LaplaceDemo.java
|
@include samples/java/tutorial_code/ImgTrans/LaPlace/LaplaceDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
-# The tutorial code's is shown lines below. You can also download it from
|
-# The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/ImgTrans/LaPlace/laplace_demo.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/ImgTrans/LaPlace/laplace_demo.py)
|
||||||
@include samples/python/tutorial_code/ImgTrans/LaPlace/laplace_demo.py
|
@include samples/python/tutorial_code/ImgTrans/LaPlace/laplace_demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -56,19 +56,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- The tutorial code's is shown lines below. You can also download it from
|
- The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- The tutorial code's is shown lines below. You can also download it from
|
- The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgTrans/remap/RemapDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgTrans/remap/RemapDemo.java)
|
||||||
@include samples/java/tutorial_code/ImgTrans/remap/RemapDemo.java
|
@include samples/java/tutorial_code/ImgTrans/remap/RemapDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- The tutorial code's is shown lines below. You can also download it from
|
- The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ImgTrans/remap/Remap_Demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ImgTrans/remap/Remap_Demo.py)
|
||||||
@include samples/python/tutorial_code/ImgTrans/remap/Remap_Demo.py
|
@include samples/python/tutorial_code/ImgTrans/remap/Remap_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -114,19 +114,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgTrans/SobelDemo/SobelDemo.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgTrans/SobelDemo/SobelDemo.java)
|
||||||
@include samples/java/tutorial_code/ImgTrans/SobelDemo/SobelDemo.java
|
@include samples/java/tutorial_code/ImgTrans/SobelDemo/SobelDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/ImgTrans/SobelDemo/sobel_demo.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/ImgTrans/SobelDemo/sobel_demo.py)
|
||||||
@include samples/python/tutorial_code/ImgTrans/SobelDemo/sobel_demo.py
|
@include samples/python/tutorial_code/ImgTrans/SobelDemo/sobel_demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -93,19 +93,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
- The tutorial's code is shown below. You can also download it
|
- The tutorial's code is shown below. You can also download it
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgTrans/Geometric_Transforms_Demo.cpp
|
@include samples/cpp/tutorial_code/ImgTrans/Geometric_Transforms_Demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
- The tutorial's code is shown below. You can also download it
|
- The tutorial's code is shown below. You can also download it
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp)
|
||||||
@include samples/java/tutorial_code/ImgTrans/warp_affine/GeometricTransformsDemo.java
|
@include samples/java/tutorial_code/ImgTrans/warp_affine/GeometricTransformsDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
- The tutorial's code is shown below. You can also download it
|
- The tutorial's code is shown below. You can also download it
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/ImgTrans/warp_affine/Geometric_Transforms_Demo.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/ImgTrans/warp_affine/Geometric_Transforms_Demo.py)
|
||||||
@include samples/python/tutorial_code/ImgTrans/warp_affine/Geometric_Transforms_Demo.py
|
@include samples/python/tutorial_code/ImgTrans/warp_affine/Geometric_Transforms_Demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -54,24 +54,24 @@ Code
|
|||||||
This tutorial code's is shown lines below.
|
This tutorial code's is shown lines below.
|
||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can also download it from [here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.cpp).
|
You can also download it from [here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.cpp).
|
||||||
@include samples/cpp/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.cpp
|
@include samples/cpp/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can also download it from [here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.java).
|
You can also download it from [here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.java).
|
||||||
@include samples/java/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.java
|
@include samples/java/tutorial_code/ImgProc/morph_lines_detection/Morphology_3.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can also download it from [here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/imgProc/morph_lines_detection/morph_lines_detection.py).
|
You can also download it from [here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/imgProc/morph_lines_detection/morph_lines_detection.py).
|
||||||
@include samples/python/tutorial_code/imgProc/morph_lines_detection/morph_lines_detection.py
|
@include samples/python/tutorial_code/imgProc/morph_lines_detection/morph_lines_detection.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
Explanation / Result
|
Explanation / Result
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
Get image from [here](https://raw.githubusercontent.com/opencv/opencv/3.4/doc/tutorials/imgproc/morph_lines_detection/images/src.png) .
|
Get image from [here](https://raw.githubusercontent.com/opencv/opencv/master/doc/tutorials/imgproc/morph_lines_detection/images/src.png) .
|
||||||
|
|
||||||
#### Load Image
|
#### Load Image
|
||||||
|
|
||||||
|
|||||||
@@ -84,19 +84,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial's code is shown below. You can also download it
|
This tutorial's code is shown below. You can also download it
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgProc/Morphology_2.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Morphology_2.cpp)
|
||||||
@include cpp/tutorial_code/ImgProc/Morphology_2.cpp
|
@include cpp/tutorial_code/ImgProc/Morphology_2.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial's code is shown below. You can also download it
|
This tutorial's code is shown below. You can also download it
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/opening_closing_hats/MorphologyDemo2.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/opening_closing_hats/MorphologyDemo2.java)
|
||||||
@include java/tutorial_code/ImgProc/opening_closing_hats/MorphologyDemo2.java
|
@include java/tutorial_code/ImgProc/opening_closing_hats/MorphologyDemo2.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial's code is shown below. You can also download it
|
This tutorial's code is shown below. You can also download it
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/opening_closing_hats/morphology_2.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/opening_closing_hats/morphology_2.py)
|
||||||
@include python/tutorial_code/imgProc/opening_closing_hats/morphology_2.py
|
@include python/tutorial_code/imgProc/opening_closing_hats/morphology_2.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -72,19 +72,19 @@ This tutorial code's is shown lines below.
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp
|
@include samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/ImgProc/Pyramids/Pyramids.java)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/ImgProc/Pyramids/Pyramids.java)
|
||||||
@include samples/java/tutorial_code/ImgProc/Pyramids/Pyramids.java
|
@include samples/java/tutorial_code/ImgProc/Pyramids/Pyramids.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
You can also download it from
|
You can also download it from
|
||||||
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/imgProc/Pyramids/pyramids.py)
|
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/imgProc/Pyramids/pyramids.py)
|
||||||
@include samples/python/tutorial_code/imgProc/Pyramids/pyramids.py
|
@include samples/python/tutorial_code/imgProc/Pyramids/pyramids.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ Otherwise, an error will be shown.
|
|||||||
Results
|
Results
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- The program calls by default an image [chicky_512.png](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/chicky_512.png)
|
- The program calls by default an image [chicky_512.png](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/chicky_512.png)
|
||||||
that comes in the `samples/data` folder. Notice that this image is \f$512 \times 512\f$,
|
that comes in the `samples/data` folder. Notice that this image is \f$512 \times 512\f$,
|
||||||
hence a downsample won't generate any error (\f$512 = 2^{9}\f$). The original image is shown below:
|
hence a downsample won't generate any error (\f$512 = 2^{9}\f$). The original image is shown below:
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -20,19 +20,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp)
|
||||||
@include samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp
|
@include samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ShapeDescriptors/bounding_rects_circles/GeneralContoursDemo1.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ShapeDescriptors/bounding_rects_circles/GeneralContoursDemo1.java)
|
||||||
@include samples/java/tutorial_code/ShapeDescriptors/bounding_rects_circles/GeneralContoursDemo1.java
|
@include samples/java/tutorial_code/ShapeDescriptors/bounding_rects_circles/GeneralContoursDemo1.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ShapeDescriptors/bounding_rects_circles/generalContours_demo1.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ShapeDescriptors/bounding_rects_circles/generalContours_demo1.py)
|
||||||
@include samples/python/tutorial_code/ShapeDescriptors/bounding_rects_circles/generalContours_demo1.py
|
@include samples/python/tutorial_code/ShapeDescriptors/bounding_rects_circles/generalContours_demo1.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -20,19 +20,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp)
|
||||||
@include samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp
|
@include samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/GeneralContoursDemo2.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/GeneralContoursDemo2.java)
|
||||||
@include samples/java/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/GeneralContoursDemo2.java
|
@include samples/java/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/GeneralContoursDemo2.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.py)
|
||||||
@include samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.py
|
@include samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -20,19 +20,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp
|
@include samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ShapeDescriptors/find_contours/FindContoursDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ShapeDescriptors/find_contours/FindContoursDemo.java)
|
||||||
@include samples/java/tutorial_code/ShapeDescriptors/find_contours/FindContoursDemo.java
|
@include samples/java/tutorial_code/ShapeDescriptors/find_contours/FindContoursDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ShapeDescriptors/find_contours/findContours_demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ShapeDescriptors/find_contours/findContours_demo.py)
|
||||||
@include samples/python/tutorial_code/ShapeDescriptors/find_contours/findContours_demo.py
|
@include samples/python/tutorial_code/ShapeDescriptors/find_contours/findContours_demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -19,19 +19,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp
|
@include samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ShapeDescriptors/hull/HullDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ShapeDescriptors/hull/HullDemo.java)
|
||||||
@include samples/java/tutorial_code/ShapeDescriptors/hull/HullDemo.java
|
@include samples/java/tutorial_code/ShapeDescriptors/hull/HullDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ShapeDescriptors/hull/hull_demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ShapeDescriptors/hull/hull_demo.py)
|
||||||
@include samples/python/tutorial_code/ShapeDescriptors/hull/hull_demo.py
|
@include samples/python/tutorial_code/ShapeDescriptors/hull/hull_demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -21,19 +21,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp
|
@include samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ShapeDescriptors/moments/MomentsDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ShapeDescriptors/moments/MomentsDemo.java)
|
||||||
@include samples/java/tutorial_code/ShapeDescriptors/moments/MomentsDemo.java
|
@include samples/java/tutorial_code/ShapeDescriptors/moments/MomentsDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ShapeDescriptors/moments/moments_demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ShapeDescriptors/moments/moments_demo.py)
|
||||||
@include samples/python/tutorial_code/ShapeDescriptors/moments/moments_demo.py
|
@include samples/python/tutorial_code/ShapeDescriptors/moments/moments_demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -19,19 +19,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp)
|
||||||
@include samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp
|
@include samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ShapeDescriptors/point_polygon_test/PointPolygonTestDemo.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ShapeDescriptors/point_polygon_test/PointPolygonTestDemo.java)
|
||||||
@include samples/java/tutorial_code/ShapeDescriptors/point_polygon_test/PointPolygonTestDemo.java
|
@include samples/java/tutorial_code/ShapeDescriptors/point_polygon_test/PointPolygonTestDemo.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
This tutorial code's is shown lines below. You can also download it from
|
This tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ShapeDescriptors/point_polygon_test/pointPolygonTest_demo.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ShapeDescriptors/point_polygon_test/pointPolygonTest_demo.py)
|
||||||
@include samples/python/tutorial_code/ShapeDescriptors/point_polygon_test/pointPolygonTest_demo.py
|
@include samples/python/tutorial_code/ShapeDescriptors/point_polygon_test/pointPolygonTest_demo.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -101,19 +101,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
The tutorial code's is shown lines below. You can also download it from
|
The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgProc/Threshold.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Threshold.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgProc/Threshold.cpp
|
@include samples/cpp/tutorial_code/ImgProc/Threshold.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
The tutorial code's is shown lines below. You can also download it from
|
The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/threshold/Threshold.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/threshold/Threshold.java)
|
||||||
@include samples/java/tutorial_code/ImgProc/threshold/Threshold.java
|
@include samples/java/tutorial_code/ImgProc/threshold/Threshold.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
The tutorial code's is shown lines below. You can also download it from
|
The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/threshold/threshold.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/threshold/threshold.py)
|
||||||
@include samples/python/tutorial_code/imgProc/threshold/threshold.py
|
@include samples/python/tutorial_code/imgProc/threshold/threshold.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -43,19 +43,19 @@ Code
|
|||||||
|
|
||||||
@add_toggle_cpp
|
@add_toggle_cpp
|
||||||
The tutorial code's is shown lines below. You can also download it from
|
The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgProc/Threshold_inRange.cpp)
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Threshold_inRange.cpp)
|
||||||
@include samples/cpp/tutorial_code/ImgProc/Threshold_inRange.cpp
|
@include samples/cpp/tutorial_code/ImgProc/Threshold_inRange.cpp
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_java
|
@add_toggle_java
|
||||||
The tutorial code's is shown lines below. You can also download it from
|
The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/threshold_inRange/ThresholdInRange.java)
|
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/threshold_inRange/ThresholdInRange.java)
|
||||||
@include samples/java/tutorial_code/ImgProc/threshold_inRange/ThresholdInRange.java
|
@include samples/java/tutorial_code/ImgProc/threshold_inRange/ThresholdInRange.java
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
@add_toggle_python
|
@add_toggle_python
|
||||||
The tutorial code's is shown lines below. You can also download it from
|
The tutorial code's is shown lines below. You can also download it from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py)
|
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py)
|
||||||
@include samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py
|
@include samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py
|
||||||
@end_toggle
|
@end_toggle
|
||||||
|
|
||||||
|
|||||||
@@ -19,18 +19,6 @@ If you encounter any error after thoroughly following these steps, feel free to
|
|||||||
[OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A
|
[OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A
|
||||||
forum](http://answers.opencv.org). We'll do our best to help you out.
|
forum](http://answers.opencv.org). We'll do our best to help you out.
|
||||||
|
|
||||||
Tegra Android Development Pack users
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
You may have used [Tegra Android Development
|
|
||||||
Pack](http://developer.nvidia.com/tegra-android-development-pack) (**TADP**) released by **NVIDIA**
|
|
||||||
for Android development environment setup.
|
|
||||||
|
|
||||||
Beside Android development tools the TADP 2.0 includes OpenCV4Android SDK, so it can be already
|
|
||||||
installed in your system and you can skip to @ref tutorial_O4A_SDK_samples "samples" section of this tutorial.
|
|
||||||
|
|
||||||
More details regarding TADP can be found in the @ref tutorial_android_dev_intro guide.
|
|
||||||
|
|
||||||
General info
|
General info
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|||||||
@@ -31,31 +31,6 @@ key topis:
|
|||||||
-# OpenCV development will certainly require some knowledge of the [Android
|
-# OpenCV development will certainly require some knowledge of the [Android
|
||||||
Camera](http://developer.android.com/guide/topics/media/camera.html) specifics.
|
Camera](http://developer.android.com/guide/topics/media/camera.html) specifics.
|
||||||
|
|
||||||
Quick environment setup for Android development
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
If you are making a clean environment install, then you can try [Tegra Android Development
|
|
||||||
Pack](https://developer.nvidia.com/tegra-android-development-pack) (**TADP**) released by
|
|
||||||
**NVIDIA**.
|
|
||||||
|
|
||||||
@note Starting the *version 2.0* the TADP package includes *OpenCV for Tegra* SDK that is a regular
|
|
||||||
*OpenCV4Android SDK* extended with Tegra-specific stuff. When unpacked, TADP will cover all of the
|
|
||||||
environment setup automatically and you can skip the rest of the guide.
|
|
||||||
|
|
||||||
If you are a beginner in Android development then we also recommend you to start with TADP.
|
|
||||||
|
|
||||||
@note *NVIDIA*'s Tegra Android Development Pack includes some special features for *NVIDIA*’s [Tegra
|
|
||||||
platform](http://www.nvidia.com/object/tegra-3-processor.html)
|
|
||||||
but its use is not limited to *Tegra* devices only. \* You need at least *1.6 Gb* free
|
|
||||||
disk space for the install.
|
|
||||||
|
|
||||||
- TADP will download Android SDK platforms and Android NDK from Google's server, so Internet
|
|
||||||
connection is required for the installation.
|
|
||||||
- TADP may ask you to flash your development kit at the end of installation process. Just skip
|
|
||||||
this step if you have no [Tegra Development Kit](http://developer.nvidia.com/mobile/tegra-hardware-sales-inquiries).
|
|
||||||
- (UNIX) TADP will ask you for *root* in the middle of installation, so you need to be a member of
|
|
||||||
*sudo* group.
|
|
||||||
|
|
||||||
Manual environment setup for Android development
|
Manual environment setup for Android development
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ If you need help with anything of the above, you may refer to our @ref tutorial_
|
|||||||
This tutorial also assumes you have an Android operated device with OpenCL enabled.
|
This tutorial also assumes you have an Android operated device with OpenCL enabled.
|
||||||
|
|
||||||
The related source code is located within OpenCV samples at
|
The related source code is located within OpenCV samples at
|
||||||
[opencv/samples/android/tutorial-4-opencl](https://github.com/opencv/opencv/tree/3.4/samples/android/tutorial-4-opencl/) directory.
|
[opencv/samples/android/tutorial-4-opencl](https://github.com/opencv/opencv/tree/master/samples/android/tutorial-4-opencl/) directory.
|
||||||
|
|
||||||
Preface
|
Preface
|
||||||
-------
|
-------
|
||||||
@@ -144,7 +144,7 @@ Here is a simple Java wrapper for our JNI stuff:
|
|||||||
public class NativeGLRenderer {
|
public class NativeGLRenderer {
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
System.loadLibrary("opencv_java3"); // comment this when using OpenCV Manager
|
System.loadLibrary("opencv_java4"); // comment this when using OpenCV Manager
|
||||||
System.loadLibrary("JNIrender");
|
System.loadLibrary("JNIrender");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ As you can see, inheritors for `Camera` and `Camera2` APIs should implement the
|
|||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
Let's leave the details of their implementation beyond of this tutorial, please refer the
|
Let's leave the details of their implementation beyond of this tutorial, please refer the
|
||||||
[source code](https://github.com/opencv/opencv/tree/3.4/samples/android/tutorial-4-opencl/) to see them.
|
[source code](https://github.com/opencv/opencv/tree/master/samples/android/tutorial-4-opencl/) to see them.
|
||||||
|
|
||||||
Preview Frames modification
|
Preview Frames modification
|
||||||
---------------------------
|
---------------------------
|
||||||
@@ -383,7 +383,7 @@ Unfortunately `UMat` keeps OpenCL _buffer_ internally, that can't be wrapped ove
|
|||||||
path/to/cmake.exe -GNinja -DCMAKE_MAKE_PROGRAM="path/to/ninja.exe" -DCMAKE_TOOLCHAIN_FILE=path/to/opencv/platforms/android/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON path/to/opencv
|
path/to/cmake.exe -GNinja -DCMAKE_MAKE_PROGRAM="path/to/ninja.exe" -DCMAKE_TOOLCHAIN_FILE=path/to/opencv/platforms/android/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON path/to/opencv
|
||||||
path/to/ninja.exe install/strip
|
path/to/ninja.exe install/strip
|
||||||
@endcode
|
@endcode
|
||||||
To use your own modified `libopencv_java3.so` you have to keep inside your APK, not to use OpenCV Manager and load it manually via `System.loadLibrary("opencv_java3")`.
|
To use your own modified `libopencv_java4.so` you have to keep inside your APK, not to use OpenCV Manager and load it manually via `System.loadLibrary("opencv_java4")`.
|
||||||
|
|
||||||
Performance notes
|
Performance notes
|
||||||
-----------------
|
-----------------
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Source Code
|
|||||||
-----------
|
-----------
|
||||||
|
|
||||||
Download the source code from
|
Download the source code from
|
||||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/introduction/display_image/display_image.cpp).
|
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/introduction/display_image/display_image.cpp).
|
||||||
|
|
||||||
@include cpp/tutorial_code/introduction/display_image/display_image.cpp
|
@include cpp/tutorial_code/introduction/display_image/display_image.cpp
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,10 @@ for(;;){
|
|||||||
|
|
||||||
CUDA {#tutorial_transition_hints_cuda}
|
CUDA {#tutorial_transition_hints_cuda}
|
||||||
----
|
----
|
||||||
_cuda_ module has been split into several smaller pieces:
|
|
||||||
|
CUDA modules has been moved into opencv_contrib repository.
|
||||||
|
|
||||||
|
@cond CUDA_MODULES
|
||||||
- _cuda_ - @ref cuda
|
- _cuda_ - @ref cuda
|
||||||
- _cudaarithm_ - @ref cudaarithm
|
- _cudaarithm_ - @ref cudaarithm
|
||||||
- _cudabgsegm_ - @ref cudabgsegm
|
- _cudabgsegm_ - @ref cudabgsegm
|
||||||
@@ -249,10 +252,7 @@ _cuda_ module has been split into several smaller pieces:
|
|||||||
- _cudastereo_ - @ref cudastereo
|
- _cudastereo_ - @ref cudastereo
|
||||||
- _cudawarping_ - @ref cudawarping
|
- _cudawarping_ - @ref cudawarping
|
||||||
- _cudev_ - @ref cudev
|
- _cudev_ - @ref cudev
|
||||||
|
@endcond
|
||||||
`gpu` namespace has been removed, use cv::cuda namespace instead. Many classes has also been renamed, for example:
|
|
||||||
- `gpu::FAST_GPU` -> cv::cuda::FastFeatureDetector
|
|
||||||
- `gpu::createBoxFilter_GPU` -> cv::cuda::createBoxFilter
|
|
||||||
|
|
||||||
Documentation format {#tutorial_transition_docs}
|
Documentation format {#tutorial_transition_docs}
|
||||||
--------------------
|
--------------------
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user