2016-06-11 8 views
1

私はマスキングの結果を与えているC#のコードを持っています。しかし、私はPythonでそれを行うことができませんでした。誰でも私の手助けをしてくれますか? Pythonで可能ですか?私はほとんどのpython OpenCVのドキュメントPythonの画像処理でORマスキング操作を行うには?

public void OROPeration() 
     { 
      IplImage orImage = Cv.CreateImage(src.Size, BitDepth.U8, 3); 
      Cv.Or(src, mask, orImage, null); 
      Cv.SaveImage("4.jpg", orImage); 
     } 

オリジナル画像

enter image description here マスキング画像 enter image description here 結果を通じて、私は「それを推測 enter image description here

答えて

1

はOpenCVの、bitwise_orで関数をTheresの取得する必要が行ってきましたあなたがしたいことをやる。

import cv2 

fin_image = cv2.bitwise_or(src_image, masking_image) 
+0

私はそのドキュメントを持っています。もしそうなら、私は感謝します。 –

+0

http://docs.opencv.org/2.4/modules/core/doc/operations_on_arrays.html – hashcode55

+0

ありがとうございました! –