# Medical image dataset bounding box in ROI

**URL:** <https://forum.opencv.org/t/medical-image-dataset-bounding-box-in-roi/9478>\
**Category:** Python\
**Created:** [July 12, 2022, 10:26am UTC](https://forum.opencv.org/t/medical-image-dataset-bounding-box-in-roi/9478 "2022-07-12T10:26:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Osamah\_TAHER](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/osamah_taher/32/5647_2.png) [@Osamah\_TAHER](https://forum.opencv.org/u/Osamah_TAHER)\
**Post date:** [July 12, 2022, 10:26am UTC](https://forum.opencv.org/t/medical-image-dataset-bounding-box-in-roi/9478/1 "2022-07-12T10:26:41Z")

</div>

Hello,  
I have a large number of medical x\_ray images as a dataset. I want detect a part of object and surround it by bounding box automatically without using image annotation tools to determinate the (x1 , y1) (x2 , y2). Can you please advise me.

 ![6](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/5/55fa52e9505d23b29f1ea531eaa0cf69a09a429f.jpeg)

---

<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:** [July 12, 2022, 10:48am UTC](https://forum.opencv.org/t/medical-image-dataset-bounding-box-in-roi/9478/2 "2022-07-12T10:48:07Z")

</div>

template matching, maybe:

[https://docs.opencv.org/4.x/de/da9/tutorial\_template\_matching.html](https://docs.opencv.org/4.x/de/da9/tutorial_template_matching.html)

---

<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:** [July 12, 2022, 3:40pm UTC](https://forum.opencv.org/t/medical-image-dataset-bounding-box-in-roi/9478/3 "2022-07-12T15:40:58Z")

</div>

train a neural network.

you can make it predict boxes or segmentations. I’d suggest segmentations. just paint the dense parts of the bone.
