About 6,070,000 results
Open links in new tab
  1. python - How can I install cv2? - Stack Overflow

    Sep 11, 2019 · pip install opencv-python. opencv-python. If you need support for working videos: pip install opencv-contrib-python. opencv-contrib-python. If you need a non-GUI OpenCV: pip …

  2. python - How do I install opencv using pip? - Stack Overflow

    Aug 15, 2018 · I need to install cv2 for a script that has been written for me. I tried pip install cv2 and pip install open_cv and got the same problem - a warning message from dist.py and …

  3. Using openCV to overlay transparent image onto another image

    Dec 1, 2016 · import numpy as np import cv2 fsize = 600 img = cv2.imread('football_stadium.png') overlay_t = cv2.imread('football_3.png',-1) # -1 loads with transparency overlay_t = …

  4. python - import opencv vs import cv2 - Stack Overflow

    Apr 30, 2018 · The Python import was now called cv2, and carried the old C API in the cv2.cv namespace. The 2 basically just means "The new API". Since then, versions 3.x and 4.x, "the …

  5. python - Converting an OpenCV Image to Black and White - Stack …

    The following Python gets me almost there, but the threshold value sent to Threshold() doesn't appear to have any effect. If I set it to 0 or 16 or 128 or 255, the result is the same, with all …

  6. Create a new RGB OpenCV image using Python? - Stack Overflow

    Jan 15, 2023 · import cv2 # Not actually necessary if you just want to create an image. import numpy as np blank_image = np.zeros((height,width,3), np.uint8) This initialises an RGB-image …

  7. OpenCV Python rotate image by X degrees around specific point

    Jan 27, 2012 · I think I may have made some progress, but still running into a problem. Here is the latest code: result = cv2.warpAffine(image, rot_mat, cv.GetSize(image), …

  8. Python - Extracting and Saving Video Frames - Stack Overflow

    Oct 29, 2015 · So I've followed this tutorial but it doesn't seem to do anything. Simply nothing. It waits a few seconds and closes the program. What is wrong with this code? import cv2 vidcap …

  9. python - Combining Two Images with OpenCV - Stack Overflow

    Sep 29, 2011 · I'm trying to use OpenCV 2.1 to combine two images into one, with the two images placed adjacent to each other. In Python, I'm doing: import numpy as np, cv img1 = …

  10. python - How to extract x,y coordinates from OpenCV …

    Mar 9, 2016 · Here is my take (runable code): import cv2, os import numpy as np import matplotlib.pyplot as plt # INITIALISATION filename = os.path.join('foo', 'bar.jpg') img0 = …

Refresh