nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/src/layers/reorg_layer.cpp
**Change Type:** added
**Context:** PR #9705: Added DNN Darknet Yolo v2 for object detection - ``` opencv_extra=dnn_model_darknet_yolo_v2 ``` ### This pullrequest changes  Added neural n...
**Review Line:** 104

**Code Changes:**
```diff
+
+            int channels = inputShape[1], height = inputShape[2], width = inputShape[3];
+
+            int out_c = channels / (reorgStride*reorgStride);
+
+            for (int k = 0; k < channels; ++k) {
+                for (int j = 0; j < height; ++j) {
+                    for (int i = 0; i < width; ++i) {
+                        int out_index = i + width*(j + height*k);
+                        int c2 = k % out_c;
+                        int offset = k / out_c;
```

Review comment:
> Most likely there was made a logical mistake in the original version of Darknet in the reorg layer: https://github.com/pjreddie/darknet/blob/master/src/blas.c#L9 > > It works as I described if called `reorg(input, output, out_w, out_h, _out_c, ...);` [#9705 (comment)](https://github.com/opencv/opencv/pull/9705#discussion_r141307309) > > But in the original Darknet version function is called in this way `reorg(input, output, in_w, in_h, in_c, ...);`, so the one-to-one correspondence of the input and output parameters is preserved, but very strange permutations occur. > > But because original Darknet works with this implementation of reorg and all models trained using it, then we can't fix this logical mistake. > > Why the author has not found and corrected this error? I think: > > * Perhaps this logical error does not spoil the detection accuracy, so it was not detected. > > * Theoretically, we can assume that this error even increased the accuracy - so the author found it and left it. > > > > iterate over output dimensions and map them to input ones. > > So I can implement it in a such way, > but it works correctly only **`if (in_w % 2 == 0 && in_h % 2 == 0 && in_c % 4 == 0)`** : http://coliru.stacked-crooked.com/a/b962d20938362d4f > > ``` > void reorg_my(const float*const srcData, float *const dstData, int width, int height, int channels, int reorgStride) > { > int outChannels = channels * reorgStride * reorgStride; > int outHeight = height / reorgStride; > int outWidth = width / reorgStride; > > for (int y = 0; y < outHeight; ++y) { > for (int x = 0; x < outWidth; ++x) { > for (int c = 0; c < outChannels; ++c) { > int out_index = x + outWidth*(y + outHeight*c); > > int step = c / channels; > int x_offset = step % reorgStride; > int y_offset = reorgStride * ((step / reorgStride) % reorgStride); > > int in_x = x * reorgStride + x_offset; > > int out_seq_y = y + c*outHeight; > int in_intermediate_y = out_seq_y*2 - out_seq_y%2; > in_intermediate_y = in_intermediate_y % (channels*height); > int in_c = in_intermediate_y / height; > int in_y = in_intermediate_y % height + y_offset; > > int in_index = in_x + width*(in_y + height*in_c); > dstData[out_index] = srcData[in_index]; > } > } > } > } > ``` Is there a GPU version of reorg？
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
As I see here, you are trying to reproduce the original version of the tracker from https://github.com/foolwood/DaSiamRPN/ . Maybe it is gonna be better to use as an example our version from https://github.com/opencv/opencv/blob/master/samples/dnn/dasiamrpn_tracker.py ?
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
use `selectROI()` function from `highgui` module instead.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
no need to declare infor/infor2 variables here.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
`const cv::Exception&`
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
Only one `waitKey()` call should be per loop cycle. Add pressed keys handling, like 27 (Esc). Refer to code of other OpenCV samples.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
Some message would be useful about the end of video stream (instead of just hanging)
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
Please use `samples::findFile()` helper to find files. ```.diff -net +samples::findFile(net) ```
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
Please use `samples::findFileOrKeep()` helper for VideoCapture input source (to support GStreamer pipelines or URLs)
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
Please reuse `cv::Rect2f`
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
`typedef` is not needed in C++. Please use capital letter in type names. ``` struct TrackerConfig { ... ```
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
Move variable declaration near its usage.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
> round BTW, there is `cvRound(float) -> int` in OpenCV (round + int cast).
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
``` Mat maxVal; cv::max(src.row(1), src.row(0), maxVal); ```
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
> `.mul(1/sumVal)` cv::divide() ?
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
Please pass the same window name to `selectROI()` (currently 2 windows in total are created by sample).
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
> video > net ?
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
It is better to print the message with video file name instead of just `CV_Assert()`
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
> 5 Avoid magic numbers. > DNN_TARGET_CUDA Please make this as sample command-line parameter. See [here](https://github.com/opencv/opencv/blob/4.5.1/samples/dnn/classification.cpp#L17-L26) --- BTW, There are multiple networks used.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
fix indentation (4 spaces)
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
`.at()` is evaluated 3 times here. Use this code instead: ``` float& v = src.at<float>(index); v = fmax(v, 1.0f / v); ```
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
> img, img Don't use in-place parameters with non-inplace processing. It has significant performance penalty. --- `img` is passed as reference here (non-const). Function name (get*) says nothing about modification of passed image.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
`cvRound()` returns `int`.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
> flowing typo
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
I propose to set parameters before object selection and print actual used backend to console. Not all target-backend combinations are valid and user can get this information on start.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
I propose to rename the function to `copySubwindow` to stress that it's not ROI, but deep copy.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
`bottomPad ==0` space is missing.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
It looks strange. All parameters have default values and I expect that sample should work by default with camera 0, if all models are there.
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
This name is similar to .py sample.