For detecting substances with similar chemical composition and density, one of the promising methods of non-destructive testing is dual-energy processing of X-ray images. In particular, dual-energy transformation algorithms can be used to search for minerals hidden within barren rock. This method is most effective when the conditions for registering X-ray images and energy levels are properly selected. This study compares the effectiveness of image processing using the dual-energy method for three cases of spectral composition variation: firstly, as a result of adjusting the voltage on the X-ray tube; secondly, by attenuating low-energy radiation through the use of a copper filter; and thirdly, by combining these two methods. Beryl particles embedded in ground muscovite are used as samples for detection. The study utilizes a pulsed X-ray radiation source that generates radiation pulses of nanosecond duration. An original high-voltage generator scheme has been implemented for the method of regulating radiation energy by changing the peak voltage on the X-ray tube. The use of X-ray sources of this type enables the acquisition of high-resolution X-ray images of moving objects.