Python問題

我係初學python,有d問題想請教各高手,我在學用simplecv1.3

Example:
        >>> f = FaceRecognizer()
        >>> imgs1 = ImageSet(path/to/images_of_type1)
        >>> labels1 = [0]*len(imgs1)
        >>> imgs2 = ImageSet(path/to/images_of_type2)
        >>> labels2 = [1]*len(imgs2)
        >>> imgs3 = ImageSet(path/to/images_of_type3)
        >>> labels3 = [2]*len(imgs3)
        >>> imgs = imgs1 + imgs2 + imgs3
        >>> labels = labels1 + labels2 + labels3
        >>> f.train(imgs, labels)
        >>> img = Image("some_image_of_any_of_the_above_type")
        >>> print f.predict(img)

        Save Fisher Training Data
        >>> f.save("trainingdata.xml")

        Load Fisher Training Data and directly use without trainging
        >>> f1 = FaceRecognizer()
        >>> f1.load("trainingdata.xml")
        >>> img = Image("some_image_of_any_of_the_above_type")
        >>> print f1.predict(img)

        Use CSV files for training
        >>> f = FaceRecognizer()
        >>> f.train(csvfile="CSV_file_name", delimiter=";")
        >>> img = Image("some_image_of_any_of_the_type_in_csv_file")
        >>> print f.predict(img)

我吾明, [0]*len(imgs1)
[0]意思係咩?
Thanks!

array with only one item: a zero.

TOP