opencv/samples/cpp/tutorial_code
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
..
calib3d Merge pull request #23018 from stopmosk:move-aruco-tutorial 2024-02-26 14:57:46 +03:00
core Merge pull request #26260 from sturkmen72:upd_doc_4_x 2024-10-09 09:09:51 +03:00
features2D Add more references. Update missing references with webarchive. Use mathbf for matrices. Check that the determinant of the rotation matrix is not negative (reflection), and correct it if it is the case. 2022-06-19 01:27:32 +02:00
gapi Merge pull request #21157 from alexgiving:atrutnev/move_resize 2021-12-29 15:13:43 +00:00
gpu Merge branch 'thrust_tutorial' of http://github.com/dtmoodie/opencv into thrust_tutorial 2015-11-10 12:29:51 -05:00
HighGUI Merge pull request #26524 from MurtazaSaherwala:DocumentationUpdation 2024-12-09 16:23:07 +03:00
Histograms_Matching Merge pull request #23442 from LaurentBerger:tuto_findFile 2023-04-06 13:02:00 +03:00
imgcodecs/GDAL_IO Update documentation ( tutorials ) 2016-08-15 17:23:04 +03:00
ImgProc Merge pull request #23442 from LaurentBerger:tuto_findFile 2023-04-06 13:02:00 +03:00
ImgTrans Merge pull request #25042 from mshabunin:doc-upgrade 2024-03-05 16:19:45 +03:00
introduction Merge pull request #16889 from mehlukas:3.4-consolidateImshow 2020-04-07 14:14:51 +00:00
ml Update Samples 2019-09-05 01:10:51 +03:00
objectDetection Merge pull request #25378 from AleksandrPanov:move_charuco_tutorial 2024-04-16 12:14:33 +03:00
photo Update Samples 2019-09-05 01:10:51 +03:00
ShapeDescriptors Update Samples 2019-09-05 01:10:51 +03:00
snippets Enhance cv::TickMeter to be able to get the last ellapsed time 2024-09-28 12:24:36 +02:00
TrackingMotion build: eliminate build warnings 2021-08-28 17:11:26 +00:00
video Fix some typos in platforms/, samples/, 3rdparty/. 2022-09-07 16:09:23 +03:00
videoio Merge pull request #25813 from kaingwade:orbbec-astra 2024-07-01 10:55:35 +03:00
xfeatures2D Update Samples 2019-09-05 01:10:51 +03:00