134 if not hasattr(self,
'pool'):
136 self.
pool = mp.Pool()
141 inimggray = inframe.getCvGRAY()
147 futures = [ self.
pool.apply_async(computefunc, args = (inimggray, 10*x, 20*x, ))
for x
in range(1,5) ]
155 try: results.append(futures[ii].get(timeout = 10))
156 except Exception
as e: error = e
157 if error:
raise error
160 outimggray = np.hstack(results)
163 fps = self.
timer.stop()
164 height, width = outimggray.shape
165 cv2.putText(outimggray, fps, (3, height - 6), cv2.FONT_HERSHEY_SIMPLEX, 0.5, 255, 1, cv2.LINE_AA)
168 outframe.sendCvGRAY(outimggray)