# Extract information from specific objects on images

**URL:** <https://forum.opencv.org/t/extract-information-from-specific-objects-on-images/7467>\
**Category:** Python\
**Created:** [February 7, 2022, 12:18pm UTC](https://forum.opencv.org/t/extract-information-from-specific-objects-on-images/7467 "2022-02-07T12:18:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike123](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mike123](https://forum.opencv.org/u/mike123)\
**Post date:** [February 7, 2022, 12:18pm UTC](https://forum.opencv.org/t/extract-information-from-specific-objects-on-images/7467/1 "2022-02-07T12:18:39Z")

</div>

Hello, I am using an application in PyQt5 that depicts images with objects inside. For instance houses. I need to check (somehow) the objects on the image and get the pixels’ values on that specific objects. For instance I have an image with 20 houses (house\_1, house\_2, house\_3, … e.t.c.) And I choose house\_1, and then to get the all pixels’ values of for object “house\_1”. Any ideas on how can I achieve that? Is it something that can OpenCV code help me? Is it something that has to do entirely with custom dataset object detection? Can I apply object detection algorithms withn opencv? I am using Ubuntu.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [February 7, 2022, 12:58pm UTC](https://forum.opencv.org/t/extract-information-from-specific-objects-on-images/7467/2 "2022-02-07T12:58:20Z")

</div>

> [@mike123](#):
>
> And I choose house\_1, and then to get the all pixels’ values

did you mean: how to segment / seperate objects in an image ?

---

<div class="post-metadata">

**Author:** ![mike123](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mike123](https://forum.opencv.org/u/mike123)\
**Post date:** [February 7, 2022, 1:02pm UTC](https://forum.opencv.org/t/extract-information-from-specific-objects-on-images/7467/3 "2022-02-07T13:02:07Z")

</div>

I need to get “squares” on houses, when they are detected inside the image. And get pixel values’ of the marked with “squares” houses … I do not know how this implementation is called… Yes, maybe…

---

<div class="post-metadata">

**Author:** ![mike123](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mike123](https://forum.opencv.org/u/mike123)\
**Post date:** [February 9, 2022, 11:24am UTC](https://forum.opencv.org/t/extract-information-from-specific-objects-on-images/7467/5 "2022-02-09T11:24:39Z")

</div>

Ok, I managed to build the model and make the object detection after many days trying. The problem is that the boxes with which the houses are marked, are overlapping. For instance box of “house\_1” overlaps box of “house\_2”. How can I achieve this: No boxes to exist on the image and when I place a mouse over a house, then a box to appear for that specific house??? Alternative: to keep all the boxes around the houses and when I place the mouse cursor over a house, then the box to disappear… Any ideas?
