| MIL 10 Reference
| Customize Help
| Save Settings

MbufClear



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Partially supported on:
Partially supported on Matrox GPU processing driver

Fully supported on:
Fully supported on Host system
Fully supported on Matrox CronosPlus
Fully supported on Matrox GigE Vision driver
Fully supported on Matrox IEEE 1394 IIDC driver
Fully supported on Matrox Iris GT
Fully supported on Matrox Morphis
Fully supported on Matrox Morphis QxT
Fully supported on Matrox Orion HD
Fully supported on Matrox Radient eCL
Fully supported on Matrox Radient eV-CXP
Fully supported on Matrox Solios eA/XA
Fully supported on Matrox Solios ecl/xcl/ev-cl
Fully supported on Matrox USB3 Vision driver (requires Update 19)
Fully supported on Matrox Vio

For any information regarding a MIL system added during a MIL Update, see the MIL system’s release note

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
3dmodelheightdefect.cpp
3dplanefit.cpp
bestplanefitter.cpp
binarybasedcircledetection.cpp
blisterpackinspection.cpp
blobmerge.cpp
bottlecapinspection.cpp
calibrationfromlist.cpp
cameraevents.cpp
cameralasercalibration.cpp
cameraonrobotarmcalibration.cpp
caninspection.cpp
chromasens3dpixa.cpp
chunkmode.cpp
codegrading.cpp
colorbasedproductidentification.cpp
colorrelativecalibration.cpp
cookiedetection.cpp
defectdetectionexample.cpp
defectdetectionprocfunc.cpp
defectdetectionprocfunc_capandcontent.cpp
depthdatamgr.cpp
dmilmdigprocesssharedmemory.cpp
dmilmultisystem.cpp
dmilobjecttracking.cpp
dotspacing.cpp
exampleinterface.cpp
examplemanager.cpp
examplemanagerfor3d.cpp
fdkaddconstantmain.cpp
fdklutmapmain.cpp
fdkoffsetgainlutmapmain.cpp
fdkoffsetgainmain.cpp
fdkoffsetgainminmaxmain.cpp
findimageorientation.cpp
flatfieldcorrection.cpp
foodinspection_cereal.cpp
foodinspection_mango.cpp
foodinspectioncereal.cpp
foodinspectionmango.cpp
form1.cs
form1.vb
histogramdisplay.cpp
histogramequalizeadaptive.cpp
interactivebayer.cpp
kinect.cpp
m3dmap.cpp
m3dmap.cs
m3dmap.vb
mapptrace.cpp
mapptrace.cs
mapptrace.vb
matroxgatoreye.cpp
mbufcolor.cpp
mbufcolor.cs
mbufcolor.vb
mcol.cpp
mcol.cs
mcol.vb
mdigautofocus.cpp
mdigautofocus.cs
mdigautofocus.vb
mdiggrabmultiple.cpp
mdiggrabsequence.cpp
mdiggrabsequence.cs
mdiggrabsequence.vb
mdigprocess.cpp
mdigprocess.cs
mdigprocess.vb
mdigprocess16vd.cpp
mdigprocessmultiple.cpp
mdispgtkview.cpp
mdispmfcdoc.cpp
mdispoverlay.cpp
mdispoverlay.cs
mdispoverlay.vb
mdispqtview.cpp
mdispwindow.cpp
mdispwindowgtk.cpp
mdispwindowqt.cpp
mechanicalpartscan.cpp
microsoftkinect.cpp
milapplication.cs
milapplication.vb
milgige.cpp
mimbinarizeadaptive.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
mocr.cpp
mocr.cs
mocr.vb
morphischannelswitchingdlg.cpp
morphology.cpp
mpmenu.cpp
mpprocessing.cpp
mprotateprocessing.cpp
mpwarpprocessing.cpp
mseqprocess.cpp
mseqprocess.cs
mseqprocess.vb
mthread.cpp
mthread.cs
mthread.vb
muart.cpp
multicamera.cpp
multicastmaster.cpp
multicastmonitor.cpp
multicastslave.cpp
multipledatamatrixcoderead.cpp
multiviewannotations.cpp
objectlocalization3d.cpp
packetdelay.cpp
pcbmodelmatching.cpp
pfocus.cpp
processingfpga.cpp
productidentificationoasis.cpp
profiledisplay.cpp
regionmanager.cpp
scriptpreprocessing.cpp
segmentationandanalysisofcells.cpp
semiocr.cpp
sickrangerc.cpp
sickrangere.cpp
simpledilateerode.cpp
superresolution.cpp
tirestringread.cpp
utilmatchcolormap.cpp
variousdenoising.cpp
viofeaturesdemo.cpp
vioplayback.cpp
wavelettransformation.cpp
Synopsis
Clears a buffer to a specified color.
Syntax
void MbufClear(
MIL_ID DstBufId, //in
MIL_DOUBLE Color //in
)
Description

This function clears the specified buffer to the specified color.

To clear a 16-bit or 32-bit multi-band image buffer to a color value, use MgraClear().

For an image buffer, the clear can be limited to a region of interest (ROI) set using MbufSetRegion().

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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
DstBufId

Specifies the identifier of the buffer to clear. If you specify an image buffer, it can have an 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).

[Matrox GPU processing driver]

If you specify an image buffer, it must be an unsigned 8- or 16-bit monochrome buffer, a packed BGR32 buffer, or a packed binary buffer.

Color

Specifies the color value with which to clear the buffer.

For a 3-band image buffer, this parameter can be set to one of the following color values:

function map For specifying a color value
CollapseValue Description
Collapse
M_RGB888(
MIL_INT Red,
MIL_INT Green,
MIL_INT Blue
)

Specifies an RGB value used to clear an 8-bit 3-band buffer to an RGB color. Each value (red, green or blue) must not exceed 8 bits.

(summarize)
Parameters

Specifies the red component, as a value between 0 and 255.

Specifies the green component, as a value between 0 and 255.

Specifies the blue component, as a value between 0 and 255.

Collapse M_COLOR_BLACK

Specifies the color black.

Collapse M_COLOR_BLUE

Specifies the color blue.

Collapse M_COLOR_BRIGHT_GRAY

Specifies the color bright gray.

Collapse M_COLOR_CYAN

Specifies the color cyan.

Collapse M_COLOR_DARK_BLUE

Specifies the color dark blue.

Collapse M_COLOR_DARK_CYAN

Specifies the color dark cyan.

Collapse M_COLOR_DARK_GREEN

Specifies the color dark green.

Collapse M_COLOR_DARK_MAGENTA

Specifies the color dark magenta.

Collapse M_COLOR_DARK_RED

Specifies the color dark red.

Collapse M_COLOR_DARK_YELLOW

Specifies the color dark yellow.

Collapse M_COLOR_GRAY

Specifies the color gray.

Collapse M_COLOR_GREEN

Specifies the color green.

Collapse M_COLOR_LIGHT_BLUE

Specifies the color light blue.

Collapse M_COLOR_LIGHT_GRAY

Specifies the color light gray.

Collapse M_COLOR_LIGHT_GREEN

Specifies the color light green.

Collapse M_COLOR_LIGHT_WHITE

Specifies the color light white.

Collapse M_COLOR_MAGENTA

Specifies the color magenta.

Collapse M_COLOR_RED

Specifies the color red.

Collapse M_COLOR_WHITE

Specifies the color white.

Collapse M_COLOR_YELLOW

Specifies the color yellow.

For a 1-band or 3-band buffer, you can set this parameter to the following grayscale value:

function map For specifying a grayscale value to be used with all bands
CollapseValue Description
Collapse Value

Specifies a grayscale value used to clear the 1-band or multi-band buffer. This value is cast to the buffer type and depth. If the destination buffer is 3-band, this value will be replicated in each band.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
VECTOR COLOR BLACK COLOR BLUE COLOR BRIGHT GRAY COLOR CYAN COLOR DARK BLUE COLOR DARK CYAN COLOR DARK GREEN COLOR DARK MAGENTA COLOR DARK RED COLOR DARK YELLOW COLOR GRAY COLOR GREEN COLOR LIGHT BLUE COLOR LIGHT GRAY COLOR LIGHT GREEN COLOR LIGHT WHITE COLOR MAGENTA COLOR RED COLOR WHITE COLOR YELLOW