Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. (* img is the original image *)
  2. bg = Binarize[RemoveBackground@img, 0.01];
  3. colorbg = Graphics[{
  4. RGBColor@paleblue, Rectangle[{-1, -1}, {0, 1}],
  5. RGBColor@red, Rectangle[{0, -1}, {1, 1}]
  6. }, Method -> {"ShrinkWrap" -> True},
  7. ImageSize -> ImageDimensions[img]];
  8. i5 = ImageAdd[ImageMultiply[i4, bg], ImageMultiply[ColorNegate@bg, colorbg]];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement