I agree that if one is asking about using a scanner as a densitometer then that is fair game here. To do it one would scan a step wedge with known values. The file is then can be opened in some graphics software like Photoshop. In Photoshop, each sector of the step wedge image can be interrogated with the "Information" window. The readout will be in "K" and it will be a percentage from 1 to 100.
You will then plot the "K" value against the known density. Then you can use a graphing program to analyze the relationship between the two sets (ie derive an equation) and use this to convert from the "K" value to Log D.
Densitometers are inexpensive, so it might be better to just get a densitometer.