3.4 in, and the modified Jacobi scheme of Horn and Brooks (see Sec. Implementations of Poisson solvers using FFT (see Sec.These journal papers summarize research previously presented in the conference papers. These Matlab codes implement the variational normal integration methods discussed in, and three famous methods for solving the Poisson equation, which were discussed in our survey. A subsequent step consists in integrating these normals into a depth map. photometric stereo, shape-from-shading, shape-from-polarization or deflectometry), one estimates the local surface orientation (i.e., normals) in each pixel. In many computer vision applications (e.g. Thanks to Horchler's comment, a better way to evaluate the value of the integral is to directly cast it into a double precision number : > double(q)Īpparently, Matlab have improved the conversion to double (and let the old q.eval method get deprecated) because the residual error on the imaginary part is smaller yet.Matlab codes for integration of normals (gradient) over a non-rectangular 2D grid, without boundary condition.
Now I don't know what your research conclude, but if you are positively certain that the result has to be real, then you can take only the real part of the expression: > q.real.eval
Which means that your integral evaluated a real number. In this case, you can safely discard a value of 0.000000000000004 and assimilate it to 0. Expect even less if it is the result of long calculations (the error may grow with the number of computations).
You cannot expect more than 15 digits precision when using 64 bits floating point number representation (matlab double format). This is just a residue of calculation error. You should notice that the imaginary part is next to nothing. However, if I evaluate it in an old fashion (this works on Matlab R2009a): > q.eval I obtain a different expression for q than you: q = The complex parts will cancel each others out. The result you are getting is in the range.
Where as the answer should be between 1 and 10 real only (not complex) if my research model is right.Ĭan you give me any suggestions, any command, or point anything I am doing wrong in matlab that is giving this complex answer. I have used the Matlab int command, but for unknown reason, complex number and pi are parts of Matlab's answer. I want to evaluate the following expression: