Created
October 6, 2014 08:33
-
-
Save ochilab/138a56fe6982098531f6 to your computer and use it in GitHub Desktop.
OpenCVSharpにてMatからポインタで画素にアクセスする方法
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
unsafe { | |
byte* b = mm.DataPointer; | |
for (int i = 0; i < height; i++) { //for文は1つにまとめていいんだが | |
for (int j = 0; j < width; j++) { | |
b[0] = 255; //B | |
b[1] = 255; //G | |
b[2] = 255; //R | |
b = b + 3; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment