Automatic fault diagnosis method and device for sorting machine
A method and a device for automatically diagnosing a sorter fault are provided. The method includes: obtaining a banknote image of a banknote by scanning; performing data processing on the banknote image based on a preset detection algorithm, to obtain a processing result; and sending a feedback information if the processing result satisfies a preset condition.
1. A method for automatically diagnosing a sorter fault, comprising:
obtaining banknote images of banknotes by scanning;
performing data processing on the banknote images based on a preset detection algorithm, to obtain processing results; and
sending feedback information, in a case that the processing result meets a preset condition;
wherein the performing data processing on the banknote images based on a preset detection algorithm to obtain processing results comprises:
for each of the banknote images,
obtaining the number of pixels of a grayscale histogram of the banknote image;
obtaining a lower limit of a grayscale interval based on a preset lower limit of a ratio and the number of pixels;
obtaining an upper limit of the grayscale interval based on a preset upper limit of the ratio and the number of pixels;
calculating a mean value of the grayscale based on the lower limit of the grayscale interval and the upper limit of the grayscale interval; and
recording the banknote image in an overexposure record, in a case that the mean value of the grayscale meets a preset overexposure condition.
2. The method according to claim 1 , wherein the sending feedback information in a case that the processing result meets the preset condition comprises:
sending the feedback information in a case that the number of banknote images in the overexposure record reaches a preset third value.
3. A device for automatically diagnosing a sorter fault, comprising a processor and a memory storing program codes, wherein the processor performs the stored program codes to:
obtain banknote images of banknotes by scanning;
perform data processing on the banknote images based on a preset detection algorithm to obtain processing results; and
send feedback information in a case that the processing result meets a preset condition;
wherein the processor further performs the stored program codes to:
for each of the banknote images,
obtain the number of pixels of a grayscale histogram of the banknote image;
obtain a lower limit of a grayscale interval based on a preset lower limit of a ratio and the number of pixels;
obtain an upper limit of the grayscale interval based on a preset upper limit of the ratio and the number of pixels;
calculate a mean value of the grayscale based on the lower limit of the grayscale interval and the upper limit of the grayscale interval; and
record the banknote image in an overexposure record in a case that the mean value of the grayscale meets an overexposure condition;
and
send feedback information in a case that the number of banknote images in the overexposure record reaches a preset third value.
4. A device for automatically diagnosing a sorter fault, comprising a processor and a memory storing program codes, wherein the processor performs the stored program codes to:
obtain banknote images of banknotes by scanning;
perform data processing on the banknote images based on a preset detection algorithm to obtain processing results; and
send feedback information in a case that the processing result meets a preset condition;
wherein the processor further performs the stored program codes to:
for each of the banknote images,
obtain the number of pixels of a grayscale histogram of the banknote image;
obtain a lower limit of a grayscale interval based on a preset lower limit of a ratio and the number of pixels;
obtain an upper limit of the grayscale interval based on a preset upper limit of the ratio and the number of pixels;
calculate a mean value of the grayscale based on the lower limit of the grayscale interval and the upper limit of the grayscale interval; and
record the banknote image in an overexposure record in a case that the mean value of the grayscale meets an overexposure condition.