MCPcopy Create free account
hub / github.com/makelove/OpenCV-Python-Tutorial / process_threaded

Function process_threaded

官方samples/gabor_threads.py:41–48  ·  view source on GitHub ↗
(img, filters, threadn = 8)

Source from the content-addressed store, hash-verified

39 return accum
40
41def process_threaded(img, filters, threadn = 8):
42 accum = np.zeros_like(img)
43 def f(kern):
44 return cv2.filter2D(img, cv2.CV_8UC3, kern)
45 pool = ThreadPool(processes=threadn)
46 for fimg in pool.imap_unordered(f, filters):
47 np.maximum(accum, fimg, accum)
48 return accum
49
50if __name__ == '__main__':
51 import sys

Callers 1

gabor_threads.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected