Here is our project for the Digital Image Processing course:
- Amazing simple object detection based on its color(in this case objects are Rubiks, Oranges, pill bottles)
- We also provide tools such as getting an object's color and picking a color in the HSV color space
i.Detect the object in the real time.
ii. Track the object as it moves around in real time. Draw a rectangle around it.
-
There is an object in real time.
-
The object is the largest color object in real time.
-
We can specify the desired size of the rectangle of the object's boundary.
-
HSV color space is used to detect the object. Hence we convert the input RGB image to HSV color space.
-
The script is suitable for real-time tracking as it has an excellent frame rate (>32 FPS).
-
The object can be partially occluded and our script will still successfully track the ball.
-
In addition, the tools support getting the color limit of the object.
To run this project, you will need to have Python and OpenCV installed on your computer. You can install OpenCV using the following command:
pip install opencv-python
pip install numpyTo use this project, simply run the following command:
python detect_object.pyOr if u want to use some tools that we provided, then:
python "NameOfToolsFile.py"The result is great. Some objects are successfully detected. Also if the object loses the frame, we catch it later when it comes into the frame.
Oranges_detection.mp4
pill.bottles_detection.mp4
rubik_detection.mp4
-
There are certain objects that we can't detect because their color is quite mixed.
-
Need to update the script if you want to track an object of a different color
-
In order to detect the object with the color we want, we need to have high-quality input as well as get the correct range of that color in the HSV color space.
WuangChin - https://www.facebook.com/wangchinn.t - tachien2003@gmail.com
This project was inspired by Tutorial on Detecting Color using OpenCV and Python