8.4.2.12. data_structures
(packages/opencv/data_structures.lsh)


dummy function that adds OpenCV C header files in C file

8.4.2.12.0. (cvCreateImageHeader size depth channels)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateImageHeader
 //    Purpose: allocates IplImage structure, initializes and returns it
 //    Context:
 //    Parameters:
 //      size - image size(width and height)
 //      depth- image depth
 //      channels - number of channels.
 //    Returns:
 //      created image header
 //    Notes:
 //      this call is short form of
 //         iplCreateImageHeader( channels, 0, depth, channels == 1 ? "GRAY" :
 //                               channels == 3 || channels == 4 ? "RGB" : "",
 //                               channels == 1 ? "GRAY" : channels == 3 ? "BGR" :
 //                               channels == 4 ? "BGRA" : "",
 //                               IPL_DATA_ORDER_PIXEL, IPL_ORIGIN_TL, 4,
 //                               size.width, size.height,
 //                               0,0,0,0);
 //F*/
 OPENCVAPI  IplImage*  cvCreateImageHeader( CvSize size, int depth, int channels );


8.4.2.12.1. (cvInitImageHeader image size depth channels origin align clear)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvInitImageHeader
 //    Purpose: initializes image header structure without memory allocation
 //    Context:
 //    Parameters:
 //      image - image header. User allocates it manually(e.g. on the stack)
 //      size  - width and height of the image
 //      depth - image depth
 //      channels - number of channels
 //      origin - IPL_ORIGIN_TL or IPL_ORIGIN_BL.
 //      align - alignment for raster lines
 //    Returns:
 //      initialized header
 //F*/
 OPENCVAPI IplImage* cvInitImageHeader( IplImage* image, CvSize size, int depth,
                                        int channels, int origin CV_DEFAULT(0),
                                        int align CV_DEFAULT(4));


8.4.2.12.2. (cvCreateImage size depth channels)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateImage
 //    Purpose: creates image header and allocates data
 //    Context:
 //    Parameters:
 //      size - image size(width and height)
 //      depth- image depth
 //      channels - number of channels.
 //    Returns:
 //      created image
 //    Notes:
 //      this call is short form of
 //         header = cvCreateImageHeader(size,depth,channels);
 //         cvCreateData(header);
 //F*/
 OPENCVAPI  IplImage*  cvCreateImage( CvSize size, int depth, int channels );


8.4.2.12.3. (cvReleaseImageHeader im)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvReleaseImageHeader
 //    Purpose: releases header
 //    Context:
 //    Parameters:
 //        image - released image header
 //    Returns:
 //      this call is short form of
 //         if( image )
 //         {
 //              iplDeallocate( *image, IPL_IMAGE_HEADER | IPL_IMAGE_ROI );
 //              *image = 0;
 //         }
 //F*/
 OPENCVAPI  void  cvReleaseImageHeader( IplImage** image );


8.4.2.12.4. (cvReleaseImage im)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvReleaseImage
 //    Purpose: releases header and image data
 //    Context:
 //    Parameters:
 //      image - released image
 //    Returns:
 //      this call is short form of
 //         if( image && *image )
 //         {
 //              iplDeallocate( *image, IPL_IMAGE_ALL );
 //              *image = 0;
 //         }
 //F*/
 OPENCVAPI  void  cvReleaseImage( IplImage** image );


8.4.2.12.5. (cvCloneImage im)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCloneImage
 //    Purpose: creates a whole copy of the image
 //    Context:
 //    Parameters:
 //      image - source image
 //    Returns:
 //    Notes:
 //F*/
 OPENCVAPI IplImage* cvCloneImage( const IplImage* image );


8.4.2.12.6. (cvSetImageCOI im coi)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSetImageCOI
 //    Purpose: set channel of interest to given value.
 //    Context:
 //    Parameters:
 //      image - image header
 //      coi   - channel of interest
 //    Returns:
 //    Notes:
 //      If roi is NULL and coi != 0, roi is allocated.
 //F*/
 OPENCVAPI  void  cvSetImageCOI( IplImage* image, int coi );


8.4.2.12.7. (cvGetImageCOI im)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetImageCOI
 //    Purpose: retrieves channel of interest
 //    Context:
 //    Parameters:
 //      image - image header
 //    Returns:
 //      COI
 //F*/
 OPENCVAPI  int  cvGetImageCOI( IplImage* image );


8.4.2.12.8. (cvSetImageROI im rect)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSetImageROI
 //    Purpose: set image ROI to given rectangle
 //    Context:
 //    Parameters:
 //      image - image header
 //      rect  - ROI rectangle
 //    Returns:
 //    Notes:
 //       If roi is NULL and rect is not equal to a whole image, roi is allocated.
 //F*/
 OPENCVAPI  void  cvSetImageROI( IplImage* image, CvRect rect );


8.4.2.12.9. (cvResetImageROI im)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvResetImageROI
 //    Purpose: deletes image ROI
 //    Context:
 //    Parameters:
 //      image - image header
 //    Returns:
 //    Notes:
 //F*/
 OPENCVAPI  void  cvResetImageROI( IplImage* image );


8.4.2.12.10. (cvGetImageROI im rect)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetImageROI
 //    Purpose: return region of interest (ROI) for given image or
 //             (0,0,image->width,image->height) if ROI is not set
 //    Context:
 //    Parameters:
 //      image - image header
 //    Returns:
 //    Notes:
 //F*/
 OPENCVAPI  CvRect cvGetImageROI( const IplImage* image );


8.4.2.12.11. (cvCreateMatHeader rows cols type)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateMatHeader
 //    Purpose: allocates CvMat structure, initializes and returns it
 //    Context:
 //    Parameters:
 //      rows - number of matrix rows
 //      cols - number of matrix columns
 //      type - matrix type
 //      step - matrix step (or stride) - an optional parameter.
 //    Returns:
 //      created matrix header
 //F*/
 OPENCVAPI  CvMat*  cvCreateMatHeader( int rows, int cols, int type );


8.4.2.12.12. (cvInitMatHeader mat rows cols type data step)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvInitMatHeader
 //    Purpose: initializes matrix header structure without memory allocation
 //    Context:
 //    Parameters:
 //      mat   - matrix header. User allocates it manually(e.g. on the stack)
 //      rows  - number of matrix rows
 //      cols  - number of matrix columns
 //      type  - matrix type
 //      step  - matrix step (optional)
 //    Returns:
 //      initalized matrix header
 //F*/
 OPENCVAPI CvMat* cvInitMatHeader( CvMat* mat, int rows, int cols,
                                   int type, void* data CV_DEFAULT(0),
                                   int step CV_DEFAULT(CV_AUTOSTEP) );


8.4.2.12.13. (cvCreateMat rows cols type)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateMat
 //    Purpose: creates matrix header and allocates data
 //    Context:
 //    Parameters:
 //      rows  - number of matrix rows
 //      cols  - number of matrix columns
 //      type  - matrix type
 //      step  - matrix step (optional)
 //    Returns:
 //      created matrix
 //F*/
 OPENCVAPI  CvMat*  cvCreateMat( int rows, int cols, int type );


8.4.2.12.14. (cvReleaseMatHeader mat)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvReleaseMatHeader
 //    Purpose: releases matrix header
 //    Context:
 //    Parameters:
 //        mat - released matrix header
 //    Returns:
 //      nothing
 //F*/
 OPENCVAPI  void  cvReleaseMatHeader( CvMat** mat );


8.4.2.12.15. (cvReleaseMat mat)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvReleaseMat
 //    Purpose: releases matrix header and underlying data
 //    Context:
 //    Parameters:
 //      matrix - released matrix
 //    Returns:
 //      nothing
 //    Notes:
 //F*/
 OPENCVAPI  void  cvReleaseMat( CvMat** mat );


8.4.2.12.16. (cvCloneMat mat)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCloneMat
 //    Purpose: creates a whole copy of the matrix
 //    Context:
 //    Parameters:
 //      mat - the cloned matrix
 //    Returns:
 //F*/
 OPENCVAPI CvMat* cvCloneMat( const CvMat* mat );


8.4.2.12.17. (cvGetSubArr arr submat rect)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetSubArr
 //    Purpose: returns sub-matrix w.o copying data
 //    Context:
 //    Parameters:
 //      arr - the original matrix (or IplImage)
 //      submat - pointer to sub-matrix stucture
 //      rect - extracted rectange
 //    Returns:
 //      filled header of submatrix (i.e., &submat)
 //F*/
 OPENCVAPI CvMat* cvGetSubArr( const CvArr* arr, CvMat* submat, CvRect rect );


8.4.2.12.18. (cvGetRow arr submat row)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetRow
 //    Purpose: The function is analogous to the previous, but returns a single row
 //    Context:
 //    Parameters:
 //      arr - an original matrix (or IplImage)
 //      submat - pointer to sub-matrix stucture
 //      row - index of the row
 //    Returns:
 //      filled header of sub-matrix (i.e., &submat)
 //F*/
 OPENCVAPI CvMat* cvGetRow( const CvArr* arr, CvMat* submat, int row );


8.4.2.12.19. (cvGetCol arr submat column)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetCol
 //    Purpose: The function is analogous to the previous, but returns a single column
 //    Context:
 //    Parameters:
 //      arr - an original matrix (or IplImage)
 //      submat - pointer to sub-matrix stucture
 //      column - index of the column
 //    Returns:
 //      filled header of sub-matrix (i.e., &submat)
 //F*/
 OPENCVAPI CvMat* cvGetCol( const CvArr* arr, CvMat* submat, int column );


8.4.2.12.20. (cvGetDiag arr submat diag)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetCol
 //    Purpose: The function is analogous to the previous, but returns a single diagonal
 //    Context:
 //    Parameters:
 //      arr - an original matrix (or IplImage)
 //      submat - pointer to sub-matrix stucture
 //      diag - index of the diagonal ( 0 corresponds to the main diagonal,
 //                positive number - to some upper diagonal, negative number - to
 //                some lower diagonal ), as shown below:
 //             0  1  2  3  4
 //            -1  0  1  2  3
 //            -2 -1  0  1  2
 //            -3 -2 -1  0  1
 //            -4 -3 -2 -1  0
 //            -5 -4 -3 -2 -1
 //
 //    Returns:
 //      filled header of sub-matrix (i.e., &submat)
 //F*/
 CVAPI CvMat* cvGetDiag( const CvArr* arr, CvMat* submat, int diag CV_DEFAULT(0));


8.4.2.12.21. (cvReshape array header new_cn new_rows)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvReshape
 //    Purpose: reshapes the matrix
 //    Context:
 //    Parameters:
 //      array  - image or matrix
 //      header - the output matrix header (may be the same as input)
 //      new_cn - the new channel number. The original array width multiplied by the
 //               original number of channels should be divisible
 //               by the new number of channels.
 //      new_rows - the new number of rows in the matrix. 0 means do not change it if
 //               it is not neccessary. Number of rows can be changed only if the matrix
 //               continuous.
 //    Returns:
 //    Notes:
 //      All the output parameters are optional
 //F*/
 CVAPI CvMat* cvReshape( const CvArr* array, CvMat* header,
                             int new_cn, int new_rows CV_DEFAULT(0));


8.4.2.12.22. (cvCreateData array)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateData
 //    Purpose: allocates image or matrix data
 //    Context:
 //    Parameters:
 //        array - image or matrix header
 //F*/
 OPENCVAPI  void  cvCreateData( CvArr* array );


8.4.2.12.23. (cvReleaseData array)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvReleaseData
 //    Purpose: releases image data
 //    Context:
 //    Parameters:
 //      array - image or matrix header
 //F*/
 OPENCVAPI  void  cvReleaseData( CvArr* array );


8.4.2.12.24. (cvSetData array data step)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSetData
 //    Purpose: sets pointer to data and step parameter to given values
 //    Context:
 //    Parameters:
 //      array - image or matrix header
 //      data  - user data
 //      step  - full width or data (distance between successive rows)
 //    Returns:
 //F*/
 OPENCVAPI  void  cvSetData( CvArr* array, void* data, int step );


8.4.2.12.25. (cvGetRawData array data step roi_size)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetRawData
 //    Purpose: fills output variables with image parameters
 //    Context:
 //    Parameters:
 //      array - image or matrix
 //      data  - pointer to top-left corner of ROI
 //      step  - is set to <widthStep> field in case of IplImage or
 //              to <step> field in case of CvMat
 //      roi_size - width and height of ROI
 //    Returns:
 //    Notes:
 //      All the output parameters are optional
 //F*/
 OPENCVAPI void cvGetRawData( const CvArr* array, uchar** data,
                              int* step, CvSize* roi_size );


8.4.2.12.26. (cvGetSize arr size)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetSize
 //    Purpose: returns size of matrix or image ROI.
 //             in case of matrix size.width == number_of_columns,
 //                               size.height == number_of_rows.
 //    Context:
 //    Parameters:
 //      arr - image or matrix
 //    Returns:
 //    Notes:
 //F*/
 OPENCVAPI  CvSize cvGetSize( const CvArr* arr );


8.4.2.12.27. (cvCopy src dst mask)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCopy
 //    Purpose: copies image ROI or matrix
 //    Context:
 //    Parameters:
 //      src - source array
 //      dst - destination array
 //      mask - optional mask
 //F*/
 OPENCVAPI  void  cvCopy( const CvArr* src, CvArr* dst,
                          const CvArr* mask CV_DEFAULT(0) );


8.4.2.12.28. (cvSet arr scalar mask)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSet
 //    Purpose: sets image ROI or matrix to given value
 //    Context:
 //    Parameters:
 //      arr - array
 //      scalar - value to set to
 //      mask - optional mask
 //F*/
 OPENCVAPI  void  cvSet( CvArr* arr, CvScalar scalar,
                         const CvArr* mask CV_DEFAULT(0) );


8.4.2.12.29. (cvLUT srcarr dstarr lutarr)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvLUT
 //    Purpose: Performs lookup-table transform: dst(x,y) = lut[src(x,y)]
 //    Parameters:
 //      srcarr - the source array: 8u or 8s type
 //      dstarr - the destination array of arbitrary type,
 //      lutarr - the LUT array. The same type as the destination array,
 //               contains 256 entries.
 //    Note:
 //      if the source array has 8s type, the modified formula is used:
 //      dst(x,y) = lut[src(x,y) + 128]
 //F*/
 OPENCVAPI  void cvLUT( const CvArr* srcarr, CvArr* dstarr, const CvArr* lutarr );


8.4.2.12.30. (cvCreateSeq seqflags hsize esize stor)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateSeq
 //    Purpose: creates sequence, located on the storage
 //    Context:
 //    Parameters:
 //         seq_flags - flags of created sequence
 //         header_size - size of sequence header. Must be non-less than sizeof(CvSeq)
 //         elem_size - size of sequence elements
 //         storage - memory storage
 //    Returns:
 //      created sequence
 //    Notes:
 //F*/
 OPENCVAPI  CvSeq*  cvCreateSeq( int seq_flags, int header_size,
                              int elem_size, CvMemStorage* storage );


8.4.2.12.31. (cvSetSeqBlockSize seq deltaelements)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSetSeqBlockSize
 //    Purpose: adjusts granularity of memory allocation for sequence
 //    Context:
 //    Parameters:
 //         seq - sequence pointer
 //         delta_elements - how many elements to allocate when there is no free space
 //                          in the sequence.
 //    Returns:
 //    Notes:
 //      If this function is not called after sequence is created,
 //      delta_elements is set to ~1K/elem_size
 //F*/
 OPENCVAPI  void  cvSetSeqBlockSize( CvSeq* seq, int delta_elements );


8.4.2.12.32. (cvSeqPush seq element)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqPush
 //    Purpose: adds element in the end of sequence
 //    Context:
 //    Parameters:
 //         seq - sequence pointer
 //         element - added element
 //    Returns:
 //F*/
 OPENCVAPI  char*  cvSeqPush( CvSeq* seq, void* element CV_DEFAULT(0));


8.4.2.12.33. (cvSeqPushFront seq element)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqPushFront
 //    Purpose: adds element in the beginning of sequence
 //    Context:
 //    Parameters:
 //         seq     - sequence pointer
 //         element - added element
 //    Returns:
 //F*/
 OPENCVAPI  char*  cvSeqPushFront( CvSeq* seq, void* element CV_DEFAULT(0));


8.4.2.12.34. (cvSeqPop seq element)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqPop
 //    Purpose: removes element from the end of sequence
 //    Context:
 //    Parameters:
 //         seq     - sequence pointer
 //         element - optional parameter. If pointer is not NULL,
 //                   removed element is copied there.
 //    Returns:
 //F*/
 OPENCVAPI  void  cvSeqPop( CvSeq* seq, void* element );


