What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-02 16:08:10
opencv capture camera python
import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting fr... Add solution -
Other 2021-10-29 17:52:19
opencv(4.5.1) c:\users\appveyor\appdata\local\temp\1\pip-req-build-kh7iq4w7\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:assertion failed) !ssize.empty() in function
Error Message::::: error Traceback (most recent call last) in 1 # read the image and resize it to a fixed-size 2 image = cv2.imread(file) ----> 3 image = cv2.resize(image, fixed_size) error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgpr... Add solution -
Python 2021-10-29 03:02:13
draw line from 2 mouse event in image python
import cv2 class DrawLineWidget(object): def __init__(self): self.original_image = cv2.imread('1.jpg') self.clone = self.original_image.copy() cv2.namedWindow('image') cv2.setMouseCallback('image', self.extract_coordi... Add solution -
Python 2021-10-28 12:36:18
image search python and opencv stackoverflow
import cv2 import numpy as np img = cv2.imread('one.jpg') pixel = img[801,600] print (pixel) # pixel value i am searching for def search_for(): for iidx, i in enumerate(img): for xidx, x in enumerate(i): if (x == pixel).all(): ... Add solution -
Python 2021-10-28 05:56:16
how to read image from sql opencv
#I am reading an image in through cv2.imread() and cropping it (slicedImage). I want to save the result in a database as a blob. originalImage = cv2.imread(self.imagePath.get()) x1coord = int(self.x1.get()) y1coord = int(self.y1.get()) x2coor... Add solution -
Python 2021-10-28 04:31:06
reverse video opencv python
# Python program to play a video # in reverse mode using opencv import cv2 cap = cv2.VideoCapture("video_file_location") check , vid = cap.read() counter = 0 check = True frame_list = [] while(check == True): check , vid = cap.rea... Add solution -
Python 2021-10-28 01:18:10
opencv convert to black and white
import cv2 originalImage = cv2.imread('C:/Users/N/Desktop/Test.jpg') grayImage = cv2.cvtColor(originalImage, cv2.COLOR_BGR2GRAY) (thresh, blackAndWhiteImage) = cv2.threshold(grayImage, 127, 255, cv2.THRESH_BINARY) cv2.imsh... Add solution
Best helpers
Erica Price
+5
Scoiattolo
+5
Vigrond
+5
Muazam
+5
Emmet
+5
A G Davey
+5
Arad
+5
Meital Regev
+5
Entrepreneur
+5
Majte
+5
JoshuaFicy
+5