def create_mlp(file_out, mlp_mesh=None, mlp_raster=None):
<EOL>mlp_file = open(file_out, '<STR_LIT:w>')<EOL>mlp_file.write('<STR_LIT:\n>'.join([<EOL>'<STR_LIT>',<EOL>'<STR_LIT>']))<EOL>mlp_file.close()<EOL>if mlp_mesh is not None:<EOL><INDENT>mlp_file = open(file_out, '<STR_LIT:a>')<EOL>mlp_file.write('<STR_LIT>')<EOL>for i, val in enumerate(mlp_mesh):<EOL><INDENT>if '<STR_LIT:label>' not in mlp_mesh[i]:<EOL><INDENT>mlp_mesh[i]['<STR_LIT:label>'] = mlp_mesh[i]['<STR_LIT:filename>']<EOL><DEDENT>if '<STR_LIT>' not in mlp_mesh[i]:<EOL><INDENT>mlp_mesh[i]['<STR_LIT>'] = [[<NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>], [<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>], [<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>], [<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:1>]]<EOL><DEDENT>mlp_file.write('<STR_LIT>'.format(mlp_mesh[i]['<STR_LIT:filename>'], mlp_mesh[i]['<STR_LIT:label>']))<EOL>mlp_file.write('<STR_LIT:\n>'.join([<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(m=mlp_mesh[i]['<STR_LIT>'][<NUM_LIT:0>]),<EOL>'<STR_LIT>'.format(m=mlp_mesh[i]['<STR_LIT>'][<NUM_LIT:1>]),<EOL>'<STR_LIT>'.format(m=mlp_mesh[i]['<STR_LIT>'][<NUM_LIT:2>]),<EOL>'<STR_LIT>'.format(m=mlp_mesh[i]['<STR_LIT>'][<NUM_LIT:3>]),<EOL>'<STR_LIT>',<EOL>'<STR_LIT>']))<EOL><DEDENT>mlp_file.write('<STR_LIT>')<EOL>mlp_file.close()<EOL><DEDENT>else:<EOL><INDENT>mlp_file = open(file_out, '<STR_LIT:a>')<EOL>mlp_file.write('<STR_LIT>')<EOL>mlp_file.close()<EOL><DEDENT>if mlp_raster is not None:<EOL><INDENT>mlp_file = open(file_out, '<STR_LIT:a>')<EOL>mlp_file.write('<STR_LIT>')<EOL>for i, val in enumerate(mlp_raster):<EOL><INDENT>if '<STR_LIT:label>' not in mlp_raster[i]:<EOL><INDENT>mlp_raster[i]['<STR_LIT:label>'] = mlp_raster[i]['<STR_LIT:filename>']<EOL><DEDENT>if '<STR_LIT>' not in mlp_raster[i]:<EOL><INDENT>mlp_raster[i]['<STR_LIT>'] = <NUM_LIT:1><EOL><DEDENT>if '<STR_LIT>' not in mlp_raster[i]['<STR_LIT>']:<EOL><INDENT>mlp_raster[i]['<STR_LIT>']['<STR_LIT>'] = [<NUM_LIT:0>, <NUM_LIT:0>]<EOL><DEDENT>if '<STR_LIT>' not in mlp_raster[i]['<STR_LIT>']:<EOL><INDENT>mlp_raster[i]['<STR_LIT>']['<STR_LIT>'] = [int(mlp_raster[i]['<STR_LIT>']['<STR_LIT>'][<NUM_LIT:0>]/<NUM_LIT:2>), int(mlp_raster[i]['<STR_LIT>']['<STR_LIT>'][<NUM_LIT:1>]/<NUM_LIT:2>)]<EOL><DEDENT>mlp_file.write('<STR_LIT>'.format(mlp_raster[i]['<STR_LIT:label>']))<EOL>mlp_file.write('<STR_LIT:U+0020>'.join([<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(m=mlp_raster[i]['<STR_LIT>']['<STR_LIT>']),<EOL>'<STR_LIT>'.format(m=mlp_raster[i]['<STR_LIT>']['<STR_LIT>']),<EOL>'<STR_LIT>'.format(mlp_raster[i]['<STR_LIT>']['<STR_LIT>']),<EOL>'<STR_LIT>'.format(m=mlp_raster[i]['<STR_LIT>']['<STR_LIT>']),<EOL>'<STR_LIT>'.format(m=mlp_raster[i]['<STR_LIT>']['<STR_LIT>']),<EOL>'<STR_LIT>'.format(m=mlp_raster[i]['<STR_LIT>']['<STR_LIT>']),<EOL>'<STR_LIT>'.format(m=mlp_raster[i]['<STR_LIT>']['<STR_LIT>']),<EOL>'<STR_LIT>']))<EOL>mlp_file.write('<STR_LIT>'.format(mlp_raster[i]['<STR_LIT>'], mlp_raster[i]['<STR_LIT:filename>']))<EOL>mlp_file.write('<STR_LIT>')<EOL><DEDENT>mlp_file.write('<STR_LIT>')<EOL>mlp_file.close()<EOL><DEDENT>else:<EOL><INDENT>mlp_file = open(file_out, '<STR_LIT:a>')<EOL>mlp_file.write('<STR_LIT>')<EOL>mlp_file.close()<EOL><DEDENT>mlp_file = open(file_out, '<STR_LIT:a>')<EOL>mlp_file.write('<STR_LIT>')<EOL>mlp_file.close()<EOL>return<EOL>
Create mlp file
    mlp_mesh (list containing dictionary)
        filename*
        label
        matrix

    mlp_raster
        filename*
        label
        semantic
        camera
            trans_vector*
            rotation_matrix*
            focal_length*
            image_px*
            image_res_mm_per_px*
            lens_distortion
            center_px
    * Required

    http://vcg.isti.cnr.it/~cignoni/newvcglib/html/shot.html