jacopoantonello / mshwfs Goto Github PK
View Code? Open in Web Editor NEWModal Shack-Hartmann wavefront sensor toolbox for MATLAB
License: Other
Modal Shack-Hartmann wavefront sensor toolbox for MATLAB
License: Other
In the centroid function, there is a swap of the X and Y variables in both the input and output. Although the fragment "Centroid works on column major order" is present, it does not explicitly state that this function returns positions in the format [Y, X]. Especially considering that all code in centroid.m suggests it follows the convention [X, Y]. This change in convention also complicates swapping the centroid method with others, as other methods typically use the convention [X, Y], thus reducing the code's flexibility. To rectify this and provide clarity:
[w, h] = size(im); -> [h, w] = size(im);
Size returns length of dimensions in order Y, X, Z...
[yy, xx] = meshgrid(1:h, 1:w); -> [xx, yy] = meshgrid(1:w, 1:h);
Meshgrid input and output is [X,Y] = meshgrid(x,y)(https://se.mathworks.com/help/matlab/ref/meshgrid.html#d126e1020611)
In the function outside of centroid in shwfs_make_fine_grid.m, there is a change:
dd = shstruct.centroid(subimage, level);
centres(i, :) = [cc(1)+dd(2)-1, cc(3)+dd(1)-1];
It is swap of x and y from dd. dd(1) = X and dd(2) = Y, so it is counterintuitive to add cc(1)+dd(2) (X+Y) and cc(2)+dd(1) (Y+X).
After changes in centroid.m it should be:
centres(i, :) = [cc(1)+dd(1)-1, cc(3)+dd(2)-1];
Hi author, I would like to ask, the range of the wavefront reconstructed from this project is only the size of the unit circle, but the size of the whole pupil is not necessarily the unit circle. So I would like to ask how to map the reconstructed wavefront to the actual measured wavefront?
I am using .bmp image for calibration after converting it into .mat. When I reduce the shstruct.coarse_grid_radius, i.e.radius for coarse grid from 16 to 10, for instance, the error that comes is, "any non finite? 1". It happens with some images. Most of the images can manage coarse grid radius of a wide range like (10,16). Some can take only above 15. I guess, one of the centers in shwfs_make_fine_grid code takes non-finite value, which one, I don't know. What to do to handle this error?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.