Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
int va[] = {1, 2, 3, 1, 2, 3 };
int vb[] = {0, 0, 1, 0, 0, 1 };
int vc[6];

CvMat Va=cvMat(3, 2, CV_64FC1, va);
CvMat Vb=cvMat(3, 2, CV_64FC1, vb);
CvMat Vc=cvMat(3, 2, CV_64FC1, vc);


cvCrossProduct(&Va,&Vb,&Vc);
Posted
Comments
[no name] 24-Sep-13 15:13pm    
Do you have any idea how expensive the ingredients are to make mind reading potions? You have made it a really bad habit of just posting code without explanation or hint of what the problem is as if you expect us to be able to read your mind.
Anderso0on 24-Sep-13 15:31pm    
i think my code is very clear , i create two matrix each one have two vector ,Now i need to apply a cross product on them ,Note i think you have a idea about cross product
CPallini 24-Sep-13 15:37pm    
'give me exception' is actually vague. I guess the library provided at least a hint of what went wrong.
Anderso0on 24-Sep-13 16:06pm    
Unhandled exception at 0x000007fefd7d9e5d in Opencv.exe: Microsoft C++ exception: cv::Exception at memory location 0x0031eb20
CPallini 24-Sep-13 16:29pm    
Ops. It looks the library itself had no idea on what was going on. Probably your best friend is the debugger, provided you have the library sources.

1 solution

C++
cvCrossProduct(Va, Vb, Vc);
 
Share this answer
 
Comments
Anderso0on 24-Sep-13 16:40pm    
what is this ?!!
Richard MacCutchan 24-Sep-13 16:41pm    
What does it look like? It's the correction to your code, as shown in the documentation.
Anderso0on 24-Sep-13 16:51pm    
syntax error
Richard MacCutchan 24-Sep-13 16:58pm    
What exactly is the error, and what exactly is the definition of this function?

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