The Python tutorial sample thresholds the orientation with a single cv.threshold call, passing HighThr as the maxval argument rather than as an upper bound:
```_, imgOrientationBin = cv.threshold(imgOrientation, LowThr, HighThr, cv.THRESH_BINARY)```
That computes imgOrientation > LowThr ? HighThr : 0, so HighThr never restricts the angle. The C++ counterpart uses inRange(imgOrientation, Scalar(LowThr), Scalar(HighThr), imgOrientationBin), and the tutorial text states "LowThr and HighThr define orientation range", so the C++ behaviour is the intended one.
samples: fix HoughLines/HoughLinesP Python sample for 5.0 shape change (fixes#29637) - #29663
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
<!-- Note!!! If you are an automated agent, we have a special process for you: add 🤖🤖🤖 to the end of the PR title. -->
Fixes#29637.
OpenCV 5.0 changed vector-backed Mat/OutputArray to true 1D arrays (see
migration guide: 1D and 0D array semantics). This changes HoughLines/
HoughLinesP Python return shape from (N,1,X) to (N,X), breaking the old
indexing pattern used in the tutorial sample.
Tested locally against opencv-python 5.0 — script runs without error,
lines drawn correctly on samples/data/sudoku.png.
* Created python version of the code for the anisotropic image segmentation tutorial. Created python/cpp toggles for the markdown file.
* fix doxygen warnings
* Extending template_matching tutorial with Java
* adding mask to java version of the tutorial
* adding the python toggle and code
* updating table of content
* adding py and java to table of content
* adding mask to python
* going back to markdown with duplicated text
* non duplicated text