Commit 55b81528 authored by Stefano Sabatini's avatar Stefano Sabatini

doc/filters: itemize crop examples

parent 1e5492ff
...@@ -1610,41 +1610,71 @@ is approximated to the nearest valid value. ...@@ -1610,41 +1610,71 @@ is approximated to the nearest valid value.
The expression for @var{x} may depend on @var{y}, and the expression The expression for @var{x} may depend on @var{y}, and the expression
for @var{y} may depend on @var{x}. for @var{y} may depend on @var{x}.
Follow some examples: @subsection Examples
@itemize
@item
Crop the central input area with size 100x100:
@example @example
# crop the central input area with size 100x100
crop=100:100 crop=100:100
@end example
# crop the central input area with size 2/3 of the input video @item
"crop=2/3*in_w:2/3*in_h" Crop the central input area with size 2/3 of the input video:
@example
crop=2/3*in_w:2/3*in_h
@end example
# crop the input video central square @item
Crop the input video central square:
@example
crop=in_h crop=in_h
@end example
# delimit the rectangle with the top-left corner placed at position @item
# 100:100 and the right-bottom corner corresponding to the right-bottom Delimit the rectangle with the top-left corner placed at position
# corner of the input image. 100:100 and the right-bottom corner corresponding to the right-bottom
corner of the input image:
@example
crop=in_w-100:in_h-100:100:100 crop=in_w-100:in_h-100:100:100
@end example
# crop 10 pixels from the left and right borders, and 20 pixels from @item
# the top and bottom borders Crop 10 pixels from the left and right borders, and 20 pixels from
"crop=in_w-2*10:in_h-2*20" the top and bottom borders
@example
crop=in_w-2*10:in_h-2*20
@end example
# keep only the bottom right quarter of the input image @item
"crop=in_w/2:in_h/2:in_w/2:in_h/2" Keep only the bottom right quarter of the input image:
@example
crop=in_w/2:in_h/2:in_w/2:in_h/2
@end example
# crop height for getting Greek harmony @item
"crop=in_w:1/PHI*in_w" Crop height for getting Greek harmony:
@example
crop=in_w:1/PHI*in_w
@end example
# trembling effect @item
"crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)" Appply trembling effect:
@example
crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)
@end example
# erratic camera effect depending on timestamp @item
"crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)" Apply erratic camera effect depending on timestamp:
@example
crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)"
@end example
# set x depending on the value of y @item
"crop=in_w/2:in_h/2:y:10+10*sin(n/10)" Set x depending on the value of y:
@example
crop=in_w/2:in_h/2:y:10+10*sin(n/10)
@end example @end example
@end itemize
@section cropdetect @section cropdetect
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment