Table of Contents

NAME

QccVolumeAlloc, QccVolumeFree, QccVolumeZero, QccVolumeResize, QccVolumeCopy, QccVolumeMaxValue, QccVolumeMinValue, QccVolumePrint, QccVolumeAdd, QccVolumeSubtract, QccVolumeMean QccVolumeVariance - miscellaneous volume routines

SYNOPSIS

#include "libQccPack.h"

QccVolume QccVolumeAlloc(int num_frames, int num_rows, int num_cols);

void QccVolumeFree(QccVolume volume, int num_frames, int num_rows);

int QccVolumeZero(QccVolume volume, int num_frames, int num_rows, int num_cols);

QccVolume QccVolumeResize(QccVolume volume, int num_frames, int num_rows, int num_cols, int new_num_frames, int new_num_rows, int new_num_cols);

int QccVolumeCopy(QccVolume volume1, const QccVolume volume2, int num_frames, int num_rows, int num_cols);

double QccVolumeMaxValue(const QccVolume volume, int num_frames, int num_rows, int num_cols);

double QccVolumeMinValue(const QccVolume volume, int num_frames, int num_rows, int num_cols);

int QccVolumePrint(const QccVolume volume, int num_frames, int num_rows, int num_cols);

int QccVolumeAdd(QccVolume volume1, const QccVolume volume2, int num_frames, int num_rows, int num_cols);

int QccVolumeSubtract(QccVolume volume1, const QccVolume volume2, int num_frames, int num_rows, int num_cols);

double QccVolumeMean(const QccVolume volume, int num_frames, int num_rows, int num_cols);

double QccVolumeVariance(const QccVolume volume, int num_frames, int num_rows, int num_cols);

DESCRIPTION

QccPack library routines use three-dimensional arrays of type QccVolume which is defined as
typedef QccMatrix *QccVolume;

Although volumes can represent data from various applications, throughout QccPack, the following terminology, which arises in the video-coding application, is adopted. Volumes are described as consisting of a collection of 2D "frames" distributed in the temporal direction. Each frame describes a 2D spatial region, and is indexed by row and column in the two spatial directions.

QccVolumeAlloc() allocates a QccVolume consisting of num_frames matrices; each matrix is a two-dimensional array of type QccMatrix and has dimensions num_rows by num_cols. QccVolumeAlloc() returns a NULL pointer if the allocation fails.

QccVolumeFree() frees a QccVolume previously allocated by QccVolumeAlloc().

QccVolumeZero() makes each element of volume zero.

QccVolumeResize() changes the size of volume from num_frames x num_rows x num_cols to new_num_frames x new_num_rows x new_num_cols by calling realloc(3) and QccMatrixResize(3) . Upon success, the new volume is returned; a NULL pointer is returned if realloc(3) or QccMatrixResize(3) fails. If volume is NULL, QccVolumeAlloc() is called. In any case, all elements added to volume are zero.

QccVolumeCopy() copies volume2 to volume1.

QccVolumeMaxValue() returns the largest element in volume.

QccVolumeMinValue() returns the smallest element in volume.

QccVolumePrint() prints the elements of volume to stdout.

QccVolumeAdd() adds each component of volume1 to the corresponding component of volume2, returning the resulting volume in volume1. volume1 and volume2 must be the same size.

QccVolumeSubtract() subtracts each component of volume2 from the corresponding component of volume1, returning the resulting volume in volume1. volume1 and volume2 must be the same size.

QccVolumeMean() calculates the mean of the elements in

QccVolumeVariance() calculates the variance of the elements in volume.

SEE ALSO

QccVector(3) , QccMatrix(3) , QccPack(3)

AUTHOR

Written by Justin T. Rucker <jtr9@msstate.edu>

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads