OpenCV trackbars not showing values on MacOS

Hi I am trying to use colour detection for my Raspberry Pi car I’ve made this colour picker script and the track bar works but it doesn’t display the numeric values just the bars. Can anyone help with this?

please – NO SCREENSHOTS of ode or errors here.

remove them and replace with TEXT, thank you.

apart from that – what is it now ? macos ? raspi ?

what did you install ? how so ?

Oh okay I’m sorry I didn’t know. I’ve removed the code screenshots. It just doesn’t show the values/ numbers on my trackbars. I have opencv-python and opencv-contrib-python in pycharm as packages I’m working on MacOS Monterey.

not the problem here, but use ONE of those, not both.

what does cv2.getBuildInformation() say about the GUI backend used here ?

Oh okay, and I have added cv2.getBuildInformation() to the script and it outputs: import sys; print(‘Python %s on %s’ % (sys.version, sys.platform))
sys.path.extend and then just the path to my project. Is the issue something to do with my opencv? On Mac it won’t show the trackbar values I’ve tried searching everywhere and no one has a solution to it.

no, i meant:

print(cv2.getBuildInformation())

and show us the output (at least the GUI section)

Sorry actually do you want me to copy and paste it all as text and I’ll remove the screenshot?

pleeeaaase !

(again, at least we need the GUI section)

Ok sorry! Here is the ouput:

General configuration for OpenCV 4.5.4 =====================================
Version control: 4.5.4

Platform:
Timestamp: 2021-11-19T20:31:27Z
Host: Darwin 20.6.0 x86_64
CMake: 3.22.0
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release

CPU/HW features:
Baseline: SSE SSE2 SSE3 SSSE3 SSE4_1
requested: DETECT
Dispatched code generation: SSE4_2 FP16 AVX AVX2 AVX512_SKX
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_2 (1 files): + POPCNT SSE4_2
FP16 (0 files): + POPCNT SSE4_2 FP16 AVX
AVX (4 files): + POPCNT SSE4_2 AVX
AVX2 (30 files): + POPCNT SSE4_2 FP16 FMA3 AVX AVX2
AVX512_SKX (5 files): + POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

C/C++:
Built as dynamic libs?: NO
C++ standard: 11
C++ Compiler: /usr/local/opt/ccache/libexec/clang++ (ver 13.0.0.13000029)
C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: /usr/local/opt/ccache/libexec/clang
C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release): -Wl,-dead_strip
Linker flags (Debug): -Wl,-dead_strip
ccache: YES
Precompiled headers: NO
Extra dependencies: -framework OpenCL /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/Accelerate.framework -lm -ldl -framework Cocoa -framework AppKit
3rdparty dependencies: libprotobuf ade ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf zlib quirc ippiw ippicv

OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio
Disabled: java world
Disabled by dependency: -
Unavailable: python2 ts
Applications: -
Documentation: NO
Non-free algorithms: NO

GUI: COCOA
Cocoa: YES
VTK support: NO

Media I/O:
ZLib: build (ver 1.2.11)
JPEG: build-libjpeg-turbo (ver 2.1.0-62)
WEBP: build (ver encoder: 0x020f)
PNG: build (ver 1.6.37)
TIFF: build (ver 42 - 4.2.0)
JPEG 2000: build (ver 2.4.0)
OpenEXR: build (ver 2.3.0)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES

Video I/O:
DC1394: NO
FFMPEG: YES
avcodec: YES (58.134.100)
avformat: YES (58.76.100)
avutil: YES (56.70.100)
swscale: YES (5.9.100)
avresample: YES (4.0.0)
GStreamer: NO
AVFoundation: YES

Parallel framework: GCD

Trace: YES (with Intel ITT)

Other third-party libraries:
Intel IPP: 2020.0.0 Gold [2020.0.0]
at: /Users/runner/work/opencv-python/opencv-python/_skbuild/macosx-11.0-x86_64-3.10/cmake-build/3rdparty/ippicv/ippicv_mac/icv
Intel IPP IW: sources (2020.0.0)
at: /Users/runner/work/opencv-python/opencv-python/_skbuild/macosx-11.0-x86_64-3.10/cmake-build/3rdparty/ippicv/ippicv_mac/iw
Lapack: YES (/Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/Accelerate.framework -lm -ldl)
Eigen: NO
Custom HAL: NO
Protobuf: build (3.5.1)

OpenCL: YES (no extra features)
Include path: NO
Link libraries: -framework OpenCL

Python 3:
Interpreter: /Users/runner/work/opencv-python/opencv-python/venv/bin/python (ver 3.10)
Libraries: /Library/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib (ver 3.10.0)
numpy: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-iyx0bpj4/overlay/lib/python3.10/site-packages/numpy/core/include (ver 1.21.2)
install path: python/cv2/python-3.10

Python (for build): /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

Java:
ant: /usr/local/bin/ant (ver 1.10.12)
JNI: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.312-7/x64/Contents/Home/include /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.312-7/x64/Contents/Home/include/darwin /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.312-7/x64/Contents/Home/include
Java wrappers: NO
Java tests: NO

Install to: /Users/runner/work/opencv-python/opencv-python/_skbuild/macosx-11.0-x86_64-3.10/cmake-install

1 Like

And sorry which GUI section do you need? How can I show you that? Thank you

no its alright now, we can see:

it also seems to be an ongoing, unresolved issue

Oh okay. Yeah I know i’ve already been on that page and it doesn’t look like there’s a solution to it.

i simply think, there is no code to draw tickmarks (or associated numbers) here