forked from postgrespro/imgsmlr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimgsmlr.h
executable file
·39 lines (33 loc) · 920 Bytes
/
imgsmlr.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*-------------------------------------------------------------------------
*
* Image similarity extension
*
* Copyright (c) 2013, PostgreSQL Global Development Group
*
* This software is released under the PostgreSQL Licence.
*
* Author: Alexander Korotkov <[email protected]>
*
* IDENTIFICATION
* imgsmlr/imgsmlr.h
*-------------------------------------------------------------------------
*/
#ifndef IMGSMLR_H
#define IMGSMLR_H
#define PATTERN_SIZE 64
#define SIGNATURE_SIZE 16
typedef struct
{
float values[PATTERN_SIZE][PATTERN_SIZE];
} PatternData;
typedef struct
{
char vl_len_[4]; /* Do not touch this field directly! */
PatternData data;
} Pattern;
typedef struct
{
float values[SIGNATURE_SIZE];
} Signature;
#define CHECK_SIGNATURE_KEY(key) Assert(VARSIZE_ANY_EXHDR(key) == sizeof(Signature) || VARSIZE_ANY_EXHDR(key) == 2 * sizeof(Signature));
#endif /* IMGSMLR_H */