]> rtime.felk.cvut.cz Git - opencv.git/commitdiff
Document class CvHistogram. Prototype for cvGetHistValue_
authorjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 24 Mar 2010 18:51:43 +0000 (18:51 +0000)
committerjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 24 Mar 2010 18:51:43 +0000 (18:51 +0000)
git-svn-id: https://code.ros.org/svn/opencv/trunk@2898 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08

opencv/doc/cv_histograms.tex

index b5bae9c41316ac9711f996f0173b62cad4750095..27eb0da4943fe6fdd3e8ce8cea2fcab7b740bd31 100644 (file)
@@ -2,10 +2,10 @@
 
 \ifCPy
 
-\ifC
-\cvfunc{CvHistogram}\label{CvHistogram}
+\cvclass{CvHistogram}\label{CvHistogram}
 Multi-dimensional histogram.
 
+\ifC
 \begin{lstlisting}
 typedef struct CvHistogram
 {
@@ -19,6 +19,10 @@ CvHistogram;
 \end{lstlisting}
 \fi
 
+\ifPy
+A CvHistogram is a multi-dimensional histogram, created by function \cross{CreateHist}.  It has an attribute \texttt{bins} a \cross{CvMatND} containing the histogram counts.
+\fi
+
 \cvCPyFunc{CalcBackProject}
 Calculates the back projection.
 
@@ -311,6 +315,18 @@ bin ranges, they assume thy are equally spaced in 0 to 255 bins.
 \cvCPyFunc{GetHistValue*D}
 Returns a pointer to the histogram bin.
 
+\cvdefC{float cvGetHistValue_1D(hist, idx0) \newline
+float cvGetHistValue_2D(hist, idx0, idx1) \newline
+float cvGetHistValue_3D(hist, idx0, idx1, idx2) \newline
+float cvGetHistValue_nD(hist, idx) \newline
+}
+
+\begin{description}
+\cvarg{hist}{Histogram}
+\cvarg{idx0, idx1, idx2, idx3}{Indices of the bin}
+\cvarg{idx}{Array of indices}
+\end{description}
+
 \begin{lstlisting}
 #define cvGetHistValue_1D( hist, idx0 ) 
     ((float*)(cvPtr1D( (hist)->bins, (idx0), 0 ))
@@ -322,12 +338,6 @@ Returns a pointer to the histogram bin.
     ((float*)(cvPtrND( (hist)->bins, (idx), 0 )))
 \end{lstlisting}
 
-\begin{description}
-\cvarg{hist}{Histogram}
-\cvarg{idx0, idx1, idx2, idx3}{Indices of the bin}
-\cvarg{idx}{Array of indices}
-\end{description}
-
 The macros \texttt{GetHistValue} return a pointer to the specified bin of the 1D, 2D, 3D or N-D histogram. In the case of a sparse histogram the function creates a new bin and sets it to 0, unless it exists already.
 \fi % }