How to determine Windosize and Stepsize in the function msbackadj for the analysis of fibers in a picture?

3 views (last 30 days)
Dear all,
I am analyzing fiber densities in pictures of brain slices that vary in size. For this, I need to use the function msbackadj. It is unclear to me how to best determine windowsize and stepsize. I tried it visually, but was restricted by two error notifications:
either: Error using msbackadj (line 235) Maximum number of windows exceeded, verify the STEP value or function handle.
or: Warning: The values in the input X and/or the input parameter STEP led to only one window. The algorithm in MSBACKADJ requires several windows in order to regress properly the baseline.
At the moment I have the same value for Windowsize and Stepsize (I am also not sure if this is the best way to do it), and I would like to keep one value for all the pictures I am analyzing.
So my question: how can I best determine this value without getting the errors/warnings, is it possible to keep one value or is it dependend on the size of your picture and should I vary it accordingly, and should I keep the same value for both windowsize and stepsize or should those be different. And if someone knows a rule of thumb/magical way to systematically determine this value that would be the best outcome.
Thank you in advance for your help and please let me know if you need more info/things are unclear. With kind regards, Kaya von Eugen

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!