WO2020233340A1 - 一种产品规格录入、检测方法及系统 - Google Patents

一种产品规格录入、检测方法及系统 Download PDF

Info

Publication number
WO2020233340A1
WO2020233340A1 PCT/CN2020/086567 CN2020086567W WO2020233340A1 WO 2020233340 A1 WO2020233340 A1 WO 2020233340A1 CN 2020086567 W CN2020086567 W CN 2020086567W WO 2020233340 A1 WO2020233340 A1 WO 2020233340A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
product
template image
target image
template
Prior art date
Application number
PCT/CN2020/086567
Other languages
English (en)
French (fr)
Inventor
俞天白
陈福兵
许敏
Original Assignee
苏州微创关节医疗科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州微创关节医疗科技有限公司 filed Critical 苏州微创关节医疗科技有限公司
Priority to US17/604,701 priority Critical patent/US20220207739A1/en
Publication of WO2020233340A1 publication Critical patent/WO2020233340A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • G06T7/0014Biomedical image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30242Counting objects in image

Definitions

  • the invention belongs to the technical field of medical devices, and relates to a product specification entry and detection method and system.
  • the purpose of the present invention is to provide a product specification entry and detection method and system to realize effective identification of product specifications, improve identification efficiency, and reduce the probability of packaging errors.
  • the specific technical plan is as follows:
  • the present invention provides a product specification entry method, including:
  • the template image, the parameter range of the similarity score, and the parameter range of each of the preset features are saved to complete the entry of the specifications of the product model to be entered.
  • comparing the template image with each of the state images to determine the similarity score of each of the state images and the template image includes:
  • the array corresponding to each state image is compared with the array corresponding to the template image to determine the similarity score of each state image and the template image.
  • processing the template image to obtain an array corresponding to the template image includes:
  • Processing each state image to obtain an array corresponding to each state image includes:
  • Binarization is performed on each state image, and the pixel values of each pixel in each state image after the binarization process are converted into arrays to obtain an array corresponding to each state image.
  • comparing the array corresponding to each state image with the array corresponding to the template image to determine the similarity score of each state image and the template image includes:
  • the exhaustive method is used to compare with the array corresponding to the template image to obtain the maximum approximation value between the state image and the template image, as the state image and the template The approximate score of the image.
  • determining the parameter range of the similarity score corresponding to the sample product according to the similarity score of each state image and the template image includes:
  • the parameter range of the similarity score corresponding to the sample product is determined.
  • the at least one preset feature of the sample product includes: the number of holes of the sample product in the status image, the maximum length of the sample product in the status image, and the The proportion of the area occupied by the sample product in the status image.
  • acquiring the parameter value of at least one preset feature of the sample product from each of the status images respectively includes:
  • the parameter value of at least one preset feature of the sample product is obtained from the state image in the following manner:
  • the present invention provides a product specification entry system, including:
  • the first image acquisition module is used to collect sample images of the same sample product whose product model is to be entered, and intercept the image of the area where the sample product is located from the sample image as a template image;
  • the second image acquisition module is used to acquire state images of at least two states of the sample product
  • the first image comparison module is configured to compare each state image with the template image, and determine the similarity score of each state image and the template image;
  • the first range determining module is configured to determine the parameter range of the similarity score corresponding to the sample product according to the similarity score of each of the state images and the template image;
  • the first feature obtaining module is configured to obtain the parameter value of at least one preset feature of the sample product from each of the state images;
  • the second range determining module is configured to determine the parameter range of each preset feature according to the acquired parameter value of each preset feature
  • the specification entry module is used to save the template image, the parameter range of the similarity score, and the parameter range of each preset feature, so as to complete the entry of the specifications of the product model to be entered.
  • the first image comparison module includes:
  • the first array obtaining unit is configured to process the template image to obtain an array corresponding to the template image, and process each of the state images to obtain an array corresponding to each of the state images;
  • the first array comparison unit is used to respectively compare the array corresponding to each state image with the array corresponding to the template image, and determine the similarity score of each state image and the template image.
  • the first array obtaining unit is specifically used for:
  • Binarization is performed on each state image, and the pixel values of each pixel in each state image after the binarization process are converted into arrays to obtain an array corresponding to each state image.
  • the first array comparison unit is specifically used for:
  • the exhaustive method is used to compare with the array corresponding to the template image to obtain the maximum approximation value between the state image and the template image, as the state image and the template The approximate score of the image.
  • the first range determining module is specifically used for:
  • the parameter range of the similarity score corresponding to the sample product is determined.
  • the at least one preset feature of the sample product includes: the number of holes of the sample product in the status image, the maximum length of the sample product in the status image, and the The proportion of the area occupied by the sample product in the status image.
  • the first feature acquisition module is specifically configured to:
  • the parameter value of at least one preset feature of the sample product is obtained from the state image in the following manner:
  • the present invention provides a product specification detection method, including:
  • the product model of the sample product is the same as the product model identified by the product to be tested, and the parameter range includes: the parameter range of the similarity score and at least one The parameter value range of the preset feature;
  • the similarity score is within the parameter range of the similarity score, acquiring a parameter value of at least one preset feature of the product to be detected from the target image;
  • comparing the target image with the template image to determine the similarity score of the target image and the template image includes:
  • the array corresponding to the target image is compared with the array corresponding to the template image to determine the similarity score of the target image and the template image.
  • processing the target image to obtain an array corresponding to the target image includes:
  • Processing the template image to obtain the array corresponding to the template image includes:
  • Binarization is performed on the template image, and the pixel values of each pixel in the template image after the binarization are converted into an array to obtain an array corresponding to the template image.
  • comparing the array corresponding to the target image with the array corresponding to the template image to determine the similarity score of the target image and the template image includes:
  • the exhaustive method is used to compare with the array corresponding to the template image, and the maximum approximation value between the target image and the template image is obtained as the difference between the target image and the template image Approximation score.
  • the at least one preset feature of the product to be inspected includes: the number of holes of the product to be inspected in the target image, the maximum length of the product to be inspected in the target image, and the The proportion of the area occupied by the area where the product to be detected is located in the target image.
  • obtaining a parameter value of at least one preset feature of the product to be inspected from the target image includes:
  • the method further includes:
  • the target image of the product to be tested is stored.
  • the present invention provides a product specification detection system, including:
  • the third image acquisition module is used to acquire the target image of the product to be inspected
  • the sample acquisition module is used to acquire the template image and parameter range of the same sample product; wherein the product model of the sample product is the same as the product model identified by the product to be tested, and the parameter range includes: similarity score The parameter range of the value and the parameter value range of at least one preset feature;
  • the second image comparison module is configured to compare the target image with the template image and determine the similarity score of the target image and the template image;
  • a second feature acquisition module configured to obtain a parameter value of at least one preset feature of the product to be inspected from the target image if the similarity score is within the parameter range of the similarity score;
  • the specification detection module is used to determine whether the acquired parameter value of at least one preset feature is within the parameter value range of the at least one preset feature, so as to determine whether the specification of the product to be detected is the same as the identified product model The specifications match.
  • the second image comparison module includes:
  • the second array obtaining unit is configured to process the target image to obtain the array corresponding to the target image, and process the template image to obtain the array corresponding to the template image;
  • the second array comparison unit is used to compare the array corresponding to the target image with the array corresponding to the template image, and determine the similarity score of the target image and the template image.
  • the second array obtaining unit is specifically used for:
  • Binarization is performed on the template image, and the pixel values of each pixel in the template image after the binarization are converted into an array to obtain an array corresponding to the template image.
  • the second array of comparison units is specifically used for:
  • the exhaustive method is used to compare with the array corresponding to the template image, and the maximum approximation value between the target image and the template image is obtained as the difference between the target image and the template image Approximation score.
  • the at least one preset feature of the product to be inspected includes: the number of holes of the product to be inspected in the target image, the maximum length of the product to be inspected in the target image, and the The proportion of the area occupied by the area where the product to be detected is located in the target image.
  • the second feature acquisition module is specifically used for:
  • system further includes:
  • the information storage module is used to store the target image of the product to be tested, the similarity score of the target image and the template image, and the parameter value of at least one preset feature of the product to be tested.
  • the template image and parameter range corresponding to the product of the product model to be entered are obtained, Store the template image and parameter range as the specification data of the product to be entered into the product model.
  • the stored template image and parameter range provide prerequisites for subsequent product specification testing. At the same time, it realizes the automatic entry of product specifications and improves the entry speed. .
  • FIG. 1 is a schematic flowchart of a method for inputting product specifications according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a product specification detection method provided by an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a product specification entry device provided by an embodiment of the present invention.
  • Fig. 4 is a schematic structural diagram of a product specification detection device provided by an embodiment of the present invention.
  • the core idea of the present invention is to identify product specifications, including product specification information input and detection.
  • product specification information When entering product specification information, select the same sample product for each product model, and then obtain the template image and parameter range corresponding to the sample product through the sample product (the parameter range includes the parameter range of the approximate degree score and at least one prediction Set the parameter range of the feature), the template image and parameter range corresponding to the sample product can be used as the specification data of the product of the product model, and the obtained template image and parameter range are saved;
  • the specifications are tested and identified, the product model identified by the product to be tested is obtained, and the template image and parameter range of the corresponding sample product are called.
  • the similarity score of the target image of the product to be tested and the template image is similar within the parameter range of the score, and the parameter value of at least one preset feature of the product to be tested is also within the parameter range of at least one preset feature, it can be determined that the specifications of the product to be tested are consistent with the specifications of the sample product. That is, the product model identified by the product to be tested is correct, thereby realizing effective identification of product specifications, reducing the probability of packaging errors, and improving the efficiency of specification identification.
  • FIG. 1 is a schematic flowchart of a method for inputting product specifications according to an embodiment of the present invention.
  • a product specification entry method includes the following steps:
  • Step S101 Collect sample images of the same example product of the product model to be entered, and intercept the image of the area where the sample product is located from the sample image as a template image.
  • Product model refers to a code that the manufacturer uses numbers or letters to distinguish products of different specifications, also called product ID number.
  • sample images of the same sample product to be entered into the product model can be collected by an image acquisition device.
  • the image acquisition device can be an imaging system specifically designed for product specification recognition, or it can be a common household camera, etc. Etc., depending on the complexity and distinction of the product.
  • the imaging system may be composed of a high-speed industrial camera, a fixed focus lens, a circular array light source, a camera power supply, a light source controller, and a high-speed shielded network cable.
  • the image of the area where the sample product is located is intercepted from the sample image as a template image, and the intercepted template image can be subsequently used for product specification detection.
  • the image of the area where the sample product is located is cut out from the sample image by slicing to obtain the template image.
  • Step S102 Collect state images of at least two states of the sample product.
  • the sample products can be placed according to different placement positions, so as to collect state images when the sample products are in different placement positions.
  • Collecting multiple status images is to obtain the parameter range of at least one preset feature of the sample product according to the multiple status images.
  • the number of collected status images can be set according to actual requirements, for example, set to 5. It is understandable that the sample image collected in step S101 can be used as a state image, and then at least one state image of another state can be collected in this step S102.
  • step S103 the template image is compared with each of the state images, and the similarity score of each state image and the template image is determined.
  • the template image may be processed to obtain an array corresponding to the template image
  • each state image may be processed to obtain an array corresponding to each state image
  • the array corresponding to each state image is compared with the array corresponding to the template image to determine the similarity score of each state image and the template image.
  • the template image can be processed in the following ways to obtain the array corresponding to the template image: the template image is binarized; the pixel value of each pixel in the template image after the binarization process is arrayed and converted to obtain the template The array corresponding to the image.
  • the gray value of the pixels on the template image can be set to 0 or 255, so the pixel value of each pixel in the template image after binarization is 0 or 255, and then Perform array conversion to obtain an array corresponding to the template image.
  • the value of each element in the array corresponding to the template image is 0 or 255, and the number of elements in the array corresponding to the template image is equal to the number of pixels in the template image.
  • the array corresponding to each state image can be obtained by processing each state image in the following ways: first, perform binarization processing on each image; then, perform binarization processing on each image The pixel value of each pixel in each subsequent state image is converted into an array to obtain an array corresponding to each state image.
  • the approximate score of each state image and the template image can be determined in the following way: for the array corresponding to each state image, the exhaustive method can be used to compare with the array corresponding to the template image to obtain the template image and The maximum similarity value of the state image is used as the similarity score of the template image and the state image.
  • the exhaustive method is used to compare the arrays, that is, the array corresponding to the template image is compared with the array corresponding to any subregion in the state image (the size of each subregion is the same as the size of the template image).
  • the approximate value of the template image and the subregion is determined according to the number of matching elements in the two arrays.
  • the approximation value is used to indicate the degree of similarity between the template image and a sub-area in the state image.
  • the sub-area with the greatest similarity to the template image is the area where the sample product in the state image is located.
  • the sub-area with the largest approximation value The area where the sample product is located in the state image is found, and the approximation value (that is, the maximum approximation value) of the sub-area is used as the similarity score between the template image and the state image.
  • Step S104 Determine the parameter range of the similarity score corresponding to the sample product according to the similarity score of each state image and the template image.
  • the average value of the similarity scores of the 5 state images and the template image is calculated, and then an appropriate lower limit is set on the basis of the average value to determine the minimum degree of similarity score Value to get the parameter range of the approximate degree score.
  • Step S105 Acquire parameter values of at least one preset feature of the sample product from each of the status images.
  • the preset features of the sample product can be set according to the shape and structure of the sample product.
  • the preset features of the sample product can be three, namely: the number of holes of the sample product in the status image, the maximum length of the sample product in the status image, and the sample product in the status image The proportion of the area occupied by the area.
  • the parameter values of the three preset features of the sample product can be obtained from the status image in the following manner:
  • the number of numerically enclosed areas in the array can be counted for the array corresponding to the state image to obtain the number of holes of the sample product in the state image .
  • the number of holes in the sample product can be obtained by counting the number of numerically enclosed areas in the array corresponding to the status image. In other embodiments, it is also possible to manually count and input the number of holes in the sample product, or to identify the holes in the sample product through image recognition of the status image, and count the number of identified holes to obtain The number of holes for the sample product described in the status image.
  • Step S106 Determine the parameter range of each preset feature according to the acquired parameter value of each preset feature.
  • each preset feature first, calculate the average value of the parameter value of the preset feature based on the parameter value of the preset feature; then, determine the preset feature based on the average value of the parameter value of the preset feature Set the parameter range of the feature.
  • the maximum length feature Take the maximum length feature as an example, obtain a maximum length value through each state image, and then calculate the average value of the maximum length value, and then set appropriate upper and lower limits on the basis of the average value to form the maximum length
  • the range of parameters As for the number of holes, the number of holes in the product of the same example is fixed, that is, the parameter range corresponding to the number of holes is a constant.
  • Step S107 Save the template image, the parameter range of the similarity score, and the parameter range of each preset feature to complete the entry of the specifications of the product model to be entered.
  • the template image, the parameter range of the similarity score and the parameter range of each preset feature are the specifications of the product model to be entered. Therefore, the template image, the parameter range (including the parameter range of the similarity score and the parameter range of each preset feature) can be stored in association with the product model information to be entered, so as to realize the entry of the specification information of the product model to be entered.
  • the template image and parameter range information can be stored in the form of files and folders, the parameter range information can be written into the parameter file, and the template image and parameter file can be saved in a folder.
  • Product specification information can be stored in the form of files and folders, the parameter range information can be written into the parameter file, and the template image and parameter file can be saved in a folder.
  • the product specification entry method collects sample images of the sample product of the product model to be entered and at least two state images of the sample product, and processes them based on these images to obtain
  • the template image and parameter range corresponding to the product to be entered into the product model, and the template image and parameter range are stored as the specification data of the product to be entered into the product model.
  • the stored template image and parameter range provide the premise for subsequent product specification testing Conditions, at the same time, the automatic entry of product specifications is realized, and the entry speed is improved.
  • FIG. 2 is a schematic flowchart of a product specification detection method according to an embodiment of the present invention.
  • a product specification detection method includes the following steps:
  • Step S201 Collect a target image of the product to be inspected.
  • Step S202 Obtain a template image and a parameter range of a sample product; wherein the product model of the sample product is the same as the product model identified by the product to be tested, and the parameter range includes: the parameter range of the similarity score And the parameter value range of at least one preset feature.
  • the template image of the sample product of the same product model and the parameter range corresponding to the sample product can be called by the product model identified by the product to be detected.
  • the product model identified by the product to be tested can be set in the form of a barcode on the product to be tested, and the product model identified by the product to be tested can be obtained by scanning the code, or directly manually input the product model identified by the product to be tested.
  • Step S203 Compare the target image with the template image, and determine the similarity score of the target image and the template image.
  • the target image may be processed to obtain the array corresponding to the target image
  • the template image may be processed to obtain the array corresponding to the template image
  • the array corresponding to the target image is compared with the array corresponding to the template image to determine the similarity score of the target image and the template image.
  • the target image can be processed in the following ways to obtain the array corresponding to the target image: first, the target image is binarized; then, the pixel value of each pixel in the target image after the binarization process is arrayed Convert to get the array corresponding to the target image.
  • the gray value of the pixel on the target image can be set to 0 or 255, so the pixel value of each pixel in the target image after binarization is 0 or 255, and then Perform array conversion to obtain an array corresponding to the target image.
  • the value of each element in the array corresponding to the target image is 0 or 255, and the number of elements in the array corresponding to the target image is equal to the number of pixels in the target image.
  • the method of processing the template image to obtain the array corresponding to the template image can be: first, the template image is binarized; then, the pixel value of each pixel in the template image after the binarization process is converted into an array , Get the array corresponding to the template image.
  • the gray value of the pixels on the template image can be set to 0 or 255, so the pixel value of each pixel in the template image after binarization is 0 or 255, and then After the array conversion, the array corresponding to the template image is obtained.
  • the value of each element in the array corresponding to the template image is 0 or 255, and the number of elements in the array array corresponding to the template image is equal to the number of pixels in the template image .
  • an exhaustive method may be used to compare with the array corresponding to the template image to obtain the target image
  • the maximum similarity value with the template image is used as the similarity score of the target image and the template image.
  • the similarity scores of the target image and the template image it can be determined whether the similarity scores are within the parameter range of the similarity scores. If it is not, it means that the similarity between the target image and the template image is small, that is, the product to be tested is not similar to the sample product, and it can be directly determined that the specifications of the product to be tested do not match the specifications of the identified product model. If it is, it means that the target image and the template image are more similar, that is, the product to be tested and the sample product are more similar, you need to continue to compare at least one preset feature to further determine the specifications and specifications of the product to be tested Whether the specifications of the identified product model match.
  • Step S204 If the similarity score is within the parameter range of the similarity score, obtain a parameter value of at least one preset feature of the product to be detected from the target image.
  • At least one preset feature of the product to be detected is the same as at least one preset feature of the sample product.
  • the preset features of the product to be inspected may be three, namely: the number of holes of the product to be inspected in the target image, the maximum length of the product to be inspected in the target image, and the The proportion of the area occupied by the area where the product to be detected is located in the target image.
  • the preset feature can also be the maximum width of the product, and if it is a round product, the preset feature can also be the geometric feature of the product such as the radius of the product.
  • the preset features can be 1, 2, 3, or more than 4, which is not specifically limited here.
  • the parameter values of the three preset features of the product to be detected may be obtained from the target image in the following manner:
  • the number of numerically enclosed areas in the array can be counted for the array corresponding to the target image to obtain the number of holes of the product to be inspected in the target image. For example, in the array corresponding to the target image, if the values of the elements in a certain area are all 255, and the values of the elements in the peripheral area of the area are all 0, it means that the area is the area where the hole is located. , The number of holes in the product to be inspected can be obtained by counting the number of closed areas in the array corresponding to the target image.
  • the length of the product to be inspected can be used as the X axis of the coordinate system, and the direction perpendicular to the length of the product to be inspected can be used as the Y axis of the coordinate system.
  • the maximum length of the detected product in the state image, and the ratio of the area defined by the contour line of the area where the product to be detected is located to the area of the target image is calculated to obtain the area ratio of the area where the product to be detected is located in the target image.
  • Step S205 Determine whether the acquired parameter value of the at least one preset feature is within the parameter value range of the at least one preset feature, so as to determine whether the specification of the product to be detected is consistent with the identified product model.
  • the specifications of the product to be tested and the identified product can be determined The specifications of the product model match, that is, the actual product model of the product to be tested matches the product model identified. If the parameter value of a preset feature is not within the corresponding parameter range, the specifications of the product to be tested are determined to be consistent with the identified product model. The specifications of the product model do not match. Furthermore, it can be determined whether the packaging of the product to be tested is wrong, if it is determined that the packaging of the product to be tested is wrong, further processing of the product to be tested is required, such as replacing the wrong packaging with the correct packaging.
  • the target image of the product to be tested After it is determined that the specifications of the product to be tested are consistent with the identified product model, the target image of the product to be tested, the similarity score of the target image and the template image, and the target image of the product to be tested
  • the parameter value of at least one preset feature of the product is stored.
  • the product number of the product to be tested can be identified (the product number is a unique identification number of the product), and the above-mentioned related information is associated with the product number of the product to be tested for storage.
  • the product model, product batch number (the product batch number is the identification number of different batches of a product model), and the operator (that is, the person performing the specification test) information of the product to be tested can also be stored in association.
  • the above-mentioned related information of the product to be tested is stored, so that the operation process can be traced and the information can be exported for query.
  • the product specification detection method collects the target image of the product to be tested, calls the template image and parameter range corresponding to the corresponding sample product, and determines the target image, template image, and parameter range. Whether the specifications of the tested product are consistent with the specifications of the identified product model, the effective identification of the specifications of the product to be tested is realized, and the identification efficiency is high, and by determining whether the specifications of the product to be tested are consistent with the specifications of the identified product model, It is convenient to check whether the packaging of the product to be tested is correct, which can reduce the probability of product packaging errors.
  • Figure 3 is a schematic structural diagram of a product specification entry system provided by an embodiment of the present invention, including:
  • the first image collection module 301 is configured to collect sample images of the same sample product whose product model is to be entered, and intercept the image of the area where the sample product is located from the sample image as a template image;
  • the second image acquisition module 302 is configured to acquire state images of at least two states of the sample product
  • the first image comparison module 303 is configured to compare the template image with each of the state images, and determine the similarity score of each of the state images and the template image;
  • the first range determining module 304 is configured to determine the parameter range of the similarity score corresponding to the sample product according to the similarity score of each state image and the template image;
  • the first feature obtaining module 305 is configured to obtain the parameter value of at least one preset feature of the sample product from each of the state images;
  • the second range determining module 306 is configured to determine the parameter range of each preset feature according to the acquired parameter value of each preset feature
  • the specification entry module 307 is configured to save the template image, the parameter range of the similarity score, and the parameter range of each preset feature to complete the entry of the specifications of the product model to be entered.
  • the first image comparison module 303 includes:
  • the first array obtaining unit is configured to process the template image to obtain an array corresponding to the template image, and process each of the state images to obtain an array corresponding to each of the state images;
  • the first array comparison unit is used to respectively compare the array corresponding to each state image with the array corresponding to the template image, and determine the similarity score of each state image and the template image.
  • the first array obtaining unit is specifically used for:
  • Binarization is performed on each state image, and the pixel values of each pixel in each state image after the binarization process are converted into arrays to obtain an array corresponding to each state image.
  • the first array comparison unit is specifically used for:
  • the exhaustive method is used to compare with the array corresponding to the template image, and the maximum approximation value between the template image and the state image is obtained as the template image and the state image Approximation score.
  • the first range determining module 304 is specifically configured to:
  • the parameter range of the similarity score corresponding to the sample product is determined.
  • At least one preset feature of the sample product is: the number of holes of the sample product in the status image, the maximum length of the sample product in the status image, and the The proportion of the area occupied by the sample product in the status image.
  • the first feature acquisition module 305 is specifically configured to:
  • the parameter value of at least one preset feature of the sample product is obtained from the state image in the following manner:
  • the product specification entry system collects the sample image of the sample product to be entered and the state images of at least two states of the sample product, and processes them based on these images to obtain the product model to be entered.
  • the template image and parameter range corresponding to the product of the product.
  • the template image and parameter range are stored as the specification data of the product to be entered into the product model.
  • the stored template image and parameter range provide preconditions for subsequent product specification testing, and achieve The automatic entry of product specifications has improved the entry speed.
  • FIG. 4 is a schematic structural diagram of a product specification detection system provided by an embodiment of the present invention, including:
  • the third image acquisition module 401 is used to acquire a target image of the product to be detected
  • the sample acquisition module 402 is used to acquire the template image and parameter range of the same sample product; wherein the product model of the sample product is the same as the product model identified by the product to be tested, and the parameter range includes: similarity The parameter range of the score and the parameter value range of at least one preset feature;
  • the second image comparison module 403 is configured to compare the target image with the template image, and determine the similarity score of the target image and the template image;
  • the second feature obtaining module 404 is configured to obtain a parameter value of at least one preset feature of the product to be inspected from the target image if the similarity score is within the parameter range of the similarity score;
  • the specification detection module 405 is configured to determine whether the acquired parameter value of at least one preset feature is within the parameter value range of the at least one preset feature, so as to determine whether the specification of the product to be detected is consistent with the identified product model Meet the specifications.
  • the second image comparison module 403 includes:
  • the second array obtaining unit is configured to process the target image to obtain the array corresponding to the target image, and process the template image to obtain the array corresponding to the template image;
  • the second array comparison unit is used to compare the array corresponding to the target image with the array corresponding to the template image, and determine the similarity score of the target image and the template image.
  • the second array obtaining unit is specifically used for:
  • Binarization is performed on the template image, and the pixel values of each pixel in the template image after the binarization are converted into an array to obtain an array corresponding to the template image.
  • the second array comparison unit is specifically used for:
  • the exhaustive method is used to compare with the array corresponding to the template image, and the maximum approximation value between the target image and the template image is obtained as the difference between the target image and the template image Approximation score.
  • the at least one preset feature of the product to be inspected includes: the number of holes of the product to be inspected in the target image, the maximum length of the product to be inspected in the target image, and the The proportion of the area occupied by the area where the product to be detected is located in the target image.
  • the second feature acquisition module 404 is specifically configured to:
  • system further includes:
  • the information storage module is used to store the target image of the product to be tested, the similarity score of the target image and the template image, and the parameter value of at least one preset feature of the product to be tested.
  • the product specification detection system collects the target image of the product to be tested, calls the template image and parameter range corresponding to the corresponding sample product, and determines the specifications of the product to be tested through the target image, template image and parameter range Whether it is consistent with the specifications of the identified product model, the effective identification of the specifications of the product to be tested is realized, and the identification efficiency is high, and by determining whether the specifications of the product to be tested are consistent with the specifications of the identified product model, it is convenient to check the product to be tested Whether the product packaging is correct can reduce the probability of product packaging errors.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Radiology & Medical Imaging (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Image Analysis (AREA)

Abstract

一种产品规格录入、检测方法及系统。其中,产品规格录入方法和系统通过采集待录入产品型号的样例产品的样例图像和至少两个状态的状态图像,基于这些图像进行处理,得到待录入产品型号对应的模板图像以及参数范围,作为待录入产品型号的规格数据进行存储,以便于为后续的产品规格检测提供前提条件;产品规格检测方法和系统采集待检测产品的目标图像,调用相应的样例产品的模板图像以及对应的参数范围,通过目标图像、模板图像以及对应的参数范围来确定待检测产品自身的规格与所标识的产品型号是否相符,实现了对待检测产品的规格的有效识别,且识别效率高,并且可便于检查产品包装是否正确,降低产品包装出错的概率。

Description

一种产品规格录入、检测方法及系统 技术领域
本发明属于医疗器械技术领域,涉及一种产品规格录入、检测方法及系统。
背景技术
在医疗器械领域,医疗器械产品的种类繁多,各个种类下还细分不同的产品类型。例如,植入到人体用于脊柱创伤修复的产品,因为人体脊柱的复杂构造和不同人骨骼之间的区别,产品类型极其复杂繁多,有20000多种,而且很多产品的特征极其相似,这就给产品包装人员和相关管理人员造成了很大的困扰,稍有疏忽就可能造成混料,存在危及病人肢体生存,甚至威胁病人生命安全的风险。
在生产过程中,通过将特征相似的产品分割成不同的产品批次,在其中间插入特征相差较大的产品批次进行生产包装,可以避免绝大多数产品包装出错的现象。但是,因为需求的多样性,不能保证相邻的产品批次的产品特征相差特别大,如果操作人员操作疏忽,就容易导致产品包装出错。包装出错的产品将会给医疗人员造成很大的困扰,也易危及患者的生命安全。
目前,为了对产品规格进行检测识别以避免包装出错,可以通过工装识别不同规格的产品的长度、宽度、孔径,这在一定程度上可以有效的识别不同规格的产品。但是面对20000多种不同规格的产品,通过工装识别不同规格的产品的长度、宽度、孔径就显得不合实际,而且工装的管理归类本身就是非常复杂的事情。
因此,如何对产品规格进行有效识别,提高识别效率,降低包装出错的概率,是一项亟待解决的问题。
发明内容
本发明的目的在于提供一种产品规格录入、检测方法及系统,以实现对产品规格的有效识别,提高识别效率,降低包装出错的概率。具体的技术方 案如下:
第一方面,本发明提供了一种产品规格录入方法,包括:
采集待录入产品型号的一样例产品的样例图像,从所述样例图像中截取所述样例产品所在区域的图像作为模板图像;
采集所述样例产品的至少两个状态的状态图像;
将每一所述状态图像与所述模板图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值;
根据每一所述状态图像与所述模板图像的近似度分值,确定所述样例产品对应的近似度分值的参数范围;
分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值;
根据所获取的每一所述预设特征的参数值,确定每一预设特征的参数范围;
对所述模板图像、所述近似度分值的参数范围和每一所述预设特征的参数范围进行保存,以完成录入所述待录入产品型号的规格。
可选的,将所述模板图像与每一所述状态图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值,包括:
对所述模板图像进行处理得到所述模板图像对应的数组,以及,对每一所述状态图像进行处理得到每一所述状态图像对应的数组;
分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值。
可选的,对所述模板图像进行处理得到所述模板图像对应的数组,包括:
对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组;
对每一所述状态图像进行处理得到每一所述状态图像对应的数组,包括:
对每一所述状态图像进行二值化处理,对二值化处理后的每一所述状态图像中各个像素点的像素值进行数组化转换,得到每一所述状态图像对应的数组。
可选的,分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值,包括:
针对每一所述状态图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述状态图像与所述模板图像的最大近似度值,作为所述状态图像与所述模板图像的近似度分值。
可选的,根据每一所述状态图像与所述模板图像的近似度分值,确定所述样例产品对应的近似度分值的参数范围,包括:
根据每一所述状态图像与所述模板图像的近似度分值,计算近似度分值的平均值;
根据所述近似度分值的平均值,确定所述样例产品对应的近似度分值的参数范围。
可选的,所述样例产品的至少一个预设特征包括:在所述状态图像中所述样例产品的孔数、在所述状态图像中所述样例产品的最大长度以及在所述状态图像中所述样例产品所在区域所占的面积比例。
可选的,分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值,包括:
针对每一所述状态图像,通过如下方式从该状态图像中获取所述样例产品的至少一个预设特征的参数值:
获得该状态图像中所述样例产品的孔数;
在该状态图像中建立坐标系,在所述坐标系下测量所述样例产品在该状态图像中的最大长度,以及,在所述坐标系下计算所述样例产品所在区域在该状态图像中所占的面积比例。
第二方面,本发明提供了一种产品规格录入系统,包括:
第一图像采集模块,用于采集待录入产品型号的一样例产品的样例图像,从所述样例图像中截取所述样例产品所在区域的图像作为模板图像;
第二图像采集模块,用于采集所述样例产品的至少两个状态的状态图像;
第一图像对比模块,用于将每一所述状态图像与所述模板图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值;
第一范围确定模块,用于根据每一所述状态图像与所述模板图像的近似度分值,确定所述样例产品对应的近似度分值的参数范围;
第一特征获取模块,用于分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值;
第二范围确定模块,用于根据所获取的每一所述预设特征的参数值,确定每一预设特征的参数范围;
规格录入模块,用于对所述模板图像、所述近似度分值的参数范围和每一所述预设特征的参数范围进行保存,以完成录入所述待录入产品型号的规格。
可选的,所述第一图像对比模块,包括:
第一数组获得单元,用于对所述模板图像进行处理得到所述模板图像对应的数组,以及,对每一所述状态图像进行处理得到每一所述状态图像对应的数组;
第一数组对比单元,用于分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值。
可选的,所述第一数组获得单元,具体用于:
对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组;
对每一所述状态图像进行二值化处理,对二值化处理后的每一所述状态图像中各个像素点的像素值进行数组化转换,得到每一所述状态图像对应的数组。
可选的,所述第一数组对比单元,具体用于:
针对每一所述状态图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述状态图像与所述模板图像的最大近似度值,作为所述状态图像与所述模板图像的近似度分值。
可选的,所述第一范围确定模块,具体用于:
根据每一所述状态图像与所述模板图像的近似度分值,计算近似度分值 的平均值;
根据所述近似度分值的平均值,确定所述样例产品对应的近似度分值的参数范围。
可选的,所述样例产品的至少一个预设特征包括:在所述状态图像中所述样例产品的孔数、在所述状态图像中所述样例产品的最大长度以及在所述状态图像中所述样例产品所在区域所占的面积比例。
可选的,所述第一特征获取模块,具体用于:
针对每一所述状态图像,通过如下方式从该状态图像中获取所述样例产品的至少一个预设特征的参数值:
获得该状态图像中所述样例产品的孔数;
在该状态图像中建立坐标系,在所述坐标系下测量所述样例产品在该状态图像中的最大长度,以及,在所述坐标系下计算所述样例产品所在区域在该状态图像中所占的面积比例。
第三方面,本发明提供了一种产品规格检测方法,包括:
采集待检测产品的目标图像;
获取一样例产品的模板图像以及参数范围;其中,所述样例产品的产品型号与所述待检测产品所标识的产品型号相同,所述参数范围包括:近似度分值的参数范围和至少一个预设特征的参数值范围;
将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值;
若所述近似度分值处于所述近似度分值的参数范围内,则从所述目标图像获取所述待检测产品的至少一个预设特征的参数值;
判断所获取的至少一个预设特征的参数值是否处于所述至少一个预设特征的参数值范围内,以确定所述待检测产品的规格是否与所标识的产品型号的规格相符。
可选的,将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值,包括:
对所述目标图像进行处理得到所述目标图像对应的数组,以及,对所述 模板图像进行处理得到所述模板图像对应的数组;
将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值。
可选的,对所述目标图像进行处理得到所述目标图像对应的数组,包括:
对所述目标图像进行二值化处理,对二值化处理后的所述目标图像中各个像素点的像素值进行数组化转换,得到所述目标图像对应的数组;
对所述模板图像进行处理得到所述模板图像对应的数组,包括:
对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组。
可选的,将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值,包括:
针对所述目标图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述目标图像与所述模板图像的最大近似度值,作为所述目标图像与所述模板图像的近似度分值。
可选的,所述待检测产品的至少一个预设特征包括:在所述目标图像中所述待检测产品的孔数、在所述目标图像中所述待检测产品的最大长度以及在所述目标图像中所述待检测产品所在区域所占的面积比例。
可选的,从所述目标图像获取所述待检测产品的至少一个预设特征的参数值,包括:
获得所述目标图像中所述待检测产品的孔数;
在所述目标图像中建立坐标系,在所述坐标系下测量所述待检测产品在所述目标图像中的最大长度,以及,在所述坐标系下计算所述待检测产品所在区域在所述目标图像中所占的面积比例。
可选的,所述方法还包括:
对所述待检测产品的目标图像、所述目标图像与所述模板图像的近似度分值和所述待检测产品的至少一个预设特征的参数值进行存储。
第四方面,本发明提供了一种产品规格检测系统,包括:
第三图像采集模块,用于采集待检测产品的目标图像;
样例获取模块,用于获取一样例产品的模板图像以及参数范围;其中,所述样例产品的产品型号与所述待检测产品所标识的产品型号相同,所述参数范围包括:近似度分值的参数范围和至少一个预设特征的参数值范围;
第二图像对比模块,用于将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值;
第二特征获取模块,用于若所述近似度分值处于所述近似度分值的参数范围内,则从所述目标图像获取所述待检测产品的至少一个预设特征的参数值;
规格检测模块,用于判断所获取的至少一个预设特征的参数值是否处于所述至少一个预设特征的参数值范围内,以确定所述待检测产品的规格是否与所标识的产品型号的规格相符。
可选的,所述第二图像对比模块,包括:
第二数组获得单元,用于对所述目标图像进行处理得到所述目标图像对应的数组,以及,对所述模板图像进行处理得到所述模板图像对应的数组;
第二数组对比单元,用于将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值。
可选的,所述第二数组获得单元,具体用于:
对所述目标图像进行二值化处理,对二值化处理后的所述目标图像中各个像素点的像素值进行数组化转换,得到所述目标图像对应的数组;
对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组。
可选的,第二数组对比单元,具体用于:
针对所述目标图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述目标图像与所述模板图像的最大近似度值,作为所述目标图像与所述模板图像的近似度分值。
可选的,所述待检测产品的至少一个预设特征包括:在所述目标图像中所述待检测产品的孔数、在所述目标图像中所述待检测产品的最大长度以及在所述目标图像中所述待检测产品所在区域所占的面积比例。
可选的,所述第二特征获取模块,具体用于:
获得所述目标图像中所述待检测产品的孔数;
在所述目标图像中建立坐标系,在所述坐标系下测量所述待检测产品在所述目标图像中的最大长度,以及,在所述坐标系下计算所述待检测产品所在区域在所述目标图像中所占的面积比例。
可选的,所述系统还包括:
信息存储模块,用于对所述待检测产品的目标图像、所述目标图像与所述模板图像的近似度分值和所述待检测产品的至少一个预设特征的参数值进行存储。
与现有技术相比,本发明提供的产品规格录入、检测方法及系统具有如下有益效果:
通过采集待录入产品型号的样例产品的样例图像和样例产品的至少两个状态的状态图像,基于这些图像进行处理,得到与待录入产品型号的产品相对应的模板图像以及参数范围,将模板图像和参数范围作为待录入产品型号的产品的规格数据进行存储,存储后的模板图像和参数范围为后续的产品规格检测提供前提条件,同时实现了产品规格的自动录入,提高了录入速度。
通过采集待检测产品的目标图像,调用相应的样例产品对应的模板图像以及参数范围,通过目标图像、模板图像以及参数范围确定待检测产品的规格是否与所标识的产品型号的规格相符,实现了对待检测产品的规格的有效识别,且识别效率高,并且通过确定待检测产品规格是否与所标识的产品型号的规格相符,可便于检查待检测产品的包装是否正确,能够降低产品的包装出错的概率。
附图说明
图1是本发明一实施例提供的一种产品规格录入方法的流程示意图;
图2是本发明一实施例提供的一种产品规格检测方法的流程示意图;
图3是本发明一实施例提供的一种产品规格录入装置的结构示意图;
图4是本发明一实施例提供的一种产品规格检测装置的结构示意图。
具体实施方式
本发明的核心思想在于对产品规格进行识别,包括产品规格信息录入和检测两部分。在录入产品规格信息时,针对每一产品型号选择一样例产品,进而通过该样例产品获得该样例产品对应的模板图像以及参数范围(参数范围包括近似度分值的参数范围和至少一个预设特征的参数范围),该样例产品对应的模板图像以及参数范围可以作为该产品型号的产品的规格数据,并将获得的模板图像以及参数范围进行保存;当需要对某一待检测产品的规格进行检测识别时,获取该待检测产品所标识的产品型号,并调用相应的样例产品的模板图像以及参数范围,若该待检测产品的目标图像与模板图像的近似度分值在近似度分值的参数范围内,且该待检测产品的至少一个预设特征的参数值也在至少一个预设特征的参数范围内,则可以判定该待检测产品的规格与样例产品的规格一致,即该待检测产品所标识的产品型号是正确的,从而实现对产品规格的有效识别,降低包装出错的概率,同时提高规格识别效率。
为使本发明的目的、优点和特征更加清楚,以下结合附图和具体实施例对本发明提出的一种产品规格录入、检测方法及系统作进一步详细说明。
首先对本发明提出的一种产品规格录入方法进行说明。
请参考图1,图1是本发明一实施例提供的一种产品规格录入方法的流程示意图。一种产品规格录入方法包括以下步骤:
步骤S101,采集待录入产品型号的一样例产品的样例图像,从所述样例图像中截取所述样例产品所在区域的图像作为模板图像。
产品型号是指生产厂家对生产的不同规格的产品,用数字或字母分别标记以利于区分的一种代码,也叫产品ID号。本实施例中,可以通过一图像采集设备采集待录入产品型号的一样例产品的样例图像,该图像采集设备可以为专门为产品规格识别而设计的影像系统,也可以是普通的家用相机等等,视产品的形貌复杂度和区别度而定。在一种实施例中,该影像系统可以由高速工业相机、定焦镜头、环形阵列光源、相机电源、光源控制器、高速屏蔽 网线构成。
在采集到样例图像后,从样例图像中截取出样例产品所在区域的图像作为模板图像,截取的所述模板图像后续可用于产品规格检测。例如,通过切片的方式从样例图像中截取出样例产品所在区域的图像,得到模板图像。
步骤S102,采集所述样例产品的至少两个状态的状态图像。
具体而言,可以将所述样例产品按照不同的摆放位置进行摆放,从而采集样例产品处于不同摆放位置时的状态图像。采集多个状态图像是为了根据多个状态图像获得样例产品的至少一个预设特征的参数范围,所采集的状态图像的数量可以根据实际需求进行设置,例如设置为5个。可以理解的是,步骤S101所采集的样例图像可以作为一个状态图像,那么此步骤S102中采集至少一个其它状态的状态图像即可。
步骤S103,将所述模板图像与每一所述状态图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值。
具体的,在一种实施例中,首先,可以对所述模板图像进行处理得到所述模板图像对应的数组,并对每一所述状态图像进行处理得到每一所述状态图像对应的数组;然后,分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值。
其中,可以通过以下方式对模板图像进行处理得到模板图像对应的数组:对模板图像进行二值化处理;对二值化处理后的模板图像中各个像素点的像素值进行数组化转换,得到模板图像对应的数组。对模板图像进行二值化处理时,可以将模板图像上的像素点的灰度值设置为0或255,因此二值化处理后的模板图像中各个像素点的像素值为0或255,然后进行数组化转换,得到与模板图像对应的数组,与模板图像对应的数组中各个元素的值为0或255,且与模板图像对应的数组中元素的数量等于模板图像中像素点的数量。
与获得模板图像对应的数组的方式相同,可以通过以下方式对每一状态图像进行处理得到每一状态图像对应的数组:首先,对每一图像进行二值化处理;然后,对二值化处理后的每一状态图像中各个像素点的像素值进行数 组化转换,得到每一状态图像对应的数组。
其中,可以通过以下方式确定每一所述状态图像与所述模板图像的近似度分值:针对每一状态图像对应的数组,可以采用穷尽法与模板图像对应的数组进行对比,得到模板图像与该状态图像的最大近似度值,作为模板图像与该状态图像的近似度分值。
可以理解的是,本实施例中,采用穷尽法进行数组的对比,即将模板图像对应的数组与状态图像中任一子区域(每一子区域的大小与模板图像的大小相同)对应的数组进行对比,根据两个数组中相匹配元素的数量确定模板图像与该子区域的近似度值。近似度值用于表示模板图像与状态图像中一子区域的相似程度,通常与模板图像相似程度最大的子区域就是状态图像中样例产品所在的区域,因此找到近似度值最大的子区域就找到了状态图像中样例产品所在的区域,将该子区域的近似度值(即最大近似度值)作为模板图像与该状态图像的近似度分值。
步骤S104,根据每一所述状态图像与所述模板图像的近似度分值,确定与所述样例产品对应的近似度分值的参数范围。
具体的,首先,根据每一状态图像与模板图像的近似度分值,计算近似度分值的平均值;然后,根据近似度分值的平均值,确定样例产品对应的近似度分值的参数范围。
例如,状态图像的数量为5个,则对5个状态图像与模板图像的近似度分值计算平均值,然后在平均值的基础上设置适当的下限值,以确定近似度分值的最小值,从而得到近似度分值的参数范围。
步骤S105,分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值。
样例产品的预设特征可以根据样例产品的形状和结构进行设定。在一个实施例中,样例产品的预设特征可以为3个,分别为:在状态图像中样例产品的孔数、在状态图像中样例产品的最大长度、在状态图像中样例产品所在区域所占的面积比例。
具体的,对于上述三个预设特征,针对每一状态图像,可以通过如下方 式从该状态图像中获取样例产品的三个预设特征的参数值:
获得该状态图像中所述样例产品的孔数;
在该状态图像中建立坐标系,在所述坐标系下测量样例产品在该状态图像中的最大长度,以及在所述坐标系下计算所述样例产品所在区域在该状态图像中所占的面积比例。
其中,在本实施例中,获得该状态图像中所述样例产品的孔数,可以针对状态图像对应的数组,统计数组中数值封闭区域的数量,得到该状态图像中样例产品的孔数。举例而言,在状态图像对应的数组中,若某一区域内的元素的值均为255,而该区域的外围区域内的元素的值均为0,则表示该区域为孔所在区域,因此,通过统计状态图像对应的数组中数值封闭区域的数量可以得到样例产品的孔数。在其它实施例中,也可以通过人工统计并输入样例产品的孔数,还可以通过对状态图像进行图像识别,识别出样例产品中的孔,并统计所识别出的孔的数量,得到状态图像中所述样例产品的孔数。
在状态图像中建立坐标系,具体可以以样例产品的长度方向为坐标系的X轴、以垂直于样例产品的长度方向的方向为坐标系的Y轴,之后在X轴方向上测量样例产品在该状态图像中的最大长度,以及,通过计算样例产品所在区域的轮廓线所限定的面积与状态图像的面积之比,得到样例产品所在区域在状态图像中所占的面积比例。
步骤S106,根据所获取的每一预设特征的参数值,确定每一预设特征的参数范围。
具体的,针对每一预设特征,首先,根据该预设特征的参数值,计算该预设特征的参数值的平均值;然后,根据该预设特征的参数值的平均值,确定该预设特征的参数范围。
以最大长度特征为例,通过每一状态图像均获得一最大长度的数值,进而计算最大长度的数值的平均值,然后在平均值的基础上设置适当的上、下限值,以组成最大长度的参数范围。而对于孔数而言,一样例产品中的孔数是一定的,即孔数对应的参数范围为一常数,比如有3个孔,则参数范围为3。
步骤S107,对所述模板图像、所述近似度分值的参数范围和每一预设特 征的参数范围进行保存,以完成录入所述待录入产品型号的规格。
所述模板图像、所述近似度分值的参数范围和每一预设特征的参数范围,即为所述待录入产品型号的规格。因此,可以将模板图像、参数范围(包括:近似度分值的参数范围和每一预设特征的参数范围)与待录入产品型号信息进行关联存储,实现待录入产品型号的规格信息的录入。
在一种实施例中,可以以文件和文件夹的形式存储模板图像、参数范围信息,将参数范围信息写入参数文件,将模板图像和参数文件保存在文件夹中,文件夹的名称以待录入产品型号进行命名。通过文件和文件夹的形式管理大量产品的模板图像和参数范围信息,这样可以建立数量庞大的产品信息资料库,实现不同产品的规格信息的有序管理,以及便于在后续检测识别过程中调用相应产品的规格信息。
综上所述,本实施例提供的产品规格录入方法,通过采集待录入产品型号的样例产品的样例图像和样例产品的至少两个状态的状态图像,基于这些图像进行处理,得到与待录入产品型号的产品相对应的模板图像以及参数范围,将模板图像和参数范围作为待录入产品型号的产品的规格数据进行存储,存储后的模板图像和参数范围为后续的产品规格检测提供前提条件,同时实现了产品规格的自动录入,提高了录入速度。
下面再对本发明提出的一种产品规格检测方法进行说明。
请参考图2,图2是本发明一实施例提供的一种产品规格检测方法的流程示意图。一种产品规格检测方法包括以下步骤:
步骤S201,采集待检测产品的目标图像。
需要注意的是,本实施例中,需要检测待检测产品所标识的产品型号的规格是否符合上一实施例中所录入的规格信息,而这是基于采集的目标图像进行判断的。因此为避免由于采集图像的误差而产生的判断误差,本实施例中需要采用上一实施例中采集样例图像的图像采集设备,来采集待检测产品的目标图像。
步骤S202,获取一样例产品的模板图像以及参数范围;其中,所述样例 产品的产品型号与所述待检测产品所标识的产品型号相同,所述参数范围包括:近似度分值的参数范围和至少一个预设特征的参数值范围。
具体的,可以通过待检测产品所标识的产品型号来调用相同产品型号的样例产品的模板图像以及样例产品对应的参数范围。待检测产品所标识的产品型号可以以条码的形式设置在待检测产品上,则可以通过扫码的方式获得待检测产品所标识的产品型号,或者直接手动输入待检测产品所标识的产品型号。
步骤S203,将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值。
具体的,在一种实施例中,首先,可以对所述目标图像进行处理得到所述目标图像对应的数组,以及,对所述模板图像进行处理得到所述模板图像对应的数组;然后,将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值。
其中,可以通过以下方式对目标图像进行处理得到目标图像对应的数组:首先,对目标图像进行二值化处理;然后,对二值化处理后的目标图像中各个像素点的像素值进行数组化转换,得到目标图像对应的数组。对目标图像进行二值化处理时,可以将目标图像上的像素点的灰度值设置为0或255,因此二值化处理后的目标图像中各个像素点的像素值为0或255,然后进行数组化转换,得到与目标图像对应的数组,与目标图像对应的数组中各个元素的值为0或255,且与目标图像对应的数组中元素的数量等于目标图像中像素点的数量。
对模板图像进行处理得到模板图像对应的数组的方式,可以为:首先,对模板图像进行二值化处理;然后,对二值化处理后的模板图像中各个像素点的像素值进行数组化转换,得到模板图像对应的数组。对模板图像进行二值化处理时,可以将模板图像上的像素点的灰度值设置为0或255,因此二值化处理后的模板图像中各个像素点的像素值为0或255,然后进行数组化转换后,得到与模板图像对应的数组,与模板图像对应的数组中各个元素的值为0或255,且与模板图像对应的数组数组中元素的数量等于模板图像中像素点的 数量。
在确定所述目标图像与所述模板图像的近似度分值时,具体的,针对所述目标图像对应的数组,可以采用穷尽法与所述模板图像对应的数组进行对比,得到所述目标图像与所述模板图像的最大近似度值,作为所述目标图像与所述模板图像的近似度分值。
在得到目标图像与模板图像的近似度分值之后,可以判断近似度分值是否处于近似度分值的参数范围内。如果不处于,表示目标图像与模板图像的相似度较小,即待检测产品与样例产品的不相似,则可以直接判定待检测产品的规格与所标识的产品型号的规格不相符。如果处于,表示目标图像与模板图像的相似度较大,即待检测产品与样例产品的相似度较大,则需要继续通过至少一个预设特征的对比,来进一步判断待检测产品的规格与所标识的产品型号的规格是否相符。
步骤S204,若所述近似度分值处于所述近似度分值的参数范围内,则从所述目标图像获取所述待检测产品的至少一个预设特征的参数值。
待检测产品的至少一个预设特征与样例产品的至少一个预设特征相同。例如,待检测产品的预设特征可以为3个,分别为:在所述目标图像中所述待检测产品的孔数、在所述目标图像中所述待检测产品的最大长度、在所述目标图像中所述待检测产品所在区域所占的面积比例。需要说明的是,根据产品的特点,预设特征还可以是产品的最大宽度,如果为圆形产品,预设特征还可以是产品的半径等等产品的几何特征。根据产品的复杂程度及与其他产品的相似度,预设特征可以为1个、2个、3个或4个以上,在此不做特别限定。
具体的,对于上述三个预设特征,可以按照以下方式从所述目标图像获取所述待检测产品的三个预设特征的参数值:
获得所述目标图像中所述待检测产品的孔数;
在所述目标图像中建立坐标系,在所述坐标系下测量所述待检测产品在所述目标图像中的最大长度,以及,在所述坐标系下计算所述待检测产品所在区域在所述目标图像中所占的面积比例。
其中,在本实施例中,获得目标图像中所述待检测产品的孔数,可以针对目标图像对应的数组,统计数组中数值封闭区域的数量,得到目标图像中待检测产品的孔数。举例而言,在目标图像对应的数组中,若某一区域内的元素的值均为255,而该区域的外围区域内的元素的值均为0,则表示该区域为孔所在区域,因此,通过统计目标图像对应的数组中数值封闭区域的数量可以得到待检测产品的孔数。在其它实施例中,也可以通过人工统计并输入待检测产品的孔数,还可以通过对目标图像进行图像识别,识别出待检测产品的孔,统计所识别出的孔的数量,得到目标图像中所述待检测产品的孔数。
在目标图像中建立坐标系,具体可以以待检测产品的长度方向为坐标系的X轴、以垂直于待检测产品的长度方向的方向为坐标系的Y轴,之后在X轴方向上测量待检测产品在该状态图像中的最大长度,以及通过计算待检测产品所在区域的轮廓线所限定的面积与目标图像的面积之比,得到待检测产品所在区域在目标图像中所占的面积比例。
步骤S205,判断所获取的至少一个预设特征的参数值是否处于所述至少一个预设特征的参数值范围内,以确定所述待检测产品的规格是否与所标识的产品型号相符。
将所获取的至少一个预设特征的参数值与相应的参数值范围进行比对,若每一预设特征的参数值均在相应的参数范围内,即可确定待检测产品的规格与所标识的产品型号的规格相符,即待检测产品的真实产品型号与所标识的产品型号相符,若有一项预设特征的参数值不在相应的参数范围内,则确定待检测产品的规格与所标识的产品型号的规格不相符。进而可以判定待检测产品的包装是否出错,若判定待检测产品的包装出错,需要对待检测产品进行进一步处理,如将错误的包装换为正确的包装。
以脊柱创伤修复的产品为例,由于此类产品形状很多,通过模板图像对比可以区别出大多数不同型号的产品,然而有些产品形状大致相同但是产品本体上的通孔数量不一致、或者产品尺寸不一致,因此,再通过预设特征孔数、长度、面积比例对比即可判断出产品规格与所标识的产品型号是否一致。
进一步的,在确定待检测产品的规格与所标识的产品型号相符后,还可 以对所述待检测产品的目标图像、所述目标图像与所述模板图像的近似度分值、所述待检测产品的至少一个预设特征的参数值进行存储。在一种实施例中,可以识别待检测产品的产品号(产品号是产品的唯一标识号),将上述相关信息与待检测产品的产品号相关联进行存储。在其它实施例中,还可以将待检测产品的产品型号、产品批号(产品批号是一产品型号的不同批次的标识号)、操作人员(即进行规格检测的人员)信息也进行关联存储。将待检测产品的上述相关信息进行存储,实现了操作过程可追溯、信息可导出查询。
综上所述,本实施例提供的产品规格检测方法,通过采集待检测产品的目标图像,调用相应的样例产品对应的的模板图像以及参数范围,通过目标图像、模板图像以及参数范围确定待检测产品的规格是否与所标识的产品型号的规格相符,实现了对待检测产品的规格的有效识别,且识别效率高,并且通过确定待检测产品规格是否与所标识的产品型号的规格相符,可便于检查待检测产品的包装是否正确,能够降低产品的包装出错的概率。
与上述的产品规格录入方法相对应,本发明还提供了一种产品规格录入系统,图3为本发明一实施例提供的一种产品规格录入系统的结构示意图,包括:
第一图像采集模块301,用于采集待录入产品型号的一样例产品的样例图像,从所述样例图像中截取所述样例产品所在区域的图像作为模板图像;
第二图像采集模块302,用于采集所述样例产品的至少两个状态的状态图像;
第一图像对比模块303,用于将所述模板图像与每一所述状态图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值;
第一范围确定模块304,用于根据每一所述状态图像与所述模板图像的近似度分值,确定所述样例产品对应的近似度分值的参数范围;
第一特征获取模块305,用于分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值;
第二范围确定模块306,用于根据所获取的每一预设特征的参数值,确定 每一预设特征的参数范围;
规格录入模块307,用于对所述模板图像、所述近似度分值的参数范围和每一预设特征的参数范围进行保存,以完成录入所述待录入产品型号的规格。
可选的,所述第一图像对比模块303,包括:
第一数组获得单元,用于对所述模板图像进行处理得到所述模板图像对应的数组,以及,对每一所述状态图像进行处理得到每一所述状态图像对应的数组;
第一数组对比单元,用于分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值。
可选的,所述第一数组获得单元,具体用于:
对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组;
对每一所述状态图像进行二值化处理,对二值化处理后的每一所述状态图像中各个像素点的像素值进行数组化转换,得到每一所述状态图像对应的数组。
可选的,所述第一数组对比单元,具体用于:
针对每一所述状态图像对应的数组,分别采用穷尽法与所述模板图像对应的数组进行对比,得到所述模板图像与该状态图像的最大近似度值,作为所述模板图像与该状态图像的近似度分值。
可选的,所述第一范围确定模块304,具体用于:
根据每一所述状态图像与所述模板图像的近似度分值,计算近似度分值的平均值;
根据所述近似度分值的平均值,确定所述样例产品对应的近似度分值的参数范围。
可选的,所述样例产品的至少一个预设特征为:在所述状态图像中所述样例产品的孔数、在所述状态图像中所述样例产品的最大长度、在所述状态图像中所述样例产品所在区域所占的面积比例。
可选的,所述第一特征获取模块305,具体用于:
针对每一所述状态图像,通过如下方式从该状态图像中获取所述样例产品的至少一个预设特征的参数值:
获得该状态图像中所述样例产品的孔数;
在该状态图像中建立坐标系,在所述坐标系下测量所述样例产品在该状态图像中的最大长度,以及,在所述坐标系下计算所述样例产品所在区域在该状态图像中所占的面积比例。
本发明实施例提供的产品规格录入系统,通过采集待录入产品型号的样例产品的样例图像和样例产品的至少两个状态的状态图像,基于这些图像进行处理,得到与待录入产品型号的产品相对应的模板图像以及参数范围,将模板图像和参数范围作为待录入产品型号的产品的规格数据进行存储,存储后的模板图像和参数范围为后续的产品规格检测提供前提条件,同时实现了产品规格的自动录入,提高了录入速度。
与上述的产品规格检测方法相对应,本发明还提供了一种产品规格检测系统,图4为本发明一实施例提供的一种产品规格检测系统的结构示意图,包括:
第三图像采集模块401,用于采集待检测产品的目标图像;
样例获取模块402,用于获取一样例产品的模板图像以及参数范围;其中,所述样例产品的产品型号与所述待检测产品所标识的产品型号相同,所述参数范围包括:近似度分值的参数范围和至少一个预设特征的参数值范围;
第二图像对比模块403,用于将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值;
第二特征获取模块404,用于若所述近似度分值处于所述近似度分值的参数范围内,则从所述目标图像获取所述待检测产品的至少一个预设特征的参数值;
规格检测模块405,用于判断所获取的至少一个预设特征的参数值是否处于所述至少一个预设特征的参数值范围内,以确定所述待检测产品的规格是 否与所标识的产品型号的规格相符。
可选的,所述第二图像对比模块403,包括:
第二数组获得单元,用于对所述目标图像进行处理得到所述目标图像对应的数组,以及,对所述模板图像进行处理得到所述模板图像对应的数组;
第二数组对比单元,用于将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值。
可选的,所述第二数组获得单元,具体用于:
对所述目标图像进行二值化处理,对二值化处理后的所述目标图像中各个像素点的像素值进行数组化转换,得到所述目标图像对应的数组;
对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组。
可选的,所述第二数组对比单元,具体用于:
针对所述目标图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述目标图像与所述模板图像的最大近似度值,作为所述目标图像与所述模板图像的近似度分值。
可选的,所述待检测产品的至少一个预设特征包括:在所述目标图像中所述待检测产品的孔数、在所述目标图像中所述待检测产品的最大长度、在所述目标图像中所述待检测产品所在区域所占的面积比例。
可选的,所述第二特征获取模块404,具体用于:
获得所述目标图像中所述待检测产品的孔数;
在所述目标图像中建立坐标系,在所述坐标系下测量所述待检测产品在所述目标图像中的最大长度,以及,在所述坐标系下计算所述待检测产品所在区域在所述目标图像中所占的面积比例。
可选的,所述系统还包括:
信息存储模块,用于对所述待检测产品的目标图像、所述目标图像与所述模板图像的近似度分值和所述待检测产品的至少一个预设特征的参数值进行存储。
本发明实施例提供的产品规格检测系统,通过采集待检测产品的目标图 像,调用相应的样例产品对应的的模板图像以及参数范围,通过目标图像、模板图像以及参数范围确定待检测产品的规格是否与所标识的产品型号的规格相符,实现了对待检测产品的规格的有效识别,且识别效率高,并且通过确定待检测产品规格是否与所标识的产品型号的规格相符,可便于检查待检测产品的包装是否正确,能够降低产品的包装出错的概率。
需要说明的是,本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
上述描述仅是对本发明较佳实施例的描述,并非对本发明范围的任何限定,本发明领域的普通技术人员根据上述揭示内容做的任何变更、修饰,均属于权利要求书的保护范围。

Claims (28)

  1. 一种产品规格录入方法,其特征在于,包括:
    采集待录入产品型号的一样例产品的样例图像,从所述样例图像中截取所述样例产品所在区域的图像作为模板图像;
    采集所述样例产品的至少两个状态的状态图像;
    将每一所述状态图像与所述模板图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值;
    根据每一所述状态图像与所述模板图像的近似度分值,确定所述样例产品对应的近似度分值的参数范围;
    分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值;
    根据所获取的每一所述预设特征的参数值,确定每一预设特征的参数范围;
    对所述模板图像、所述近似度分值的参数范围和每一所述预设特征的参数范围进行保存,以完成录入所述待录入产品型号的规格。
  2. 如权利要求1所述的产品规格录入方法,其特征在于,将所述模板图像与每一所述状态图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值,包括:
    对所述模板图像进行处理得到所述模板图像对应的数组,以及,对每一所述状态图像进行处理得到每一所述状态图像对应的数组;
    分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值。
  3. 如权利要求2所述的产品规格录入方法,其特征在于,对所述模板图像进行处理得到所述模板图像对应的数组,包括:
    对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组;
    对每一所述状态图像进行处理得到每一所述状态图像对应的数组,包括:
    对每一所述状态图像进行二值化处理,对二值化处理后的每一所述状态图像中各个像素点的像素值进行数组化转换,得到每一所述状态图像对应的数组。
  4. 如权利要求2所述的产品规格录入方法,其特征在于,分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值,包括:
    针对每一所述状态图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述状态图像与所述模板图像的最大近似度值,作为所述状态图像与所述模板图像的近似度分值。
  5. 如权利要求1所述的产品规格录入方法,其特征在于,根据每一所述状态图像与所述模板图像的近似度分值,确定所述样例产品对应的近似度分值的参数范围,包括:
    根据每一所述状态图像与所述模板图像的近似度分值,计算近似度分值的平均值;
    根据所述近似度分值的平均值,确定所述样例产品对应的近似度分值的参数范围。
  6. 如权利要求1所述的产品规格录入方法,其特征在于,所述样例产品的至少一个预设特征包括:在所述状态图像中所述样例产品的孔数、在所述状态图像中所述样例产品的最大长度以及在所述状态图像中所述样例产品所在区域所占的面积比例。
  7. 如权利要求6所述的产品规格录入方法,其特征在于,分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值,包括:
    针对每一所述状态图像,通过如下方式从该状态图像中获取所述样例产品的至少一个预设特征的参数值:
    获得该状态图像中所述样例产品的孔数;
    在该状态图像中建立坐标系,在所述坐标系下测量所述样例产品在该状态图像中的最大长度,以及,在所述坐标系下计算所述样例产品所在区域在该状态图像中所占的面积比例。
  8. 一种产品规格录入系统,其特征在于,包括:
    第一图像采集模块,用于采集待录入产品型号的一样例产品的样例图像,从所述样例图像中截取所述样例产品所在区域的图像作为模板图像;
    第二图像采集模块,用于采集所述样例产品的至少两个状态的状态图像;
    第一图像对比模块,用于将每一所述状态图像与所述模板图像进行对比,确定每一所述状态图像与所述模板图像的近似度分值;
    第一范围确定模块,用于根据每一所述状态图像与所述模板图像的近似度分值,确定所述样例产品对应的近似度分值的参数范围;
    第一特征获取模块,用于分别从每一所述状态图像获取所述样例产品的至少一个预设特征的参数值;
    第二范围确定模块,用于根据所获取的每一所述预设特征的参数值,确定每一预设特征的参数范围;
    规格录入模块,用于对所述模板图像、所述近似度分值的参数范围和每一所述预设特征的参数范围进行保存,以完成录入所述待录入产品型号的规格。
  9. 如权利要求8所述的产品规格录入系统,其特征在于,所述第一图像对比模块,包括:
    第一数组获得单元,用于对所述模板图像进行处理得到所述模板图像对应的数组,以及,对每一所述状态图像进行处理得到每一所述状态图像对应的数组;
    第一数组对比单元,用于分别将每一所述状态图像对应的数组与所述模板图像对应的数组进行对比,确定每一所述状态图像与所述模板图像的近似度分值。
  10. 如权利要求9所述的产品规格录入系统,其特征在于,所述第一数组获得单元,具体用于:
    对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组;
    对每一所述状态图像进行二值化处理,对二值化处理后的每一所述状态 图像中各个像素点的像素值进行数组化转换,得到每一所述状态图像对应的数组。
  11. 如权利要求9所述的产品规格录入系统,其特征在于,所述第一数组对比单元,具体用于:
    针对每一所述状态图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述状态图像与所述模板图像的最大近似度值,作为所述状态图像与所述模板图像的近似度分值。
  12. 如权利要求8所述的产品规格录入系统,其特征在于,所述第一范围确定模块,具体用于:
    根据每一所述状态图像与所述模板图像的近似度分值,计算近似度分值的平均值;
    根据所述近似度分值的平均值,确定所述样例产品对应的近似度分值的参数范围。
  13. 如权利要求8所述的产品规格录入系统,其特征在于,所述样例产品的至少一个预设特征包括:在所述状态图像中所述样例产品的孔数、在所述状态图像中所述样例产品的最大长度以及在所述状态图像中所述样例产品所在区域所占的面积比例。
  14. 如权利要求13所述的产品规格录入系统,其特征在于,所述第一特征获取模块,具体用于:
    针对每一所述状态图像,通过如下方式从该状态图像中获取所述样例产品的至少一个预设特征的参数值:
    获得该状态图像中所述样例产品的孔数;
    在该状态图像中建立坐标系,在所述坐标系下测量所述样例产品在该状态图像中的最大长度,以及,在所述坐标系下计算所述样例产品所在区域在该状态图像中所占的面积比例。
  15. 一种产品规格检测方法,其特征在于,包括:
    采集待检测产品的目标图像;
    获取一样例产品的模板图像以及参数范围;其中,所述样例产品的产品 型号与所述待检测产品所标识的产品型号相同,所述参数范围包括:近似度分值的参数范围和至少一个预设特征的参数值范围;
    将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值;
    若所述近似度分值处于所述近似度分值的参数范围内,则从所述目标图像获取所述待检测产品的至少一个预设特征的参数值;
    判断所获取的至少一个预设特征的参数值是否处于所述至少一个预设特征的参数值范围内,以确定所述待检测产品的规格是否与所标识的产品型号的规格相符。
  16. 如权利要求15所述的产品规格检测方法,其特征在于,将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值,包括:
    对所述目标图像进行处理得到所述目标图像对应的数组,以及,对所述模板图像进行处理得到所述模板图像对应的数组;
    将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值。
  17. 如权利要求16所述的产品规格检测方法,其特征在于,对所述目标图像进行处理得到所述目标图像对应的数组,包括:
    对所述目标图像进行二值化处理,对二值化处理后的所述目标图像中各个像素点的像素值进行数组化转换,得到所述目标图像对应的数组;
    对所述模板图像进行处理得到所述模板图像对应的数组,包括:
    对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组。
  18. 如权利要求16所述的产品规格检测方法,其特征在于,将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值,包括:
    针对所述目标图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述目标图像与所述模板图像的最大近似度值,作为所述目 标图像与所述模板图像的近似度分值。
  19. 如权利要求15所述的产品规格检测方法,其特征在于,所述待检测产品的至少一个预设特征包括:在所述目标图像中所述待检测产品的孔数、在所述目标图像中所述待检测产品的最大长度以及在所述目标图像中所述待检测产品所在区域所占的面积比例。
  20. 如权利要求19所述的产品规格检测方法,其特征在于,从所述目标图像获取所述待检测产品的至少一个预设特征的参数值,包括:
    获得所述目标图像中所述待检测产品的孔数;
    在所述目标图像中建立坐标系,在所述坐标系下测量所述待检测产品在所述目标图像中的最大长度,以及,在所述坐标系下计算所述待检测产品所在区域在所述目标图像中所占的面积比例。
  21. 如权利要求15所述的产品规格检测方法,其特征在于,所述方法还包括:
    对所述待检测产品的目标图像、所述目标图像与所述模板图像的近似度分值和所述待检测产品的至少一个预设特征的参数值进行存储。
  22. 一种产品规格检测系统,其特征在于,包括:
    第三图像采集模块,用于采集待检测产品的目标图像;
    样例获取模块,用于获取一样例产品的模板图像以及参数范围;其中,所述样例产品的产品型号与所述待检测产品所标识的产品型号相同,所述参数范围包括:近似度分值的参数范围和至少一个预设特征的参数值范围;
    第二图像对比模块,用于将所述目标图像与所述模板图像进行对比,确定所述目标图像与所述模板图像的近似度分值;
    第二特征获取模块,用于若所述近似度分值处于所述近似度分值的参数范围内,则从所述目标图像获取所述待检测产品的至少一个预设特征的参数值;
    规格检测模块,用于判断所获取的至少一个预设特征的参数值是否处于所述至少一个预设特征的参数值范围内,以确定所述待检测产品的规格是否与所标识的产品型号的规格相符。
  23. 如权利要求22所述的产品规格检测系统,其特征在于,所述第二图像对比模块,包括:
    第二数组获得单元,用于对所述目标图像进行处理得到所述目标图像对应的数组,以及,对所述模板图像进行处理得到所述模板图像对应的数组;
    第二数组对比单元,用于将所述目标图像对应的数组与所述模板图像对应的数组进行对比,确定所述目标图像与所述模板图像的近似度分值。
  24. 如权利要求23所述的产品规格检测系统,其特征在于,所述第二数组获得单元,具体用于:
    对所述目标图像进行二值化处理,对二值化处理后的所述目标图像中各个像素点的像素值进行数组化转换,得到所述目标图像对应的数组;
    对所述模板图像进行二值化处理,对二值化处理后的所述模板图像中各个像素点的像素值进行数组化转换,得到所述模板图像对应的数组。
  25. 如权利要求23所述的产品规格检测系统,其特征在于,第二数组对比单元,具体用于:
    针对所述目标图像对应的数组,采用穷尽法与所述模板图像对应的数组进行对比,得到所述目标图像与所述模板图像的最大近似度值,作为所述目标图像与所述模板图像的近似度分值。
  26. 如权利要求22所述的产品规格检测系统,其特征在于,所述待检测产品的至少一个预设特征包括:在所述目标图像中所述待检测产品的孔数、在所述目标图像中所述待检测产品的最大长度以及在所述目标图像中所述待检测产品所在区域所占的面积比例。
  27. 如权利要求26所述的产品规格检测系统,其特征在于,所述第二特征获取模块,具体用于:
    获得所述目标图像中所述待检测产品的孔数;
    在所述目标图像中建立坐标系,在所述坐标系下测量所述待检测产品在所述目标图像中的最大长度,以及,在所述坐标系下计算所述待检测产品所在区域在所述目标图像中所占的面积比例。
  28. 如权利要求22所述的产品规格检测系统,其特征在于,所述系统还 包括:
    信息存储模块,用于对所述待检测产品的目标图像、所述目标图像与所述模板图像的近似度分值和所述待检测产品的至少一个预设特征的参数值进行存储。
PCT/CN2020/086567 2019-05-20 2020-04-24 一种产品规格录入、检测方法及系统 WO2020233340A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/604,701 US20220207739A1 (en) 2019-05-20 2020-04-24 Methods and systems for entering and verifying product specifications

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910419743.5 2019-05-20
CN201910419743.5A CN110147838B (zh) 2019-05-20 2019-05-20 一种产品规格录入、检测方法及系统

Publications (1)

Publication Number Publication Date
WO2020233340A1 true WO2020233340A1 (zh) 2020-11-26

Family

ID=67592246

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/086567 WO2020233340A1 (zh) 2019-05-20 2020-04-24 一种产品规格录入、检测方法及系统

Country Status (3)

Country Link
US (1) US20220207739A1 (zh)
CN (1) CN110147838B (zh)
WO (1) WO2020233340A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110147838B (zh) * 2019-05-20 2021-07-02 苏州微创关节医疗科技有限公司 一种产品规格录入、检测方法及系统
CN111833317A (zh) * 2020-06-30 2020-10-27 佛山科学技术学院 基于增强现实的工业产品规格检测方法及设备
CN111967230A (zh) * 2020-08-13 2020-11-20 上海威克迈龙川汽车发动机零件有限公司 一种在现场测量后自动输入对应报表的测量系统及其应用方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107403127A (zh) * 2016-05-20 2017-11-28 重庆电信系统集成有限公司 一种基于图像orb特征的车辆卸货状态监测方法
CN108304796A (zh) * 2018-01-29 2018-07-20 深圳春沐源控股有限公司 一种智能杂草警示方法及系统
CN109564619A (zh) * 2016-05-19 2019-04-02 思比机器人公司 跟踪商店内的货架上的产品的放置的方法
CN110147838A (zh) * 2019-05-20 2019-08-20 苏州微创关节医疗科技有限公司 一种产品规格录入、检测方法及系统

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7079230B1 (en) * 1999-07-16 2006-07-18 Sun Chemical B.V. Portable authentication device and method of authenticating products or product packaging
WO2008111290A1 (ja) * 2007-03-13 2008-09-18 Nikon Corporation テンプレートマッチング装置、テンプレートマッチング装置を備えたカメラ、テンプレートマッチングをコンピュータで行うためのプログラム
US8494909B2 (en) * 2009-02-09 2013-07-23 Datalogic ADC, Inc. Automatic learning in a merchandise checkout system with visual recognition
CN101799431B (zh) * 2010-04-08 2012-01-04 湖南大学 高速生产线上罐盖质量的机器视觉在线检测方法
JP6009888B2 (ja) * 2012-09-27 2016-10-19 富士フイルム株式会社 薬剤検査装置及び方法
CN102945368B (zh) * 2012-10-17 2015-04-22 西安理工大学 啤酒瓶盖激光字符的定位识别方法
CN105303189B (zh) * 2014-07-29 2019-08-20 阿里巴巴集团控股有限公司 一种用于检测预定区域中特定标识图像的方法及装置
US20160297361A1 (en) * 2015-04-08 2016-10-13 Jeffrey M. Drazan Camera array system and method to detect a load status of a semi- trailer truck
CN107403179B (zh) * 2016-05-20 2020-10-23 株式会社理光 一种物品包装信息的注册方法及装置
CN106096677B (zh) * 2016-06-08 2018-12-04 潮州三环(集团)股份有限公司 包装信息检测方法及装置
GB2551489A (en) * 2016-06-15 2017-12-27 Fairfield Labels Ltd Product verification system
CN106372837A (zh) * 2016-08-31 2017-02-01 温州泛海网络科技有限公司 一种隐形眼镜进销存管理系统
US10269107B2 (en) * 2017-02-23 2019-04-23 Global Neighbor Inc Selective plant detection and treatment using green luminance photometric machine vision scan with real time chromaticity operations and image parameter floors for low processing load
CN106960300B (zh) * 2017-03-22 2020-09-25 湖北九州通达科技开发有限公司 一种医药物流行业的库存初装实现方法及装置
US20180341822A1 (en) * 2017-05-26 2018-11-29 Dura Operating, Llc Method and system for classifying objects in a perception scene graph by using a scene-detection-schema
CN107609818A (zh) * 2017-09-14 2018-01-19 广东正业科技股份有限公司 一种仓储物流系统及方法
WO2019069617A1 (ja) * 2017-10-05 2019-04-11 日本電気株式会社 個体識別装置
CN108830122B (zh) * 2018-04-28 2021-06-22 山东烟台烟草有限公司 卷烟智能识别装置及方法
CN108717545B (zh) * 2018-05-18 2020-12-18 北京大账房网络科技股份有限公司 一种基于手机拍照的票据识别方法及系统
CN108805988A (zh) * 2018-05-23 2018-11-13 平安科技(深圳)有限公司 Vr图像生成方法、装置、计算机设备及存储介质
CN109332192A (zh) * 2018-08-03 2019-02-15 小黄狗环保科技有限公司 一种用于易拉罐和饮料瓶分类的图像识别方法
CN109255568A (zh) * 2018-08-21 2019-01-22 南京理工大学 一种基于图像识别的智能仓储系统
CN109816640B (zh) * 2019-01-08 2023-05-12 南京富士通南大软件技术有限公司 一种基于图片对比的产品校验方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109564619A (zh) * 2016-05-19 2019-04-02 思比机器人公司 跟踪商店内的货架上的产品的放置的方法
CN107403127A (zh) * 2016-05-20 2017-11-28 重庆电信系统集成有限公司 一种基于图像orb特征的车辆卸货状态监测方法
CN108304796A (zh) * 2018-01-29 2018-07-20 深圳春沐源控股有限公司 一种智能杂草警示方法及系统
CN110147838A (zh) * 2019-05-20 2019-08-20 苏州微创关节医疗科技有限公司 一种产品规格录入、检测方法及系统

Also Published As

Publication number Publication date
CN110147838A (zh) 2019-08-20
CN110147838B (zh) 2021-07-02
US20220207739A1 (en) 2022-06-30

Similar Documents

Publication Publication Date Title
WO2020233340A1 (zh) 一种产品规格录入、检测方法及系统
CN104169945B (zh) 对图像中的对象的两级分类
US20190388182A1 (en) Tracking surgical items with prediction of duplicate imaging of items
EP2341331B1 (en) Medicine management system
US20190213725A1 (en) Board defect filtering method and device thereof and computer-readable recording medium
TWI669519B (zh) 電路板瑕疵篩選方法及其裝置與電腦可讀取記錄媒體
JP5718781B2 (ja) 画像分類装置および画像分類方法
US6687396B1 (en) Optical member inspection apparatus, image-processing apparatus, image-processing method, and computer readable medium
CN110118777A (zh) 一种控制系统系统集成智能检验台
CN107084992A (zh) 一种基于机器视觉的胶囊检测方法及系统
CN1323369C (zh) 图像识别装置和方法以及图像识别装置的示教装置和方法
CN112432902A (zh) 一种外周血细胞形态学判别细胞数目的自动检测系统及方法
TWI423145B (zh) 指紋圖像檢測方法
CN111353992A (zh) 一种基于纹理特征的农产品缺陷检测方法及系统
CN110110622A (zh) 一种基于图像处理的医疗文本检测方法、系统和存储介质
CN111795919B (zh) 一种骨髓细胞形态学自动检测系统及其工作方法
WO2017166778A1 (zh) 细菌鉴定方法及装置
CN115359412B (zh) 一种盐酸中和实验评分方法、装置、设备及可读存储介质
CN116525133A (zh) 核酸的自动采集方法、系统、电子设备及介质
CN1789914A (zh) 吻合器漏针检测系统
Schier et al. Automated counting of yeast colonies using the fast radial transform algorithm
CN114332876A (zh) 一种基于区块链技术的医疗票据图像识别方法
KR101782366B1 (ko) 스케일 보정을 통한 표본 정규화가 수행되는 학습기반의 비전검사 방법
CN114496196A (zh) 医疗实验室临床生化检验自动审核系统
TW202232400A (zh) 智能物流資料採集系統

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20810074

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20810074

Country of ref document: EP

Kind code of ref document: A1