Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_SEARCH_IMAGE_BY_IMAGE_V2

### Structure Definition

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    typedef struct _net_sdk_search_image_by_image_v2
    {
        unsigned int limitNum;
        DD_TIME_EX startTime;
        DD_TIME_EX endTime;
        unsigned int similarity;
        unsigned int searchType;
        unsigned int imgSourceType;
        unsigned int imgNum;
        unsigned int* imgId;
        unsigned int eventType;
        unsigned int groupsNum;
        unsigned int* groupsId;
        unsigned int sfaceImgsNum;
        NET_SDK_FACE_IMG_INFO_CH* sfaceImgs;
        struct
        {
            unsigned int imgWidth;
            unsigned int imgHeight;
            unsigned int imgLen;
            unsigned char* imgData;
        } sfaceImgData;
    } NET_SDK_SEARCH_IMAGE_BY_IMAGE_V2;

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct NET_SDK_SEARCH_IMAGE_BY_IMAGE_V2
    {
        public UInt32 limitNum;
        public DD_TIME_EX startTime;
        public DD_TIME_EX endTime;
        public UInt32 similarity;
        public UInt32 searchType;
        public UInt32 imgSourceType;
        public UInt32 imgNum;
        public IntPtr imgId;
        public UInt32 eventType;
        public UInt32 groupsNum;
        public IntPtr groupsId;
        public UInt32 sfaceImgsNum;
        public IntPtr sfaceImgs;
        public struct NET_SDK_SEARCH_IMAGE_BY_IMAGE_V2_sfaceImgData
        {
            public UInt32 imgWidth;
            public UInt32 imgHeight;
            public UInt32 imgLen;
            public IntPtr imgData;
        }
        public NET_SDK_SEARCH_IMAGE_BY_IMAGE_V2_sfaceImgData sfaceImgData;
    }

### Function Description

Image Search V2.

### Member Description

Member | Type | Remark
--- | --- | ---
limitNum | unsigned int | Quantity restrictions.
startTime | `DD_TIME_EX` | Start time.
endTime | `DD_TIME_EX` | End time.
similarity | unsigned int | Similarity.
searchType | unsigned int | Search type, refer to `NET_SDK_SEARCH_IMAGE_BY_IMAGE_TYPE`.
imgSourceType | unsigned int | Image source. Use `NET_SDK_SEARCH_IMAGE_SOURCE_V2` when searchType is SEARCH_IMAGE_BY_IMAGE.
imgNum | unsigned int | The number of image ids, used when searchType is SEARCH_IMAGE_BY_IMAGE and imgSourceType is FROM_ALBUM.
imgId | unsigned int* | Image id, used when searchType is SEARCH_IMAGE_BY_IMAGE and imgSourceType is FROM_ALBUM.
eventType | unsigned int | Used when searchType is SEARCH_IMAGE_BY_EVENT, `NET_SDK_SEARCH_IMAGE_BY_EVENT_TYPE_V2`.
groupsNum | unsigned int | The number of target libraries. This parameter is used when searchType is SEARCH_IMAGE_BY_IMAGE and imgSourceType is FROM_GROUP.
groupsId | unsigned int* | Target library ID, used when searchType is SEARCH_IMAGE_BY_IMAGE and imgSourceType is FROM_GROUP.
sfaceImgsNum | unsigned int | The number of images. Used when searchType is SEARCH_IMAGE_BY_IMAGE and imgSourceType is FROM_SNAP.
sfaceImgs | `NET_SDK_FACE_IMG_INFO_CH`* | SEARCH_IMAGE_BY_FACE_IMAGES, used when searchType is SEARCH_IMAGE_BY_IMAGE and imgSourceType is FROM_SNAP.
sfaceImgData |
    1
    2
    3
    4
    5
    6
    7
    struct
    {
        unsigned int imgWidth;  // Image width.
        unsigned int imgHeight; // Image height.
        unsigned int imgLen;    // Image data length.
        unsigned char* imgData; // Image data.
    } sfaceImgData;
| When searchType is SEARCH_IMAGE_BY_IMAGE, imgSourceType is FROM_EXTERNAL.

Error Code