What's new

Closed Python: Slider

Status
Not open for further replies.

alchemist_19

Addict
Joined
Oct 8, 2018
Posts
50
Reaction
3
Points
77
Paano po mag add ng slider or bar slide para ma adjust yung value ng alpha ng dalawang images?
Code:

import cv2
import numpy as np

#Two Images: Lena & Design
lena = cv2.imread("C:/Image Processing/lena/lena.jpg")
design= cv2.imread("C:/Image Processing/lena/birthday.jpg")

#Two images are Same size
design = cv2.resize(design, lena.shape[1::-1])

#Value ng Alpha
dist = cv2.addWeighted(lena, 0.7, design,0.3, 0)

cv2.imshow("Blended Image", dist)
cv2.waitKey(0)
cv2.destroyAllWindows()

OUTPUT:

1584502904402.png
 

Attachments

Status
Not open for further replies.

Similar threads

Back
Top