Click or drag to resize

IMcBackgroundDiv Method

Corrects for uneven background lighting in an image instance using arithmetic division between the image and the background image.

Namespace:  MediaCy.IQL.Operations
Assembly:  MediaCy.IQL.Operations (in MediaCy.IQL.Operations.dll) Version: 10.0.6912.0
Syntax
VB
Function Div ( 
	vBackground As Object,
	<OptionalAttribute> vSourceImg As Object
) As McImage

Parameters

vBackground
Type: SystemObject
Image (or IMcRegionAccess) of the background. If the background image is supplied as an IMcRegionAccess or if the background image has UseActiveFrameRange set to FALSE, then the one supplied frame is reused to associate with each frame of the image. Otherwise each background source frame is associated with a destination frame until one of the ActiveFrameRange's is exhausted.
vSourceImg (Optional)
Type: SystemObject
Optional source image, operator applies to parent image when parameter is omitted.

Return Value

Type: McImage
The resulting McImage
Remarks
A conversion is performed on the background image so that it has the same type as the source image. The conversion rules are defined by the value of the Conversion property. The background image is the image of the background lighting. An example is the image taken with a camera mounted on a microscope when the slide to be analyzed is removed. It is assumed to have the same lighting conditions as the image to be corrected. For color images, each channel has its own BlackLevel value. The algorithm is based on the following formula: CI(x,y) = ( ((I(x,y)-BL) / (BI(x,y)-BL)) * (M-BL) ) + BL where: @untitled table I(x,y) is a pixel value of the original image at location (x,y) BI(x,y) is a pixel value of the background image at the same location M is the average pixel value of the background image BL is the level of black (BlackLevel) CI(x,y) is the new pixel value in the corrected image. This function is meant to be used in transmitted light experiments, and is especially important when measuring optical densities. Use Sub if the goal is to flatten the background of an image prior to counting or measuring objects.
See Also