www.pudn.com > Face3DModel.zip > CornerMatch.h
#pragma once
// struct for match corners
typedef struct {
POINT ptCorner1;
POINT ptCorner2;
}MatchCorner;
class MatchCornerAndIndex
{
public:
MatchCornerAndIndex();
int getIndex();
int getNum();
addCorner(MatchCorner points, int index);
MatchCorner getCorner(int i);
setUseState(bool state);
bool getUseState();
private:
vector corners;
vector indexs;
int index;
int num;
bool use;
};
///////////////////////////////////////////////////////////////////////////////
// CornerDetection:
// Detect corners in the specified pixels of an bitmap
// Arguments:
// nWidth - the width of bitmap
// nHeight - the height of bitmap
// pbImage - the dibbits pointer of bitmap, 24bit true color bitmap
// pbMask - the specified pixels, we only detect corners in pixel whose
// mask is 255; if NULL, means all pixels in the detect range
// vecCorners - the corners detected
// Return value:
// no
// History:
// Created on 11/19/04 by wjliu
///////////////////////////////////////////////////////////////////////////////
void CornerDetection(int nWidth, int nHeight, BYTE *pbImage, BYTE *pbMask, vector& vecCorners);
void CornerDetectOnGrayImage(int nWidth, int nHeight, BYTE *pbGray, BYTE *pbEdge);
void CornerMatch(int nWidth, int nHeight, BYTE *pbImage1, BYTE *pbImage2, vector& vecCorners1, vector& vecCorners2, vector &vecMatchCorners);
void MatchCancel(int nWidth, int nHeight, BYTE *pbImage1, BYTE *pbImage2, vector &vecMatchCorners, double thresholdLevel);