在我尝试使用scipy的python2.7探索过程中,我编写了以下简单的脚本:#!/usr/bin/env python
# coding=utf-8
# -*- Mode: python; c-basic-offset: 4 -*-
from scipy import ndimage
import numpy as np
from scipy import misc
import argparse
import Image
def getArguments():
parser = argparse.ArgumentParser(description="An simple Image processor")
parser.add_argument('image_file', metavar="FILENAME", type=str,
help="The image file that will be read In order to be processed")
return parser.parse_args()
def getImagePathFromArguments():
'''
:return: string
'''
args = getArguments()
return args.image_file
def loadImage(image):
'''
:param image: The path of the Image
:return:
''