8.4.2.12.35. (cvSeqPopFront seq element)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqPopFront
 //    Purpose: removes element from the beginning of sequence
 //    Context:
 //    Parameters:
 //         seq     - sequence pointer
 //         element - optional parameter. If pointer is not NULL,
 //                   removed element is copied there.
 //    Returns:
 //F*/
 OPENCVAPI  void  cvSeqPopFront( CvSeq* seq, void* element );


8.4.2.12.36. (cvSeqPushMulti seq elements count in-front)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqPushMulti
 //    Purpose: adds several elements in the end of sequence
 //    Context:
 //    Parameters:
 //         seq      - sequence pointer
 //         count    - number of added elements
 //         elements - array of added elements.
 //         in_front - 1 if push in front
 //    Returns:
 //F*/
 CVAPI  void  cvSeqPushMulti(CvSeq* seq, void* elements, int count, int in_front);


8.4.2.12.37. (cvSeqPopMulti seq elements count in-fron)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqPopMulti
 //    Purpose: removes several elements from the end of sequence
 //    Context:
 //    Parameters:
 //         seq      - sequence pointer
 //         count    - number of removed elements
 //         elements - optional parameter. If not NULL, removed elements are copied there
 //         in_front - 1 if pop in front
 //    Returns:
 //F*/
 OPENCVAPI  void  cvSeqPopMulti( CvSeq* seq, void* elements, int count, int in_front);


8.4.2.12.38. (cvSeqInsert seq bindex element)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqInsert
 //    Purpose: inserts element in the middle of the sequence
 //    Context:
 //    Parameters:
 //         sequence     - sequence pointer
 //         before_index - index of element, before which the element is inserted
 //         element      - inserted element
 //    Returns:
 //F*/
 OPENCVAPI  char*  cvSeqInsert( CvSeq* seq, int before_index,
                                void* element CV_DEFAULT(0));


8.4.2.12.39. (cvSeqRemove seq index)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqRemove
 //    Purpose: removes element from the middle of the sequence
 //    Context:
 //    Parameters:
 //         seq      - sequence pointer
 //         index    - index of removed element
 //    Returns:
 //F*/
 OPENCVAPI  void  cvSeqRemove( CvSeq* seq, int index );


8.4.2.12.40. (cvClearSeq seq )
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvClearSeq
 //    Purpose: clears sequence(removes all sequence elements)
 //    Context:
 //    Parameters:
 //         seq - sequence pointer
 //    Returns:
 //F*/
 OPENCVAPI  void  cvClearSeq( CvSeq* seq );


8.4.2.12.41. (cvGetSeqElem seq index)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetSeqElem
 //    Purpose: finds sequence element by its index
 //    Context:
 //    Parameters:
 //         seq - sequence pointer
 //         index - element index
 //    Returns:
 //         pointer to found element or NULL.
 //    Notes:
 //         index == -1 means last sequence element, -2 - prelast element etc.
 //F*/
 OPENCVAPI  char*  cvGetSeqElem( CvSeq* seq, int index, CvSeqBlock** block CV_DEFAULT(0) );


8.4.2.12.42. (cvSeqElemIdx seq element block)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSeqElemIdx
 //    Purpose: calculates element index from its address
 //    Context:
 //    Parameters:
 //         seq - sequence pointer
 //         element - sequence element
 //         block - optional output parameter. Sequence block, containing found element.
 //    Returns:
 //         index of sequence element
 //F*/
 OPENCVAPI int  cvSeqElemIdx( CvSeq* seq, void* element, CvSeqBlock** block CV_DEFAULT(0) );


8.4.2.12.43. (cvStartAppendToSeq seq writer)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvStartAppendToSeq
 //    Purpose: initializes writer state for further writing to sequence
 //    Context:
 //    Parameters:
 //         seq - sequence pointer
 //         writer - pointer to initialized writer state
 //    Returns:
 //F*/
 OPENCVAPI  void  cvStartAppendToSeq( CvSeq* seq, CvSeqWriter* writer );


