Introduction - If you have any usage issues, please Google them yourself
This functions displays GUI for selecting square or rectangular part
of the input image IMG. To perform selection user must click mouse twice:
at two corners of the selection area.
User can change the shape at any moment, even when first point is set,
unless it is not forbidden by additional parameters.
User also cam change the way the selection area is calculated
from the two selected points.