Multiple Object Detection with Color Using OpenCV

Ahmad Adnan Kaifi · 186K views · 2014 · 1:51

Open on YouTube

Computer vision, speech & NLPTesting, debugging & developer toolsdemo

Why Stack Overflow recommends it

Stack Overflow users link it as a visual example of color-based multi-object detection and contour drawing in OpenCV when asking how to build or fix something similar.

Recommended by 0 people across 0 different months, 2015 to 2018.

What it is

A short 2014 demo by Ahmad Adnan Kaifi showing an OpenCV program that detects and tracks several objects at once based on their color, with contours drawn around each. The code is linked in the description and is adapted from a Kyle Hounslow tutorial.

What people said

Cites bearbearsocute · 2015-08 · Stack Overflow · on “Opencv Colour detection C++”

I watched a video on youtube on colour tracking with contour lines, link is followed below. [this video] The source code is available for download at the comment section. There are errors at line 220 about cannythreshold, but i deleted it. Another error is at line 234, the track filtered object part, I don't know what should i add in since it is asking for 1 more argument What should i do to make this code work?

Cites Reactionic · 2015-11 · Stack Overflow · on “How to overlay object with transparent color in OpenCV”

Example [LINK] I will try to explain my question according the image. Firstly i use Python3 and OpenCV3. I just want to colorize the white pixels of mask(for example with shinny blue). Then using addWeighted, i want to blend that mask onto original image. But the problem i can't colorize the mask. Mask is the result of inRange fuction and i can't transform it to RGB. [this video] Just like in the video but single frame.

Cites Amr · 2017-06 · Stack Overflow · on “How to multiple color object detection using OpenCV”

@DanMašek i could do some thing like this link [LINK] using moments instead of findcontours, it works well but i need to draw the rectangular fram around every object and get angle,length...etc. like this guy link [this video]

Cites Antony Rizzitelli · 2018-03 · Stack Overflow · on “OpenCV Unity - Get 3D position from 2D image position”

I'm programming an Hololens application and I'm trying to do a real time tracking system. I will use OpenCV for the computer vision algorithm. I saw there that this is possible to get a contour of a color object -> [this video] So with this solution I can get the contour of a color zone and then have the middle pixel position of this zone, right but now how to convert that 2D position in a 3D position in the coordinate system of the Hololens? I saw there some solution for pose estimation -> [LINK] This is using this method: [LINK] I have all the parameters that the function need except "object" that is object 3D position if I read correctly but I don't have that object 3D pos I'm trying to calcul