A method for identifying medicine bottles and related devices and equipment

By acquiring multiple images of the medicine bottle and using size information, similarity and characteristic colors for identification, the errors and inefficiency caused by manual operations during the medicine bottle recognition process are solved, and high accuracy and high efficiency automation is achieved Identify.

CN114943847BActive Publication Date: 2024-12-10JIANGSU REHN MEDICAL INSTR TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210422608.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2024-12-10
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

The traditional Chinese medicine bottle recognition process relies on manual operations, which are prone to errors and are inefficient, resulting in insufficient recognition accuracy and efficiency.

Method used

By acquiring multiple collected images of the medicine bottle, using multi-dimensional features such as size information, similarity and characteristic colors for identification, we can judge whether the medicine bottle matches the sample image in the database, and realize automatic recognition.

Benefits of technology

It greatly reduces the probability of error caused by manual intervention, improves the accuracy and efficiency of bottle recognition, and reduces manual losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943847B_ABST
    Figure CN114943847B_ABST
Patent Text Reader

Abstract

The present application discloses a method for identifying a medicine bottle and related devices and equipment. The method for identifying a medicine bottle includes: obtaining multiple captured images of a medicine bottle to be identified, and identifying the captured images to obtain first size information of the medicine bottle to be identified; using the first size information to filter out multiple first sample images that meet a first preset condition from a database; filtering out multiple second sample images whose similarity with the multiple captured images meets a second preset condition from the multiple first sample images; in response to multiple second sample images meeting a third preset condition, obtaining a characteristic color of the captured image; determining whether the second sample image meeting the third preset condition contains the characteristic color of the captured image; if it does, determining that the medicine bottle in the second sample image having the characteristic color of the captured image is the same as the medicine bottle to be identified. Through the above scheme, the recognition accuracy and efficiency of medicine bottles can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical device technology, and in particular to a method for identifying a medicine bottle and a related device. Background Art

[0002] Before destroying injection bottles such as ampoules, vials and other glass bottles, it is usually necessary to identify the bottles and confirm that they are correct before destroying them. In the prior art, drug information is usually obtained manually from the bottles themselves or on the packaging, and then recorded and counted. Due to human subjective factors, errors may occur in the records, and the manual recording method is inefficient. In view of this, how to improve the accuracy and efficiency of bottle identification has become an urgent problem to be solved. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a method for identifying medicine bottles and related devices, which can improve the recognition accuracy and efficiency of medicine bottles.

[0004] To solve the above technical problems, a technical solution adopted in the present application is: to provide a method for identifying medicine bottles, comprising: obtaining multiple captured images of the medicine bottle to be identified, and identifying the captured images to obtain the first size information of the medicine bottle to be identified; using the first size information to filter out multiple first sample images that meet the first preset condition from a database; filtering out multiple second sample images whose similarity with the multiple captured images meets the second preset condition from the multiple first sample images; in response to the multiple second sample images meeting the third preset condition, obtaining the characteristic color of the captured image; judging whether the second sample image that meets the third preset condition contains the characteristic color of the captured image; if so, judging that the medicine bottle in the second sample image having the characteristic color of the captured image is the same as the medicine bottle to be identified.

[0005] Among them, the step of identifying the acquired image to obtain the first size information of the medicine bottle to be identified includes: obtaining the first width value and the first height value of the medicine bottle to be identified in each of the acquired images; wherein the first width value and the first height value of all the acquired images constitute the first size information of the medicine bottle to be identified.

[0006] Among them, the step of using the first size information to filter out multiple first sample images that meet the first preset condition from the database includes: obtaining sample images one by one from the database; for each of the acquired images, determining whether the absolute value of the difference between the second width value of the sample image and the first width value is less than or equal to a first preset value, and whether the absolute value of the difference between the second height value of the sample image and the first height value is less than or equal to a second preset value; if so, filtering out the first sample image from the sample images in the database.

[0007] Among them, the step of selecting from the multiple first sample images a plurality of second sample images whose similarity with the multiple acquired images meets a second preset condition includes: obtaining feature information of each of the acquired images; for each of the acquired images, using the feature information of the current acquired image to select from the multiple first sample images a second sample image having the highest similarity with the first sample images.

