# Merge images with only specified pixels

**URL:** <https://forum.opencv.org/t/merge-images-with-only-specified-pixels/8416>\
**Category:** Python\
**Tags:** imgproc\
**Created:** [April 15, 2022, 10:10am UTC](https://forum.opencv.org/t/merge-images-with-only-specified-pixels/8416 "2022-04-15T10:10:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/lia/32/5052_2.png) [@lia](https://forum.opencv.org/u/lia)\
**Post date:** [April 15, 2022, 10:10am UTC](https://forum.opencv.org/t/merge-images-with-only-specified-pixels/8416/1 "2022-04-15T10:10:55Z")

</div>

![20210328_142641](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/e/ed22221c8b88cfb970e93b373671f590898c60a9.jpeg)

Hello everyone  
I couldn’t find anything related to the task I’m trying to do.  
For example, I want to add only the pixels that are pink color in the image with another image.  
How can I combine two images and only use specific pixels?

---

<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:** [April 15, 2022, 10:06pm UTC](https://forum.opencv.org/t/merge-images-with-only-specified-pixels/8416/2 "2022-04-15T22:06:01Z")

</div>

[https://docs.opencv.org/4.x/da/d97/tutorial\_threshold\_inRange.html](https://docs.opencv.org/4.x/da/d97/tutorial_threshold_inRange.html)

[https://docs.opencv.org/4.x/d2/d96/tutorial\_py\_table\_of\_contents\_imgproc.html](https://docs.opencv.org/4.x/d2/d96/tutorial_py_table_of_contents_imgproc.html)
