I want to detect shadow and remove it from image. However, I download a code from matlab file exchange: https://www.mathworks.com/matlabcentral/fileexchange/54647-shadow-detection/content/matlab_shadow/shadow_detect.m but in that code the author write "You can also consider using automatic threshold estimation methods" Is there any automatic threshold estimation method?? I need the name of the method or any suggestion.