[0008] Among them, the step of responding to the multiple second sample images meeting the third preset condition includes: responding to the similarity between at least one of the acquired images and its corresponding second sample image exceeding a first threshold; or, responding to the similarity between at least two of the acquired images and their corresponding second sample images exceeding a second threshold, and at least two of the second sample images exceeding the second threshold correspond to the same medicine bottle; or, responding to the similarity between all of the acquired images and their corresponding second sample images exceeding a third threshold, and all of the second sample images correspond to the same medicine bottle; wherein the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.

[0009] Among them, after the step of judging whether the second sample image that meets the third preset condition contains the characteristic color of the acquired image, it also includes: if the second sample image that meets the third preset condition does not contain the characteristic color of the acquired image, re-acquire multiple acquired images of the medicine bottle to be identified, and judge whether the re-acquired multiple acquired images contain the characteristic color of the second sample image.

[0010] Among them, the step of obtaining the characteristic information of each of the acquired images includes: adjusting the size of each of the acquired images to meet the requirements of the preset pixel size; adjusting each of the acquired images to the same grayscale level, and obtaining its corresponding grayscale mean; for each of the acquired images, determining whether the grayscale value of each pixel of the current acquired image is greater than or equal to its corresponding grayscale mean; if so, the characteristic information corresponding to the current pixel is 1; if not, the characteristic information corresponding to the current pixel is 0.

[0011] Among them, before the step of obtaining multiple collected images of the medicine bottle to be identified, it includes: providing multiple medicine bottles of different types; obtaining multiple sample images of each of the medicine bottles in turn; obtaining the second width value and the second height value corresponding to the medicine bottle in each of the sample images; using the sample images to obtain the characteristic color of the medicine bottle; for each of the sample images, using the current sample image to obtain its corresponding characteristic information; constructing a mapping relationship between each of the sample images and the corresponding second width value and the second height value, the characteristic color and the characteristic information, and storing the mapping relationship in the database.

[0012] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide a medicine bottle identification device, comprising a memory and a processor coupled to each other, the memory storing program instructions, and the program instructions are used to be executed by the processor to implement the medicine bottle identification method mentioned in any of the above embodiments.

[0013] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to implement the medicine bottle identification method mentioned in any of the above embodiments.

[0014] Different from the prior art, the beneficial effect of the present application is as follows: the present application provides a method for identifying medicine bottles, by obtaining multiple captured images of the medicine bottles to be identified, and judging and identifying the captured images of the medicine bottles based on multi-dimensional features such as size information, similarity and characteristic color, to determine whether they are the same as the sample images in the database. Therefore, there is no need for manual verification of the medicine bottles to be identified, thereby greatly reducing the manual loss in medicine bottle identification, reducing the probability of errors that may be caused by human factors, and thereby improving the recognition accuracy and efficiency of medicine bottles. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0016] Figure 1 It is a flow chart of an implementation method of a medicine bottle identification method of the present application;

[0017] Figure 2 yes Figure 1 A structural diagram of an implementation method of step S101;

[0018] Figure 3 yes Figure 1 A schematic flow chart of an implementation method of step S101;

[0019] Figure 4 yes Figure 1 A schematic flow chart of an implementation method of step S102;

[0020] Figure 5 yes Figure 1 A schematic flow chart of an implementation method of step S103;

[0021] Figure 6 yes Figure 5 A schematic flow chart of an implementation method of step S401;

[0022] Figure 7 yes Figure 1 A schematic diagram of a flow chart of an implementation method before step S101;

[0023] Figure 8 It is a schematic diagram of the framework of an embodiment of the medicine bottle identification device of the present application;

[0024] Fig. 9 This is a schematic diagram of the structure of an embodiment of the medicine bottle identification device of the present application;

[0025] Fig.10 It is a schematic diagram of a framework of an implementation scheme of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of the method for identifying a medicine bottle of the present application. Specifically, the method may include the following steps:

[0028] S101: Acquire multiple captured images of a medicine bottle to be identified, and identify the captured images to obtain first size information of the medicine bottle to be identified.

[0029] Specifically, the above-mentioned medicine bottle to be identified refers to a type of empty medicine bottle with a cylindrical body, such as an ampoule bottle, a cillin bottle, etc., which can be set according to actual conditions and is not limited here. In a specific implementation scenario, when the medicine in the medicine bottle is used up, the medical staff can put the empty medicine bottle into the medicine bottle identification device, and the clamping component in the identification device moves the medicine bottle to the shooting range of the camera. At the same time, the clamping component drives the medicine bottle to rotate around its own central axis according to the number of rotations and the rotation angle pre-set in the processor, so that the camera can obtain the medicine bottle acquisition images at different angles. In this embodiment, the above-mentioned pre-set number of rotations can be 3 times, and the rotation angle can be 50°. In other scenarios, it can also be set to other values, which are not given one by one here. In a specific implementation scenario, every time the medicine bottle to be identified rotates 50°, the camera takes a shot to obtain a collection image. The above process is repeated three times, and finally a total of three collection images of the medicine bottle to be identified are obtained. In addition, it should be noted that the acquired medicine bottle collection image specifically refers to the side image in the length direction of the medicine bottle body.

[0030] In a specific implementation scenario, please refer to Figure 2 , Figure 2 yes Figure 1 The structural diagram of the implementation method of step S101 in the figure introduces in detail the method for obtaining the first size information of the medicine bottle. Specifically, in the process of using the recognition device to obtain the captured image, it is necessary to first configure the hardware structure used when taking pictures in advance to ensure that the contour information of the ampoule bottle is highlighted, such as setting the background plate 11 to white in advance, and adjusting the light intensity of the background light (not shown) to a suitable range. Secondly, it is necessary to perform a cropping operation on the original image obtained by shooting to obtain the captured image 13 of the medicine bottle to be identified. The above-mentioned cropping operation is used to eliminate other devices that affect the subsequent subject recognition process, such as Figure 2 The clamping assembly 15 shown in the figure is cut, and the remaining part of the original image after cropping is the acquired image 13. Finally, the medicine bottle image 17 of the medicine bottle to be identified in the acquired image 13 is obtained by using the subject recognition algorithm, wherein the subject recognition algorithm can borrow the open-cv library. It should be noted that the width and height of the medicine bottle image 17 obtained here are the first size information of the medicine bottle to be identified.

[0031] In one implementation scenario, see Figure 3 , Figure 3 yes Figure 1 The above step S101 includes:

[0032] S201: Obtain a first width value and a first height value of a medicine bottle to be identified in each captured image.

[0033] Specifically, the first width value and the first height value refer to the width and height of the pixels occupied by the medicine bottle to be identified in the collected image. In a specific implementation scenario, subject recognition processing is performed on the three collected images obtained in turn, and the width and height of the pixels occupied by the medicine bottle to be identified in each collected image are determined, and finally a total of three first width values ​​and first height values ​​are obtained.

[0034] S202: The first width value and the first height value of all the collected images constitute the first size information of the medicine bottle to be identified.

[0035] In a specific implementation scenario, for example, based on three captured images, the three first width values ​​of the medicine bottle to be identified are 18, 20 and 21, and the three first height values ​​are 48, 49 and 51, respectively. At this time, the above six values ​​together constitute the first size information of the medicine bottle to be identified, and the first width value and the first height value correspond one to one.

[0036] S102: Filtering out a plurality of first sample images that meet a first preset condition from a database using the first size information.

[0037] Specifically, see Figure 4 , Figure 4 yes Figure 1 The above step S102 includes:

[0038] S301: Obtain stored images one by one from the database.

[0039] The stored images specifically refer to the collected images corresponding to medicine bottles of all specifications of different types. It should be noted that the stored images here also obtain the side images of the medicine bottle in the length direction. In this embodiment, a total of 72 stored images are obtained for each medicine bottle. Of course, in other embodiments, the number of stored images can also be other values, which are not specifically limited here. The more the number of stored images, the higher the recognition accuracy of the medicine bottle.

[0040] S302: For each captured image, determine whether the absolute value of the difference between the second width value of the currently stored image and the first width value in the currently captured image is less than or equal to a first preset value, and whether the absolute value of the difference between the second height value of the currently stored image and the first height value is less than or equal to a second preset value.

