| image = | localOrientation2dImg (inSingleImg,roiSize,roiOffset) |
Computes local inertia orientation on ROIs of the input image.
This algorithm computes the local inertia 2D orientation of the input image.
The image is first splitted into ROIs with the Split an image to a sequence of 2D ROIs algorithm. The ROI are described by the parameters InInputImg2dSize and InInputImg2dOffset.
A global orientation is calculated for each ROI using the Grey Inertia Measure 2d algorithm. To improve the orientation estimation, a circular mask is used to ignore the highest frequencies. The mask is calculated by the algorithm.
The global orientation is then assigned to each pixel of the corresponding ROI and the ROIs are finally merged with the Merge 2D ROIs from a sequence image algorithm.
The figure below illustrates the process:
If the ROIs overlap, the merge step (with Merge 2D ROIs from a sequence image) average the orientations estimated for all the ROIs including the overlap area.
The following figure displays an example of result calculated forthe mandrill image. On the left, we can observe the raw result with angles varying from 0 to
. On the right, the orientation is displayed with arrows overlayed with the inpu image for a better reading.