Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can someone help me to translate this line of code in java?

if (area >= 30 && std::abs(1 - ((double)rect.width / (double)rect.height)) <= 0.2 && std::abs(1 - (area / (CV_PI * std::pow(radius, 2)))) <= 0.2)

What I want to be translated is the std::abs and the CV_PI * std::pow

I've search the net for std::abs equivalent to java and failed to find any. Please help. Wasn't able to search for CV_PI * std::pow since I can't still find the std::abs