Usually, surface roughness are measured with stylus type instrument which gives idea of roughness about thin line that should not be the roughness of whole surface.
please see attached pdf using scilab 5.3.3 as a possible method . It is just a suggestion . I have not tried it on any real case but I think it might lead you to some good results .
what you need to do is
1 just capture the image of two surfaces ( even with a mobile/web
camera using ordinary incandescent bulb.. but adjust the shutter speed / aperture
to limit max intensity within range .or some dark film as filter.)
2. Store the image as say .bmp file
3. Convert to b/w image see code..
4. Think of using some metric to identify the distance between
ideal smooth surface (constant pixel values ) and test matrix
An increase in the surface leads usually to an increase in the surface roughness , neverteless this increase is not necessarily equivalent from one area to anther .
You can sum the roughness rms of each lines measured by your stylus and divided by the number N of lines on length L .
then plot the rms as a function of N. This will give you an idea of the dependance of the RMS with the surface.