MCPcopy Create free account
hub / github.com/Profactor/cv-plot / transform

Method transform

CvPlot/examples/examples_core.cpp:314–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312TEST_CASE("custom_transformation") {
313 struct MyPolarTransformation : public Transformation {
314 cv::Point2d transform(const cv::Point2d &p)const override {
315 return{ std::cos(p.x)*p.y,std::sin(p.x)*p.y };
316 }
317 cv::Point2d untransform(const cv::Point2d &p)const override {
318 return{ std::atan2(p.y, p.x), std::sqrt(p.x *p.x + p.y*p.y) };
319 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected