Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ofPolyline lefteye, righteye, topmouth etc;
- ofCvColorImage testApply;
- unsigned char * pix = cam.getPixels();
- for(int i = 0;i<camWidth*camHeight;i++){
- int x = i % camWidth;
- int y = (i - x) / camWidth;
- if(lefteye.inside(x, y) ||
- righteye.inside(x, y) ||
- topmouth.inside(x, y) ||
- botmouth.inside(x, y) ||
- nosebridge.inside(x, y) ||
- nosebase.inside(x, y)){
- pix[i] = pix[i];
- }else{
- pix[i] = 255;
- }
- }
- testApply.setFromPixels(pix, camWidth, camHeight);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement