| MIL 10 Reference
| Customize Help
| Save Settings

MbufCopy



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
addconstant.cpp
aimdpmgrading.cpp
binarybasedcircledetection.cpp
blobmerge.cpp
calibrationfromlist.cpp
cameraevents.cpp
chunkmode.cpp
codegrading.cpp
colorbasedproductidentification.cpp
colorrelativecalibration.cpp
defectdetectionexample.cpp
dmilmdigprocesssharedmemory.cpp
dmilmultisystem.cpp
dmilobjecttrackingslave.cpp
dotspacing.cpp
examplemanager.cpp
fdkaddconstantmain.cpp
fixturingusingblob.cpp
flatfieldcorrection.cpp
foodinspection_cereal.cpp
foodinspectioncereal.cpp
histogramequalizeadaptive.cpp
kinect.cpp
kinectcamerainterface.cpp
lmigocator2000.cpp
m3dmap.cpp
m3dmap.cs
m3dmap.vb
mappbenchmark.cpp
mappbenchmark.cs
mappbenchmark.vb
matroxgatoreye.cpp
mcol.cpp
mcol.cs
mcol.vb
mcolorwarp.cpp
mdigautofocus.cpp
mdigautofocus.cs
mdigautofocus.vb
mdigcrossbar.cpp
mdiggrabsequence.cpp
mdiggrabsequence.cs
mdiggrabsequence.vb
mdigprocess16vd.cpp
mdispwindowleveling.cpp
mdispwindowleveling.cs
mdispwindowleveling.vb
microsoftkinect.cpp
milgige.cpp
mimdeinterlace.cpp
mimdeinterlace.cs
mimdeinterlace.vb
mimfft.cpp
mimfft.cs
mimfft.vb
mimlocatepeak1d.cpp
mimlocatepeak1d.cs
mimlocatepeak1d.vb
mimwarp.cpp
mimwarp.cs
mimwarp.vb
mmodeltracking.cpp
mmodeltracking.cs
mmodeltracking.vb
monitoringapplication.cpp
morphischannelswitchingdlg.cpp
morphology.cpp
mpat.cpp
mpat.cs
mpat.vb
mpprocessing.cpp
mseqprocess.cpp
mseqprocess.cs
mseqprocess.vb
mthread.cpp
mthread.cs
mthread.vb
multicamera.cpp
multicastmaster.cpp
multicastmonitor.cpp
multicastslave.cpp
multipledatamatrixcoderead.cpp
pfocus.cpp
productidentificationoasis.cpp
publishingapplication.cpp
registeredgoldentemplate.cpp
scriptpreprocessing.cpp
segmentationandanalysisofcells.cpp
sickrangerc.cpp
sickrangere.cpp
superresolution.cpp
variouscodereadings.cpp
variousdenoising.cpp
viofeaturesdemo.cpp
vioplayback.cpp
wavelettransformation.cpp
Synopsis
Copy data from one buffer to another.
Syntax
void MbufCopy(
MIL_ID SrcBufId, //in
MIL_ID DestBufId //in
)
Description

This function copies the specified source buffer data to the specified destination buffer. If the source and destination buffers are of different data types, MIL converts the data automatically.

If the source buffer depth is greater than that of the destination, the most significant bits are truncated when the data is copied into the destination. If the destination depth is greater than that of the source, the source data is zero or sign-extended (depending on the type of the source) when copied into the destination. If the destination is larger in size than the source, exceeding areas of the buffer are unaffected.

Note, when copying from a non-binary buffer to a binary buffer, all non-zero pixels in the source buffer are represented as ones (1) in the binary buffer. When copying a binary buffer to a buffer of a different depth, each bit is copied into the least-significant bit of a different destination pixel. The remaining bits of the destination pixel are set to 0; to propagate the bit value to all bits, use MimBinarize().

When copying from a floating-point buffer to an integer buffer, the values are truncated.

If the source buffer is a 3-band YUV buffer and the destination buffer is a 1-band buffer, only the Y band (luminance) is copied. If the source buffer is a 3-band RGB buffer and the destination buffer is a 1-band buffer, only the red band is copied.

Note, if the source is a 1-band image buffer associated with a LUT buffer and the destination is a 3-band image buffer, the source data copied to destination is first mapped through the LUT.

You can limit this function's results to a region of an image buffer using a region of interest (ROI) set using MbufSetRegion(). The ROI must be defined in raster format (M_RASTER or M_VECTOR_AND_RASTER). An error is generated if the ROI is only in vector format (M_VECTOR). If you specify multiple image buffers with an ROI, results are limited to the portion of the ROIs that intersect.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
SrcBufId

Specifies the identifier of the source data buffer.

If you specify an image buffer that has an ROI associated with it, the ROI must be in raster format; otherwise, you will get an error.

DestBufId

Specifies the identifier of the destination data buffer.

If you specify an image buffer that has an ROI associated with it, the ROI must be in raster format; otherwise, you will get an error.

Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
VECTOR VECTOR