1 | initial version |
so the answer is: use copyTo() with a mask (and a roi):
Rect roi = // something based on hinfo
img(roi).copyTo(patch1, mask==255);
please try to use opencv's builtin functions, not to defeat it writing ill fated for-loops, like above !
2 | No.2 Revision |
so the answer is: use copyTo() with a mask (and a roi):
Rect roi = // something based on hinfo
img(roi).copyTo(patch1, mask==255);
mask);
please try to use opencv's builtin functions, not to defeat it writing ill fated for-loops, like above !