cv2

colab face mask implementation?

colab face mask implementation? Question: I was trying to implement face mask detecting system from this blog. I got an error in the detect_mask_image.py file: File "/content/drive/My Drive/mask/face-mask-detector/detect_mask_image.py", line 32, in <module> net = cv2.dnn.readNet(prototxtPath, weightsPath) cv2.error: OpenCV(4.1.2) /io/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can’t open "face_detector/deploy.prototxt" in function ‘ReadProtoFromTextFile’ Why this error? Asked By: …

Total answers: 1

How to Fix Images Being Written to Video in Random Order

How to Fix Images Being Written to Video in Random Order Question: I am attempting to write 271 images of a simulation that are already in numerical order (‘0.jpg’,’1.jpg’, …, ‘271.jpg’) into a video. cv2.videoWriter appears to be writing all of these images in random order, producing a video that doesn’t align with what is …

Total answers: 3

Remove logo/watermark given locations from an image using python/opencv/deep learning

Remove logo/watermark given locations from an image using python/opencv/deep learning Question: I am very new to opencv and deep learning using python. I am trying to remove watermark/logo from an image. I am able to find location of watermark by finding the location of cropped watermark image in the original image in the image which …

Total answers: 1

Unresolved reference "cv2" inside cv2 (cv2.cv2)

Unresolved reference "cv2" inside cv2 (cv2.cv2) Question: I’ve looked around and people seem to have similar problems but none described my case exactly, and solutions that worked for them didn’t seem to work for me (or there was no answer to the question at all). Using pycharm, after having installed opencv-python and opencv-contrib-python I noticed …

Total answers: 5

How to get the duration of video using cv2

How to get the duration of video using OpenCV Question: I can only get the number of frames CAP_PROP_FRAME_COUNT using OpenCV. However, I cannot find the parameter to get the duration of the video using OpenCV. How to do that? Thank you very much. Asked By: Frankie || Source Answers: First calculate frame per second …

Total answers: 6

Removing horizontal underlines

Removing horizontal underlines Question: I am attempting to pull text from a few hundred JPGs that contain information on capital punishment records; the JPGs are hosted by the Texas Department of Criminal Justice (TDCJ). Below is an example snippet with personally identifiable information removed. I’ve identified the underlines as being the impediment to proper OCR–if …

Total answers: 4