opencv-2.3.1-list-fixup.patch
OpenCV-2.3.1/modules/legacy/src/facedetection.cpp 2012-01-16 12:02:50.000000000 +0100 | ||
---|---|---|
66 | 66 |
m_seqRects = NULL; |
67 | 67 |
m_iNumLayers = 16; |
68 | 68 |
assert(m_iNumLayers <= MAX_LAYERS); |
69 |
m_pFaceList = new List(); |
|
69 |
m_pFaceList = new FaceDetectionList();
|
|
70 | 70 |
|
71 | 71 | |
72 | 72 | |
... | ... | |
241 | 241 |
void FaceDetection::ResetImage() |
242 | 242 |
{ |
243 | 243 |
delete m_pFaceList; |
244 |
m_pFaceList = new List(); |
|
244 |
m_pFaceList = new FaceDetectionList();
|
|
245 | 245 | |
246 | 246 |
}//FaceDetection::ResetImage |
247 | 247 | |
... | ... | |
424 | 424 | |
425 | 425 | |
426 | 426 |
////// |
427 |
//List Class |
|
427 |
//FaceDetectionList Class
|
|
428 | 428 |
///// |
429 |
ListElem::ListElem()
|
|
429 |
FaceDetectionListElem::FaceDetectionListElem()
|
|
430 | 430 |
{ |
431 | 431 |
m_pNext = this; |
432 | 432 |
m_pPrev = this; |
433 | 433 |
m_pFace = NULL; |
434 |
}///ListElem::ListElem()
|
|
434 |
}///FaceDetectionListElem::FaceDetectionListElem()
|
|
435 | 435 | |
436 |
ListElem::ListElem(Face * pFace,ListElem * pHead)
|
|
436 |
FaceDetectionListElem::FaceDetectionListElem(Face * pFace,FaceDetectionListElem * pHead)
|
|
437 | 437 |
{ |
438 | 438 |
m_pNext = pHead; |
439 | 439 |
m_pPrev = pHead->m_pPrev; |
... | ... | |
441 | 441 |
pHead->m_pPrev = this; |
442 | 442 | |
443 | 443 |
m_pFace = pFace; |
444 |
}//ListElem::ListElem(Face * pFace)
|
|
444 |
}//FaceDetectionListElem::FaceDetectionListElem(Face * pFace)
|
|
445 | 445 | |
446 | 446 | |
447 | 447 | |
448 |
ListElem::~ListElem()
|
|
448 |
FaceDetectionListElem::~FaceDetectionListElem()
|
|
449 | 449 |
{ |
450 | 450 |
delete m_pFace; |
451 | 451 |
m_pNext->m_pPrev = m_pPrev; |
452 | 452 |
m_pPrev->m_pNext = m_pNext; |
453 | 453 | |
454 |
}//ListElem::~ListElem()
|
|
454 |
}//FaceDetectionListElem::~FaceDetectionListElem()
|
|
455 | 455 | |
456 |
List::List()
|
|
456 |
FaceDetectionList::FaceDetectionList()
|
|
457 | 457 |
{ |
458 |
m_pHead = new ListElem(); |
|
458 |
m_pHead = new FaceDetectionListElem();
|
|
459 | 459 |
m_FacesCount = 0; |
460 | 460 |
m_pCurElem = m_pHead; |
461 |
}//List::List()
|
|
461 |
}//FaceDetectionList::FaceDetectionList()
|
|
462 | 462 | |
463 |
List::~List()
|
|
463 |
FaceDetectionList::~FaceDetectionList()
|
|
464 | 464 |
{ |
465 | 465 |
void * tmp; |
466 | 466 |
while((tmp = m_pHead->m_pNext->m_pFace) != 0) |
... | ... | |
468 | 468 | |
469 | 469 |
delete m_pHead; |
470 | 470 | |
471 |
}//List::~List()
|
|
471 |
}//FaceDetectionList::~FaceDetectionList()
|
|
472 | 472 | |
473 | 473 | |
474 |
int List::AddElem(Face * pFace) |
|
474 |
int FaceDetectionList::AddElem(Face * pFace)
|
|
475 | 475 |
{ |
476 |
new ListElem(pFace,m_pHead); |
|
476 |
new FaceDetectionListElem(pFace,m_pHead);
|
|
477 | 477 |
return m_FacesCount++; |
478 |
}//List::AddElem(Face * pFace) |
|
478 |
}//FaceDetectionList::AddElem(Face * pFace)
|
|
479 | 479 | |
480 |
Face * List::GetData() |
|
480 |
Face * FaceDetectionList::GetData()
|
|
481 | 481 |
{ |
482 | 482 |
m_pCurElem = m_pCurElem->m_pNext; |
483 | 483 |
return m_pCurElem->m_pFace; |
484 |
}//Face * List::GetData() |
|
484 |
}//Face * FaceDetectionList::GetData()
|
|
485 | 485 | |
486 | 486 |
OpenCV-2.3.1/modules/legacy/src/_facedetection.h 2012-01-16 12:02:23.000000000 +0100 | ||
---|---|---|
296 | 296 |
}; |
297 | 297 | |
298 | 298 | |
299 |
class ListElem |
|
299 |
class FaceDetectionListElem
|
|
300 | 300 |
{ |
301 | 301 |
public: |
302 |
ListElem(); |
|
303 |
ListElem(Face * pFace,ListElem * pHead);
|
|
304 |
virtual ~ListElem(); |
|
305 |
ListElem * m_pNext; |
|
306 |
ListElem * m_pPrev; |
|
302 |
FaceDetectionListElem();
|
|
303 |
FaceDetectionListElem(Face * pFace,FaceDetectionListElem * pHead);
|
|
304 |
virtual ~FaceDetectionListElem();
|
|
305 |
FaceDetectionListElem * m_pNext;
|
|
306 |
FaceDetectionListElem * m_pPrev;
|
|
307 | 307 |
Face * m_pFace; |
308 |
};//class ListElem |
|
308 |
};//class FaceDetectionListElem
|
|
309 | 309 | |
310 |
class List |
|
310 |
class FaceDetectionList
|
|
311 | 311 |
{ |
312 | 312 |
public: |
313 |
List(); |
|
313 |
FaceDetectionList();
|
|
314 | 314 |
int AddElem(Face * pFace); |
315 |
virtual ~List(); |
|
315 |
virtual ~FaceDetectionList();
|
|
316 | 316 |
Face* GetData(); |
317 | 317 |
long m_FacesCount; |
318 | 318 |
private: |
319 |
ListElem * m_pHead; |
|
320 |
ListElem * m_pCurElem; |
|
321 |
};//class List |
|
319 |
FaceDetectionListElem * m_pHead;
|
|
320 |
FaceDetectionListElem * m_pCurElem;
|
|
321 |
};//class FaceDetectionList
|
|
322 | 322 | |
323 | 323 | |
324 | 324 |
class FaceDetection |
... | ... | |
341 | 341 |
CvSeq* m_seqRects; |
342 | 342 |
|
343 | 343 |
bool m_bBoosting; |
344 |
List * m_pFaceList; |
|
344 |
FaceDetectionList * m_pFaceList;
|
|
345 | 345 | |
346 | 346 |
protected: |
347 | 347 |
void ResetImage(); |
OpenCV-2.3.1/modules/legacy/src/facedetection.h 2012-01-16 12:01:58.000000000 +0100 | ||
---|---|---|
23 | 23 | |
24 | 24 |
//class Face; |
25 | 25 | |
26 |
class ListElem |
|
26 |
class FaceDetectionListElem
|
|
27 | 27 |
{ |
28 | 28 |
public: |
29 |
ListElem(); |
|
30 |
ListElem(Face * pFace,ListElem * pHead);
|
|
31 |
virtual ~ListElem(); |
|
32 |
ListElem * m_pNext; |
|
33 |
ListElem * m_pPrev; |
|
29 |
FaceDetectionListElem();
|
|
30 |
FaceDetectionListElem(Face * pFace,FaceDetectionListElem * pHead);
|
|
31 |
virtual ~FaceDetectionListElem();
|
|
32 |
FaceDetectionListElem * m_pNext;
|
|
33 |
FaceDetectionListElem * m_pPrev;
|
|
34 | 34 |
Face * m_pFace; |
35 |
};//class ListElem |
|
35 |
};//class FaceDetectionListElem
|
|
36 | 36 | |
37 |
class List |
|
37 |
class FaceDetectionList
|
|
38 | 38 |
{ |
39 | 39 |
public: |
40 |
List(); |
|
40 |
FaceDetectionList();
|
|
41 | 41 |
int AddElem(Face * pFace); |
42 |
virtual ~List(); |
|
42 |
virtual ~FaceDetectionList();
|
|
43 | 43 |
Face* GetData(); |
44 | 44 |
long m_FacesCount; |
45 | 45 |
private: |
46 |
ListElem * m_pHead; |
|
47 |
ListElem * m_pCurElem; |
|
48 |
};//class List |
|
46 |
FaceDetectionListElem * m_pHead;
|
|
47 |
FaceDetectionListElem * m_pCurElem;
|
|
48 |
};//class FaceDetectionList
|
|
49 | 49 | |
50 | 50 | |
51 | 51 |
class FaceDetection |
... | ... | |
68 | 68 |
CvSeq* m_seqRects; |
69 | 69 |
|
70 | 70 |
bool m_bBoosting; |
71 |
List * m_pFaceList; |
|
71 |
FaceDetectionList * m_pFaceList;
|
|
72 | 72 | |
73 | 73 |
protected: |
74 | 74 |
void ResetImage(); |