๐Ÿ”’ Closed Python: Slider

Status
Not open for further replies.

alchemist_19

Grasshopper
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.webp
 
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 304
    Views
  • 1
    Participants
Last reply from:
alchemist_19

Online now

Members online
1,029
Guests online
700
Total visitors
1,729

Forum statistics

Threads
2,276,969
Posts
28,973,413
Members
1,229,670
Latest member
Hyuga000
Back
Top