[0041] Specifically, the second width value refers to the width value of the pixels occupied by the medicine bottle in the stored image, the second height value refers to the height value of the pixels occupied by the medicine bottle in the stored image, and the first preset condition refers to the absolute value of the difference between the second width value and the first width value of each collected image is less than or equal to the first preset value, and the absolute value of the difference between the second height value of the stored image and the first height value of all collected images is less than or equal to the second preset value. In this embodiment, the first preset value is 5 and the second preset value is 10, then the first preset condition specifically refers to the difference between the second width value and the first width value in the range of -5 to 5, and the difference between the second height value and the first height value in the range of -10 to 10.

[0042] S303: If yes, the currently stored image is selected as the first sample image.

[0043] S304: Otherwise, obtain the next stored image after the current stored image from the database, and use the next stored image as the current stored image, and return to step S302.

[0044] Specifically, in this embodiment, if there is an image that meets the first preset condition in the stored images, it will be screened out as the first sample image. In another embodiment, if there is no image that meets the first preset condition in the stored images, the recognition process is directly terminated, and a message indicating recognition failure is output in the system, which can be specifically prompted in at least one form of text, picture, sound, etc. For example, a text prompt message "Recognition failed" can be output; or a voice prompt message "Please note that the medicine bottle recognition failed!" can be output, which is not limited here.

[0045] Through the above implementation, the size features of the medicine bottles in the captured image are compared with the sizes of the medicine bottles in the stored image, and a batch of medicine bottles with similar structures are preliminarily screened out from multiple stored images, thereby improving the efficiency of the subsequent recognition process and effectively releasing more computing space.

[0046] S103: Filter out, from the plurality of first sample images, a plurality of second sample images whose similarities with the plurality of collected images meet a second preset condition.

[0047] See also Figure 5 , Figure 5 yes Figure 1 The above step S103 specifically includes:

[0048] S401: Obtain feature information of each captured image.

[0049] Specifically, in one embodiment, the feature information refers to a hash value corresponding to the image, which can be obtained by calculation using an Ahash algorithm.

[0050] Of course, in other implementations, the feature information may also include a QR code and a barcode, which is not specifically limited here.

[0051] See also Figure 6 , Figure 6 yes Figure 5 The flowchart of step S401 in the embodiment mainly introduces the specific process of obtaining image feature information using the Ahsh algorithm. The above step S401 includes:

[0052] S501: Adjust the size of each captured image to meet the requirement of preset pixel size.

[0053] Specifically, in this embodiment, the preset pixel size is 20*20, so the size of all collected images needs to be unified, and the size of each collected image is adjusted to 20*20. At this time, each image has 400 pixels. By adjusting the size of the image, the details in the image are removed, and only basic information such as structure and brightness is retained, which can eliminate the differences caused by different sizes or proportions.

[0054] S502: Adjust each captured image to the same grayscale level, and obtain its corresponding grayscale mean value.

[0055] In this embodiment, the resized captured images are converted to the same grayscale level, for example, 64 levels of grayscale. At this time, the 400 pixels in each captured image include 64 colors, and each pixel corresponds to a grayscale value. The grayscale mean of all pixels is calculated, and each captured image corresponds to a grayscale mean.

[0056] S503: For each collected image, determine whether the grayscale value of each pixel of the current collected image is greater than or equal to its corresponding grayscale mean value.

[0057] S504: If yes, the feature information corresponding to the current pixel is set to 1.

[0058] S505: If not, the feature information corresponding to the current pixel is set to 0.

[0059] Specifically, in this embodiment, the grayscale value of each pixel is compared with the grayscale mean value in turn, and finally a 400-bit integer consisting of 1 or 0 is obtained, and the value is the characteristic information of the collected image. Through the above implementation, the characteristic information of each image can be obtained, providing technical support for the subsequent step of screening sample images according to the characteristic information.

[0060] S402: For each collected image, select the second sample image having the highest similarity with the first sample image from multiple first sample images using feature information of the current collected image.

[0061] Specifically, the second preset condition in step S103 refers to the condition that the similarity between the feature information of the acquired image and the first sample image is the highest. In this embodiment, there are 3 acquired images and 50 first sample images in total. Therefore, it is necessary to calculate the similarity between the feature information of each acquired image and the 50 first sample images, and use the first sample image with the highest similarity as the second sample image corresponding to the current acquired image, and the number of second sample images finally screened out is the same as the number of acquired images.

[0062] Through the above method, second sample images with the same number as the collected images are screened out from multiple first sample images by using feature information similarity, thereby improving the efficiency of the subsequent recognition process and releasing more computing space.

[0063] S104: In response to the plurality of second sample images meeting a third preset condition, obtaining a characteristic color of the captured image.

[0064] Specifically, the characteristic color refers to other colors except transparent color and black. In addition to the black printed font and the transparent color of the bottle body, each medicine bottle also has a special color corresponding to the medicine inside. The special color is the characteristic color of the captured image.

[0065] In this embodiment, the third preset condition in the above step S104 includes three situations: one is that the similarity between at least one acquired image and its corresponding second sample image exceeds the first threshold; the second is that the similarity between at least two acquired images and their corresponding second sample images exceeds the second threshold, and at least two second sample images exceeding the second threshold correspond to the same medicine bottle; the third is that the similarity between all acquired images and their corresponding second sample images exceeds the third threshold, and all second sample images correspond to the same medicine bottle. Since the similarity is a percentage value, when the similarity between two pictures exceeds a certain percentage threshold, the two pictures are deemed to be similar. Preferably, the first threshold is set to 90%, the second threshold is set to 84%, and the third threshold is set to 74%. Of course, in other embodiments, the size of each threshold can be set as needed, and is not specifically limited here.

[0066] In yet another embodiment, if there is no image meeting the third preset condition in the second sample images, the recognition process is directly terminated, and information indicating recognition failure is output in the system.

[0067] S105: Determine whether the second sample image that meets the third preset condition contains the characteristic color of the captured image.

[0068] S106: If included, determining that the medicine bottle in the second sample image having the characteristic color of the captured image is the same as the medicine bottle to be identified.

[0069] S107: If not, reacquire multiple captured images of the medicine bottle to be identified, and determine whether the reacquired multiple captured images contain the characteristic color of the second sample image.

[0070] Specifically, according to the number of rotations and the rotation angle reset in the processor, the clamping assembly is used to drive the medicine bottle to rotate around its own central axis, and the camera obtains the medicine bottle captured images at different angles again. The number of rotations and the rotation angle reset here can be the same as the number of rotations and the rotation angle set in the first acquisition of the captured image, or they can be different, and are not specifically limited here.

[0071] In another specific implementation scenario, if the judgment result of step S105 is that the second sample image that meets the third preset condition does not contain the characteristic color of the captured image, step S107 may also be to end the recognition process and output information on recognition failure in the system, which may be in the form of at least one of text, picture, sound, etc. For example, a text prompt message "Recognition failed" may be output; or a voice prompt message "Please note that the medicine bottle recognition failed!" may be output, which is not limited here.

[0072] The above-mentioned implementation method obtains multiple captured images of the medicine bottle to be identified, and judges and identifies the captured images of the medicine bottle based on multi-dimensional features such as size information, similarity and characteristic color to determine whether they are the same as the sample images in the database. Therefore, there is no need for manual verification of the medicine bottle to be identified, thereby greatly reducing the manual loss in medicine bottle identification, reducing the probability of errors that may be caused by human factors, and thus improving the recognition accuracy and efficiency of the medicine bottle.

[0073] See also Figure 7 , Figure 7 yes Figure 1 In this embodiment, the process of establishing the medicine bottle database is described in detail, which may specifically include the following steps:

[0074] S601: Provide a plurality of medicine bottles of different types.

[0075] Specifically, since different types of medicine bottles may have the same specifications, and the same type of medicine bottles may correspond to multiple specifications, in order to improve the accuracy of medicine bottle identification, it is necessary to model medicine bottles of all types and specifications. In this embodiment, taking "ampoules" as an example, "ampoules" include different types such as "antibiotic ampoules" and "narcotic ampoules"; in addition, "narcotic ampoules" can be further refined, including "opioid ampoules", "cocaine ampoules", "synthetic anesthetic ampoules", etc.; in addition, "opioid ampoules" also include "1ml opioid ampoules", "3ml opioid ampoules", "5ml opioid ampoules", etc., which can be set according to actual needs and are not limited here.

[0076] S602: Acquire multiple sample images of each medicine bottle in sequence.

[0077] Specifically, similar to the above-mentioned method of acquiring the collected image, the clamping assembly in the recognition device is used to move the sample medicine bottle into the shooting range of the camera, and the clamping assembly drives the medicine bottle to rotate around its own central axis according to the preset number of rotations and rotation angles, so that the camera can obtain sample images of the medicine bottle at different angles. In this embodiment, the preset number of rotations can be 90 times, and the rotation angle can be 4°. In other scenarios, other values ​​can also be set. Examples are not given one by one here. The more the number of rotations set and the smaller the rotation angle, the more sample images can be obtained and the higher the recognition accuracy.

[0078] S603: Obtain a second width value and a second height value corresponding to the medicine bottle in each sample image.

[0079] Specifically, the second width value and the second height value refer to the width and height of pixels occupied by the medicine bottle in the sample image.

[0080] S604: Acquire the characteristic color of the medicine bottle using the sample image.

[0081] S605: For each sample image, use the current sample image to obtain corresponding feature information.

[0082] Specifically, the above method for obtaining the characteristic color and characteristic information of the medicine bottle in the sample image is consistent with the method for acquiring the characteristic color and characteristic information of the image.

[0083] S606: Construct a mapping relationship between each sample image and the corresponding second width value and second height value, characteristic color and characteristic information, and store the mapping relationship in a database.

[0084] Through the above method, the mapping relationship of all medicine bottles is stored in the same database, and the width value, height value, characteristic color and characteristic information are stored, which is conducive to the unified management of sample medicine bottles and facilitates the use of sample medicine bottle data during the identification process.

[0085] See also Figure 8 , Figure 8 It is a schematic diagram of the framework of an embodiment of the medicine bottle identification device of the present application. The identification device includes an acquisition module 10, a screening module 12, a judgment module 14 and a processing module 16. Specifically, the acquisition module 10 is used to obtain multiple captured images of the medicine bottle to be identified, and to identify the captured images to obtain the first size information of the medicine bottle to be identified. The screening module 12 is used to filter out multiple first sample images that meet the first preset condition from the database according to the first size information, and to filter out multiple second sample images whose similarity with the multiple captured images meets the second preset condition from the multiple first sample images. The acquisition module 10 is also used to obtain the characteristic color of the captured image in response to the multiple second sample images meeting the third preset condition. The judgment module 14 is used to determine whether the second sample image that meets the third preset condition contains the characteristic color of the captured image. The processing module 16 is used to respond to the second sample image containing the characteristic color of the captured image, and then consider that the medicine bottle in the second sample image with the characteristic color of the captured image is the same as the medicine bottle to be identified. Through the above design method, by obtaining multiple collected images of the medicine bottle to be identified, and judging and identifying the collected images of the medicine bottle based on multi-dimensional features such as size information, similarity and characteristic color, it is determined whether they are the same as the sample images in the database. Therefore, there is no need to manually check the medicine bottle to be identified, thereby greatly reducing the manual loss in medicine bottle identification, reducing the probability of errors caused by human factors, and thus improving the recognition accuracy and efficiency of the medicine bottle.

[0086] See also Fig. 9 , Fig. 9 The device includes a memory 100 and a processor 102 coupled to each other, the memory 100 stores program instructions, and the processor 102 is used to execute the program instructions to implement the quality evaluation method of the face image mentioned in any of the above embodiments.

[0087] Specifically, the processor 102 may also be referred to as a CPU (Central Processing Unit). The processor 102 may be an integrated circuit chip having the ability to process signals. The processor 102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 102 may be implemented by a plurality of integrated circuit chips.

[0088] See also Fig.10 , Fig.10 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 20 stores a computer program 200, which can be read by a computer, and the computer program 200 can be executed by a processor to implement the quality evaluation method mentioned in any of the above embodiments. Among them, the computer program 200 can be stored in the above-mentioned computer-readable storage medium 20 in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The computer-readable storage medium 20 with a storage function can be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, RandomAccess Memory), a disk or an optical disk, etc., which can store program codes, or a terminal device such as a computer, a server, a mobile phone, and a tablet.

