Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what is difference between cvcreatematheader() and cvcreatedata() ?
ihope explain difference with simple code
Posted
Comments
Sergey Alexandrovich Kryukov 20-Sep-13 15:31pm    
Such questions about "difference" are simple incorrect. What would you call a "difference"? If you can tell what it is, please tell us the difference between apple and Apple. :-)
Did you read the OpenCV documentation? What are your particular concerns about these functions?
—SA
Anderso0on 20-Sep-13 15:48pm    
i read in opencv Doc cvcreatematheader just create structre to matrix and cvcreatedata allocate data and you can do this two functionality with cvcreatemat
but i did not understand cvcreatematheader and cvcreatedata exactly do
Richard C Bishop 20-Sep-13 15:32pm    
Why not get book, read words, think with brain?
Sergey Alexandrovich Kryukov 20-Sep-13 16:24pm    
Good idea... :-)
—SA

1 solution

The documentation[^] (concisely) explains it all. For instance, it states that cvCreateMat is a just shortcut (or a 'convenience function') for the sequence
C++
CvMat* mat = cvCreateMatHeader(rows, cols, type);
cvCreateData(mat);
 
Share this answer
 
Comments
Anderso0on 20-Sep-13 16:16pm    
cvcreatedata() allocate what ??
Anderso0on 20-Sep-13 16:20pm    
are you mean cvcreatemat header just allocate header part of strucure cvmat(such row ,col , step) and cvcreatedata allocate second part(union {uchar* ptr;short* s;int* i;float* fl;double* db;}) ??
Sergey Alexandrovich Kryukov 20-Sep-13 16:23pm    
Agree, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900