Ask Your Question

User284093's profile - activity

2021-05-09 12:43:28 -0600 received badge  Popular Question (source)
2021-05-09 12:43:28 -0600 received badge  Notable Question (source)
2020-06-20 04:45:30 -0600 received badge  Supporter (source)
2020-06-20 04:45:19 -0600 marked best answer DNN Superres & Video

DNN Superres works fine on images but when I try and use video it creates a 1KB empty video file? (No errors otherwise)

sr = dnn_superres.DnnSuperResImpl_create()

path = "FSRCNN_x3.pb"
sr.readModel(path)
sr.setModel("fsrcnn", 3)

capture = cv2.VideoCapture('./outtest.mp4')

width = int(capture.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(capture.get(cv2.CAP_PROP_FRAME_HEIGHT))
currentfps = int(capture.get(cv2.CAP_PROP_FPS))
frames = int(capture.get(cv2.CAP_PROP_FRAME_COUNT))
Duration = int(frames/currentfps)
fps = 2*currentfps 

out = cv2.VideoWriter('./Output.mp4', cv2.VideoWriter_fourcc(*'avc1'), (currentfps), (width,height), 0)

while(capture.isOpened()):
    ret, frame = capture.read()
    if ret == True:

        result = sr.upsample(frame)
        out.write(result)

    else:
        break

capture.release()
out.release()
2020-06-20 04:45:19 -0600 received badge  Scholar (source)
2020-06-20 03:38:15 -0600 asked a question DNN Superres & Video

DNN Superres & Video DNN Superres works fine on images but when I try and use video it creates a 1KB empty video fil

2020-06-19 07:22:16 -0600 commented answer How to eliminate small contours in a binary image?

I'm new to OpenCV and never used C++, I'm doing something very basic wrong as 'findcontours', 'drawContours' and 'binara

2020-03-22 09:13:31 -0600 commented answer Python, eliminate small contours

Hi supra56, the problem with this output is it removes the small contours within the large contour. Do you know how one

2020-03-22 09:10:08 -0600 commented question Remove small contours

Apologies, did not realize I should have attempted to bump my previous question. Supra56, the problem with your solution

2020-03-21 20:27:20 -0600 asked a question Remove small contours

Remove small contours I'm attempting to remove the small contours outside the largest contour while retaining the inner-

2019-12-12 09:48:18 -0600 commented answer Python, eliminate small contours

Yeah, I'm trying to retain the black holes that are inside of the white planet.

2019-12-12 08:50:24 -0600 commented answer Python, eliminate small contours

Wow, that is progress! I need to keep the holes (small contours) within the main contour though (see my output image), s

2019-12-11 11:27:28 -0600 commented answer Python, eliminate small contours

Thanks you, I've changed that line to the below which solves the error but it looks like the apply mask line was old/C++

2019-12-11 11:27:05 -0600 commented answer Python, eliminate small contours

Thanks you, I've changed that line to the below which solves the error but it looks like the apply mask line was old/C++

2019-12-11 05:40:44 -0600 asked a question Python, eliminate small contours

Python, eliminate small contours I'm attempting to do the same thing as https://answers.opencv.org/question/120499/how-t

2019-11-19 10:13:10 -0600 asked a question Python, eliminate small contours, white matte.

Python, eliminate small contours, white matte. I'm attempting to do the same thing as this person: How to eliminate smal