Commit Graph

12 Commits

Author SHA1 Message Date
MurtazaSaherwala
3a8d7ec75a
Merge pull request #26524 from MurtazaSaherwala:DocumentationUpdation
Updated trackbar callback function and improved documentation #26524

This Fixes #26467

Description:
This pull request improve the OpenCV documentation regarding the Trackbar functionality. The current documentation does not provide clear guidance on certain aspects, such as handling the value pointer deprecation and utilizing callback arguments in C. This update addresses those gaps and provides an updated example for better clarity.

Changes:
Updated Documentation:

Clarified the usage of the value pointer and explained how to pass an initial value, since the value pointer is deprecated.
Added more detailed explanations about callback arguments in C, ensuring that users understand how to access and use them in Trackbar callbacks.
Added a note on how to properly handle initial value passing without relying on the deprecated value pointer.
Updated Tutorial Example:

Renamed and used callback function parameters to make them more understandable.
Included a demonstration on how to utilize userdata in the callback function.
Additional Notes:

Removed reliance on the value pointer for updating trackbar values. Users are now encouraged to use other mechanisms as per the current implementation to avoid the runtime warning.

### 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
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [] The feature is well documented and sample code can be built with the project CMake
2024-12-09 16:23:07 +03:00
Sean McBride
35f1a90df7
Merge pull request #22149 from seanm:sprintf
Replaced sprintf with safer snprintf

* Straightforward replacement of sprintf with safer snprintf

* Trickier replacement of sprintf with safer snprintf

Some functions were changed to take another parameter: the size of the buffer, so that they can pass that size on to snprintf.
2022-06-25 06:48:22 +03:00
Suleyman TURKMEN
f73395122c Update Samples 2019-09-05 01:10:51 +03:00
catree
9fc0cabdf5 Add Java and Python code for trackbar tutorial. 2018-05-18 11:29:41 +02:00
Suleyman TURKMEN
bb6f65c199 Update documentation ( tutorials ) 2016-08-15 17:23:04 +03:00
Suleyman TURKMEN
11ca1c95f8 update cpp samples and tutorials 2016-06-26 20:55:00 +03:00
Dmitriy Anisimov
ec03d6e6fc removed cpp/tutorial_code/images/ 2014-09-23 07:45:52 +04:00
Adil Ibragimov
8a4a1bb018 Several type of formal refactoring:
1. someMatrix.data -> someMatrix.prt()
2. someMatrix.data + someMatrix.step * lineIndex -> someMatrix.ptr( lineIndex )
3. (SomeType*) someMatrix.data -> someMatrix.ptr<SomeType>()
4. someMatrix.data -> !someMatrix.empty() ( or !someMatrix.data -> someMatrix.empty() ) in logical expressions
2014-08-13 15:21:35 +04:00
vbystricky
4286f60387 Extract imgcodecs module from highgui 2014-07-07 16:28:08 +04:00
Andrey Kamaev
b131dfeecd Build tutorial codes together with other samples
These codes should be included into regular builds.
2012-11-09 10:15:48 +04:00
OpenCV Buildbot
04384a71e4 Normalize line endings and whitespace 2012-10-17 15:32:23 +04:00
Ana Huaman
2819438fe6 Reorganized code and added Morphology 2 cpp code 2011-06-21 05:06:25 +00:00