Switches between the mode, where only pure C implementations from cxcore, OpenCV etc. are used, and the mode, where IPP and MKL functions are used if available. When cvUseOptimized(0) is called, all the optimized libraries are unloaded. The function may be useful for debugging, IPP&MKL upgrade on the fly, online speed comparisons etc. Note that by default the optimized plugins are loaded, so it is not necessary to call cvUseOptimized(1) in the beginning of the program (actually, it will only increase the startup time)

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: (


public static int cvUseOptimized(
	bool optimize
Visual Basic
Public Shared Function cvUseOptimized ( 
	optimize As Boolean
) As Integer
Visual C++
static int cvUseOptimized(
	bool optimize
static member cvUseOptimized : 
        optimize : bool -> int 


Type: System..::..Boolean
true to turn on optimization, false to turn off

Return Value

Type: Int32
The number of optimized functions loaded

See Also