image process: prepared for gaussian and median blur
This commit is contained in:
@@ -140,9 +140,12 @@ class CornerTracker:
|
||||
|
||||
@staticmethod
|
||||
def image_process(_image: np.array):
|
||||
result = cv2.cvtColor(_image, cv2.COLOR_BGR2GRAY)
|
||||
|
||||
return result
|
||||
_result = cv2.cvtColor(_image, cv2.COLOR_BGR2GRAY)
|
||||
'''
|
||||
_result = cv2.GaussianBlur(_result, (9, 9), 0)
|
||||
_result = cv2.medianBlur(_result, 3)
|
||||
'''
|
||||
return _result
|
||||
|
||||
def init_reference_frame(self, _image: np.array):
|
||||
# Draw mask
|
||||
@@ -382,7 +385,7 @@ if __name__ == '__main__':
|
||||
cv2.putText(image_anno, "FPS : " + str(int(fps)), (20, image_anno.shape[0] - 20),
|
||||
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (50, 170, 50), 1)
|
||||
|
||||
cv2.imshow(f"Image Anno", image_anno)
|
||||
cv2.imshow(f"Image Anno", cv2.medianBlur(image_anno, 3))
|
||||
|
||||
# Exit if ESC pressed
|
||||
k = cv2.waitKey(key_wait) & 0xff
|
||||
@@ -424,4 +427,3 @@ if __name__ == '__main__':
|
||||
i += 1
|
||||
|
||||
plt.show()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user