代码拉取完成,页面将自动刷新
#ifndef _HAND_GESTURE_
#define _HAND_GESTURE_
#include <opencv2/imgproc/imgproc.hpp>
#include<opencv2/opencv.hpp>
#include <vector>
#include <string>
#include "main.hpp"
#include "myImage.hpp"
using namespace cv;
using namespace std;
class HandGesture{
public:
MyImage m;
HandGesture();
vector<vector<Point> > contours;
vector<vector<int> >hullI;
vector<vector<Point> >hullP;
vector<vector<Vec4i> > defects;
vector <Point> fingerTips;
Rect rect;
void printGestureInfo(Mat src);
int cIdx;
int frameNumber;
int mostFrequentFingerNumber;
int nrOfDefects;
Rect bRect;
double bRect_width;
double bRect_height;
bool isHand;
bool detectIfHand();
void initVectors();
void getFingerNumber(MyImage *m);
void eleminateDefects(MyImage *m);
void getFingerTips(MyImage *m);
void drawFingerTips(MyImage *m);
private:
string bool2string(bool tf);
int fontFace;
int prevNrFingerTips;
void checkForOneFinger(MyImage *m);
float getAngle(Point s,Point f,Point e);
vector<int> fingerNumbers;
void analyzeContours();
string intToString(int number);
void computeFingerNumber();
void drawNewNumber(MyImage *m);
void addNumberToImg(MyImage *m);
vector<int> numbers2Display;
void addFingerNumberToVector();
Scalar numberColor;
int nrNoFinger;
float distanceP2P(Point a,Point b);
void removeRedundantEndPoints(vector<Vec4i> newDefects,MyImage *m);
void removeRedundantFingerTips();
};
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。