- import cv2
- import numpy as np
- # Load the background image (assumed to be a screenshot of the WhatsApp conversation)
- background = cv2.imread('whatsapp_screenshot.png')
- # Create a mask for the phone screen
- screen_mask = np.zeros_like(background)
- screen_mask[70:400, 40:600] = 255
- # Create a blank image to represent the phone screen
- screen = np.zeros_like(background)
- # Add text to represent the conversation
- font = cv2.FONT_HERSHEY_SIMPLEX
- cv2.putText(screen, 'Studentja: Të nderuar mesues, unë kam pasur disa probleme familjare', (50, 50), font, 1, (255,255,255), 2, cv2.LINE_AA)
- cv2.putText(screen, 'Mesuesi: Unë kuptoj që mund të keni pasur probleme të vërteta,', (50, 100), font, 1, (255,255,255), 2, cv2.LINE_AA)
- cv2.putText(screen, 'por është shumë e rëndësishme që të njoftoni mungesat tuaja', (50, 150), font, 1, (255,255,255), 2, cv2.LINE_AA)
- cv2.putText(screen, 'në kohë për të mbajtur një regjistër të saktë të mesimeve', (50, 200), font, 1, (255,255,255), 2, cv2.LINE_AA)
- # Add the phone screen to the background image using the mask
- background = cv2.bitwise_and(background, background, mask=cv2.bitwise_not(screen_mask))
- background = cv2.add(background, screen)
- # Show the final composite image
- cv2.imshow('Biseda midis mesuesit dhe studentes', background)
- cv2.waitKey(0)
- cv2.destroyAllWindows()
[text] video
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- video
- Paste Code
- 04 Feb-2023
- 1.33 Kb
You can Share it: