Skip to content

Commit

Permalink
[MediaVision] Change property name
Browse files Browse the repository at this point in the history
  • Loading branch information
hsgwon committed Sep 10, 2024
1 parent 4e8225b commit d54054f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ internal static partial class InferenceFacialLandmarkDetection
internal static extern MediaVisionError GetResultCount(IntPtr handle, out ulong requestOrder, out uint count);

[DllImport(Libraries.MediaVisionInferenceFacialLandmarkDetection, EntryPoint = "mv_facial_landmark_get_position")]
internal static extern MediaVisionError GetPoint(IntPtr handle, uint index, out uint posX, out uint posY);
internal static extern MediaVisionError GetPosition(IntPtr handle, uint index, out uint posX, out uint posY);
}

internal static partial class InferencePoseLandmarkDetection
Expand Down Expand Up @@ -250,7 +250,7 @@ internal static partial class InferencePoseLandmarkDetection
internal static extern MediaVisionError GetResultCount(IntPtr handle, out ulong requestOrder, out uint count);

[DllImport(Libraries.MediaVisionInferencePoseLandmarkDetection, EntryPoint = "mv_pose_landmark_get_position")]
internal static extern MediaVisionError GetPoint(IntPtr handle, uint index, out uint posX, out uint posY);
internal static extern MediaVisionError GetPosition(IntPtr handle, uint index, out uint posX, out uint posY);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public InferenceFacialLandmarkDetector()
/// Detects facial landmark on the source image synchronously.
/// </summary>
/// <remarks>
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Point"/> will be empty.
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Position"/> will be empty.
/// </remarks>
/// <param name="source">The image data to detect facial landmark.</param>
/// <returns>A label of detected facial landmark.</returns>
Expand All @@ -92,7 +92,7 @@ public InferenceFacialLandmarkDetectorResult Inference(MediaVisionSource source)
/// Detects facial landmark on the source image asynchronously.
/// </summary>
/// <remarks>
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Point"/> will be empty.<br/>
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Position"/> will be empty.<br/>
/// This API uses about twice as much memory as <see cref="InferenceFacialLandmarkDetector.Inference"/>.
/// </remarks>
/// <param name="source">The image data to detect facial landmark.</param>
Expand Down Expand Up @@ -120,15 +120,15 @@ public async Task<InferenceFacialLandmarkDetectorResult> InferenceAsync(MediaVis
/// Requests to detect facial landmark on the given source image.<br/>
/// </summary>
/// <remarks>
/// This API is not guranteed that inference is done when this method returns. The user can get the result by using <see cref="GetPoint"/>.<br/>
/// This API is not guranteed that inference is done when this method returns. The user can get the result by using <see cref="GetPosition"/>.<br/>
/// And the user call this API again before the previous one is finished internally, API call will be ignored until the previous one is finished.<br/>
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Point"/> will be empty.<br/>
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Position"/> will be empty.<br/>
/// Note that this API could use about twice as much memory as <see cref="InferenceFacialLandmarkDetector.Inference"/>.
/// </remarks>
/// <param name="source">The image data to detect facial landmark.</param>
/// <exception cref="ObjectDisposedException">The InferenceFacialLandmarkDetector already has been disposed.</exception>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
/// <seealso cref="GetPoint"/>
/// <seealso cref="GetPosition"/>
/// <since_tizen> 12 </since_tizen>
public void RequestInference(MediaVisionSource source)
{
Expand All @@ -143,17 +143,17 @@ public void RequestInference(MediaVisionSource source)
}

/// <summary>
/// Gets the point as a result of <see cref="RequestInference"/>.
/// Gets the position as a result of <see cref="RequestInference"/>.
/// </summary>
/// <remarks>
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Point"/> will be empty.<br/>
/// If there's no detected facial landmark, <see cref="InferenceFacialLandmarkDetectorResult.Position"/> will be empty.<br/>
/// This API uses about twice as much memory as <see cref="InferenceFacialLandmarkDetector.Inference"/>.
/// </remarks>
/// <returns>A point of detected facial landmark.</returns>
/// <returns>A position of detected facial landmark.</returns>
/// <exception cref="ObjectDisposedException">The InferenceFacialLandmarkDetector already has been disposed.</exception>
/// <seealso cref="RequestInference"/>
/// <since_tizen> 12 </since_tizen>
public InferenceFacialLandmarkDetectorResult GetPoint()
public InferenceFacialLandmarkDetectorResult GetPosition()
{
return new InferenceFacialLandmarkDetectorResult(_handle);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ internal InferenceFacialLandmarkDetectorResult(IntPtr handle)
Validate("Failed to get result count.");

RequestOrder = requestOrder;
var points = new List<Point>();
var positions = new List<Point>();

for (uint i = 0 ; i < count ; i++)
{
InteropFLD.GetPoint(handle, i, out uint x, out uint y).Validate("Failed to get point.");
points.Add(new Point((int)x, (int)y));
InteropFLD.GetPosition(handle, i, out uint x, out uint y).Validate("Failed to get position.");
positions.Add(new Point((int)x, (int)y));
}

Point = points;
Position = positions;
}

/// <summary>
Expand All @@ -52,9 +52,9 @@ internal InferenceFacialLandmarkDetectorResult(IntPtr handle)
public ulong RequestOrder { get; }

/// <summary>
/// Gets the point of the detected facial landmark.
/// Gets the position of the detected facial landmark.
/// </summary>
/// <since_tizen> 12 </since_tizen>
public IEnumerable<Point> Point { get; }
public IEnumerable<Point> Position { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public InferencePoseLandmarkDetector()
/// Detects pose landmark on the source image synchronously.
/// </summary>
/// <remarks>
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Point"/> will be empty.
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Position"/> will be empty.
/// </remarks>
/// <param name="source">The image data to detect pose landmark.</param>
/// <returns>A label of detected pose landmark.</returns>
Expand All @@ -92,7 +92,7 @@ public InferencePoseLandmarkDetectorResult Inference(MediaVisionSource source)
/// Detects pose landmark on the source image asynchronously.
/// </summary>
/// <remarks>
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Point"/> will be empty.<br/>
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Position"/> will be empty.<br/>
/// This API uses about twice as much memory as <see cref="InferencePoseLandmarkDetector.Inference"/>.
/// </remarks>
/// <param name="source">The image data to detect pose landmark.</param>
Expand Down Expand Up @@ -120,15 +120,15 @@ public async Task<InferencePoseLandmarkDetectorResult> InferenceAsync(MediaVisio
/// Requests to detect pose landmark on the given source image.<br/>
/// </summary>
/// <remarks>
/// This API is not guranteed that inference is done when this method returns. The user can get the result by using <see cref="GetPoint"/>.<br/>
/// This API is not guranteed that inference is done when this method returns. The user can get the result by using <see cref="GetPosition"/>.<br/>
/// And the user call this API again before the previous one is finished internally, API call will be ignored until the previous one is finished.<br/>
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Point"/> will be empty.<br/>
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Position"/> will be empty.<br/>
/// Note that this API could use about twice as much memory as <see cref="InferencePoseLandmarkDetector.Inference"/>.
/// </remarks>
/// <param name="source">The image data to detect pose landmark.</param>
/// <exception cref="ObjectDisposedException">The InferencePoseLandmarkDetector already has been disposed.</exception>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
/// <seealso cref="GetPoint"/>
/// <seealso cref="GetPosition"/>
/// <since_tizen> 12 </since_tizen>
public void RequestInference(MediaVisionSource source)
{
Expand All @@ -143,17 +143,17 @@ public void RequestInference(MediaVisionSource source)
}

/// <summary>
/// Gets the point as a result of <see cref="RequestInference"/>.
/// Gets the position as a result of <see cref="RequestInference"/>.
/// </summary>
/// <remarks>
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Point"/> will be empty.<br/>
/// If there's no detected pose landmark, <see cref="InferencePoseLandmarkDetectorResult.Position"/> will be empty.<br/>
/// This API uses about twice as much memory as <see cref="InferencePoseLandmarkDetector.Inference"/>.
/// </remarks>
/// <returns>A point of detected pose landmark.</returns>
/// <returns>A position of detected pose landmark.</returns>
/// <exception cref="ObjectDisposedException">The InferencePoseLandmarkDetector already has been disposed.</exception>
/// <seealso cref="RequestInference"/>
/// <since_tizen> 12 </since_tizen>
public InferencePoseLandmarkDetectorResult GetPoint()
public InferencePoseLandmarkDetectorResult GetPosition()
{
return new InferencePoseLandmarkDetectorResult(_handle);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ internal InferencePoseLandmarkDetectorResult(IntPtr handle)
Validate("Failed to get result count.");

RequestOrder = requestOrder;
var points = new List<Point>();
var positions = new List<Point>();

for (uint i = 0 ; i < count ; i++)
{
InteropPLD.GetPoint(handle, i, out uint x, out uint y).Validate("Failed to get point.");
points.Add(new Point((int)x, (int)y));
InteropPLD.GetPosition(handle, i, out uint x, out uint y).Validate("Failed to get position.");
positions.Add(new Point((int)x, (int)y));
}

Point = points;
Position = positions;
}

/// <summary>
Expand All @@ -52,9 +52,9 @@ internal InferencePoseLandmarkDetectorResult(IntPtr handle)
public ulong RequestOrder { get; }

/// <summary>
/// Gets the point of the detected pose landmark.
/// Gets the position of the detected pose landmark.
/// </summary>
/// <since_tizen> 12 </since_tizen>
public IEnumerable<Point> Point { get; }
public IEnumerable<Point> Position { get; }
}
}

0 comments on commit d54054f

Please sign in to comment.