Ask Your Question

sth's profile - activity

2019-10-13 18:35:34 -0600 commented answer Error while working with contours

it is, it helped me

2019-10-13 16:46:23 -0600 received badge  Supporter (source)
2019-10-13 16:46:22 -0600 marked best answer Error while working with contours

when running this code

import numpy as np
import cv2

image=cv2.imread('screenshoot10.jpg')
cv2.imshow('input image', image)

gray=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)

edged=cv2.Canny(gray,30,200)
cv2.imshow('canny edges',edged)

_, contours = cv2.findContours(edged,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)
cv2.imshow('canny edges after contouring', edged)

print(contours)
print('Numbers of contours found=' + str(len(contours)))

cv2.drawContours(image,contours,-1,(0,255,0),3)
cv2.imshow('contours',image)
cv2.waitKey(0)
cv2.destroyAllWindows()

getting an error

OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgproc\src\drawing.cpp:2509: error: (-215:Assertion failed) npoints > 0 in function 'cv::drawContours'

what am I doing wrong?

2019-10-13 16:46:22 -0600 received badge  Scholar (source)
2019-10-08 06:23:32 -0600 answered a question video stream input from the screen with api

So it is that opencv does not have the ability to capture a screen, but it can be implemented using mss, and I also saw

2019-10-08 06:23:32 -0600 asked a question Error while working with contours

Error while working with contours when running this code `import numpy as np import cv2 image=cv2.imread('screenshoot10

2019-10-08 06:23:31 -0600 asked a question Error while working with contours

Error while working with contours when running this code `import numpy as np import cv2 image=cv2.imread('screenshoot10

2019-06-21 08:22:53 -0600 asked a question video stream input from the screen with api

video stream input from the screen with api I need to get a video stream from the screen in real time to send it to the