You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to make some trackbar by opencv.
But, It doesn't work.
Program just quit after call createTrackbar() function.
So, I uninstalled this opencv version I download at this git.
And, I reinstalled opencv of recent version.
And, It worked.
here is my code.
from os import truncate
import cv2
import numpy as np
I want to make some trackbar by opencv.
But, It doesn't work.
Program just quit after call createTrackbar() function.
So, I uninstalled this opencv version I download at this git.
And, I reinstalled opencv of recent version.
And, It worked.
here is my code.
from os import truncate
import cv2
import numpy as np
frame = np.zeros((500,500,3),np.uint8)
WindowTitle = 'TrackBar'
cv2.namedWindow(WindowTitle)
def trackbar_callback(color,value):
frame[:,:,color] = value
cv2.createTrackbar('r',WindowTitle,0,255,lambda v:
trackbar_callback(2,v))
cv2.createTrackbar('g',WindowTitle,0,255,lambda v:
trackbar_callback(1,v))
cv2.createTrackbar('b',WindowTitle,0,255,lambda v:
trackbar_callback(0,v))
while True:
cv2.destroyAllWindows()
The text was updated successfully, but these errors were encountered: