MCPcopy Create free account
hub / github.com/Smorodov/Multitarget-tracker / complexDivision

Function complexDivision

src/Tracker/ldes/fft_functions.cpp:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56cv::Mat complexDivision(const cv::Mat& a, const cv::Mat& b) {
57 std::vector<cv::Mat> pa;
58 std::vector<cv::Mat> pb;
59 cv::split(a, pa);
60 cv::split(b, pb);
61
62 cv::Mat divisor = 1. / (pb[0].mul(pb[0]) + pb[1].mul(pb[1]));
63
64 std::vector<cv::Mat> pres;
65
66 pres.push_back((pa[0].mul(pb[0]) + pa[1].mul(pb[1])).mul(divisor));
67 pres.push_back((pa[1].mul(pb[0]) + pa[0].mul(pb[1])).mul(divisor));
68
69 cv::Mat res;
70 cv::merge(pres, res);
71 return res;
72}
73
74void rearrange(cv::Mat& img) {
75 int cx = img.cols / 2;

Callers 1

trainLocationMethod · 0.85

Calls 2

splitFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected