About BBS

CXCORE リファレンス マニュアル

最終変更者: 怡土順一, 最終変更リビジョン: 448, 最終変更日時: 2008-12-24 00:28:23 +0900 (水, 24 12月 2008)


配列操作(Operations on Arrays)


コピーと充填(Copying and Filling)


Copy

一つの配列を別の配列にコピーする

void cvCopy( const CvArr* src, CvArr* dst, const CvArr* mask=NULL );

src
コピー元の配列.
dst
コピー先の配列.
mask
8 ビットシングルチャンネル配列の処理マスク.コピー先の配列の変更する要素を指定する.

関数 cvCopy は,入力配列から出力配列に選択された要素をコピーする.

mask(I)!=0 の場合,dst(I)=src(I)

引数の配列が IplImage 型の場合,その ROI と COI が利用される. コピー元配列とコピー先配列は,同じ型,同じ次元,同じサイズでなければならない.この関数は,疎な配列もコピーできる(この場合,マスクはサポートされない).


Set

配列の各要素に与えられた値をセットする

void cvSet( CvArr* arr, CvScalar value, const CvArr* mask=NULL );

arr
値をセットする配列.
value
配列を埋める値.
mask
8 ビットシングルチャンネル配列の処理マスク.配列の変更する要素を指定する.

関数 cvSet は,スカラー値 value を,配列の選択された各要素にコピーする.

mask(I)!=0 の場合,arr(I)=value

配列 arrIplImage 型の場合, ROI は利用されるが,COI がセットされていてはならない.


SetZero

配列をクリアする

void cvSetZero( CvArr* arr );
#define cvZero cvSetZero

arr
クリアされる配列.

関数 cvSetZero は,配列をクリアする. 密な配列(CvMat, CvMatND, IplImage)に対する cvZero(array) は,cvSet(array,cvScalarAll(0),0) と等価である. 疎な配列の場合は,全ての要素が削除される.


SetIdentity

スカラー倍された単位行列を用いて初期化を行う

void cvSetIdentity( CvArr* mat, CvScalar value=cvRealScalar );

arr
初期化される行列(正方である必要はない).
value
対角成分の値.

関数 cvSetIdentity は,スカラー倍された単位行列を用いた初期化を行う.

i=j ならば,    arr(i,j)=value
そうでなければ,         0

Range

与えられた範囲の数で行列を埋める

void cvRange( CvArr* mat, double start, double end );

mat
初期化される行列.これは,整数型あるいは浮動小数点型 32 ビットシングルチャンネルでなくてはならない.
start
範囲の下限(範囲に含まれる).
end
範囲の上限(範囲に含まれない).

関数 cvRange は,次のように行列を初期化する.

arr(i,j)=(end-start)*(i*cols(arr)+j)/(cols(arr)*rows(arr))
例えば,以下のコードは連続した整数の1次元ベクトルを初期化する.
CvMat* A = cvCreateMat( 1, 10, CV_32S );
cvRange( A, 0, A->cols ); // A は,[0,1,2,3,4,5,6,7,8,9] で初期化される.

OpenCV-1.0 リファレンス マニュアル
OpenCV-1.1pre リファレンス マニュアル
OpenCVサンプルコード


CV_ASSERT
CV_CALL
CV_CHECK
CV_CMP
CV_ERROR
CV_FUNCNAME
CV_GET_SEQ_ELEM
CV_GRAPH_EDGE_FIELDS
CV_GRAPH_FIELDS
CV_GRAPH_VERTEX_FIELDS
CV_IABS
CV_IMAGE_ELEM
CV_IMAX
CV_IMIN
CV_NODE_HAS_NAME
CV_NODE_IS_COLLECTION
CV_NODE_IS_EMPTY
CV_NODE_IS_FLOW
CV_NODE_IS_INT
CV_NODE_IS_MAP
CV_NODE_IS_REAL
CV_NODE_IS_SEQ
CV_NODE_IS_STRING
CV_NODE_IS_USER
CV_NODE_SEQ_IS_SIMPLE
CV_QUADEDGE2D_FIELDS
CV_RGB
CV_SEQUENCE_FIELDS
CV_SET_FIELDS
CV_SIGN
CV_SUBDIV2D_FIELDS
CV_SUBDIV2D_POINT_FIELDS
CV_SWAP
CV_TREE_NODE_FIELDS
CV_TURN_ON_IPL_COMPATIBILITY
EXIT
MAX
MIN
OPENCV_ASSERT
OPENCV_CALL
OPENCV_ERRCHK
OPENCV_ERROR
__BEGIN__
__END__

CvANN_MLP
CvANN_MLP_TrainParams
CvANN_MLP::create
CvANN_MLP::train
CvArr
CvAttrList
CvBoost
CvBoostParams
CvBoostTree
CvBoost::get_weak_predictors
CvBoost::predict
CvBoost::prune
CvBoost::train
CvBox2D
CvCapture
CvConDensation
CvConnectedComp
CvConvexityDefect
CvDTree
CvDTreeNode
CvDTreeParams
CvDTreeSplit
CvDTreeTrainData
CvDTree::predict
CvDTree::train
CvEM
CvEMParams
CvEM::train
CvFileNode
CvFileStorage
CvGraph
CvGraphScanner
CvHMM
CvImgObsInfo
CvHaarClassifier
CvHaarClassifierCascade
CvHaarFeature
CvHaarStageClassifier
CvHistogram
CvKNearest
CvKNearest::find_nearest
CvKNearest_train
CvKalman
CvMat
cvMatMul
cvMatMulAdd
CvMatND
CvMemBlock
CvMemStorage
CvMemStoragePos
CvNormalBayesClassifier
CvNormalBayesClassifier::predict
CvNormalBayesClassifier::train
CvPoint
CvPoint2D32f
CvPoint2D64f
CvPoint3D32f
CvPoint3D64f
CvQuadEdge2D
CvRTParams
CvRTrees
CvRTrees::get_proximity
CvRTrees::get_var_importance
CvRTrees::predict
CvRTrees::train
CvRect
CvSVM
CvSVMParams
CvSVM::get_support_vector
CvSVM::train
CvScalar
CvSeq
CvSeqBlock
CvSet
CvSize
CvSize2D32f
CvSlice
CvSparseMat
CvStatModel
CvStatModel::CvStatModel
CvStatModel::clear
CvStatModel::CvStatModel(data)
CvStatModel::~CvStatModel
CvStatModel::load
CvStatModel::predict
CvStatModel::read
CvStatModel::save
CvStatModel::train
CvStatModel::write
CvSubdiv2D
CvSubdiv2DPoint
CvTermCriteria
CvTreeNodeIterator
CvTypeInfo
IplImage
RTreesOOBerror

cv2DRotationMatrix
cv3dTrackerCalibrateCameras
cv3dTrackerLocateObjects
cvAbsDiff
cvAbsDiffS
cvAcc
cvAdaptiveThreshold
cvAdd
cvAddS
cvAddWeighted
cvAlloc
cvAnd
cvAndS
cvApproxChains
cvApproxPoly
cvArcLength
cvAvg
cvAvgSdv
cvBackProjectPCA
cvBoundingRect
cvBoxPoints
cvCalcBackProject
cvCalcBackProjectPatch
cvCalcCovarMatrix
cvCalcCovarMatrixEx
cvCalcDecompCoeff
cvCalcEMD2
cvCalcEigenObjects
cvCalcGlobalOrientation
cvCalcHist
cvCalcImageHomography
cvCalcMotionGradient
cvCalcOpticalFlowBM
cvCalcOpticalFlowHS
cvCalcOpticalFlowLK
cvCalcOpticalFlowPyrLK
cvCalcPCA
cvCalcPGH
cvCalcProbDensity
cvCalcSubdivVoronoi2D
cvCalibrateCamera2
cvCamShift
cvCanny
cvCartToPolar
cvCbrt
cvCheckArr
cvCheckContourConvexity
cvCircle
cvClearGraph
cvClearHist
cvClearMemStorage
cvClearND
cvClearSeq
cvClearSet
cvClearSubdivVoronoi2D
cvClipLine
cvClone
cvCloneGraph
cvCloneImage
cvCloneMat
cvCloneMatND
cvCloneSeq
cvCloneSparseMat
cvCmp
cvCmpS
cvCompareHist
cvComputeCorrespondEpilines
cvConDensInitSampleSet
cvConDensUpdateByTime
cvContourArea
cvContourFromContourTree
cvConvert
cvConvertImage
cvConvertPointsHomogenious
cvConvertScale
cvConvertScaleAbs
cvConvexHull2
cvConvexityDefects
cvCopy
cvCopyHist
cvCopyMakeBorder
cvCornerEigenValsAndVecs
cvCornerHarris
cvCornerMinEigenVal
cvCountNonZero
cvCreate2DHMM
cvCreateCameraCapture
cvCreateChildMemStorage
cvCreateConDensation
cvCreateContourTree
cvCreateData
cvCreateFileCapture
cvCreateGraph
cvCreateGraphScanner
cvCreateHist
cvCreateImage
cvCreateImageHeader
cvCreateKalman
cvCreateMat
cvCreateMatHeader
cvCreateMatND
cvCreateMatNDHeader
cvCreateMemStorage
cvCreateObsInfo
cvCreatePOSITObject
cvCreateSeq
cvCreateSet
cvCreateSparseMat
cvCreateStructuringElementEx
cvCreateSubdivDelaunay2D
cvCreateTrackbar
cvCreateVideoWriter
cvCrossProduct
cvCvtColor
cvCvtScale
cvCvtSeqToArray
cvDCT
cvDFT
cvDecRefData
cvDeleteMoire
cvDestroyAllWindows
cvDestroyWindow
cvDet
cvDilate
cvDistTransform
cvDiv
cvDotProduct
cvDrawChessBoardCorners
cvDrawContours
cvDynamicCorrespondMulti
cvEViterbi
cvEigenDecomposite
cvEigenProjection
cvEigenVV
cvEllipse
cvEllipse2Poly
cvEllipseBox
cvEndFindContours
cvEndWriteSeq
cvEndWriteStruct
cvEqualizeHist
cvErode
cvError
cvErrorStr
cvEstimateHMMStateParams
cvEstimateObsProb
cvEstimateTransProb
cvExp
cvFastArctan
cvFillConvexPoly
cvFillPoly
cvFilter2D
cvFindChessboardCorners
cvFindContours
cvFindCornerSubPix
cvFindExtrinsicCameraParams2
cvFindFundamentalMat
cvFindGraphEdge
cvFindGraphEdgeByPtr
cvFindHomography
cvFindNearestPoint2D
cvFindNextContour
cvFindRuns
cvFindStereoCorrespondence
cvFindType
cvFirstType
cvFitEllipse2
cvFitLine2D
cvFlip
cvFloodFill
cvFlushSeqWriter
cvFree
cvGEMM
cvGet1D
cvGet2D
cvGet3D
cvGetND
cvGetAffineTransform
cvGetCaptureProperty
cvGetCentralMoment
cvGetCol
cvGetCols
cvGetDiag
cvGetDims
cvGetElemType
cvGetErrMode
cvGetErrStatus
cvGetFileNode
cvGetFileNodeByName
cvGetFileNodeName
cvGetGraphVtx
cvGetHashedKey
cvGetHistValue_1D
cvGetHistValue_2D
cvGetHistValue_3D
cvGetHistValue_nD
cvGetHuMoments
cvGetImage
cvGetImageCOI
cvGetImageROI
cvGetMat
cvGetMinMaxHistValue
cvGetModuleInfo
cvGetNextSparseNode
cvGetNormalizedCentralMoment
cvGetNumThreads
cvGetOptimalDFTSize
cvGetPerspectiveTransform
cvGetQuadrangleSubPix
cvGetRawData
cvGetReal1D
cvGetReal2D
cvGetReal3D
cvGetRealND
cvGetRectSubPix
cvGetRootFileNode
cvGetRow
cvGetRows
cvGetSeqElem
cvGetSeqReaderPos
cvGetSetElem
cvGetSize
cvGetSpatialMoment
cvGetSubRect
cvGetTextSize
cvGetThreadNum
cvGetTickCount
cvGetTickFrequency
cvGetTrackbarPos
cvGetWindowHandle
cvGetWindowName
cvGoodFeaturesToTrack
cvGrabFrame
cvGraphAddEdge
cvGraphAddEdgeByPtr
cvGraphAddVtx
cvGraphEdgeIdx
cvGraphRemoveEdge
cvGraphRemoveEdgeByPtr
cvGraphRemoveVtx
cvGraphRemoveVtxByPtr
cvGraphVtxDegree
cvGraphVtxDegreeByPtr
cvGraphVtxIdx
cvGuiBoxReport
cvHaarDetectObjects
cvHoughCircles
cvHoughLines2
cvImgToObs_DCT
cvInRange
cvInRangeS
cvIncRefData
cvInitFont
cvInitImageHeader
cvInitLineIterator
cvInitMatHeader
cvInitMatNDHeader
cvInitMixSegm
cvInitSparseMatIterator
cvInitSystem
cvInitTreeNodeIterator
cvInitUndistortMap
cvInpaint
cvInsertNodeIntoTree
cvIntegral
cvInvSqrt
cvInvert
cvIsInf
cvIsNaN
cvKMeans2
cvKalmanCorrect
cvKalmanPredict
cvLUT
cvLaplace
cvLine
cvLoad
cvLoadHaarClassifierCascade
cvLoadImage
cvLog
cvLogPolar
cvMahalanobis
cvMakeAlphaScanlines
cvMakeHistHeaderForArray
cvMakeScanlines
cvMakeSeqHeaderForArray
cvMat
cvMatchContourTrees
cvMatchShapes
cvMatchTemplate
cvMax
cvMaxRect
cvMaxS
cvMeanShift
cvMemStorageAlloc
cvMemStorageAllocString
cvMerge
cvMin
cvMinAreaRect2
cvMinEnclosingCircle
cvMinMaxLoc
cvMinS
cvMixChannels
cvMixSegmL2
cvMoments
cvMorphEpilinesMulti
cvMorphologyEx
cvMoveWindow
cvMul
cvMulSpectrums
cvMulTransposed
cvMultiplyAcc
cvNamedWindow
cvNextGraphItem
cvNextTreeNode
cvNorm
cvNormalize
cvNormalizeHist
cvNot
cvNulDevReport
cvOpenFileStorage
cvOr
cvOrS
cvPOSIT
cvPerspectiveTransform
cvPointPolygonTest
cvPointSeqFromMat
cvPolarToCart
cvPolyLine
cvPostWarpImage
cvPow
cvPreCornerDetect
cvPrevTreeNode
cvPreWarpImage
cvProjectPCA
cvProjectPoints2
cvPtr1D
cvPtr2D
cvPtr3D
cvPtrND
cvPutText
cvPyrDown
cvPyrMeanShiftFiltering
cvPyrSegmentation
cvPyrUp
cvQueryFrame
cvQueryHistValue_1D
cvQueryHistValue_2D
cvQueryHistValue_3D
cvQueryHistValue_nD
cvRNG
cvRandArr
cvRandInt
cvRandReal
cvRandShuffle
cvRange
cvRead
cvReadByName
cvReadChainPoint
cvReadInt
cvReadIntByName
cvReadRawData
cvReadRawDataSlice
cvReadReal
cvReadRealByName
cvReadString
cvReadStringByName
cvRectangle
cvRedirectError
cvReduce
cvRegisterModule
cvRegisterType
cvRelease
cvRelease2DHMM
cvReleaseCapture
cvReleaseConDensation
cvReleaseData
cvReleaseFileStorage
cvReleaseGraphScanner
cvReleaseHaarClassifierCascade
cvReleaseHist
cvReleaseImage
cvReleaseImageHeader
cvReleaseKalman
cvReleaseMat
cvReleaseMatND
cvReleaseMemStorage
cvReleaseObsInfo
cvReleasePOSITObject
cvReleaseSparseMat
cvReleaseStructuringElement
cvReleaseVideoWriter
cvRemap
cvRemoveNodeFromTree
cvRepeat
cvResetImageROI
cvReshape
cvReshapeMatND
cvResize
cvResizeWindow
cvRestoreMemStoragePos
cvRetrieveFrame
cvRodrigues2
cvRound
cvRunHaarClassifierCascade
cvRunningAvg
cvSVBkSb
cvSVD
cvSampleLine
cvSave
cvSaveImage
cvSaveMemStoragePos
cvScale
cvScaleAdd
cvSegmentMotion
cvSeqElemIdx
cvSeqInsert
cvSeqInsertSlice
cvSeqInvert
cvSeqPartition
cvSeqPop
cvSeqPopFront
cvSeqPopMulti
cvSeqPush
cvSeqPushFront
cvSeqPushMulti
cvSeqRemove
cvSeqRemoveSlice
cvSeqSearch
cvSeqSlice
cvSeqSort
cvSet
cvSet1D
cvSet2D
cvSet3D
cvSetND
cvSetAdd
cvSetCaptureProperty
cvSetData
cvSetErrMode
cvSetErrStatus
cvSetHistBinRanges
cvSetIPLAllocators
cvSetIdentity
cvSetImageCOI
cvSetImageROI
cvSetImagesForHaarClassifierCascade
cvSetMemoryManager
cvSetMouseCallback
cvSetNew
cvSetNumThreads
cvSetReal1D
cvSetReal2D
cvSetReal3D
cvSetRealND
cvSetRemove
cvSetRemoveByPtr
cvSetSeqBlockSize
cvSetSeqReaderPos
cvSetTrackbarPos
cvSetZero
cvShowImage
cvSmooth
cvSnakeImage
cvSobel
cvSolveCubic
cvSplit
cvSqrt
cvSquareAcc
cvStartAppendToSeq
cvStartFindContours
cvStartNextStream
cvStartReadChainPoints
cvStartReadRawData
cvStartReadSeq
cvStartWriteSeq
cvStartWriteStruct
cvStdErrReport
cvSub
cvSubRS
cvSubS
cvSubdiv2DEdgeDst
cvSubdiv2DEdgeOrg
cvSubdiv2DGetEdge
cvSubdiv2DLocate
cvSubdiv2DRotateEdge
cvSubdivDelaunay2DInsert
cvSubstituteContour
cvSum
cvThreshHist
cvThreshold
cvTrace
cvTransform
cvTranspose
cvTreeToNodeSeq
cvTypeOf
cvUndistort2
cvUniformImgSegm
cvUnregisterType
cvUpdateMotionHistory
cvUseOptimized
cvWaitKey
cvWarpAffine
cvWarpPerspective
cvWatershed
cvWrite
cvWriteComment
cvWriteFileNode
cvWriteFrame
cvWriteInt
cvWriteRawData
cvWriteReal
cvWriteString
cvXor
cvXorS
cvmGet
cvmSet
error_handling_sample
error_macros