mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 07:28:21 +08:00
Fix: Handle Runtime error raised by uiautoamtor2
This commit is contained in:
@@ -502,6 +502,20 @@ def rgb2hsv(image):
|
||||
return image
|
||||
|
||||
|
||||
def rgb2yuv(image):
|
||||
"""
|
||||
Convert RGB to YUV color space.
|
||||
|
||||
Args:
|
||||
image (np.ndarray): Shape (height, width, channel)
|
||||
|
||||
Returns:
|
||||
np.ndarray: Shape (height, width)
|
||||
"""
|
||||
image = cv2.cvtColor(image, cv2.COLOR_RGB2YUV)
|
||||
return image
|
||||
|
||||
|
||||
def rgb2luma(image):
|
||||
"""
|
||||
Convert RGB to the Y channel (Luminance) in YUV color space.
|
||||
|
||||
Reference in New Issue
Block a user