-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.cpp
More file actions
56 lines (47 loc) · 1018 Bytes
/
Copy pathtools.cpp
File metadata and controls
56 lines (47 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* =====================================================================================
*
* Filename: tools.cpp
*
* Description: some tool function
*
* Version: 1.0
* Created: 2013年02月13日 20时48分19秒
* Revision: none
* Compiler: gcc
*
* Author: 金鹏 (),
* Organization:
*
* =====================================================================================
*/
#include "functions.h"
#include "errmsg.h"
void displayMat(CvMat* mat)
{
for( int i = 0 ; i < mat->rows ; i++ )
{
float* ptr = (float*)(mat->data.ptr + i * mat->step) ;
for( int j = 0 ; j < mat->cols ; j++ )
{
printf("%f " ,*(ptr+j));
}
printf("\n");
}
}
void releaseMats(CvMat*** mats , int size )
{
for( int i = 0 ; i < size ; i++ )
{
cvReleaseMat(&((*mats)[i]));
}
delete *mats ;
}
void releaseFrames(IplImage*** frames , int& size)
{
for( int i = 0 ; i < size; i++ )
{
cvReleaseImage(&((*frames)[i]));
}
delete *frames ;
}