[~] Refactor

This commit is contained in:
Siarhei Siniak 2021-07-22 11:08:41 +03:00
parent ef4f995bc1
commit a1408aed0e

@ -1038,9 +1038,26 @@ def kernel_15(
t9.release() t9.release()
t11 = t10[1] t11 = t10[1]
t12 = cv2.cvtColor(t11, cv2.COLOR_BGR2RGB) t12 = cv2.cvtColor(t11, cv2.COLOR_BGR2RGB)
matplotlib.pyplot.figure() t13 = t12.copy()
matplotlib.pyplot.imshow(t12) t15 = numpy.array([t8.xcenter, t8.ycenter, t8.width, t8.height])
matplotlib.pyplot.show() t16 = numpy.array([t13.shape[1], t13.shape[0], t13.shape[1], t13.shape[0]])
t17 = t15 .* t16
t18 = t17[:2] - t17[2:] / 2
t19 = t17[:2] + t17[2:] / 2
t20 = numpy.array([
t18[0], t18[1],
t19[0], t19[1],
])
t21 = numpy.round(t20).astype(numpy.int32)
t14 = cv2rectangle(
t13,
tuple(t21[:2]),
tuple(t21[2:]),
)
pprint.pprint(
locals()
)
return dict( return dict(
t6=t6, t6=t6,