
Hello friends! Today we will detect coloured objects in an image using MATLAB, draw their bounding boxes and calculate their centre coordinates. We will keep the original demonstration with red, green and blue shapes, then explain what changes when the input is a real photograph. In our circle-detection tutorial , we selected objects by geometry. Here, we first select pixels by colour and then group neighbouring selected pixels into regions. A green triangle and a green circle can both be detected because colour, rather than shape, is the initial rule. We will use a reusable script with explicit colour thresholds and a minimum object area. The settings are starting values for a demonstration image, not universal definitions of red, green and blue under every camera and lighting condition. ...











