本文整理汇总了C++中scoped_ptr::cleanFacesList方法的典型用法代码示例。如果您正苦于以下问题:C++ scoped_ptr::cleanFacesList方法的具体用法?C++ scoped_ptr::cleanFacesList怎么用?C++ scoped_ptr::cleanFacesList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scoped_ptr
的用法示例。
在下文中一共展示了scoped_ptr::cleanFacesList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: detectFrom
//
// Image processing function (if image source changes)
//
void UFacet::detectFrom(UImage sourceImage) {
Mat processImage(Size(sourceImage.width, sourceImage.height), CV_8UC3,
sourceImage.data);
Mat resizedImage(cvRound(processImage.rows / scale.as<double>()),
cvRound(processImage.cols / scale.as<double>()), CV_8UC1);
resize(processImage, resizedImage, resizedImage.size(), 0, 0, INTER_LINEAR);
width = resizedImage.cols;
height = resizedImage.rows;
//Compute fps - algorithm efficency
int64 startTick = getTickCount();
fps = static_cast<double>(getTickFrequency()) / (startTick - mLastTick);
mLastTick = startTick;
double timestamp = (double) mLastTick / getTickFrequency();
//////////////////////////////////////////////////////////
// FACET FACET FACET FACET FACET FACET FACET FACET
IplImage iplimg = resizedImage;
mFacet->face.clearElements();
mFacet->detectFeat(&iplimg, &iplimg);
vec_roix.clear();
vec_roiy.clear();
vec_angle.clear();
vec_LEbBnd.clear();
vec_LEbDcl.clear();
vec_LEyOpn.clear();
vec_LEbHgt.clear();
vec_REbBnd.clear();
vec_REbDcl.clear();
vec_REyOpn.clear();
vec_REbHgt.clear();
vec_LiAspt.clear();
vec_LLiCnr.clear();
vec_RLiCnr.clear();
vec_Wrnkls.clear();
vec_Nstrls.clear();
vec_TeethA.clear();
faces = mFacet->facesList.size();
for (std::list<facepar_t>::iterator iter = mFacet->facesList.begin();
iter != mFacet->facesList.end(); ++iter) {
vec_roix.push_back(iter->roix);
vec_roiy.push_back(iter->roiy);
vec_angle.push_back(iter->angle);
vec_LEbBnd.push_back(iter->LEbBnd);
vec_LEbDcl.push_back(iter->LEbDcl);
vec_LEyOpn.push_back(iter->LEyOpn);
vec_LEbHgt.push_back(iter->LEbHgt);
vec_REbBnd.push_back(iter->REbBnd);
vec_REbDcl.push_back(iter->REbDcl);
vec_REyOpn.push_back(iter->REyOpn);
vec_REbHgt.push_back(iter->REbHgt);
vec_LiAspt.push_back(iter->LiAspt);
vec_LLiCnr.push_back(iter->LLiCnr);
vec_RLiCnr.push_back(iter->RLiCnr);
vec_Wrnkls.push_back(iter->Wrnkls);
vec_Nstrls.push_back(iter->Nstrls);
vec_TeethA.push_back(iter->TeethA);
}
roix = vec_roix;
roiy = vec_roiy;
angle = vec_angle;
LEbBnd = vec_LEbBnd;
LEbDcl = vec_LEbDcl;
LEyOpn = vec_LEyOpn;
LEbHgt = vec_LEbHgt;
REbBnd = vec_REbBnd;
REbDcl = vec_REbDcl;
REyOpn = vec_REyOpn;
REbHgt = vec_REbHgt;
LiAspt = vec_LiAspt;
LLiCnr = vec_LLiCnr;
RLiCnr = vec_RLiCnr;
Wrnkls = vec_Wrnkls;
Nstrls = vec_Nstrls;
TeethA = vec_TeethA;
mFacet->cleanFacesList();
// Copy mResult image to UImage
mBinImage.image.width = resizedImage.cols;
mBinImage.image.height = resizedImage.rows;
mBinImage.image.size = resizedImage.cols * resizedImage.rows * 3;
mBinImage.image.data = resizedImage.data;
image = mBinImage;
}