Skip to content

Tag: opencv

how to use argument parser in jupyter notebook

https://github.com/ITCoders/Human-detection-and-Tracking/blob/master/main.py This is the code I obtained for the human detection. I’m using anaconda navigator(jupyter notebook). How can I use argument parser in this? How can I give the video path -v ? Can anyone please say me a solution for this? As the…

How to connect closest points together using opencv

Using the OpenCV module in python is it possible to connect the red dots in the image below such that each red dot is only connected once to its nearest neighbor red dot? Answer For the first step, you should convert your image to a binary image using the appropriate tools like cv2.cvtColor(), cv2.threshold()…

Trouble running a Python script through VB

The objective is to receive an image path and pass that to a Python program as an argument, then receive the results. This is done through a web app using VB (on the IIS server) and it works perfectly except when I import the python module OpenCV (imported in Python as cv2, more specifically). What’s ev…

Hough Circles open CV error

I am currently using HoughCircles on computer-vision but I can’t manage to make it work. How can this error be solved ? Here is my code : UPDATE : New error : Answer As @jeru-luke has told in comment, you should add img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) just before you call cv2.HoughCircles() : CO…

OpenCV Composting 2 images of differing size

I need to alpha-blend 2 images that are not the same size. I’ve managed to get them to composite by resizing to the same size, so I’ve got part of the logic: I’m wondering if I need to make a mask that is the same size as the larger image and then use that with my first image. If so,