[0089] In summary, different from the prior art, the present application provides a method for identifying medicine bottles, which obtains multiple captured images of the medicine bottles to be identified, and judges and identifies the captured images of the medicine bottles based on multi-dimensional features such as size information, similarity and characteristic color to determine whether they are the same as the sample images in the database. Therefore, there is no need for manual verification of the medicine bottles to be identified, thereby greatly reducing the manual loss in medicine bottle identification, reducing the probability of errors caused by human factors, and thereby improving the recognition accuracy and efficiency of medicine bottles.

[0090] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for identifying a medicine bottle, characterized in that: include: Acquire multiple captured images of the medicine bottle to be identified, and identify the captured images to obtain first size information of the medicine bottle to be identified; Using the first size information, screening out a plurality of first sample images that meet a first preset condition from a database; Filtering out a plurality of second sample images whose similarities with the plurality of collected images meet a second preset condition from the plurality of first sample images; In response to the plurality of second sample images meeting a third preset condition, obtaining a characteristic color of the collected image; Determining whether the second sample image that meets the third preset condition contains the characteristic color of the collected image; If so, determining that the medicine bottle in the second sample image having the characteristic color of the acquired image is the same as the medicine bottle to be identified; The step of identifying the collected image to obtain the first size information of the medicine bottle to be identified includes: Obtaining a first width value and a first height value of the medicine bottle to be identified in each of the collected images; Wherein, the first width value and the first height value of all the acquired images constitute the first size information of the medicine bottle to be identified; The step of selecting a plurality of first sample images that meet the first preset condition from the database by using the first size information includes: Obtain sample images one by one from the database; For each of the collected images, determining whether an absolute value of a difference between a second width value of the sample image and the first width value is less than or equal to a first preset value, and whether an absolute value of a difference between a second height value of the sample image and the first height value is less than or equal to a second preset value; If yes, filtering out the first sample image from the sample images in the database; The step of selecting, from the plurality of first sample images, a plurality of second sample images whose similarities with the plurality of collected images meet a second preset condition comprises: Obtaining feature information of each of the collected images; For each of the collected images, using the feature information of the current collected image, screening out the second sample image having the highest similarity thereto from a plurality of the first sample images; The step of responding that the plurality of second sample images meet the third preset condition comprises: In response to the similarity between at least one of the acquired images and its corresponding second sample image exceeding a first threshold; or, In response to the similarity between at least two of the acquired images and their corresponding second sample images exceeding a second threshold, and at least two of the second sample images exceeding the second threshold correspond to the same medicine bottle; or, In response to the similarity between all the collected images and the corresponding second sample images exceeding a third threshold, and all the second sample images correspond to the same medicine bottle; The first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.

2. The identification method according to claim 1, characterized in that: After the step of determining whether the second sample image meeting the third preset condition contains the characteristic color of the collected image, the method further includes: If the second sample image that meets the third preset condition does not contain the characteristic color of the acquired image, multiple acquired images of the medicine bottle to be identified are reacquired, and it is determined whether the reacquired multiple acquired images contain the characteristic color of the second sample image.

3. The identification method according to claim 1, characterized in that: The step of obtaining feature information of each of the collected images comprises: Adjusting the size of each of the captured images to meet the requirements of a preset pixel size; Adjusting each of the collected images to the same grayscale level and obtaining the corresponding grayscale mean value; For each of the collected images, determining whether the grayscale value of each pixel of the current collected image is greater than or equal to the corresponding grayscale mean value; If yes, the feature information corresponding to the current pixel is 1; If not, the feature information corresponding to the current pixel is set to 0.

4. The identification method according to claim 1, characterized in that: Before the step of acquiring multiple collected images of the medicine bottle to be identified, the method includes: Provide multiple medicine bottles of different types; sequentially acquiring a plurality of sample images of each of the medicine bottles; Obtaining a second width value and a second height value corresponding to the medicine bottle in each of the sample images; Acquire the characteristic color of the medicine bottle using the sample image; For each of the sample images, using the current sample image to obtain the corresponding feature information; A mapping relationship between each sample image and the corresponding second width value, second height value, characteristic color and characteristic information is constructed, and the mapping relationship is stored in the database.

5. A device for identifying medicine bottles, characterized in that: It comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the program instructions are used to be executed by the processor to implement the medicine bottle identification method according to any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to implement the medicine bottle identification method according to any one of claims 1 to 4.