[英]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)
我要翻譯的是std::abs
和CV_PI * std::pow
。
我在網上搜索了相當於 java 的std::abs
,但沒有找到。 請幫忙。 無法搜索CV_PI * std::pow
因為我仍然找不到std::abs
。
查看Math
class。
https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html
Math.PI
Math.pow(...)
Math.abs(...)
etc.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.