Skip to content

Instantly share code, notes, and snippets.

@wolfkarl
Created May 21, 2014 10:32
Show Gist options
  • Save wolfkarl/37d3dd91542a669bda05 to your computer and use it in GitHub Desktop.
Save wolfkarl/37d3dd91542a669bda05 to your computer and use it in GitHub Desktop.
// normalize and flip
for (ii = 0; ii < npoints; ii++)
{
cv::Point p, pn;
p = selected.at(ii);
pn.x = 100*(p.x - xmin) / (xmax-xmin);
pn.y = 100*(p.y - ymin) / (ymax-ymin);
normalized.push_back(pn);
std::cout << "Normalized: " << pn.x << " " << pn.y << "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment