MATLAB: How can i implement given formula in image processing

Image Processing Toolboxpoint

i have to aplly this foumula for contrast streching plz give me matlab program of this formula
s=(a-rmin)*(L/(rmax-rmin)); where L=256 rmin=0 rimax=255

Best Answer

There are lots of options for this:
Please check out the Matlab functions here.
You might need to define smaller blocks in your image and apply it locally depending on your requirements