Mathematics of getting the normals
Hello. I am a graduate student trying to understand your computeNormalsSquareSupport.m file.
First it seems to me that for a given patch size, you are convolving A^TA and A^b with a box filter of all ones (without the averaging multiplicative factor),
and then computing as in the least squares approach the computation A x = b where
A is the matrix of all the point cloud values stacked as columns x , y, 1 x is the parameters of the plane to solve for and b is the negative z values (depth values),
You then solve for x using the least squares approach x = (A^{t} * A)^{-1} *A{^t} * b
I have studied this approach for obtaining a single normal as outlined here: http://www.ilikebigbits.com/2015_03_04_plane_from_points.html
But I am not sure about the mathematics here of computing all of the normals simulatenously for the entire depth point cloud.
Any insights into this matter much appreciated as I am trying to obtain a full understanding of the algorithm to obtain HHA images.