@@ -151,16 +151,58 @@ enum DecompTypes {
151
151
DECOMP_NORMAL = 16
152
152
};
153
153
154
- // ! norm types
155
- enum NormTypes { NORM_INF = 1 ,
154
+ /* * norm types
155
+
156
+ src1 and src2 denote input arrays.
157
+ */
158
+
159
+ enum NormTypes {
160
+ /* *
161
+ \f[
162
+ norm = \forkthree
163
+ {\|\texttt{src1}\|_{L_{\infty}} = \max _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM_INF}\) }
164
+ {\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} = \max _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM_INF}\) }
165
+ {\frac{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} }{\|\texttt{src2}\|_{L_{\infty}} }}{if \(\texttt{normType} = \texttt{NORM_RELATIVE | NORM_INF}\) }
166
+ \f]
167
+ */
168
+ NORM_INF = 1 ,
169
+ /* *
170
+ \f[
171
+ norm = \forkthree
172
+ {\| \texttt{src1} \| _{L_1} = \sum _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM_L1}\)}
173
+ { \| \texttt{src1} - \texttt{src2} \| _{L_1} = \sum _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM_L1}\) }
174
+ { \frac{\|\texttt{src1}-\texttt{src2}\|_{L_1} }{\|\texttt{src2}\|_{L_1}} }{if \(\texttt{normType} = \texttt{NORM_RELATIVE | NORM_L1}\) }
175
+ \f]*/
156
176
NORM_L1 = 2 ,
177
+ /* *
178
+ \f[
179
+ norm = \forkthree
180
+ { \| \texttt{src1} \| _{L_2} = \sqrt{\sum_I \texttt{src1}(I)^2} }{if \(\texttt{normType} = \texttt{NORM_L2}\) }
181
+ { \| \texttt{src1} - \texttt{src2} \| _{L_2} = \sqrt{\sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2} }{if \(\texttt{normType} = \texttt{NORM_L2}\) }
182
+ { \frac{\|\texttt{src1}-\texttt{src2}\|_{L_2} }{\|\texttt{src2}\|_{L_2}} }{if \(\texttt{normType} = \texttt{NORM_RELATIVE | NORM_L2}\) }
183
+ \f]
184
+ */
157
185
NORM_L2 = 4 ,
186
+ /* *
187
+ \f[
188
+ norm = \forkthree
189
+ { \| \texttt{src1} \| _{L_2} ^{2} = \sum_I \texttt{src1}(I)^2} {if \(\texttt{normType} = \texttt{NORM_L2SQR}\)}
190
+ { \| \texttt{src1} - \texttt{src2} \| _{L_2} ^{2} = \sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2 }{if \(\texttt{normType} = \texttt{NORM_L2SQR}\) }
191
+ { \left(\frac{\|\texttt{src1}-\texttt{src2}\|_{L_2} }{\|\texttt{src2}\|_{L_2}}\right)^2 }{if \(\texttt{normType} = \texttt{NORM_RELATIVE | NORM_L2}\) }
192
+ \f]
193
+ */
158
194
NORM_L2SQR = 5 ,
195
+ /* *
196
+ In the case of one input array, calculates the Hamming distance of the array from zero,
197
+ In the case of two input arrays, calculates the Hamming distance between the arrays.
198
+ */
159
199
NORM_HAMMING = 6 ,
200
+ /* *
201
+ Similar to NORM_HAMMING, but in the calculation, each two bits of the input sequence will
202
+ be added and treated as a single bit to be used in the same calculation as NORM_HAMMING.
203
+ */
160
204
NORM_HAMMING2 = 7 ,
161
- #ifndef CV_DOXYGEN
162
- NORM_TYPE_MASK = 7 ,
163
- #endif
205
+ NORM_TYPE_MASK = 7 , // !< bit-mask which can be used to separate norm type from norm flags
164
206
NORM_RELATIVE = 8 , // !< flag
165
207
NORM_MINMAX = 32 // !< flag
166
208
};
0 commit comments