Equivalent of copyTo in Python OpenCV bindings?

前端 未结 2 1865
孤街浪徒
孤街浪徒 2020-11-30 06:52

OpenCV has the copyTo function, which enables copying a masked area from one Mat to another.

http://docs.opencv.org/3.1.0/d3/d63/classcv_1_1Mat.html#a4331fa88593a9a

2条回答
  •  囚心锁ツ
    2020-11-30 07:36

    Note sure if this is exactly what you want, but for copying with masks in Python, I would go with cv2.bitwise_

    new_image = cv2.bitwise_and(old_image,binary_mask)
    

提交回复
热议问题