Class VFPAPI86
- Namespace
- VisioForge.Core.VideoFingerPrinting
- Assembly
- VisioForge.Core.dll
Provides access to the 32-bit (x86) native video fingerprinting API through platform invoke declarations. This class contains methods for fingerprint search, comparison, and image analysis operations. Note: 32-bit support is primarily for Windows; Linux and macOS typically use 64-bit libraries.
public static class VFPAPI86Inheritance
Inherited Members
Methods
VFPCompare_Build(out int, nint)
Builds the final fingerprint data from processed frames for comparison.
public static extern nint VFPCompare_Build(out int pLen, nint pDataTmp)Parameters
pLenint-
Output parameter receiving the length of the fingerprint data.
pDataTmpnint-
Pointer to the comparison context.
Returns
- nint
-
Pointer to the built fingerprint data.
VFPCompare_Clear(nint)
Clears and releases resources associated with the comparison context.
public static extern void VFPCompare_Clear(nint pDataTmp)Parameters
pDataTmpnint-
Pointer to the comparison context to clear.
VFPCompare_Compare(nint, int, nint, int, int)
Compares two fingerprints and returns a difference score (lower means more similar).
public static extern double VFPCompare_Compare(nint pData1, int iLen1, nint pData2, int iLen2, int MaxS)Parameters
pData1nint-
Pointer to the first fingerprint data.
iLen1int-
Length of the first fingerprint data.
pData2nint-
Pointer to the second fingerprint data.
iLen2int-
Length of the second fingerprint data.
MaxSint-
Maximum time shift in seconds searched for the best alignment.
Returns
- double
-
The difference score: 0 for identical content, higher values for greater differences (lower means more similar).
VFPCompare_CompareMirror(nint, int, nint, int, int, bool)
Compares two fingerprints with mirror detection support.
public static extern double VFPCompare_CompareMirror(nint data1, int len1, nint data2, int len2, int maxShift, bool checkMirror)Parameters
data1nint-
Pointer to the first fingerprint data.
len1int-
Length of the first fingerprint data.
data2nint-
Pointer to the second fingerprint data.
len2int-
Length of the second fingerprint data.
maxShiftint-
Maximum time shift in seconds searched for the best alignment.
checkMirrorbool-
Whether to check mirrored orientations (horizontal, vertical, both).
Returns
- double
-
The difference score: 0 for identical content, higher values for greater differences (lower means more similar).
VFPCompare_CompareMirror2(nint, int, nint, int, int, out int)
Compares two fingerprints with mirror detection and reports the detected mirror mode.
public static extern double VFPCompare_CompareMirror2(nint data1, int len1, nint data2, int len2, int maxShift, out int mirrorMode)Parameters
data1nint-
Pointer to the first fingerprint data.
len1int-
Length of the first fingerprint data.
data2nint-
Pointer to the second fingerprint data.
len2int-
Length of the second fingerprint data.
maxShiftint-
Maximum time shift in seconds searched for the best alignment.
mirrorModeint-
Output parameter receiving the detected mirror mode.
Returns
- double
-
The difference score: 0 for identical content, higher values for greater differences (lower means more similar).
VFPCompare_Init(int, nint)
Initializes the fingerprint comparison engine with a specified frame count.
public static extern void VFPCompare_Init(int count, nint pDataTmp)Parameters
countint-
The number of frames to allocate for processing.
pDataTmpnint-
Pointer to the temporary data structure for comparison operations.
VFPCompare_Init2(int)
Initializes the fingerprint comparison engine and returns a handle to the comparison context.
public static extern nint VFPCompare_Init2(int count)Parameters
countint-
The number of frames to allocate for processing.
Returns
- nint
-
A pointer to the initialized comparison context.
VFPCompare_Process(nint, int, int, int, double, nint)
Processes a video frame for fingerprint comparison operations.
public static extern int VFPCompare_Process(nint p, int w, int h, int s, double dTime, nint pDataTmp)Parameters
pnint-
Pointer to the frame pixel data.
wint-
Width of the frame in pixels.
hint-
Height of the frame in pixels.
sint-
Stride (bytes per row) of the frame data.
dTimedouble-
Timestamp of the frame in seconds.
pDataTmpnint-
Pointer to the comparison context.
Returns
- int
-
Status code indicating success (0) or failure.
VFPSearch_Build(out int, nint)
Builds the final fingerprint data from processed frames.
public static extern nint VFPSearch_Build(out int pLen, nint pDataTmp)Parameters
pLenint-
Output parameter receiving the length of the fingerprint data.
pDataTmpnint-
Pointer to the search context.
Returns
- nint
-
Pointer to the built fingerprint data.
VFPSearch_Clear(nint)
Clears and releases resources associated with the search context.
public static extern void VFPSearch_Clear(nint pDataTmp)Parameters
pDataTmpnint-
Pointer to the search context to clear.
VFPSearch_Init(int, nint)
Initializes the fingerprint search engine with a specified frame count.
public static extern void VFPSearch_Init(int count, nint pDataTmp)Parameters
countint-
The number of frames to allocate for processing.
pDataTmpnint-
Pointer to the temporary data structure for search operations.
VFPSearch_Init2(int)
Initializes the fingerprint search engine and returns a handle to the search context.
public static extern nint VFPSearch_Init2(int count)Parameters
countint-
The number of frames to allocate for processing.
Returns
- nint
-
A pointer to the initialized search context.
VFPSearch_Process(nint, int, int, int, double, nint)
Processes a video frame for fingerprint search operations.
public static extern int VFPSearch_Process(nint p, int w, int h, int s, double dTime, nint pDataTmp)Parameters
pnint-
Pointer to the frame pixel data.
wint-
Width of the frame in pixels.
hint-
Height of the frame in pixels.
sint-
Stride (bytes per row) of the frame data.
dTimedouble-
Timestamp of the frame in seconds.
pDataTmpnint-
Pointer to the search context.
Returns
- int
-
Status code indicating success (0) or failure.
VFPSearch_Search(nint, int, int, nint, int, int, out double, int)
Searches for matches between two fingerprints.
public static extern int VFPSearch_Search(nint pData1, int iLen1, int iSkip1, nint pData2, int iLen2, int iSkip2, out double pDiff, int maxDiff)Parameters
pData1nint-
Pointer to the first fingerprint data.
iLen1int-
Length of the first fingerprint data.
iSkip1int-
Number of leading samples of the first fingerprint to skip (10 per second; usually 0).
pData2nint-
Pointer to the second fingerprint data.
iLen2int-
Length of the second fingerprint data.
iSkip2int-
Second of the second fingerprint to search from; the search window opens half the length of the first fingerprint earlier.
pDiffdouble-
Output parameter receiving the difference value between fingerprints.
maxDiffint-
Maximum allowed difference for a match.
Returns
- int
-
The position of the best match, or
int.MaxValuewhen no match was found.
VFPSearch_SearchMirror(nint, int, int, nint, int, int, out double, int, bool)
Searches for matches between two fingerprints with mirror detection.
public static extern int VFPSearch_SearchMirror(nint data1, int len1, int skip1, nint data2, int len2, int skip2, out double diff, int maxDiff, bool checkMirror)Parameters
data1nint-
Pointer to the first fingerprint data (needle).
len1int-
Length of the first fingerprint data.
skip1int-
Number of leading samples of the first fingerprint to skip (10 per second; usually 0).
data2nint-
Pointer to the second fingerprint data (haystack).
len2int-
Length of the second fingerprint data.
skip2int-
Second of the second fingerprint to search from; the search window opens half the length of the first fingerprint earlier.
diffdouble-
Output parameter receiving the difference value of the best match.
maxDiffint-
Maximum difference for a match to be reported.
checkMirrorbool-
Whether to check mirrored orientations (horizontal, vertical, both).
Returns
- int
-
The position of the best match, or
int.MaxValuewhen no match was found.
VFPSearch_SearchMirror2(nint, int, nint, int, out int, out int, out int, double, double)
Searches for matches between two fingerprints with mirror detection and duration hints.
public static extern void VFPSearch_SearchMirror2(nint data1, int len1, nint data2, int len2, out int diff, out int pos, out int mirrorMode, double duration1, double duration2)Parameters
data1nint-
Pointer to the first fingerprint data.
len1int-
Length of the first fingerprint data.
data2nint-
Pointer to the second fingerprint data.
len2int-
Length of the second fingerprint data.
diffint-
Output parameter receiving the difference value between fingerprints.
posint-
Output parameter receiving the position of the best match.
mirrorModeint-
Output parameter receiving the detected mirror mode.
duration1double-
Duration of the first video in seconds.
duration2double-
Duration of the second video in seconds.
VFPSearch_SearchRange(nint, int, nint, int, int, int, out double, int, bool, out int)
Finds the best alignment of the whole fragment inside the second fingerprint whose start lies in a range. Up to 9 samples (0.9 s, never more than a tenth of the fragment) may run past the end of the second fingerprint, which drops the last partial second of its video; nothing may run past the start. Of equally good alignments, the earliest wins.
public static extern int VFPSearch_SearchRange(nint data1, int len1, nint data2, int len2, int start, int end, out double diff, int maxDiff, bool checkMirror, out int mirrorMode)Parameters
data1nint-
Pointer to the first fingerprint data (needle).
len1int-
Length of the first fingerprint data in bytes.
data2nint-
Pointer to the second fingerprint data (haystack).
len2int-
Length of the second fingerprint data in bytes.
startint-
First start sample to try (10 samples per second).
endint-
Last start sample to try; clamped to the last start allowed at the end.
diffdouble-
When this method returns, contains the difference score of the match.
maxDiffint-
Maximum difference for a match to be reported.
checkMirrorbool-
Whether to check mirrored orientations (horizontal, vertical, both).
mirrorModeint-
When this method returns, contains the mirror mode of the match (0 when none).
Returns
- int
-
The start sample of the best match (10 per second), or -1 when no alignment scores below
maxDiff.
VFPSetLicenseKey(string)
Sets the license key for the video fingerprinting library.
public static extern void VFPSetLicenseKey(string licenseKey)Parameters
licenseKeystring-
The license key string to activate the library.
VFPSetLicenseKeyA(string)
Sets the license key from a byte string. Used on macOS and Linux, where wchar_t is 4 bytes and VFPSetLicenseKey does not match a UTF-16 marshal.
public static extern void VFPSetLicenseKeyA(string licenseKey)Parameters
licenseKeystring-
The license key string to activate the library.