Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@ namespace OpenCvSharp.Internal;

static partial class NativeMethods
{
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus img_hash_averageHash(
in InputArrayProxy inputArr, in OutputArrayProxy outputArr);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus img_hash_blockMeanHash(
in InputArrayProxy inputArr, in OutputArrayProxy outputArr, int mode);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus img_hash_colorMomentHash(
in InputArrayProxy inputArr, in OutputArrayProxy outputArr);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus img_hash_marrHildrethHash(
in InputArrayProxy inputArr, in OutputArrayProxy outputArr, float alpha, float scale);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus img_hash_pHash(
in InputArrayProxy inputArr, in OutputArrayProxy outputArr);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus img_hash_radialVarianceHash(
in InputArrayProxy inputArr, in OutputArrayProxy outputArr, double sigma, int numOfAngleLine);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus img_hash_ImgHashBase_compute(OpenCvSafeHandle obj, in InputArrayProxy inputArr, in OutputArrayProxy outputArr);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using OpenCvSharp.LineDescriptor;

#pragma warning disable 1591
#pragma warning disable CA1401 // P/Invokes should not be visible
Expand Down Expand Up @@ -37,4 +38,119 @@ public static partial ExceptionStatus line_descriptor_LSDDetector_detect2(
IntPtr[] images, int imagesSize,
IntPtr keyLines, int scale, int numOctaves,
IntPtr[] masks, int masksSize);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_create(
IntPtr parameters, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_Ptr_BinaryDescriptor_get(
IntPtr obj, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_Ptr_BinaryDescriptor_delete(IntPtr obj);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_getNumOfOctaves(
OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_setNumOfOctaves(
OpenCvSafeHandle obj, int value);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_getWidthOfBand(
OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_setWidthOfBand(
OpenCvSafeHandle obj, int value);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_getReductionRatio(
OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_setReductionRatio(
OpenCvSafeHandle obj, int value);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_detect1(
OpenCvSafeHandle obj, IntPtr image, IntPtr keyLines, OpenCvSafeHandle mask);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_detect2(
OpenCvSafeHandle obj, IntPtr[] images, int imagesLength, IntPtr keyLines,
IntPtr[] masks, int masksLength);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_compute1(
OpenCvSafeHandle obj, IntPtr image, IntPtr keyLines, IntPtr descriptors, int returnFloatDescriptor);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_compute2(
OpenCvSafeHandle obj, IntPtr[] images, int imagesLength,
IntPtr[] keyLines, int[] keyLineSizes, int keyLinesLength,
IntPtr outputKeyLines, IntPtr descriptors, int returnFloatDescriptor);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_descriptorSize(
OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_descriptorType(
OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_defaultNorm(
OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_Params_new(out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_Params_delete(IntPtr obj);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_Params_getAll(
IntPtr obj, out BinaryDescriptorParamsData data);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_Params_setAll(
IntPtr obj, BinaryDescriptorParamsData data);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_Params_read(IntPtr obj, IntPtr node);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptor_Params_write(IntPtr obj, IntPtr storage);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_create(out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_Ptr_BinaryDescriptorMatcher_get(
IntPtr obj, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_Ptr_BinaryDescriptorMatcher_delete(IntPtr obj);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_match(
OpenCvSafeHandle obj, IntPtr query, IntPtr train, IntPtr matches, OpenCvSafeHandle mask);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_matchQuery(
OpenCvSafeHandle obj, IntPtr query, IntPtr matches, IntPtr[] masks, int masksLength);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_knnMatch(
OpenCvSafeHandle obj, IntPtr query, IntPtr train, IntPtr matches, int k,
OpenCvSafeHandle mask, int compactResult);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_knnMatchQuery(
OpenCvSafeHandle obj, IntPtr query, IntPtr matches, int k,
IntPtr[] masks, int masksLength, int compactResult);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_add(
OpenCvSafeHandle obj, IntPtr[] descriptors, int descriptorsLength);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_train(OpenCvSafeHandle obj);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus line_descriptor_BinaryDescriptorMatcher_clear(OpenCvSafeHandle obj);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static unsafe partial ExceptionStatus line_descriptor_drawLineMatches(
IntPtr image1, KeyLine* keyLines1, int keyLines1Length,
IntPtr image2, KeyLine* keyLines2, int keyLines2Length,
DMatch* matches, int matchesLength, IntPtr output,
Scalar matchColor, Scalar singleLineColor,
byte* matchesMask, int matchesMaskLength, int flags);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static unsafe partial ExceptionStatus line_descriptor_drawKeylines(
IntPtr image, KeyLine* keyLines, int keyLinesLength,
IntPtr output, Scalar color, int flags);
}

[StructLayout(LayoutKind.Sequential)]
internal struct BinaryDescriptorParamsData
{
public int NumOfOctaves;
public int WidthOfBand;
public int ReductionRatio;
public int KSize;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using OpenCvSharp.Detail;
using OpenCvSharp.LineDescriptor;

#pragma warning disable 1591
#pragma warning disable CA1401 // P/Invokes should not be visible
Expand Down Expand Up @@ -347,6 +348,9 @@ public static partial void vector_ImageFeatures_getKeypointsSize(
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial IntPtr vector_KeyLine_new1();

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static unsafe partial IntPtr vector_KeyLine_new2(KeyLine* data, nuint length);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial nuint vector_KeyLine_getSize(OpenCvSafeHandle vector);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;

namespace OpenCvSharp.Internal;

[StructLayout(LayoutKind.Sequential)]
internal struct FacemarkKazemiParamsData
{
public ulong CascadeDepth;
public ulong TreeDepth;
public ulong NumTreesPerCascadeLevel;
public float LearningRate;
public ulong OversamplingAmount;
public ulong NumTestCoordinates;
public float Lambda;
public ulong NumTestSplits;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

#pragma warning disable 1591
#pragma warning disable CA1401
#pragma warning disable CA2101
#pragma warning disable IDE1006

namespace OpenCvSharp.Internal;

static partial class NativeMethods
{
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_BIF_create(
int numBands, int numRotations, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_Ptr_BIF_get(IntPtr obj, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_Ptr_BIF_delete(IntPtr obj);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_BIF_getNumBands(OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_BIF_getNumRotations(OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_BIF_compute(
OpenCvSafeHandle obj, in InputArrayProxy image, in OutputArrayProxy features);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_MACE_create(int imageSize, out IntPtr returnValue);
[LibraryImport(DllExtern, StringMarshalling = StringMarshalling.Utf8), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_MACE_load(
string filename, string objName, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_Ptr_MACE_get(IntPtr obj, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_Ptr_MACE_delete(IntPtr obj);
[LibraryImport(DllExtern, StringMarshalling = StringMarshalling.Utf8), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_MACE_salt(OpenCvSafeHandle obj, string passphrase);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_MACE_train(
OpenCvSafeHandle obj, IntPtr[] images, int imagesLength);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_MACE_same(
OpenCvSafeHandle obj, in InputArrayProxy query, out int returnValue);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_PredictCollector_init(
OpenCvSafeHandle obj, nuint size);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_PredictCollector_collect(
OpenCvSafeHandle obj, int label, double distance, out int returnValue);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_StandardCollector_create(
double threshold, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_Ptr_StandardCollector_get(
IntPtr obj, out IntPtr returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_Ptr_StandardCollector_delete(IntPtr obj);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_StandardCollector_getMinLabel(
OpenCvSafeHandle obj, out int returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_StandardCollector_getMinDist(
OpenCvSafeHandle obj, out double returnValue);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_StandardCollector_getResults(
OpenCvSafeHandle obj, int sorted, IntPtr labels, IntPtr distances);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_StandardCollector_getResultsMap(
OpenCvSafeHandle obj, IntPtr labels, IntPtr distances);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public static partial ExceptionStatus face_FaceRecognizer_update(
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_FaceRecognizer_predict2(
OpenCvSafeHandle obj, in InputArrayProxy src, out int label, out double confidence);
[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial ExceptionStatus face_FaceRecognizer_predictCollect(
OpenCvSafeHandle obj, in InputArrayProxy src, IntPtr collector);

[LibraryImport(DllExtern), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial ExceptionStatus face_FaceRecognizer_write1(
Expand Down
Loading
Loading