1. An x-ray inspection system for separating material-specific images generated by transmitting x-rays through an ensemble of unknown materials, comprising: generating means for generating and emitting N different x-ray energy distributions, each energy distribution being labelled by E.sub.k and having an x-ray intensity I.sub.0 (E.sub.k), where k ranges from 1 to N, and where N is an integer greater than 1; a device storing an N by N matrix .mu..sup.-1, where .mu..sup.-1 is an inversion of a matrix t*, and where each matrix element .mu..sub.jk for the matrix .mu. is defined as the linear attenuation coefficient of a certain material group j (of N material groups) at the x-ray energy E.sub.k, the N material groups being generated from sorting the ensemble of unknown materials into N possible groups of materials according to the closeness of linear attenuation coefficients or equivalent characteristics of materials at different incident x-ray energy distributions prior to inspection, wherein at least two .mu..sup.-1 matrices are stored in the device and each .mu..sup.-1 matrix corresponds to a different set of N material groups; reshaping means for reshaping the N different x-ray energy distributions emitted from the generating means; first detecting means for detecting the x-ray intensities I.sub.0 (E.sub.k) at each of the reshaped N x-ray energy distributions labelled E.sub.k, the detecting occurring before transmission of the reshaped N x-ray energy distributions through the ensemble of unknown materials, the first detecting means outputting a first signal corresponding to the detection by the first detecting means; second detecting means for detecting a portion of the reshaped N x-ray energy distributions labelled E.sub.k that have passed through the ensemble of unknown materials, the second detecting means outputting a second signal corresponding to the detection by the second detecting means; first converting means for receiving the first signal from the first detecting means and for converting the first signal into first image information; second converting means for receiving the second signal from the second detecting means and for converting the second signal into second image information; logarithmic means for logarithmically processing the first and second image information; switching means for dynamically switching from one .mu..sup.-1 matrix for one set of N material groups to another .mu..sup.-1 for another set of N material groups during the inspection, wherein the switching is for the purpose of finding an appropriate set of N material groups that best represents the actual material groups existing in the ensemble under inspection; image-generating means for generating material-specific images for the N groups of materials, using the logarithmically processed first and second image information and the .mu..sup.-1 matrix; and processing means for processing and displaying the material-specific images.