@staticmethod<EOL><INDENT>def get_params(width, height, distortion_scale):<DEDENT>
half_height = int(height / <NUM_LIT:2>)<EOL>half_width = int(width / <NUM_LIT:2>)<EOL>topleft = (random.randint(<NUM_LIT:0>, int(distortion_scale * half_width)),<EOL>random.randint(<NUM_LIT:0>, int(distortion_scale * half_height)))<EOL>topright = (random.randint(width - int(distortion_scale * half_width) - <NUM_LIT:1>, width - <NUM_LIT:1>),<EOL>random.randint(<NUM_LIT:0>, int(distortion_scale * half_height)))<EOL>botright = (random.randint(width - int(distortion_scale * half_width) - <NUM_LIT:1>, width - <NUM_LIT:1>),<EOL>random.randint(height - int(distortion_scale * half_height) - <NUM_LIT:1>, height - <NUM_LIT:1>))<EOL>botleft = (random.randint(<NUM_LIT:0>, int(distortion_scale * half_width)),<EOL>random.randint(height - int(distortion_scale * half_height) - <NUM_LIT:1>, height - <NUM_LIT:1>))<EOL>startpoints = [(<NUM_LIT:0>, <NUM_LIT:0>), (width - <NUM_LIT:1>, <NUM_LIT:0>), (width - <NUM_LIT:1>, height - <NUM_LIT:1>), (<NUM_LIT:0>, height - <NUM_LIT:1>)]<EOL>endpoints = [topleft, topright, botright, botleft]<EOL>return startpoints, endpoints<EOL>
Get parameters for ``perspective`` for a random perspective transform.

        Args:
            width : width of the image.
            height : height of the image.

        Returns:
            List containing [top-left, top-right, bottom-right, bottom-left] of the orignal image,
            List containing [top-left, top-right, bottom-right, bottom-left] of the transformed image.