I have 2 thread. Thread 1 to get streaming from camrea IP and thread 1 will process those stream. I hope two thread run parallel but it's not. thread 2 is not reached.
def thread_get_image():
count = 0
while cap.isOpened():
ret, frame = cap.read()
t = datetime.datetime.now()
if ret:
count += 1
path = "data/{}.jpg".format(count)
cv2.imwrite(path, frame)
queueImage.put((path, t))
else:
break
time.sleep(0.05)
cap.release()
cv2.destroyAllWindows
def thread_processing():
while not queueImage.empty():
do_something()
time.sleep(0.05)
t1 = threading.Thread(target=thread_get_image())
t1.start()
t2 = threading.Thread(target=thread_processing())
t2.start()