Created
September 30, 2016 06:05
-
-
Save ochilab/858d616b1a18e38f7a9263391a3559cb to your computer and use it in GitHub Desktop.
OpenCVSharp3対応のはじめの動作確認
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 以下、OpenCVSharp3対応です | |
*/ | |
//画像ファイル読み込み | |
Mat img = new Mat(@"C:\Users\ochi\Documents\temp\test.png"); | |
Mat img2 = img.Clone(); | |
Mat img3 = img.Clone(); | |
//トリミング(ROI) | |
img3 = img3[new OpenCvSharp.Rect(200, 200, 180, 200)]; | |
//表示 | |
Cv2.ImShow("img", img); | |
Cv2.ImShow("img3", img3); | |
//反転 | |
Cv2.BitwiseNot(img2, img2); | |
Cv2.ImShow("img2", img2); | |
Cv2.WaitKey(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment