| With the rapid development of people’s living standard, people are paying more andmore attention to the quality of medicines. The quality of medicines has close relationship notonly with the credit of drugs-making companies, but also with people’s health. As the primaryway of encapsulation, the capsule quality detection becomes one of the most important partsin the drug-producing process. Mass production of medicines calls for accurate and fastquality testing lines. However, capsule detection in China aims mainly at the dose of thecapsules and the inspection of breakage detection is mainly achieved by using artificialversion. The automatic line exists many problems such as low efficiency, undetection etc. andalso increase the costs for the company. Based on this circumstance, this paper, using highlydeveloped image processing technology as its detecting method and digital signal processor(abbreviated as DPS) as its detecting platform, put forward a new way of detecting morethan one double color capsule as well as their damage degree and damaged area.In terms of hardware, this paper chooses TMS320DM642 made by TI Company as theprocessing chip and realizes high-speed capsule detection by taking over one picture of thecapsules through CCD. Meanwhile, the digital signal processor collects pictures of thecapsules from four faces through CCD, and connects to a four road codec to realize thefour-face detection of the capsules.In terms of software, this paper firstly makes analysis on CCS3.3 which is thedevelopment environment of DSP, then elaborates debugging tools for the system, COFF filesand programming procedures. I also analyze image display and processing method and reducethe commonly-seen noises in hardware platform. By comparing the advantages anddisadvantages of different ways of noise decoupling, I choose median filter and mean filter asthe algorithm for noise reduction. In the stage of detecting of multi-capsule, this paperidentifies the edge of the capsule by means of the method of edge detection and then carriesthe detection of four faces of the capsule respectively. In the process of detecting, currentalgorithm can only detect half of the capsule. This paper comes up with the method of doublegated segmentation, color reversing and image synthesis as to reduce DSP image processingdata. In terms of damage degree, this paper figures out the damaged area and analyzes grayhistogram in order to realize the irregularly shaped capsule detection. |