# Object Detection using an Object's corner colors

**URL:** <https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330>\
**Category:** Python\
**Tags:** programming, object-detection\
**Created:** [December 16, 2022, 2:01am UTC](https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330 "2022-12-16T02:01:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![angela804](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/angela804/32/5700_2.png) [@angela804](https://forum.opencv.org/u/angela804)\
**Post date:** [December 16, 2022, 2:01am UTC](https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330/1 "2022-12-16T02:01:01Z")

</div>

Hi! I’m trying to implement a system. Supposed that I want to create an object detection using an object’s corners where it has a color.

 ![Dec 7 Progress Report (1)](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/3/35e74710d9021dd45777259ed9b690698670abf7.png)

My initial plan is to detect the colors and make a contour around it using the detected colors. But I’m a bit confused how to proceed or how it can be done.

Would like to hear your thoughts.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [December 16, 2022, 4:07am UTC](https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330/2 "2022-12-16T04:07:47Z")

</div>

break the task down into subtasks. state them clearly. research each. if a subtask is still too complex, break it down further.

perhaps the first task should be to review the tutorials on [https://docs.opencv.org/](https://docs.opencv.org/) so you know the tools (primitives and operations) of image processing.

---

<div class="post-metadata">

**Author:** ![jsxyhelu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/jsxyhelu/32/194_2.png) [@jsxyhelu](https://forum.opencv.org/u/jsxyhelu)\
**Post date:** [December 20, 2022, 8:56am UTC](https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330/3 "2022-12-20T08:56:03Z")

</div>

we need pictures you take in real place.

---

<div class="post-metadata">

**Author:** ![Tamias](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@Tamias](https://forum.opencv.org/u/Tamias)\
**Post date:** [December 21, 2022, 1:55am UTC](https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330/4 "2022-12-21T01:55:50Z")

</div>

I went down the same path, even to the point of using red and green squares. The only difference is I had a single red square in the upper right and a green one in the lower left.

My advice is not to do this at all, unless you will always have the exact same lighting, the exact same shade of white for a background, and never have any other objects/backgrounds visible. Basically the color approach works with a fixed image in a file, but not if you are using a camera. Because you will go crazy trying to distinguish “red” or “green” under varying circumstances.

What to do? I suggest looking at my post, [Creating a highly recognizable marker on a printed image](https://forum.opencv.org/t/creating-a-highly-recognizable-marker-on-a-printed-image/11283).

---

<div class="post-metadata">

**Author:** ![angela804](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/angela804/32/5700_2.png) [@angela804](https://forum.opencv.org/u/angela804)\
**Post date:** [January 4, 2023, 1:50am UTC](https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330/5 "2023-01-04T01:50:17Z")

</div>

Saw it, but, it’s utilizing Aruco. I can’t use Aruco now because it’s sensitive. A little part of it being blocked means it can’t be detected anymore. But thanks, though.

---

<div class="post-metadata">

**Author:** ![angela804](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/angela804/32/5700_2.png) [@angela804](https://forum.opencv.org/u/angela804)\
**Post date:** [January 23, 2023, 9:29am UTC](https://forum.opencv.org/t/object-detection-using-an-objects-corner-colors/11330/6 "2023-01-23T09:29:23Z")

</div>

i finished this one. Thanks so much! The subtasks helped
