返回信息流rt~
这是一条镜像帖。来源:北邮人论坛 / ml-dm / #10921同步于 2013/6/30
该镜像源已超过 30 天没有更新,可能在源站已被删除。
ML_DM机器人发帖
intel的IPP有破解版的吗?有木有人用过呢?
buptwangzhe
2013/6/30镜像同步20 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
PCA compressPCA(InputArray pcaset, int maxComponents,
const Mat& testset, OutputArray compressed)
{
PCA pca(pcaset, // pass the data
Mat(), // there is no pre-computed mean vector,
// so let the PCA engine to compute it
CV_PCA_DATA_AS_ROW, // indicate that the vectors
// are stored as matrix rows
// (use CV_PCA_DATA_AS_COL if the vectors are
// the matrix columns)
maxComponents // specify how many principal components to retain
);
// if there is no test data, just return the computed basis, ready-to-use
if( !testset.data )
return pca;
CV_Assert( testset.cols == pcaset.cols );
compressed.create(testset.rows, maxComponents, testset.type());
Mat reconstructed;
for( int i = 0; i < testset.rows; i++ )
{
Mat vec = testset.row(i), coeffs = compressed.row(i);
// compress the vector, the result will be stored
// in the i-th row of the output matrix
pca.project(vec, coeffs);
// and then reconstruct it
pca.backProject(coeffs, reconstructed);
// and measure the error
printf("%d. diff = %g\n", i, norm(vec, reconstructed, NORM_L2));
}
return pca;
}
【 在 buptwangzhe 的大作中提到: 】
: @qutong 你用opencv了吗?
【 在 qutong 的大作中提到: 】
: PCA compressPCA(InputArray pcaset, int maxComponents,
: const Mat& testset, OutputArray compressed)
: {
: ...................
看不懂,膜拜大牛~那几个问题回答下啦~
书比较旧,个人觉得像是这种日新月异的东西,还是看在线文档吧,少走弯路
【 在 buptwangzhe 的大作中提到: 】
: 。。。我买的书
: iPad客户端1.3发布