首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在图像阵列上应用边缘检测

在图像阵列上应用边缘检测
EN

Stack Overflow用户
提问于 2016-01-15 09:58:28
回答 1查看 244关注 0票数 1

我试着用下面的代码做边缘检测:

代码语言:javascript
复制
lfw_people = fetch_lfw_people(min_faces_per_person=70, resize=0.4)

# introspect the images arrays to find the shapes (for plotting)
n_samples, h, w = lfw_people.images.shape

# for machine learning we use the 2 data directly (as relative pixel
# positions info is ignored by this model)
X = lfw_people.data
n_features = X.shape[1]

# the label to predict is the id of the person
y = lfw_people.target
target_names = lfw_people.target_names
n_classes = target_names.shape[0]

print("Total dataset size:")
print("n_samples: %d" % n_samples)
print("n_features: %d" % n_features)
print("n_classes: %d" % n_classes)



###############################################################################
# Split into a training set and a test set using a stratified k fold

# split into a training and testing set
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.25)

我正在尝试使用sobel进行边缘检测,但据我所知,sobel用于1张图像。如何将其应用于多个图像或图像数组?

EN

回答 1

Stack Overflow用户

发布于 2016-01-15 11:11:20

我相信在http://dsp.stackexchange.comhttp://datascience.stackexchange.com上询问(对我来说,你听起来对你试图提取的特征相当不清楚)会是解决这个问题的更好的选择。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34803182

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档