Findline's Performance Against Rotational Drift With Consideration of Line's Contrast
This is an experimental explanation on FindLine’s performance against rotational drift.
This is an experimental explanation on FindLine’s performance against rotational drift.
In VisionPro, FindLine and LineMax are both line extraction tools for 2D images.
In performance, FindLine shows much faster processing time. But other aspects of performance are not known in official documentation.
This article tries to show the performance of FindLine tool against rotational drift with the consideration of line’s contrast.
To assess the performance of FindLine against rotational drift, synthetic line dataset is generated for evaluation. Rotational drift can be affected by two major factors: one is the rotational angle of line and the other is the contrast of line. Thus, the synthetic line dataset needs to provide variety in line angle and contrast.
As you may know, line's contrast is also known as the gradient of line profile. The steeper in gradient, the larger in contrast. So, the change of gradient in line profile exactly changes the contrast of line. To model the gradient of the line profile, a Gaussian function-based method is designed in which the gradient of the Gaussian function graph can be configured by the parameter called variance.
The Gaussian functions are often used to represent the probability density function of a normally distributed random variable with expected value μ and variance σ² as the form below:
The Gaussian function graph configured by the above formula is shown below.
As you may know, the change of mean value μ does not affect the shape of graph but translate the graph along x =axis.
While, the change of variance σ² can modify the shape of graph vastly, especially for the gradient of graph.
With the above observations, Gaussian function graph can be a good model to emulate line with various contrasts. By adjusting variance σ² we can modify the gradient of Gaussian function graph which is the contrast of line. The following figure shows the generated synthetic line with the Gaussian function and its profile.
Here, σ stands for the standard deviation of Gaussian function and rot = 0 stands for the ground-truth rotation angle is zero degree. Also contrast value is measured by the Caliper tool in VisionPro. The shape of the above profile of line is the same as the graph of Gaussian function with the standard deviation of 1.6. Of course, Gaussian function is scaled with 128, so that the highest point is set to 128 higher than the base intensity.
The following images show the synthetically generated lines with various line angles and contrasts. As you can see, the Gaussian function’s standard deviation σ plays a key role in controlling the contrast of the line. The bigger the σ produces the smaller the magnitude of the contrast.
Here are the parameters set for FindLine tool, and all the parameters remain the same during the whole process of performance evaluation.
During the synthetic line generation process, 54 values are sampled from the range of [0.2, 8.0] in standard deviation and 61 angles are sampled from the range of [-3.0, 3.0] in rotation angle. Thus, eventually 3294 lines are generated for performance evaluation. The following figure shows the 3D bar graph of deviation error between actual angle of line and result angle from FindLine’s result.
From the above 3D bar graph, two observations can be derived as follows:
Due to the proposed method for synthetic line generation use low sampling rate, aliasing effect seems severe than real line cases. Nowadays, most camera processors contain image quality enhancing technology which alleviates the aliasing effect dramatically. Even though deviation error still can be fluctuated by the line angle especially when line is very thin.
Note 1: To view 'LineMax's performance against rotational drift with consideration of line's contrast', please refer to the article 000002179.
Note 2: All the above line finding tool names and tests are valid with VisionPro 9.23.