Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is meant create header without allocated in memory c++
{ cvCreateMatHeader() ,cvCreateData()}
Posted

1 solution

It simply means that only the CvMat object is allocated and created, but not actual matrix data (not memory for the elements of the matrix themselves), which you can allocate and add later. The instance of this class without actual data still carries metadata: in this case, just the dimension of the array container and element type descriptor. One purpose of this is to allow the user-allocated data.

Please see: http://opencv.willowgarage.com/documentation/operations_on_arrays.html[^].

—SA
 
Share this answer
 
v2
Comments
Anderso0on 2-Aug-13 17:43pm    
pleace give me example about data and header
Sergey Alexandrovich Kryukov 2-Aug-13 18:12pm    
Example of what? The documentation is quite clear...
—SA
Anderso0on 2-Aug-13 17:46pm    
and what is different between this fun
cvCreateMat()
cvCreateMatHeader()
cvMat()
cvInitMatHeader()
Sergey Alexandrovich Kryukov 2-Aug-13 18:15pm    
Did anyone ever taught you that the questions about "difference" are incorrect?!
What's the use? You can read about each of the functions separately and understand what do they supposed to do. That's all that matter.
Besides, if you did not manage to figure out what one function does after my explanation and supposedly reading the documentation, how can I hope that you are going to understand others. Please, one step at a time. If you have some particular concern, please ask...
—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