Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在图像位图上的特定点放置一个图标。我知道了使用 OenCV 放置图标的位置。我可以理解这org.opencv.core.Point与android.graphics.Point. 我怎样才能转换org.opencv.core.Point为android.graphics.Point?
org.opencv.core.Point
android.graphics.Point
它们不是来自相同的来源(至少,在你离开Object规范之后),所以没有直接的方法来转换它们。你应该能做的最好的事情是
Object
[在你已经有org.opencv.core.Point名字之后point]
point
pt = new android.graphics.Point(point.x, point.y);
您可以将其设为 return 语句而不是赋值,并在某处创建一个仅为android.graphics.Point您返回对象的方法。