off_set

This MATLAB function, off_set, computes a plane equation that best fits grayscale intensity values in an image, using three given intensity

You are now following this Submission

The algorithm solves a linear system to determine the plane coefficients and generates an estimated intensity matrix over a specified region.
In image processing and computer vision, surface fitting techniques are commonly used to estimate variations in intensity levels across an image. This function estimates a planar intensity variation from three grayscale values and provides an interpolated surface over a defined grid.
Given three grayscale intensity values, , , and , corresponding to three points in an image grid, the function determines a plane of the form:
where:
- corresponds to the gray level ,
- corresponds to the gray level ,
- corresponds to the gray level .
A system of linear equations is formed and solved using matrix inversion to find the parameters .
The function is defined as:
where:
- and define the grid region.
- The output is a 2D intensity matrix representing the planar surface.
1.Linear System Setup
For the three given grayscale intensity values, the system of equations is:
- corresponds to the intensity :
- corresponds to the intensity :
- corresponds to the intensity :
These equations are arranged into matrix form:
where:
,
The system is solved using MATLAB's `linsolve` function:
;
where represents the plane parameters. Finally, the value of is found using:
.
2. Intensity Plane Surface Calculation
Using the computed coefficients, the plane equation is rearranged to compute the intensity matrix I:
3. Conclusion
This MATLAB function provides an efficient way to estimate a grayscale intensity plane from three known intensity values. The function is useful for background correction. The approach is valuable for image normalization, illumination correction, and feature extraction in image processing applications.

Cite As

Georges Boudebs (2025). off_set (https://www.mathworks.com/matlabcentral/fileexchange/<...>), MATLAB Central File Exchange. Retrieved February 22, 2025.

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0