Image: Arithmetic Transform: Subtract Interpolated Background
Subtract the background created with interpolation
It is not accessible from script. This feature is OriginPro only.
Please refer to the page for additional option switches when accessing the x-function from script
Input Image |
Specifies the input image to be manipulated. The default input is the active image. |
Anchor Num |
Specifies the number of the anchors on the image. The anchors will be used to create the interpolated background. |
Background |
Specifies whether or not the background is darker than the foreground. |
Output Matrix |
Specifies the output matrix. By default, a new image will be created and used as output. |
Anchor Shape |
Specifies the shape of the anchors (either ellipse or rectangle). |
Apply Auto Level |
This checkbox specifies whether or not to apply auto color leveling to the image after subtracting the interpolated background |
Adjust Brightness |
Specifies the increase/decrease of the brightness for the interpolated background. The value should be an integer between -10 and 10. A negative value will cause the brightness to be reduced while a positive value will result in brightness increase. |
When analyzing the contents of an image, the background typically does not contain anything of interest. In fact, in many cases the background can interfere with your analysis. One way to deal with this is to subtract it from the image. Subtracting the background from the image can help to segment out the objects of interest and facilitate further processing.
Often, we do not have a previously recorded background or an image of the background without any foreground objects. In this case, background subtract requires estimating the background with some algorithm and then subtracting it from the original image. Two tools provided by OriginPro are capable of performing this kind of background subtraction. They are Subtract Background and Subtract Interpolated Background. The major difference between them is the algorithm which is used to generate the background.
The ImgSubtractInterpBG X-Funtion, Subtract Interpolated Background tool in OriginPro subtracts the background that is created with interpolation. To create an interpolated background, the X, Y, and Z (Intensity) mean values within the anchor areas are computed. The background image is gridded from these XYZ values by the method of random matrix conversion based on the Thin Plain Spline (TPS) Algorithm. This tool also allows you to determine the anchor number, move and resize the anchors on the image to determine the interpolated background..
Note that this function only supports gray scale images.
The following example shows how to subtract an interpolated background from the input image:
![]() |
![]() |
|
|
Note: OriginPro includes the ability to automatically recalculate the analysis result of the background subtractoperation any time you change the parameters or update your source data. In addition, the settings for the analysis routine can be saved to an analysis theme for later use with similar data.
To create an interpolated background, the X, Y, and Z (Intensity) mean values within the anchor areas will be computed, then the background image is gridded from these XYZ values by the method of random matrix conversion base on Thin Plain spline (TPS) algorithm.
The computation of subtracting the interpolated background mainly uses L_CombineBitmapExt function from LEADTOOLS Main API. If Brighter than the Foreground is chosen as Background, the colors of the background will be inverted, and then the background and the input image will be combined with an adding operation. If Darker than the Foreground is chosen as Background, the background and the input image will be combined with a subtraction operation.
For more information on how the image is inverted and how the two images are combined please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_InvertBitmap and L_CombineBitmapExt topics.
LEADTOOLS Main API Help file, Version 14