8.4.2.12.44. (cvStartWriteSeq seqflags hsize esize stor writer)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvStartWriteSeq
 //    Purpose: creates new sequence and initializes writer for it
 //    Context:
 //    Parameters:
 //         seq_flags - flags of created sequence
 //         header_size - size of sequence header. Must be non-less than sizeof(CvSeq)
 //         elem_size - size of sequence elements
 //         storage - memory storage, where the sequence will be located
 //         writer - pointer to initialized writer state
 //    Returns:
 //F*/
 OPENCVAPI  void  cvStartWriteSeq( int seq_flags, int header_size,
                                int elem_size, CvMemStorage* storage,
                                CvSeqWriter* writer );


8.4.2.12.45. (cvEndWriteSeq writer)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvEndWriteSeq
 //    Purpose: ends writing process and closes writer
 //    Context:
 //    Parameters:
 //         writer - writer state
 //    Returns:
 //         written sequence
 //F*/
 OPENCVAPI  CvSeq*  cvEndWriteSeq( CvSeqWriter* writer );


8.4.2.12.46. (cvFlushSeqWriter writer)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvFlushSeqWriter
 //    Purpose: updates sequence headers, but don't close writer
 //    Context:
 //    Parameters:
 //         writer - writer state
 //    Returns:
 //F*/
 OPENCVAPI  void   cvFlushSeqWriter( CvSeqWriter* writer );


8.4.2.12.47. (cvStartReadSeq seq reader reverse)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvStartReadSeq
 //    Purpose: initializes sequence reader
 //    Context:
 //    Parameters:
 //         seq - sequence pointer
 //         reader - pointer to initialized reader state
 //         reverse - if not 0, function moves read position to the end of sequence
 //    Returns:
 //F*/
 OPENCVAPI void cvStartReadSeq( CvSeq* seq, CvSeqReader* reader, int reverse CV_DEFAULT(0) );


8.4.2.12.48. (cvGetSeqReaderPos reader)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetSeqReaderPos
 //    Purpose: returns read position
 //    Context:
 //    Parameters:
 //         reader - reader state
 //    Returns:
 //         read position
 //F*/
 OPENCVAPI  int    cvGetSeqReaderPos( CvSeqReader* reader );


8.4.2.12.49. (cvSetSeqReaderPos reader index isrelative)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSetSeqReaderPos
 //    Purpose: moves read position
 //    Context:
 //    Parameters:
 //         index  - new read position
 //         is_relative - if not 0, index is offset from current position
 //                      (else it is absolute position). Position is changed cyclically
 //         reader - reader state
 //    Returns:
 //F*/
 OPENCVAPI  void   cvSetSeqReaderPos( CvSeqReader* reader, int index,
                                   int is_relative CV_DEFAULT(0));


8.4.2.12.50. (cvCvtSeqToArray seq array slice)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCvtSeqToArray
 //    Purpose: copies sequence to array
 //    Context:
 //    Parameters:
 //         seq - source sequence
 //         array - destination array. Must have capacity at least
 //                 seq->total*seq->elem_siz bytes
 //    Returns:
 //         pointer to array.
 //F*/
 OPENCVAPI  void*  cvCvtSeqToArray( CvSeq* seq, CvArr* array,
                                    CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ) );


8.4.2.12.51. (cvMakeSeqHeaderForArray seqtype hsize esize array total seq block)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvMakeSeqHeaderForArray
 //    Purpose: wraps array with sequence(without copying data)
 //    Context:
 //    Parameters:
 //         seq_flags - flags of sequence
 //         header_size - size of sequence header. Must be non-less than sizeof(CvSeq)
 //         elem_size - size of sequence elements
 //         array - source array.
 //         total - total number of elements in array
 //         seq   - pointer to local structure CvSeq
 //         block - pointer to local structure CvSeqBlock
 //    Returns:
 //F*/
 OPENCVAPI  void  cvMakeSeqHeaderForArray( int seq_type, int header_size,
                                           int elem_size, CvArr* array, int total,
                                           CvSeq* seq, CvSeqBlock* block );


8.4.2.12.52. (cvCreateSet setflags hsize esize stor)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateSet
 //    Purpose: creates new set
 //    Context:
 //    Parameters:
 //         set_flags - flags of set
 //         header_size - size of set header. Must be non-less than sizeof(CvSet)
 //         elem_size - size of set elements.
 //                     Must be non-less than 8 bytes, divisible by 4.
 //                     Least significant bit of first 4-byte field of set elements must
 //                     be zero.
 //         storage   - memory storage, where the set will be located
 //    Returns:
 //         created set
 //F*/
 OPENCVAPI  CvSet*   cvCreateSet( int set_flags, int header_size,
                               int elem_size, CvMemStorage* storage );


8.4.2.12.53. (cvSetAdd setstruct element insertedelement)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSetAdd
 //    Purpose: adds new element to the set
 //    Context:
 //    Parameters:
 //         set - set
 //         element - optional input parameter. If non NULL, it is copied to inserted
 //                   element(starting from second 4-byte field)
 //         inserted_element - optional output parameter. If non NULL, address of inserted
 //                   element is stored there
 //    Returns:
 //         index of added element
 //F*/
 OPENCVAPI  int   cvSetAdd( CvSet* set_struct, CvSetElem* element CV_DEFAULT(0),
                            CvSetElem** inserted_element CV_DEFAULT(0) );


8.4.2.12.54. (cvSetRemove setstruct index)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvSetRemove
 //    Purpose: removes element from the set
 //    Context:
 //    Parameters:
 //         set - set
 //         index - index of removed element
 //    Returns:
 //F*/
 OPENCVAPI  void   cvSetRemove( CvSet* set_struct, int index );


8.4.2.12.55. (cvGetSetElem setstruct index)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGetSetElem
 //    Purpose: finds set element by its index
 //    Context:
 //    Parameters:
 //         set - set
 //         index - element index
 //    Returns:
 //         pointer to element or 0 if index is out of range or element at this index
 //         isn't in the set
 //F*/
 OPENCVAPI  CvSetElem*  cvGetSetElem( CvSet* set_struct, int index );


8.4.2.12.56. (cvClearSet setstruct)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvClearSet
 //    Purpose: clear set(removes all elements from the set)
 //    Context:
 //    Parameters:
 //         set - set
 //    Returns:
 //F*/
 OPENCVAPI  void   cvClearSet( CvSet* set_struct );


8.4.2.12.57. (cvCreateGraph graphflags hsize vtxsize esize stor)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvCreateGraph
 //    Purpose: creates graph
 //    Context:
 //    Parameters:
 //         graph_flags - flags of created graph. CV_SEQ_KIND_GRAPH must be set,
 //                       CV_GRAPH_FLAG_ORIENTED(if set) means oriented graph.
 //         header_size - size of graph header. Must be non-less than sizeof(CvGraph)
 //         vtx_size - size of graph vertices. Must be GREATER than sizeof(CvGraphVtx).
 //                   (for example, sizeof(CvGraphVtx2D) can be used
 //                     for simple graphs on the plane)
 //         edge_size - size of graph edges. Must be non-less than sizeof(CvGraphEdge)
 //         storage   - memory storage, where the graph will be located
 //    Returns:
 //         created graph
 //F*/
 OPENCVAPI  CvGraph*   cvCreateGraph( int graph_flags, int header_size,
                                   int vtx_size, int edge_size,
                                   CvMemStorage* storage );


8.4.2.12.58. (cvGraphAddVtx graph vertex insertedvertex)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGraphAddVtx
 //    Purpose: adds vertex to graph
 //    Context:
 //    Parameters:
 //         graph - graph
 //         vertex - optional input parameter. If pointer to vertex is not NULL,
 //                  it is copied to inserted vertex
 //                 (first sizeof(CvGraphVtx) bytes aren't copied)
 //         inserted_vertex - optional output parameter. If not NULL, pointer to inserted
 //                  vertex is stored there
 //    Returns:
 //         index of inserted vertex
 //F*/
 OPENCVAPI  int   cvGraphAddVtx( CvGraph* graph, CvGraphVtx* vertex CV_DEFAULT(0),
                                 CvGraphVtx** inserted_vertex CV_DEFAULT(0) );


8.4.2.12.59. (cvGraphRemoveVtx graph index)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGraphRemoveVtx, cvGraphRemoveVtxByPtr
 //    Purpose: removes vertex from the graph
 //    Context:
 //    Parameters:
 //         graph - graph
 //         index - index of removed vertex
 //         vtx - pointer to removed vertex
 //    Returns:
 //    Notes:
 //      Vertex is removed with all the incident edges
 //F*/
 OPENCVAPI  void   cvGraphRemoveVtx( CvGraph* graph, int index );
 OPENCVAPI  void   cvGraphRemoveVtxByPtr( CvGraph* graph, CvGraphVtx* vtx );


