Skip to content

Commit 8877e3a

Browse files
Adjustmenbts
1 parent fda1e76 commit 8877e3a

File tree

1 file changed

+4
-28
lines changed

1 file changed

+4
-28
lines changed

modules/core/include/opencv2/core.hpp

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -644,20 +644,6 @@ CV_EXPORTS_W void meanStdDev(InputArray src, OutputArray mean, OutputArray stdde
644644
645645
This version of cv::norm calculates the absolute norm of src1. The type of norm to calculate is specified using cv::NormTypes.
646646
647-
If normType is not specified, NORM_L2 is used.
648-
649-
--done edit--
650-
651-
\f[norm = \forkfour{\|\texttt{src1}\|_{L_{\infty}} = \max _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM_INF}\) }
652-
{ \| \texttt{src1} \| _{L_1} = \sum _I | \texttt{src1} (I)|}{if \(\texttt{normType} = \texttt{NORM_L1}\) }
653-
{ \| \texttt{src1} \| _{L_2} = \sqrt{\sum_I \texttt{src1}(I)^2} }{if \(\texttt{normType} = \texttt{NORM_L2}\) }
654-
{ \| \texttt{src1} \| _{L_2} ^{2} = \sum_I \texttt{src1}(I)^2} {if \(\texttt{normType} = \texttt{NORM_L2SQR}\)}\f]
655-
656-
If normType is not specified, NORM_L2 is used.
657-
658-
or an absolute or relative difference norm if src2 is there:
659-
660-
661647
As example for one array consider the function \f$r(x)= \begin{pmatrix} x \\ 1-x \end{pmatrix}, x \in [-1;1]\f$.
662648
The \f$ L_{1}, L_{2} \f$ and \f$ L_{\infty} \f$ norm for the sample value \f$r(-1) = \begin{pmatrix} -1 \\ 2 \end{pmatrix}\f$
663649
is calculated as follows
@@ -676,14 +662,16 @@ The following graphic shows all values for the three norm functions \f$\| r(x) \
676662
It is notable that the \f$ L_{1} \f$ norm forms the upper and the \f$ L_{\infty} \f$ norm forms the lower border for the example function \f$ r(x) \f$.
677663
![Graphs for the different norm functions from the above example](pics/NormTypes_OneArray_1-2-INF.png)
678664
679-
The function cv::norm returns the calculated norm.
680-
681665
When the mask parameter is specified and it is not empty, the norm is
666+
667+
If normType is not specified, NORM_L2 is used.
682668
calculated only over the region specified by the mask.
683669
684670
Multi-channel input arrays are treated as single-channel arrays, that is,
685671
the results for all channels are combined.
686672
673+
Hamming norms can only be calculated with CV_8U depth arrays.
674+
687675
@param src1 first input array.
688676
@param normType type of the norm (see cv::NormTypes).
689677
@param mask optional operation mask; it must have the same size as src1 and CV_8UC1 type.
@@ -696,18 +684,6 @@ This version of cv::norm calculates the absolute difference norm
696684
or the relative difference norm of arrays src1 and src2.
697685
The type of norm to calculate is specified using cv::NormTypes.
698686
699-
\f[norm = \forkfour{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} = \max _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM_INF}\) }
700-
{ \| \texttt{src1} - \texttt{src2} \| _{L_1} = \sum _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if \(\texttt{normType} = \texttt{NORM_L1}\) }
701-
{ \| \texttt{src1} - \texttt{src2} \| _{L_2} = \sqrt{\sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2} }{if \(\texttt{normType} = \texttt{NORM_L2}\) }
702-
{ \| \texttt{src1} - \texttt{src2} \| _{L_2} ^{2} = \sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2 }{if \(\texttt{normType} = \texttt{NORM_L2SQR}\) }
703-
\f]
704-
705-
or
706-
707-
\f[norm = \forkthree{\frac{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} }{\|\texttt{src2}\|_{L_{\infty}} }}{if \(\texttt{normType} = \texttt{NORM_RELATIVE | NORM_INF}\) }
708-
{ \frac{\|\texttt{src1}-\texttt{src2}\|_{L_1} }{\|\texttt{src2}\|_{L_1}} }{if \(\texttt{normType} = \texttt{NORM_RELATIVE | NORM_L1}\) }
709-
{ \frac{\|\texttt{src1}-\texttt{src2}\|_{L_2} }{\|\texttt{src2}\|_{L_2}} }{if \(\texttt{normType} = \texttt{NORM_RELATIVE | NORM_L2}\) }\f]
710-
711687
@param src1 first input array.
712688
@param src2 second input array of the same size and the same type as src1.
713689
@param normType type of the norm (cv::NormTypes).

0 commit comments

Comments
 (0)