|
|
|
@ -519,7 +519,7 @@ The function LUT fills the output array with values from the look-up table. Indi |
|
|
|
|
are taken from the input array. That is, the function processes each element of src as follows: |
|
|
|
|
\f[\texttt{dst} (I) \leftarrow \texttt{lut(src(I) + d)}\f] |
|
|
|
|
where |
|
|
|
|
\f[d = \fork{0}{if \texttt{src} has depth \texttt{CV\_8U}}{128}{if \texttt{src} has depth \texttt{CV\_8S}}\f] |
|
|
|
|
\f[d = \fork{0}{if \(\texttt{src}\) has depth \(\texttt{CV_8U}\)}{128}{if \(\texttt{src}\) has depth \(\texttt{CV_8S}\)}\f] |
|
|
|
|
@param src input array of 8-bit elements. |
|
|
|
|
@param lut look-up table of 256 elements; in case of multi-channel input array, the table should |
|
|
|
|
either have a single channel (in this case the same table is used for all channels) or the same |
|
|
|
@ -617,21 +617,21 @@ relative difference norm. |
|
|
|
|
The functions norm calculate an absolute norm of src1 (when there is no |
|
|
|
|
src2 ): |
|
|
|
|
|
|
|
|
|
\f[norm = \forkthree{\|\texttt{src1}\|_{L_{\infty}} = \max _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM\_INF}\) } |
|
|
|
|
{ \| \texttt{src1} \| _{L_1} = \sum _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM\_L1}\) } |
|
|
|
|
{ \| \texttt{src1} \| _{L_2} = \sqrt{\sum_I \texttt{src1}(I)^2} }{if \(\texttt{normType} = \texttt{NORM\_L2}\) }\f] |
|
|
|
|
\f[norm = \forkthree{\|\texttt{src1}\|_{L_{\infty}} = \max _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM_INF}\) } |
|
|
|
|
{ \| \texttt{src1} \| _{L_1} = \sum _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM_L1}\) } |
|
|
|
|
{ \| \texttt{src1} \| _{L_2} = \sqrt{\sum_I \texttt{src1}(I)^2} }{if \(\texttt{normType} = \texttt{NORM_L2}\) }\f] |
|
|
|
|
|
|
|
|
|
or an absolute or relative difference norm if src2 is there: |
|
|
|
|
|
|
|
|
|
\f[norm = \forkthree{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} = \max _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM\_INF}\) } |
|
|
|
|
{ \| \texttt{src1} - \texttt{src2} \| _{L_1} = \sum _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM\_L1}\) } |
|
|
|
|
{ \| \texttt{src1} - \texttt{src2} \| _{L_2} = \sqrt{\sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2} }{if \(\texttt{normType} = \texttt{NORM\_L2}\) }\f] |
|
|
|
|
\f[norm = \forkthree{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} = \max _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM_INF}\) } |
|
|
|
|
{ \| \texttt{src1} - \texttt{src2} \| _{L_1} = \sum _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM_L1}\) } |
|
|
|
|
{ \| \texttt{src1} - \texttt{src2} \| _{L_2} = \sqrt{\sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2} }{if \(\texttt{normType} = \texttt{NORM_L2}\) }\f] |
|
|
|
|
|
|
|
|
|
or |
|
|
|
|
|
|
|
|
|
\f[norm = \forkthree{\frac{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} }{\|\texttt{src2}\|_{L_{\infty}} }}{if \(\texttt{normType} = \texttt{NORM\_RELATIVE\_INF}\) } |
|
|
|
|
{ \frac{\|\texttt{src1}-\texttt{src2}\|_{L_1} }{\|\texttt{src2}\|_{L_1}} }{if \(\texttt{normType} = \texttt{NORM\_RELATIVE\_L1}\) } |
|
|
|
|
{ \frac{\|\texttt{src1}-\texttt{src2}\|_{L_2} }{\|\texttt{src2}\|_{L_2}} }{if \(\texttt{normType} = \texttt{NORM\_RELATIVE\_L2}\) }\f] |
|
|
|
|
\f[norm = \forkthree{\frac{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} }{\|\texttt{src2}\|_{L_{\infty}} }}{if \(\texttt{normType} = \texttt{NORM_RELATIVE_INF}\) } |
|
|
|
|
{ \frac{\|\texttt{src1}-\texttt{src2}\|_{L_1} }{\|\texttt{src2}\|_{L_1}} }{if \(\texttt{normType} = \texttt{NORM_RELATIVE_L1}\) } |
|
|
|
|
{ \frac{\|\texttt{src1}-\texttt{src2}\|_{L_2} }{\|\texttt{src2}\|_{L_2}} }{if \(\texttt{normType} = \texttt{NORM_RELATIVE_L2}\) }\f] |
|
|
|
|
|
|
|
|
|
The functions norm return the calculated norm. |
|
|
|
|
|
|
|
|
@ -1345,7 +1345,7 @@ CV_EXPORTS_W void sqrt(InputArray src, OutputArray dst); |
|
|
|
|
/** @brief Raises every array element to a power.
|
|
|
|
|
|
|
|
|
|
The function pow raises every element of the input array to power : |
|
|
|
|
\f[\texttt{dst} (I) = \fork{\texttt{src}(I)^power}{if \texttt{power} is integer}{|\texttt{src}(I)|^power}{otherwise}\f] |
|
|
|
|
\f[\texttt{dst} (I) = \fork{\texttt{src}(I)^{power}}{if \(\texttt{power}\) is integer}{|\texttt{src}(I)|^{power}}{otherwise}\f] |
|
|
|
|
|
|
|
|
|
So, for a non-integer power exponent, the absolute values of input array |
|
|
|
|
elements are used. However, it is possible to get true values for |
|
|
|
|