OpenCV-Playing-Card-Detector icon indicating copy to clipboard operation
OpenCV-Playing-Card-Detector copied to clipboard

Use Screenshot as input => Readjust size value in findCards function

Open 42isTheAnswer42 opened this issue 2 years ago • 0 comments

Hi there,

I wanted to try this on a screenshot, being succesfull just to decission of cards, my size value of my contours has about 355 and the minimum size is above 25000 I guess.

What do I need to readjust here? have i missed some scaling?

for i in range(len(cnts_sort)): size = cv2.contourArea(cnts_sort[i]) // has size of 300 and min size is 25000 peri = cv2.arcLength(cnts_sort[i],True) approx = cv2.approxPolyDP(cnts_sort[i],0.01*peri,True)

42isTheAnswer42 avatar Aug 22 '23 18:08 42isTheAnswer42