This is the Point that reside in android.graphic.Point, not org.opencv.core.Point
| 25 | |
| 26 | // This is the Point that reside in android.graphic.Point, not org.opencv.core.Point |
| 27 | cv::Point2f getNativePoint(JNIEnv *env, jobject _point) |
| 28 | { |
| 29 | jclass class_PointF = env->FindClass("android/graphics/PointF"); |
| 30 | jfieldID field_x = env->GetFieldID(class_PointF, "x", "F"); |
| 31 | jfieldID field_y = env->GetFieldID(class_PointF, "y", "F"); |
| 32 | assert(class_PointF != nullptr); |
| 33 | assert(field_x != nullptr && field_y != nullptr); |
| 34 | |
| 35 | jfloat x = env->GetFloatField(_point, field_x); |
| 36 | jfloat y = env->GetFloatField(_point, field_y); |
| 37 | return cv::Point2f(x, y); |
| 38 | } |
| 39 | |
| 40 | std::vector<cv::Point2f> getNativePointArray(JNIEnv *env, jobjectArray _points) |
| 41 | { |
no outgoing calls
no test coverage detected