Did you enjoy this video? Try my premium courses! 😃🙌😊 ● Hands-On Computer Vision in the Cloud: Building an AWS-based Real Time Number Plate Recognition System bit.ly/3RXrE1Y ● End-To-End Computer Vision: Build and Deploy a Video Summarization API bit.ly/3tyQX0M ● Computer Vision on Edge: Real Time Number Plate Recognition on an Edge Device bit.ly/4dYodA7 ● Machine Learning Entrepreneur: How to start your entrepreneurial journey as a freelancer and content creator bit.ly/4bFLeaC Learn to create AI-based prototypes in the Computer Vision School! www.computervision.school 😃🚀🎓
i am facing the following error cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
Can we make something where camera detects the colour in traffic light and tells what colour is the light and it will assist the colourblind people if they are confused. Blinking yellow and blinking red is tough for them. It may be a good project.
Is there a way to display an array at the center of the webcam and if a certain color gets in that array it will send some sort of signal to a mechanism?
Excuse me Sir, please can I ask you a question: I just decided to pay for the OpenCV certification, its 1500 canadian dollars, and I m pretty convinced that it is a great investment for my future career in CV. Please can you give me your opinion? It will be a great help Thank you in advance :)
Can you do a tutorial on how to regognise light a few colors light and the maybe log in into a excel for data to use. i want to make a uptime logger for my cnc machines
Thank you! It is so concise! May I know could this be further refined to detect objects based on the criteria like shape (eg rectangle in different orientation) and size (eg pixel x pixel)? Thanks!
Hello, I'm trying to create a program that detects and counts objects by color, but now I can only count four colors, these are red, blue, green and yellow. I wonder if I can add the whole color scale to the program, how can I do this? I will be very happy if you give back. have a nice day😊
Hey, I think adding the entire color scale to the program will be very challenging. I would suggest to add more colors incrementally until performance is affected. 🙌
Hey, yes it is possible, you could try by getting the bounding boxes of all connected components, the same way I did in the parking spot detector and counter video. 💪🙌
hey i tried to follow along with your tutorial but for some reason when i try to run it it says IndexError: index 10 is out of bounds for axis 0 with size 1 how can i fix this ?
like it, really cool video.. the kicker for me was the "BRG" .. it really confused me for a while.. was experimenting with the values there.. was trying to read the color of a led which i thought was green but was more white:ish with a green halo haha, is it possible to detect more colors at the same time ?
Yeah, I hear you, something is tricky to specify the exact hue of a given color. About detecting more than one color at the same time: yes, absolutely! The code can be adapted to detect as many colors as you wish! 😃💪
I'm thinking of a device in the form of a video camera. This device will consist of a RaspberryPi, a camera module and display. This device will demonstrate the operation of the program for participation in roboracing. I propose to create a team to work on this project. In the future, it will be possible to participate in the OpenCV AI Competition 2023+n with this project. From Uruguay, you can participate in the competition)
Very useful tutorial, thanks! I would like to know if you could help me with a project. Do you offer paid consulting? The concept of the project is to create a system for selecting and separating stones by shade of green using a Raspberry Pi with a camera. The system captures real-time images through the camera and processes these images to detect the green tones in the stones. Based on the shades of green detected, the stones are classified into different groups (1, 2, 3, 4) according to the defined shade scale. The image generated by the camera is displayed on a monitor, and each stone is marked with a square that indicates which group it belongs to.
Hey, I took a look and there was a bug which affected the performance in the case of red hues, thank you for noticing it. It is fixed now, take a look at the repo. 💪🙌
Great video but I have a slight issue it says TypeError: VideoCapture() takes no arguments. I'm assuming this means its having trouble finding my webcam footage but I'm not sure how to fix it
Hello Pasindu, I am not sure if I understand your question, what do you mean? In this video I show you how to detect colors using Python and OpenCV using the HSV colorspace.
Hey Jerome, try defining a new variable called red = [0, 0, 255], and use that one instead of 'yellow'. If it doesn't detect the exact hue of red you are looking for you would have to see what are the bgr coordinates of the exact color you want to detect 💪🙌
Hey, define a new variable called red = [0, 0, 255] and use it instead of the 'yellow' variable. You may need to adjust the definition of red in case is not the exact hue of red you are looking for! 😃🙌
As long as you can run Python, install OpenCV and get images from a webcam it 'should' work. If you try it on a raspberry pi let me know how it works! 💪
How do you put a circle dot in the middle of the lemon/color? I'm trying to create a posture and gait analysis thesis with colored markers and get measurements (angles/distance), I want to be able to detect it and put a point in the middle of each markers and connect each point with lines. Hoping for your response, thanks in advance!
Hey, about the circle take a look at cv2.circle function, you can compute the coordinates of the center of the color by inspecting the bounding box coordinates. 🙌
Hey! Not sure if you still need the code but here it is anyway: if bbox is not None: x1, y1, x2, y2 = bbox cv2.rectangle(frame, (x1, y1), (x2, y2), [0, 255, 0], 5) center_x = (x1 + x2) // 2 center_y = (y1 + y2) // 2 frame = cv2.circle(frame, (center_x, center_y), 0, (0, 0, 255), 5) # change the 5 to adjust thickness just replace the if statement where you draw the rectangle and there should now me a circle in the middle of the object
Hi, i need to make a robot that can avoid green and red obstacles. when the robot detect the green obstacle it should go left and when it sees red obstacle it should go right. and I am kinda lost how to make the camera program, can you help me?🥲
Hey, are you working with Arduino? If you are, search for videos on 'arduino color sensor project', there are plenty of videos on youtube which cover the foundations of how to do it. 🙌
Hey, is it possible to make it so the code runs the tracking on screen? Im trying to make an extension that runs on my pc on top of all my apps to track certain colors for premiere keyframes. Im not that skilled in coding so was hopping for a little help.
Hey Sergey, you want to track colors in your screen? Sure, it is possible, I guess the code in this project is a good baseline for that. Take a look at PyAutoGUI library, you can use it to take screenshots, for example. 💪💪