Ask Your Question

MadFrog's profile - activity

2018-01-28 23:15:53 -0600 asked a question The effect of using cv2.HoughLines() is wrong

The effect of using cv2.HoughLines() is wrong I refer to this link for experiments. This is the original picture: My

2018-01-16 07:03:11 -0600 received badge  Enthusiast
2018-01-15 02:59:36 -0600 marked best answer TypeError: no matching UMat constructor found/supported

When I use cv2.UMat,an error has occured,how can I fix it?

I have installed CUDA.

My test code:

import cv2

print(cv2.ocl.haveOpenCL())#True
cv2.ocl.setUseOpenCL(True)
print(cv2.ocl.useOpenCL())#True
pic1 = r'dog.jpg'
img = cv2.imread(cv2.UMat(pic1))
cv2.imshow('test',img)
cv2.waitKey(0)
2018-01-15 02:59:36 -0600 received badge  Scholar (source)
2018-01-14 20:28:47 -0600 asked a question TypeError: no matching UMat constructor found/supported

TypeError: no matching UMat constructor found/supported When I use cv2.UMat,an error has occured,how can I fix it? I h

2018-01-14 05:51:27 -0600 commented question What's the difference between cv2.imread(img) and cv2.imread(cv2.UMat(img))?

OK!I just ask how to use acceleration, or what situations can accelerate and which functions can accelerate. For opencv'

2018-01-13 00:50:54 -0600 edited question What's the difference between cv2.imread(img) and cv2.imread(cv2.UMat(img))?

What's the difference between cv2.imread(img) and cv2.imread(cv2.UMat(img))? What's the difference between the 2 ways of

2018-01-13 00:50:39 -0600 edited question What's the difference between cv2.imread(img) and cv2.imread(cv2.UMat(img))?

What's the difference between cv2.imread(img) and cv2.imread(cv2.UMat(img))? What's the difference between the 2 ways of

2018-01-13 00:49:43 -0600 asked a question What's the difference between cv2.imread(img) and cv2.imread(cv2.UMat(img))?

What's the difference between cv2.imread(img) and cv2.imread(cv2.UMat(img))? What's the difference between the 2 ways of

2018-01-12 22:39:22 -0600 commented answer I want to know whether opencv3 and python3 have GPU mode?

@break I have already installed CUDA.And "print(cv2.ocl.haveOpenCL())" is "True".Then how to put numpy arrays into cv2.

2018-01-12 08:21:34 -0600 marked best answer I want to know whether opencv3 and python3 have GPU mode?

I want to know whether opencv3 and python3 have GPU mode,I looked at this link and knew that there was no GPU mode when opencv2, but does opencv3 have GPU mode now?

Not deep learning, just the methods commonly used by opencv, is there a GPU mode?

2018-01-12 08:14:36 -0600 commented answer I want to know whether opencv3 and python3 have GPU mode?

@break print(cv2.ocl.haveOpenCL()) cv2.ocl.setUseOpenCL(True) So it starts? So it's speeding up?

2018-01-12 08:11:44 -0600 commented answer I want to know whether opencv3 and python3 have GPU mode?

@break How do I start OpenCL when I speed up? I have installed CUDA.

2018-01-12 07:26:38 -0600 asked a question I want to know whether opencv3 and python3 have GPU mode?

I want to know whether opencv3 and python3 have GPU mode? I want to know whether opencv3 and python3 have GPU mode,I loo

2018-01-12 03:11:45 -0600 marked best answer What does the history of this function “createBackgroundSubtractorMOG2” means?

I only see this description in this link, it hasn't a very detailed explanation, so I'd like to know where can I find a more detailed explanation.The official web document says "Length of the history", what "Length of the history" is?

image description

My code:

import os
import time
import cv2

def main():
    img_src_dirpath = r'C:/Users/Shinelon/Desktop/SRC/'
    dir = r'D:/deal_pics/' + time.strftime('%Y-%m-%d') + '/'
    if not os.path.exists(dir):
        os.makedirs(dir)
    img_dst_dirpath = dir
    history = 60
    varThreshold = 16
    detectShadows = True
    mog2 = cv2.createBackgroundSubtractorMOG2( history, varThreshold, detectShadows )
    for f in os.listdir( img_src_dirpath ):
        if f.endswith( '.jpg' ):
            img = cv2.imread( img_src_dirpath + f )
            mog2.apply( img )
            bg = mog2.getBackgroundImage()
            cv2.imwrite( img_dst_dirpath + f, bg )
    cv2.destroyAllWindows()

if __name__ == '__main__':
    main()
2018-01-11 18:12:48 -0600 commented answer What does the history of this function “createBackgroundSubtractorMOG2” means?

Anyway,thank you for your help,

2018-01-11 07:18:05 -0600 commented answer What does the history of this function “createBackgroundSubtractorMOG2” means?

Do you have the source code for this method? Or, for example, this parameter is 60, so is it means to generate a 61st fr

2018-01-11 07:17:09 -0600 commented answer What does the history of this function “createBackgroundSubtractorMOG2” means?

Do you have the source code for this method? Or, for example, this parameter is 60, so is it means to generate a 61st fr

2018-01-11 07:06:58 -0600 commented answer What does the history of this function “createBackgroundSubtractorMOG2” means?

Can you provide detailed information for this parameter? I have never found more.

2018-01-11 02:28:30 -0600 edited question What does the history of this function “createBackgroundSubtractorMOG2” means?

What does the history of this function “createBackgroundSubtractorMOG2” means? I only see this description in this link,

2018-01-11 02:28:11 -0600 received badge  Editor (source)
2018-01-11 02:28:11 -0600 edited question What does the history of this function “createBackgroundSubtractorMOG2” means?

What does the history of this function “createBackgroundSubtractorMOG2” means? I only see this description in this link,

2018-01-11 02:22:17 -0600 asked a question What does the history of this function “createBackgroundSubtractorMOG2” means?

What does the history of this function “createBackgroundSubtractorMOG2” means? I only see this description in this link,