Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Tizen.Multimedia.Vision/MediaVision/FaceDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private static IEnumerable<FaceDetectionResult> GetResults(int number, float[] c
return Enumerable.Empty<FaceDetectionResult>();
}

var results = new List<FaceDetectionResult>();
var results = new List<FaceDetectionResult>(number);

for (int i = 0; i < number; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static IEnumerable<Point> GetResults(int number, global::Interop.MediaVi
return Enumerable.Empty<Point>();
}

var results = new List<Point>();
var results = new List<Point>(number);

for (int i = 0; i < number; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private static IEnumerable<ImageClassificationResult> GetResults(int number, int
return Enumerable.Empty<ImageClassificationResult>();
}

var results = new List<ImageClassificationResult>();
var results = new List<ImageClassificationResult>(number);

for (int i = 0; i < number; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal InferenceFaceDetectorResult(IntPtr handle)
Validate("Failed to get result count.");

RequestId = requestId;
var boundingBoxes = new List<Rectangle>();
var boundingBoxes = new List<Rectangle>((int)count);

for (uint i = 0 ; i < count ; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal InferenceFacialLandmarkDetectorResult(IntPtr handle)
Validate("Failed to get result count.");

RequestId = requestId;
var points = new List<Point>();
var points = new List<Point>((int)count);

for (uint i = 0 ; i < count ; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal InferenceImageClassifierResult(IntPtr handle)
Validate("Failed to get result count.");

RequestId = requestId;
var labels = new List<string>();
var labels = new List<string>((int)count);

for (uint i = 0 ; i < count ; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal InferenceObjectDetectorResult(IntPtr handle)
Validate("Failed to get result count.");

RequestId = requestId;
var boundingBoxes = new List<Rectangle>();
var boundingBoxes = new List<Rectangle>((int)count);

for (uint i = 0 ; i < count ; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal InferencePoseLandmarkDetectorResult(IntPtr handle)
Validate("Failed to get result count.");

RequestId = requestId;
var points = new List<Point>();
var points = new List<Point>((int)count);

for (uint i = 0 ; i < count ; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private static IEnumerable<ObjectDetectionResult> GetResults(int number, int[] i
return Enumerable.Empty<ObjectDetectionResult>();
}

var results = new List<ObjectDetectionResult>();
var results = new List<ObjectDetectionResult>(number);

for (int i = 0; i < number; i++)
{
Expand Down
Loading