-
Notifications
You must be signed in to change notification settings - Fork 1
7 Motion processing tutorial
For starting is important to set the velocities with the tool Motion Bank List as shown in the next picture:
and also activating the process V1MotionProcessNew.
The system detects the motion in one direction and the opposite direction to reduce the fake positives, as shown in the following diagram:
if we want to activate or deactivate the difference operation, we need to go to the configuration file and put 1 (true), or 0 (fake) in the part of V1MotionSubs
depending on what we want
<!--MOTION-->
<V1MotionSubs>1</V1MotionSubs>
<MTMotionSubs>1</MTMotionSubs>
The visualization of the activation is shown as follows where each square represents one direction, and the directions are
The position of the visualizations are down to the shape visualizations.
MT component cells join the motion detection performed with different Gabor filters, and also the resolution is decreased. For that, we need to activate MTComponentCells process. We can also change the resolution of the MT matrices in the configuration file in this field:
<motionDimensions>70</motionDimensions>
The visualization is shown as the following, at the right of the V1 motion:
The way the pattern motion is calculated is by using the Intersection of constraints.
The Intersection of Constrains consists in calculate the real velocity using a geometric operation, where having two velocities vectors of component motion, on each vector, it's traced a constrain, which is a perpendicular line of the vector, and the intersection of these two constraints is the resulting velocity vector.
When the program starts, the MT cells are calculated by combining the pairs of MT component cells. Then the MT pattern motion is calculated in a process similar to the multiplication of two matrices.
The Process MTPatternCell have the methods for performing the pattern activation. We can modify some values in the following method
Mat PatternActivation(Cell cell) {
mul = MatrixUtils.multiply(MatrixUtils.basicDilate(cell.previous, 3, 9));
Imgproc.GaussianBlur(mul, blur, new Size(31, 31), 5);
Core.multiply(blur, Scalar.all(15), blur);
sum = MatrixUtils.maxSum(cell.previous);
Core.multiply(blur, sum, m);
Core.multiply(mul, Scalar.all(0.1), mul);
return MatrixUtils.maxSum(m, mul);
}
First, a dilatation is done on the two-component motion matrices and then multiplied. After a gaussian blur is applied to the multiplication. And after all, the previous result is multiplied by the max sum of the two source component motion matrices.
The activations are represented in a color matrix, where the Hue represents the motion direction, shown in the next image:
Also, to visualize that process, it's necessary to activate the MTPatternCell process in the process list
The visualization of the MT pattern cell is at the right of the MT component activations as shown below:
2022 Luis Adrian Parra - Niclab