Problem when using dot product with Xcode
Dear friends,
Please give me some idea how to solve this problem. I wrote a very simple program that executes dot product between two points, A = (1,2), B = (2,5). However, I could not implement it because of the error No viable overload '=' (compiler explains: "candidate function not viable: no known function from 'int' to 'const cv::Point_<int>' for 1st argument"). I am using Open CV 3.4.2 and Xcode 9.2. Below is my implementation.
#include<iostream>
#include<opencv2/opencv.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/core/types.hpp>
using namespace cv;
using namespace std;
int main()
{
Point A(1,2);
Point B(2,5);
Point C = B.dot(A);
return 0;
}
i removed your screenshot, those are useless here.
please EDIT your QUESTION, and add a TEXT version of your code and the resulting errors, thank you.
please check wikipedia for dot product : result is a scalar