8.4.2.12.60. (cvGraphAddEdge graph sidx eidx edge insertededge)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGraphAddEdge, cvGraphAddEdgeByPtr
 //    Purpose: add edge to graph
 //    Context:
 //    Parameters:
 //         graph - graph
 //         start_idx, end_idx - indices of starting and ending vertices
 //         start_vtx, end_vtx - pointers to starting and ending vertices
 //         edge - optional input parameter. If not NULL, the edge is copied to
 //                inserted edge(first sizeof(CvGraphEdge) bytes aren't copied
 //         inserted_edge - optional output parameter. Points to inserted edge.
 //    Returns:
 //    ... 1 if the edge is inserted, 0 if the vertices were connected already,
 //    -1 if a critical error occured (normally, an error message box appears in this case)
 //    Notes:
 //       starting vertex must differ from ending one.
 //F*/
 OPENCVAPI  int  cvGraphAddEdge( CvGraph* graph,
                                 int start_idx, int end_idx,
                                 CvGraphEdge* edge CV_DEFAULT(0),
                                 CvGraphEdge** inserted_edge CV_DEFAULT(0) );


8.4.2.12.61. (cvGraphRemoveEdge graph sidx eidx)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGraphRemoveEdge, cvGraphRemoveEdgeByPtr
 //    Purpose: removes edge to graph
 //    Context:
 //    Parameters:
 //         graph - graph
 //         start_idx, end_idx - indices of starting and ending vertices
 //         start_vtx, end_vtx - pointers to starting and ending vertices
 //    Returns:
 //F*/
 OPENCVAPI  void   cvGraphRemoveEdge( CvGraph* graph, int start_idx, int end_idx );


8.4.2.12.62. (cvFindGraphEdge graph sidx eidx)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvFindGraphEdge, cvFindGraphEdgeByPtr
 //    Purpose: finds edge, connecting two vertices. If graph is orientation, order
 //             of input vertices is taken into account
 //    Context:
 //    Parameters:
 //         graph - graph
 //         start_idx, end_idx - indices of starting and ending vertices
 //         start_vtx, end_vtx - pointers to starting and ending vertices
 //    Returns:
 //F*/
 OPENCVAPI  CvGraphEdge*  cvFindGraphEdge( CvGraph* graph, int start_idx, int end_idx );


8.4.2.12.63. (cvClearGraph graph)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvClearGraph
 //    Purpose: clear graph(removes all the edges and vertices from the graph)
 //    Context:
 //    Parameters:
 //         graph - graph
 //    Returns:
 //F*/
 OPENCVAPI  void  cvClearGraph( CvGraph* graph );


8.4.2.12.64. (cvGraphVtxDegree graph vtxidx)
(packages/opencv/data_structures.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //    Name:    cvGraphVtxDegree, cvGraphVtxDegreeByPtr
 //    Purpose: counts edges, incident to given vertex
 //    Context:
 //    Parameters:
 //         graph - graph
 //         vtx_idx - vertex index
 //         vtx - pointer to vertex
 //    Returns:
 //      number of incident edges
 //F*/
 OPENCVAPI  int  cvGraphVtxDegree( CvGraph* graph, int vtx_idx );


8.4.2.12.65. (cvgraphvtxdegreebyptr graph vtx)
(packages/opencv/data_structures.lsh)


 OPENCVAPI  int  cvGraphVtxDegreeByPtr( CvGraph* graph, CvGraphVtx* vtx );


8.4.2.12.66. (cvrecttoroi rect coi roi)
(packages/opencv/data_structures.lsh)








8.4.2.12.67. (cvroitorect roi rect)
(packages/opencv/data_structures.lsh)








8.4.2.12.68. (cvround val)
(packages/opencv/data_structures.lsh)








8.4.2.12.69. (cvfloor val)
(packages/opencv/data_structures.lsh)








8.4.2.12.70. (cvceil val)
(packages/opencv/data_structures.lsh)








8.4.2.12.71. (cvinvsqrt arg)
(packages/opencv/data_structures.lsh)








8.4.2.12.72. (cvsqrt arg)
(packages/opencv/data_structures.lsh)