<s> """<STR_LIT>""" <EOL> print __doc__ <EOL> from SimpleCV import Camera , Display <EOL> cam = Camera ( ) <EOL> display_width = <NUM_LIT> <EOL> display_height = <NUM_LIT> <EOL> display = Display ( resolution = ( display_width , display_height ) ) <EOL> crop_width = <NUM_LIT:200> <EOL> crop_height = <NUM_LIT:200> <EOL> while display . isNotDone ( ) : <EOL> img = cam . getImage ( ) . flipHorizontal ( ) <EOL> crop_x = display . mouseX * img . width / display_width <EOL> crop_y = display . mouseY * img . height / display_height <EOL> if ( display . mouseX <= <NUM_LIT:1> ) : <EOL> crop_x = <NUM_LIT:1> <EOL> if ( display . mouseY <= <NUM_LIT:1> ) : <EOL> crop_y = <NUM_LIT:1> <EOL> if ( display . mouseX + crop_width >= display_width ) : <EOL> crop_x = ( display_width - crop_width ) <EOL> if ( display . mouseY + crop_height >= display_height ) : <EOL> crop_y = ( display_height - crop_height ) <EOL> cropped_img = img . crop ( crop_x , crop_y , crop_width , crop_height ) <EOL> xray_img = cropped_img . edges ( ) . smooth ( ) <EOL> img . getDrawingLayer ( ) . blit ( xray_img , ( crop_x , crop_y ) ) <EOL> img . save ( display ) </s>
