当前位置: 首页 > news >正文

高端网站建设步骤哪些网站免费做职业测评

高端网站建设步骤,哪些网站免费做职业测评,互联网方案设计,主机服务器网站 怎么做使用opencv c 来调用caffemodel 使用opencv 得dnn 模块调用 caffemodel得程序#xff0c;图片自己输入就行#xff0c;不做过多得解释#xff0c;看代码清单。 定义手指关节点 const int POSE_PAIRS[20][2] { {0,1}, {1,2}, {2,3}, {3,4}, // thumb {0,5}, {5,6}, {6,7}…使用opencv c 来调用caffemodel 使用opencv 得dnn 模块调用 caffemodel得程序图片自己输入就行不做过多得解释看代码清单。 定义手指关节点 const int POSE_PAIRS[20][2] { {0,1}, {1,2}, {2,3}, {3,4}, // thumb {0,5}, {5,6}, {6,7}, {7,8}, // index {0,9}, {9,10}, {10,11}, {11,12}, // middle {0,13}, {13,14}, {14,15}, {15,16}, // ring {0,17}, {17,18}, {18,19}, {19,20} // small }; string protoFile “hand/pose_deploy.prototxt”; string weightsFile “hand/pose_iter_102000.caffemodel”; int nPoints 22; 代码清单 #include opencv2/dnn.hpp #include opencv2/imgproc.hpp #include opencv2/highgui.hpp #include iostreamusing namespace std; using namespace cv; using namespace cv::dnn; #ifdef _DEBUG #pragma comment(lib,opencv_world455d.lib) #else #pragma comment(lib,opencv_world455.lib) #endifconst int POSE_PAIRS[20][2] {{0,1}, {1,2}, {2,3}, {3,4}, // thumb{0,5}, {5,6}, {6,7}, {7,8}, // index{0,9}, {9,10}, {10,11}, {11,12}, // middle{0,13}, {13,14}, {14,15}, {15,16}, // ring{0,17}, {17,18}, {18,19}, {19,20} // small };string protoFile hand/pose_deploy.prototxt; string weightsFile hand/pose_iter_102000.caffemodel;int nPoints 22;int main(int argc, char **argv) {string imageFile qianbo2.jpg;// Take arguments from commmand lineif (argc 2){imageFile argv[1];}float thresh 0.01;Mat frame imread(imageFile);Mat frameCopy frame.clone();int frameWidth frame.cols;int frameHeight frame.rows;float aspect_ratio frameWidth / (float)frameHeight;int inHeight 368;int inWidth (int(aspect_ratio*inHeight) * 8) / 8;cout inWidth inWidth ; inHeight inHeight endl;double t (double)cv::getTickCount();Net net readNetFromCaffe(protoFile, weightsFile);Mat inpBlob blobFromImage(frame, 1.0 / 255, Size(inWidth, inHeight), Scalar(0, 0, 0), false, false);net.setInput(inpBlob);Mat output net.forward();int H output.size[2];int W output.size[3];// find the position of the body partsvectorPoint points(nPoints);for (int n 0; n nPoints; n){// Probability map of corresponding bodys part.Mat probMap(H, W, CV_32F, output.ptr(0, n));resize(probMap, probMap, Size(frameWidth, frameHeight));Point maxLoc;double prob;minMaxLoc(probMap, 0, prob, 0, maxLoc);if (prob thresh){circle(frameCopy, cv::Point((int)maxLoc.x, (int)maxLoc.y), 8, Scalar(0, 255, 255), -1);cv::putText(frameCopy, cv::format(%d, n), cv::Point((int)maxLoc.x, (int)maxLoc.y), cv::FONT_HERSHEY_COMPLEX, 1, cv::Scalar(0, 0, 255), 2);}points[n] maxLoc;}int nPairs sizeof(POSE_PAIRS) / sizeof(POSE_PAIRS[0]);for (int n 0; n nPairs; n){// lookup 2 connected body/hand partsPoint2f partA points[POSE_PAIRS[n][0]];Point2f partB points[POSE_PAIRS[n][1]];if (partA.x 0 || partA.y 0 || partB.x 0 || partB.y 0)continue;line(frame, partA, partB, Scalar(0, 255, 255), 8);circle(frame, partA, 8, Scalar(0, 0, 255), -1);circle(frame, partB, 8, Scalar(0, 0, 255), -1);}t ((double)cv::getTickCount() - t) / cv::getTickFrequency();cout Time Taken t endl;imshow(Keypoints, frameCopy);imshow(Skeleton, frame);imwrite(out.jpg, frame);waitKey();return 0; }
http://www.hkea.cn/news/14413969/

相关文章:

  • 全国有哪些做服装的网站青柠影院免费观看电视剧高清
  • 山东鸿泰建设集团有限公司网站wordpress图片不同分辨率
  • 做英德红茶的网站免费广告网
  • 网站空间域名如何用WordPress建小说站
  • 免费推广网站大全下载社群营销案例
  • 生产企业网站有哪些聪明的上海网站
  • 长春几个火车站啊拼多多无货源网店怎么开
  • 莆田建设企业网站青海网站建设哪家好
  • 高校网站建设汇报网页设计的图片怎么设置
  • 优秀品牌企业网站建设案例petit模板wordpress
  • 网站认证费用网站维护工程师工资
  • 杭州网站建设ttmwlwordpress主题开发电子书
  • 基本的网站建设步骤网站优化合同
  • 东莞网站建dede可以做购物网站吗
  • 淘宝做链接的网站申请备案 关网站
  • 南阳网站推广生产企业解决方案
  • 北京工商局网站如何做股东变更运营怎么自学
  • 建设银行个人登录网站美食网站制作模板
  • 网站程序元淄博网站建设排行榜
  • 怎么免费建立网站做推广帮网站做推广赚钱吗
  • ui模板网站建设工程信息网官网重庆
  • 内蒙古建设 招聘信息网站先进的网站建设
  • 万网域名注册后怎么样做网站免费数据统计网站
  • 苏州网站建设集团杭州网站专业制作
  • 网络科技公司网站长春建设网站
  • 上海网站建设seodian网站建设公司接单
  • 做ppt模仿网站云南 网站建设网站
  • 延庆网站建设关于网站开发的评审时间安排
  • 中小学网站建设有什么好处魔兽wordpress
  • 做牛仔裤的视频网站wordpress ftp 密码