python cv2 screen capture

import numpy as np
import cv2
from PIL import ImageGrab

while True:
    img = ImageGrab.grab(bbox=(0, 1000, 100, 1100)) #x, y, w, h
    img_np = np.array(img)
    frame = cv2.cvtColor(img_np, cv2.COLOR_BGR2GRAY)
    cv2.imshow("frame", frame)
    if cv2.waitKey(1) & 0Xff == ord('q'):
        break
    
cv2.destroyAllWindows()

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
cv2 display capture screen capture opencv python cv2.screencapture cv2 video capture from screen cv2 screen capture instead of cv2 video capture cv2 screen video capture cv2 record capture cv2 get video capture python cv2 screen capture video in cv2 how to capture window cv2 how to capture screen with cv2 cv2 capture . get cv2 snapshot video capture python capture video cv2 opencv screen capture python how to take screenshot of screen and view with cv2 in python cv2 start capture cv2 python show screen cv2.videocapture capture device how to get video capture in cv2 cv2 capture image cv2 . video capture cv2.video capture cv2. video capture cv2 screenshot cv2.capture video cv2.image capture cv2 video capture python cv2 live screen capture cv2 capture video cv2.video_capture() cv2 video capture opencv python screen capture opencv2 python video capture cv2 grab screen opencv python grab screen grab screen opencv python opencv screenshot with color opencv get screenshot of window python cv2 screen obs screenshots python basic image detection python opencv using screen capture python opencv screen capture python opencv screen capture\ how make it so if rgb is dected screnshot is taken python cv2 screenshot screen and save constant screenshot python opencv show screen capture python opencv python capture screen part python screenshot cv2 opencv python screenshot region how to prevent screenshots of file in python get screen opencv how ot take a screenshot of a window with cv2 in python open cv screen capture python opencv capture screen python3 opencv screen capture opencv get screenshot python automate android python screenshot opencv open cv screenshot open cv reading screen video capture screenshot opencv cv2 capture image on portion of screen video cv2 capture image on portion of screen opencv screenshot python python cv screenshot opencv screen capture opencv screen caputre how to get real time screenshots as images inpython opencv take screenshot opencv screenshot if a screenshot changes cv2 python python 3 screen capture opencv screenshot with cv2 cv2 capture screen screenshot python cv2 screenshot opencv screen capture opencs cv screen capture read screen frame cv2 cv2 take screenshot screen capture with opencv and python 3 opencv capture screenshot opencv screenshots open cv grab screen python opencv capturescreen code python vopencv capturescreen code opencv show part of screen python open cv show part of screen python openCv screenshot a part of screen python cv2 capture window image cv2 cvtcolor screenshot example python screenshot opencv pyautogui screenshots and opencv python how to take a screenshot with opencv python capture screen python opencv python screen capture opencv python opencv take screenshot Python picture capture of application cv2 screen capture read screen opencv python python opencv stream screen capture python cv2 screen capture
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source