What's new
  • Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as: All that and more! Registration is quick, simple and absolutely free. Join our community today!

Help Python: Slider

alchemist_19

Grasshopper
Joined
Oct 8, 2018
Messages
32
Reaction score
2
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
 

Online statistics

Members online
775
Guests online
1,114
Total visitors
1,889

Forum statistics

Threads
847,802
Messages
15,019,972
Members
1,368,547
Top