【问题标题】:error: incompatible types: org.opencv.core.Point cannot be converted to android.graphics.Point错误:不兼容的类型:org.opencv.core.Point 无法转换为 android.graphics.Point
【发布时间】:2020-03-19 13:24:18
【问题描述】:

我是OpenCV 的新手。

我想知道如何将org.opencv.core.Point 转换为android.graphics.Point

这是我的代码:

Point size = new Point();     
display.getSize(size);

double mobile_width = size.x;
double mobile_height = size.y;

我收到一条错误消息。

error: incompatible types: org.opencv.core.Point cannot be converted to android.graphics.Point
display.getSize(size);

【问题讨论】:

标签: java android opencv opencv4android


【解决方案1】:

只要这样做:

android.graphics.Point size = new android.graphics.Point();     
display.getSize(size);

double mobile_width = size.x;
double mobile_height = size.y;

阅读:https://developer.android.com/reference/android/graphics/Point

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-27
    • 2017-10-03
    • 1970-01-01
    • 2018-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多