Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

噗,发现我们的域名好像 #1

Open
Go7hic opened this issue Feb 6, 2015 · 6 comments
Open

噗,发现我们的域名好像 #1

Go7hic opened this issue Feb 6, 2015 · 6 comments

Comments

@Go7hic
Copy link

Go7hic commented Feb 6, 2015

哈哈,好巧。。

@willard-yuan
Copy link
Owner

谷歌排名比你靠前,哈哈。你那个us结尾的域名挺有意思。

@xysoul
Copy link

xysoul commented Jul 14, 2016

@willard-yuan Hi, 学长。我运行第6张的图像实例,但是报了下面的错误:
File ".../pcaClustering.py", line 10, in
immatrix = array([array(Image.open(im)).flatten() for im in imlist], 'f')
ValueError: setting an array element with a sequence.
我找了解决方案,没有解决。

@xysoul
Copy link

xysoul commented Jul 14, 2016

@willard-yuan
我用原始data的话可以run,使用自己的图片数据就报以上错误。
是我的图像数据太大?

@willard-yuan
Copy link
Owner

@xysoul 你看一下你的图片是不是RGB三通道图像,你可以把你使用的这个里面的哪个文件告诉我,我测试一下。

@xysoul
Copy link

xysoul commented Jul 17, 2016

我用的是ch06_fig63_kmeans_project_images.py

@willard-yuan
Copy link
Owner

@xysoul

from PCV.tools import imtools, pca
from PIL import Image, ImageDraw
from pylab import *

imlist = imtools.get_imlist('../data/selectedfontimages/a_selected_thumbs')
imnbr = len(imlist)

# Load images, run PCA.
immatrix = array([array(Image.open(im)).flatten() for im in imlist], 'f')
V, S, immean = pca.pca(immatrix)

你要确保你的图片文件名保存在imlist(列表)里面,我猜你的问题应该出在这里,你把用你的数据跑时候的imlist打印出来,我看一下是不是对的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants