Skip to content

Instantly share code, notes, and snippets.

@ochilab
Created October 6, 2014 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ochilab/138a56fe6982098531f6 to your computer and use it in GitHub Desktop.
Save ochilab/138a56fe6982098531f6 to your computer and use it in GitHub Desktop.
OpenCVSharpにてMatからポインタで画素にアクセスする方法
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