Group Abstract Group Abstract

Message Boards Message Boards

Basic photographic "faux" Orton effect

Posted 10 years ago
Attachments:
POSTED BY: Brian Lee
4 Replies

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: EDITORIAL BOARD
Posted 10 years ago

Small fix to improve performace if you don't mind. Shortly, I've changed

 Dynamic[everything]

to

 Dynamic[
     applying image effects;
     Dynamic[ composing images]
]

The point is that the outer Dynamic (invisible explicitly but this is what Manipulate does) is triggered by image effect parameters. The inner one is only triggered by those related to a position and a width of the division line. The outer one doesn't know what is inside the inner one so it won't be triggered when you move the line.

image1 = (*image*);
image2 = image1;

width = ImageDimensions[image1][[1]];
height = ImageDimensions[image1][[2]];

Manipulate[

 image3 =  ImageCompose[image2,   SetAlphaChannel[   ImageAdjust[
     GaussianFilter[image2, gaussian2], {contrast, brightness}],    alpha]
];

 Dynamic @ ImageCompose[
   image1,
   ImagePad[   ImageTake[image3,   All, {1, width - div}], {{0, divthickness}, {0, 0}}, divcolor]
   , {0, height}, {0, height}
   ]
  ,
 Style["Image Processing Controls", Bold,  Medium],
 {{gaussian2, 10, "Blur Radius"}, 0, 60}, 
 {{contrast, 0.25, "Contrast"}, 0, 1}, 
 {{brightness, 0.26, "Brightness"}, 0, 1}, 
 {{alpha, 0.45, "Opacity"}, 0, 1},  
 Delimiter, 
 Style["View", Bold, Medium], 
 {{div, width/2, "Comparison Line"}, width, 1}, 
 {{divthickness, 1, "Line Thickness"}, 0, 4, 1}, 
 {{divcolor, White, "Line Color"}, ColorSlider}, 
 ControlPlacement -> Left]

Let's go one step further and replace the Dynamic from above with:

EventHandler[
 Dynamic[
  ImageCompose[
   image1,
   ImagePad[    ImageTake[image3, All, {1, pos}], {{0, divthickness}, {0, 0}},    divcolor]
   , {0, height}, {0, height}
   ]
  ],
 {"MouseMoved" :> (pos =   MousePosition["GraphicsAbsolute", {1, 1}][[1]])}
 ]

enter image description here

POSTED BY: Kuba Podkalicki

Thank you Vitaliy! I've not seen that demonstration before. Pretty neat stuff over there. :)

POSTED BY: Brian Lee

This is very beautiful! I am not sure if you have seen this, but there is also a demonstration: Photographic Orton Effect

[enter image description here]

POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard