android-intrinsics-extrinsics-utils-functions - #6818
Merged
ev-mp merged 6 commits intoJul 20, 2020
Conversation
ev-mp
suggested changes
Jul 13, 2020
ev-mp
left a comment
Contributor
There was a problem hiding this comment.
Several comments to review.
Can you add the unit-test as well ?
| jclass pixel_2D_class = env->GetObjectClass(pixel_2D); | ||
| jfieldID pixel_x_field = env->GetFieldID(pixel_2D_class, "mX", "I"); | ||
| jfieldID pixel_y_field = env->GetFieldID(pixel_2D_class, "mY", "I"); | ||
| float* pixel = new float[2]; |
ev-mp
reviewed
Jul 14, 2020
| @@ -0,0 +1,6 @@ | |||
| # Android Wrapper Code Fragments | |||
ev-mp
approved these changes
Jul 14, 2020
ev-mp
reviewed
Jul 15, 2020
|
|
||
| // helper method for retrieving float[3] from Point_3D object | ||
| std::shared_ptr<float> retrievePoint3D(JNIEnv *env, jobject point_3D) { | ||
|
|
| } | ||
| Log.d(TAG, "depth = " + depthAtMiddleOfFrame); | ||
| Pixel depth_pixel = new Pixel(w/2, h/2); | ||
| Point_3D depth_point = Utils.deprojectPixelToPoint(depthFrameIntrinsic, depth_pixel, depthAtMiddleOfFrame ); |
Contributor
There was a problem hiding this comment.
The projection API calls receive distance in meters, not raw.
| jfieldID to_pixel_y_field = env->GetFieldID(to_pixel_class, "mY", "F"); | ||
| env->SetFloatField(toPixel, to_pixel_x_field, to_pixel[0]); | ||
| env->SetFloatField(toPixel, to_pixel_y_field, to_pixel[1]); | ||
| } No newline at end of file |
|
|
||
| // retrieving rs2_intrinsics from intrinsic object | ||
| // helper method for retrieving rs2_intrinsics from intrinsic object | ||
| rs2_intrinsics retrieveIntrinsic(JNIEnv *env, jobject intrinsic) { |
Contributor
There was a problem hiding this comment.
The name retireveIntrinsic is more appropriate in the context of stream/frame profile.
Can we consider intrinsic_jni2rs or similar?
Contributor
Author
There was a problem hiding this comment.
done - changed to intrinsic_jobject2rs
ev-mp
suggested changes
Jul 16, 2020
ev-mp
left a comment
Contributor
There was a problem hiding this comment.
See the comments for the extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android Wrapper - API functions added:
rs2_deproject_pixel_to_point
rs2_transform_point_to_point
rs2_project_point_to_pixel
rs2_fov
rs2_project_color_pixel_to_depth_pixel
Triggered by jira ticket: DSO-15199