Advertisement
Guest User

3

a guest
Sep 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.27 KB | None | 0 0
  1. img=imread('matches.png');
  2. mask=imread('matchMask.png');
  3. [lin col]=size(img);
  4. nimg=zeros(lin, col, 3);
  5. inc=50;
  6. aux=img; %inc
  7. aux(mask==0)=aux(mask==0)+inc;
  8. nimg(:,:,1)=aux;
  9. nimg(:,:,2)=aux; %inc
  10. aux(mask==0)=aux(mask==0)+inc;
  11. nimg(:,:,3)=aux; %2*inc
  12. nimg=uint8(nimg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement