冒泡
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 219 KiB |
@@ -7,7 +7,7 @@ img_rgba=cv.cvtColor(img,cv.COLOR_BGR2BGRA)
|
|||||||
# split alpha channel
|
# split alpha channel
|
||||||
blue,green,red,alpha = cv.split(img_rgba)
|
blue,green,red,alpha = cv.split(img_rgba)
|
||||||
#set alpha channel
|
#set alpha channel
|
||||||
alpha[int(alpha.shape[0]/2):alpha.shape[0],int(alpha.shape[1]/2):alpha.shape[1]]=0
|
alpha[int(alpha.shape[0]/2):alpha.shape[0],int(alpha.shape[1]/2):alpha.shape[1]]=128
|
||||||
# remix alpha to img_rgba
|
# remix alpha to img_rgba
|
||||||
img_rgba=cv.merge((blue,green,red,alpha))
|
img_rgba=cv.merge((blue,green,red,alpha))
|
||||||
# show
|
# show
|
||||||
|
|||||||
Reference in New Issue
Block a user