The invention discloses a correlated imaging
impurity detection method and
system for
drug production, and relates to the technical field of
drug impurity detection. The method comprises the following steps: loading a first binary
mask matrix, projecting a target product area, controlling a single-
pixel detector to detect, determining a first measurement value, and performing lightweight reconstruction to obtain a first preview; generating a second binary
mask matrix and performing projection and detection reconstruction by pre-checking the first preview, and performing multi-round iteration until an Nth preview is determined; calling the first preview to the Nth preview from a temporary
database of an online detection platform, executing multi-layer
compressed sensing and reconstruction, and determining a reconstruction result; and aiming at a reconstruction result, matching in an
impurity feature
library, and determining an impurity
verification result. The technical problems of low impurity detection efficiency and insufficient detection accuracy in the
medicine production process in the prior art are solved, and the technical effect of efficient and accurate online detection of
medicine impurities in the production link is achieved.