Commit Graph

29 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
berak
182b52d23d fix some samples colliding with std::beta
also add comments explaining the change
2018-03-15 12:40:49 +01:00
Suleyman TURKMEN
89480801b8 some improvements on tutorials 2017-07-29 20:08:19 +03: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
Maksim Shabunin
359acc0d33 Tutorials: moved imgcodecs and videoio tutorials to separate pages 2016-02-12 13:35:46 +03:00
Ishank gulati
24da1ba3dc added videoio docs and tutorials 2015-12-26 10:48:01 +05:30
Marvin Smith
91fbe00caa Updated gdal tutorial to include comments. 2015-01-17 19:28:58 -08:00
Dmitriy Anisimov
ec03d6e6fc removed cpp/tutorial_code/images/ 2014-09-23 07:45:52 +04:00
Vadim Pisarevsky
a602185fb6 Merge pull request #3097 from mshabunin:gdal-support 2014-08-13 19:26:10 +00:00
mshabunin
3ed89a8879 Merge with master and fix conflicts 2014-08-13 18:24:11 +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
d58f736935 Split highgui module to videoio and highgui 2014-07-14 23:16:47 +04:00
Marvin Smith
67e23ed972 Fixing double to uchar conversion warning. 2014-07-11 07:33:42 -07:00
vbystricky
4286f60387 Extract imgcodecs module from highgui 2014-07-07 16:28:08 +04:00
Marvin Smith
561703ca27 Fixed the compiler warnings for the demo program. 2014-07-01 17:04:28 -07:00
Marvin Smith
14548227ca Adding support for GDAL raster images. 2014-07-01 16:29:11 -07:00
Roman Donchenko
aacf188e83 Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts:
	modules/ocl/include/opencv2/ocl/ocl.hpp
	modules/ocl/src/arithm.cpp
	modules/ocl/src/build_warps.cpp
	modules/ocl/src/color.cpp
	modules/ocl/src/haar.cpp
	modules/ocl/src/imgproc.cpp
	modules/ocl/src/split_merge.cpp
	modules/ocl/test/test_color.cpp
	samples/cpp/3calibration.cpp
	samples/cpp/OpenEXRimages_HDR_Retina_toneMapping.cpp
	samples/cpp/OpenEXRimages_HDR_Retina_toneMapping_video.cpp
	samples/cpp/Qt_sample/main.cpp
	samples/cpp/camshiftdemo.cpp
	samples/cpp/descriptor_extractor_matcher.cpp
	samples/cpp/distrans.cpp
	samples/cpp/generic_descriptor_match.cpp
	samples/cpp/grabcut.cpp
	samples/cpp/morphology2.cpp
	samples/cpp/segment_objects.cpp
	samples/cpp/stereo_calib.cpp
	samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp
	samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
	samples/cpp/tutorial_code/introduction/display_image/display_image.cpp
	samples/cpp/tutorial_code/introduction/windows_visual_studio_Opencv/Test.cpp
	samples/cpp/tutorial_code/objectDetection/objectDetection.cpp
	samples/cpp/tutorial_code/objectDetection/objectDetection2.cpp
	samples/cpp/video_dmtx.cpp
2013-11-19 16:21:09 +04:00
StevenPuttemans
2b106db02f Applied all fixes related to translating C to C++ code
Also fixed some typos and code alignment
Also adapted tutorial CPP samples
Fixed some identation problems
2013-11-17 20:34:50 +01:00
Andrey Kamaev
0738ea7d0f Make highgui.hpp independent from C API 2013-04-08 15:47:29 +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
Bernat Gabor
bdfc0201de Added the How to create videos with OpenCV Tutorial. Made some corrections to the feature2d, to get rid of some documentation build errors. 2011-08-13 14:02:18 +00:00
Bernat Gabor
a0a46b0d70 Added a video input tutorial with PSNR and SSIM. 2011-08-11 09:34:03 +00:00
Bernat Gabor
a5f38806ab Small modifications to the scan tutorial and added the video-input-psnr-ssim sample file. 2011-08-09 05:43:58 +00:00
Ana Huaman
2819438fe6 Reorganized code and added Morphology 2 cpp code 2011-06-21 05:06:25 +00:00