Detection of timber quality and moisture content