WO2022205606A1 - Mould processing method and apparatus, electronic device, system, and storage medium - Google Patents

Mould processing method and apparatus, electronic device, system, and storage medium Download PDF

Info

Publication number
WO2022205606A1
WO2022205606A1 PCT/CN2021/097262 CN2021097262W WO2022205606A1 WO 2022205606 A1 WO2022205606 A1 WO 2022205606A1 CN 2021097262 W CN2021097262 W CN 2021097262W WO 2022205606 A1 WO2022205606 A1 WO 2022205606A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
insert
image
template image
original size
Prior art date
Application number
PCT/CN2021/097262
Other languages
French (fr)
Chinese (zh)
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 广东拓斯达科技股份有限公司
Publication of WO2022205606A1 publication Critical patent/WO2022205606A1/en

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/0004Industrial image inspection
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • 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/20024Filtering details
    • G06T2207/20032Median filtering
    • 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/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Definitions

  • the present application relates to manufacturing technology, for example, to a mold processing method, apparatus, electronic device, system and storage medium.
  • Insert injection molding is a method of pre-fixing the insert in the appropriate position in the mold, and then injecting plastic into the mold. After the mold is opened, the insert is cooled and solidified plastic is tightly embedded in the product to obtain inserts such as threaded rings and electrodes.
  • the method of the product, the insert state of the mold is directly related to the quality of the injection molded product. In the actual production process, the injection molding products may be scrapped due to abnormal states such as missing and misplaced inserts in the mold, and even the mold may be damaged due to the misplacement of the inserts, which will lead to lower production efficiency and increased production costs.
  • the present application provides a mold processing method, device, electronic device, system and storage medium, which can improve production efficiency and reduce production cost.
  • a mold processing method including:
  • the attribute information is sent to a calibration device, so that the calibration device performs insert calibration on the mold according to the attribute information.
  • a mold processing device comprising:
  • a first determining module configured to obtain a template image and an actual measured image of the mold, and to determine the embedded area of the measured image according to the insert area of the template image;
  • a second determining module configured to determine an abnormal region of the inlay according to the inlay region of the template image and the inlay region of the measured image
  • a third determining module configured to determine the attribute information of the abnormal region of the insert
  • the sending module is configured to send the attribute information to a calibration device, so that the calibration device can perform insert calibration on the mold according to the attribute information.
  • An electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the program, the implementation of any of the embodiments of the present application is implemented.
  • a mold processing system including a calibration device and an electronic device for executing the mold processing method described in any embodiment of the present application.
  • a computer-readable storage medium is also provided, storing a computer program, wherein, when the computer program is executed by a processor, the mold processing method according to any embodiment of the present application is implemented.
  • FIG. 1 is a schematic flowchart of a mold processing method provided by an embodiment of the present application.
  • FIG. 2 is another schematic flowchart of the mold processing method provided by the embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a mold processing device provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a mold processing system provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a mold processing method provided by an embodiment of the present application.
  • the method may be executed by a mold processing device provided by an embodiment of the present application, and the device may be implemented in software and/or hardware.
  • the apparatus may be integrated in an electronic device, for example, the electronic device may be a personal computer (Personal Computer, PC), a tablet computer, a notebook computer, a desktop computer and other electronic devices.
  • PC Personal Computer
  • tablet computer tablet computer
  • notebook computer a desktop computer and other electronic devices.
  • the method may include the following steps.
  • step 101 a template image and an actual measured image of the mold are acquired, and the insert area of the measured image is determined according to the insert area of the template image.
  • the mold may be an insert injection mold.
  • the inserts can be correctly fixed in the mold in advance and the mold can be photographed to obtain a template image of the mold, wherein the inserts correctly fixed in the mold can include one or more inserts.
  • the mold can be photographed in real time, and the measured image of the mold can be obtained.
  • a manual frame selection method can be used to frame the insert area in the template image, and the frame-selected insert area may be a circle, a rectangle, a polygon, etc., and the frame-selected insert area may include: One or more, an insert area corresponds to an insert that is properly seated in the mold. After the inlay area is framed in the template image, the electronic device may match the inlay area of the template image with the measured image, thereby determining the inlay area of the measured image.
  • Step 102 Determine the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image.
  • the abnormal region of the insert can be determined in the following manner:
  • the difference image can show the difference between the inlay area of the template image and the inlay area of the measured image.
  • the coordinate gray value of the template image corresponding to each pixel in the differential image and the gray value of the measured image coordinate can be obtained.
  • the coordinate gray value of the template image is the gray value of the coordinate position corresponding to the pixel in the embedded area of the template image.
  • the gray value of the measured image coordinate is the gray value of the coordinate position corresponding to the pixel point in the embedded area of the measured image, and calculate the difference between the gray value of the template image coordinate corresponding to each pixel point and the gray value of the measured image coordinate , if the difference exceeds the preset grayscale threshold, the area corresponding to the pixel is retained; otherwise, if the difference does not exceed the preset grayscale threshold, the area corresponding to the pixel is filtered out, and the reserved area That is, the candidate area, and the preset grayscale threshold can be adaptively selected.
  • the remaining candidate regions will be less; if the similarity between the two images is low and obviously different, after the difference is performed, the remaining candidate regions There will be more areas.
  • the reserved candidate regions are not necessarily all abnormal regions of the insert, and need to be identified and judged.
  • a first area threshold may be set, and after a candidate area is obtained, area filtering may be performed on the candidate area based on the first area threshold to obtain an abnormal insert area.
  • each candidate area is larger than the first area threshold, reserve the candidate area larger than the first area threshold, filter out the candidate area that is not larger than the first area threshold, and the retained candidate area is the insert abnormality area.
  • Step 103 Determine the attribute information of the abnormal area of the insert.
  • the attribute information of the insert abnormal area may include type information and location information of the insert abnormal area.
  • the type information of the abnormal region of the insert may include the leakage and the dislocation.
  • Leakage and dislocation have characteristics corresponding to leakage and dislocation. Among them, leakage usually shows a large area of anomalies, such as the entire area where the insert is located; while dislocation usually shows a small area of anomaly, such as only the edge area of the insert. abnormal.
  • a second area threshold may be set according to these characteristics, and the type of the abnormal area of the insert may be identified by using the second area threshold to obtain type information of the abnormal area of the insert.
  • each insert abnormal area is greater than the second area threshold, and the type of the insert abnormal area larger than the second area threshold can be identified as missing, and the type of the insert abnormal area that is not larger than the second area threshold can be identified. Type identification is misplaced.
  • the position information of the abnormal area of the insert can be obtained by calculating the center of the abnormal area of the insert.
  • the circumscribing rectangle of the abnormal area of the insert may be determined, the center of the circumscribing rectangle may be used as the center of the abnormal area of the insert, the coordinate information of the center may be obtained, and the coordinate information may be used as the position information of the abnormal area of the insert.
  • the center of gravity of the abnormal region of the insert can also be determined in some ways, the coordinate information of the center of gravity can be obtained, and the coordinate information can be used as the position information of the abnormal region of the insert, which is not limited here.
  • Step 104 Send the attribute information to the calibration device, so that the calibration device performs insert calibration on the mold according to the attribute information.
  • the type information and position information of the abnormal area of the insert may be sent to the correction device, so that the correction device performs insert correction on the mold according to the type information and the position information of the abnormal area of the insert.
  • the calibration device may be a manipulator, a robot, etc., which is not limited here.
  • the attribute information sent to the calibration device may also be determined according to the number of inserts configured in the mold. For example, when there is only one insert configured in the mold, after determining the attribute information of the abnormal area of the insert, only the type information of the abnormal area of the insert can be sent to the correction device; and when there are multiple inserts configured in the mold, After the attribute information of the abnormal area of the insert is determined, the type information and location information of the abnormal area of the insert may be sent to the correction device.
  • the template image and the measured image of the mold can be acquired, and the insert area of the measured image can be determined according to the insert area of the template image; the insert area of the template image and the measured image can be determined according to the Determine the abnormal area of the insert; determine the attribute information of the abnormal area of the insert; send the attribute information to the calibration device, so that the calibration device can perform insert calibration on the mold according to the attribute information. That is, the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.
  • the mold processing method includes the following steps.
  • step 201 a template image of the original size of the mold and an actual measured image of the original size are acquired.
  • the mold may be an insert injection mold.
  • the inserts can be correctly fixed in the mold in advance and the mold can be photographed to obtain a template image of the mold, wherein the inserts correctly fixed in the mold can include one or more inserts.
  • the mold can be photographed in real time, and the measured image of the mold can be obtained.
  • Step 202 Acquire multiple regions of interest framed in the template image of the original size.
  • a manual frame selection method can be used to frame a region of interest (ROI) in the template image, and the framed region of interest can be a circle, a rectangle, a polygon, etc.
  • the regions of interest may include one or more regions, and one region of interest corresponds to one insert correctly fixed in the mold, that is, each region of interest is an area containing the insert.
  • Step 203 combine multiple interest regions to obtain the embedded region of the template image of the original size.
  • multiple areas of interest may be combined to reduce the number of areas and facilitate subsequent processing.
  • the minimum circumscribed rectangle of multiple interest regions may be calculated, and the area corresponding to the minimum circumscribed rectangle is determined as the embedded area of the template image of the original size.
  • the minimum circumscribed rectangle can be calculated by the following formula:
  • (ROI.x, ROI.y) represents the coordinates of the upper left corner of the minimum circumscribed rectangle, (roi 1 .x, roi 1 .y), (roi n .x, roi n .y) represent the first region of interest, respectively
  • the coordinates of the upper left corner and the upper left corner of the nth region of interest, n is an integer greater than or equal to 2
  • ROI.width represents the width of the smallest bounding rectangle
  • ROI.height represents the height of the smallest bounding rectangle
  • roi n.width represents the first The width of n regions of interest, roi n.height represents the height of the nth region of interest.
  • the method before the reducing the original size template image and the original size measured image, the method further includes: determining an inlay area of the original size template image; The embedded area of the template image of the size is filtered and denoised.
  • Step 204 Perform filtering and noise reduction processing on the embedded region of the template image of the original size.
  • an adaptive median filter can be used to filter and denoise the embedded area of the template image of the original size.
  • the adaptive median filter can not only filter out the salt and pepper noise with a high probability, but also It can smooth other non-impulsive noises, protect the details in the image as much as possible, and avoid the thinning or coarsening of the image edges.
  • the adaptive median filter requires a rectangular window S xy , which differs from the conventional median filter in that the size of this window changes (increases) during the filtering process.
  • the output of the filter is a pixel value that is used to replace the pixel value at the point (x,y) at the center of the filter window.
  • Z min minimum gray value in S xy ;
  • Z max maximum gray value in S xy ;
  • Z med median of pixel values in S xy ;
  • Z xy represents the gray value at the coordinate (x, y);
  • S max maximum window size allowed by S xy .
  • the adaptive median filter has two processing procedures, denoted as: A and B respectively.
  • Step A The purpose of this step is to determine whether the median Z med obtained in the current window is noise. Proceed as follows:
  • a 2 Z med -Z max ;
  • step B If A 1 >0 and A 2 ⁇ 0, jump to step B; otherwise, increase the size of the window; if the size of the increased window ⁇ S max , repeat the process of step A; otherwise, output Z med .
  • the reducing the template image of the original size and the measured image of the original size to obtain the template image of the reduced size and the measured image of the reduced size including: according to the template of the original size
  • the size relationship between the embedded area of the image and the template image of the original size determines a scaling factor; the template image of the original size is reduced according to the scaling factor to obtain the template image of the reduced size, and according to the scaling factor
  • the scaling factor reduces the actual measured image of the original size to obtain the actual measured image of the reduced size.
  • Step 205 Determine the scaling factor according to the size relationship between the insert area of the template image of the original size and the template image of the original size.
  • the scaling factor may be determined according to the width-height relationship between the embedded area of the template image of the original size and the template image of the original size.
  • the calculation method of the scaling factor may be as follows:
  • G represents the scaling factor
  • src.width represents the width of the embedded area of the template image of the original size
  • src.height represents the height of the embedded area of the template image of the original size
  • dst.width represents the width of the template image of the original size
  • dst.height represents the height of the original size template image.
  • the scaling will be performed.
  • the factor is set to 0.25; otherwise, the scaling factor is set to 0.5.
  • Step 206 reducing the original size template image according to the scaling factor to obtain a reduced size template image, and reducing the original size measured image according to the scaling factor to obtain a reduced size measured image.
  • both the template image of the original size and the measured image of the original size can be reduced processing, using small-sized images for template matching to improve the speed of subsequent matching detection.
  • the acquiring the template image and the measured image of the mold includes: acquiring the template image of the original size and the measured image of the original size.
  • the determining of the inlay area of the measured image according to the inlay area of the template image includes: reducing the template image of the original size and the measured image of the original size to obtain the template image of reduced size and the measured image of the original size. A reduced-size measured image; matching the insert area of the reduced-sized template image with the reduced-sized measured image to obtain an insert area of the reduced-sized measured image.
  • Step 207 matching the embedded area of the reduced-sized template image with the reduced-sized measured image to obtain the embedded area of the reduced-sized measured image.
  • the determining an abnormal area of the insert according to the insert area of the template image and the insert area of the measured image includes: adjusting the insert of the reduced size measured image according to the scaling factor The size reduction process is performed on the area to obtain the insert area of the measured image of the original size; the abnormal area of the insert is determined according to the insert area of the template image of the original size and the insert area of the measured image of the original size .
  • Step 208 performing a size reduction process on the embedded area of the reduced-sized measured image according to the scaling factor, to obtain the embedded area of the actual measured image of the original size.
  • the size reduction process can be performed on the embedded area of the reduced size measured image according to the previously used scaling factor.
  • the following formula can be used for restoration processing:
  • P(a,b) is the position coordinate obtained by matching after reducing the size
  • P(x,y) is the coordinate in the image that is mapped and restored to the original size.
  • the determining the abnormal insert region according to the insert region of the original size template image and the insert region of the original size measured image includes: acquiring the original size template image The difference image of the insert area of the original size and the insert area of the measured image of the original size; the area filter is performed on the difference image according to the preset grayscale threshold to obtain a candidate area; the abnormality of the insert is determined according to the candidate area area.
  • Step 209 Obtain a difference image of the insert area of the template image of the original size and the insert area of the measured image of the original size.
  • the difference image can show the difference between the inlay area of the template image and the inlay area of the measured image.
  • Step 210 Perform regional filtering on the differential image according to a preset grayscale threshold to obtain a candidate region.
  • the coordinate gray value of the template image corresponding to each pixel in the differential image and the gray value of the measured image coordinate can be obtained.
  • the coordinate gray value of the template image is the gray value of the coordinate position corresponding to the pixel in the embedded area of the template image.
  • the gray value of the measured image coordinate is the gray value of the coordinate position corresponding to the pixel point in the embedded area of the measured image, and calculate the difference between the gray value of the template image coordinate corresponding to each pixel point and the gray value of the measured image coordinate , if the difference exceeds the preset grayscale threshold, the area corresponding to the pixel is retained; otherwise, if the difference does not exceed the preset grayscale threshold, the area corresponding to the pixel is filtered out, and the reserved area That is, the candidate area, and the preset grayscale threshold can be adaptively selected.
  • the following formula can be used to perform regional filtering on the differential image:
  • D(x,y) represents the judgment result of the area.
  • the determining the abnormal region of the insert according to the candidate region includes: performing regional filtering on the candidate region according to a first area threshold to obtain the abnormal region of the insert.
  • Step 211 Perform area filtering on the candidate area according to the first area threshold to obtain the abnormal area of the insert.
  • a first area threshold may be set, and after a candidate area is obtained, area filtering may be performed on the candidate area based on the first area threshold to obtain an abnormal insert area.
  • each candidate area is larger than the first area threshold, reserve the candidate area larger than the first area threshold, filter out the candidate area that is not larger than the first area threshold, and the retained candidate area is the insert abnormality area.
  • Step 212 perform type identification on the abnormal area of the insert according to the second area threshold, and obtain the type information of the abnormal area of the insert.
  • the type information of the abnormal region of the insert may include the leakage and the dislocation.
  • Leakage and dislocation have characteristics corresponding to leakage and dislocation. Among them, leakage usually shows a large area of anomalies, such as the entire area where the insert is located; while dislocation usually shows a small area of anomaly, such as only the edge area of the insert. abnormal.
  • a second area threshold may be set according to these features, and the type of the abnormal area of the insert may be identified by using the second area threshold to obtain type information of the abnormal area of the insert.
  • each insert abnormal area is greater than the second area threshold, and the type of the insert abnormal area larger than the second area threshold can be identified as missing, and the type of the insert abnormal area that is not larger than the second area threshold can be identified. Type identification is misplaced.
  • Step 213 Calculate the center of the abnormal area of the insert to obtain the position information of the abnormal area of the insert.
  • the position information of the abnormal area of the insert can be obtained by calculating the center of the abnormal area of the insert.
  • the circumscribing rectangle of the abnormal area of the insert may be determined, the center of the circumscribing rectangle may be used as the center of the abnormal area of the insert, the coordinate information of the center may be obtained, and the coordinate information may be used as the position information of the abnormal area of the insert.
  • the center of gravity of the abnormal region of the insert can also be determined in some ways, the coordinate information of the center of gravity can be obtained, and the coordinate information can be used as the position information of the abnormal region of the insert, which is not limited here.
  • Step 214 sending the type information and position information of the abnormal area of the insert to the correction device, so that the correction device performs insert correction on the mold according to the type information and the position information of the abnormal area of the insert.
  • the attribute information sent to the calibration device may also be determined according to the number of inserts configured in the mold. For example, when there is only one insert configured in the mold, after determining the attribute information of the abnormal area of the insert, only the type information of the abnormal area of the insert can be sent to the correction device; and when there are multiple inserts configured in the mold, After the attribute information of the abnormal area of the insert is determined, the type information and location information of the abnormal area of the insert may be sent to the correction device.
  • the correction device may be a manipulator, a robot, etc., which is not limited here.
  • the template image and the measured image of the mold can be acquired, and the insert area of the measured image can be determined according to the insert area of the template image; the insert area of the template image and the measured image can be determined according to the Determine the abnormal area of the insert; determine the attribute information of the abnormal area of the insert; send the attribute information to the calibration device, so that the calibration device can perform insert calibration on the mold according to the attribute information. That is, the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.
  • steps in the flowchart of FIG. 2 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these sub-steps or stages The sequence is also not necessarily sequential, but may be performed alternately or alternately with other steps or sub-steps of other steps or at least a portion of a phase.
  • FIG. 3 is a schematic structural diagram of a mold processing device provided by an embodiment of the present application, and the device is suitable for executing the mold processing method provided by the embodiment of the present application.
  • the apparatus may include the following modules.
  • the first determination module 301 is configured to obtain a template image and an actual measured image of the mold, and to determine the embedded area of the actual measured image according to the embedded area of the template image;
  • the second determining module 302 is configured to determine the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image;
  • the third determining module 303 is configured to determine the attribute information of the abnormal region of the insert.
  • the sending module 304 is configured to send the attribute information to a calibration device, so that the calibration device performs insert calibration on the mold according to the attribute information.
  • the first determination module 301 obtains the template image and the measured image of the mold, including:
  • the determining of the inlay area of the measured image according to the inlay area of the template image includes:
  • the first determining module 301 performs reduction processing on the template image of the original size and the measured image of the original size, to obtain the template image of the reduced size and the measured image of the reduced size, including :
  • the template image of the original size is reduced according to the scaling factor to obtain the template image of reduced size, and the actual measured image of the original size is reduced according to the scaling factor to obtain the reduced size of the template image. Measured image.
  • the device further includes:
  • a fourth determining module configured to determine the insert area of the template image of the original size
  • a noise reduction module configured to perform filtering and noise reduction processing on the embedded region of the template image of the original size.
  • the fourth determining module determines the insert area of the template image in the original size, including:
  • the multiple interest regions are merged to obtain the embedded region of the template image in the original size.
  • the second determining module 302 determines the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image, including:
  • the abnormal area of the insert is determined according to the insert area of the template image of the original size and the insert area of the measured image of the original size.
  • the second determining module 302 determines the abnormal insert area according to the insert area of the template image of the original size and the insert area of the measured image of the original size, including:
  • the insert abnormal area is determined according to the candidate area.
  • the second determining module 302 determines the abnormal region of the insert according to the candidate region, including:
  • Area filtering is performed on the candidate area according to the first area threshold to obtain the abnormal area of the insert.
  • the third determining module 303 determines the attribute information of the abnormal region of the insert, including:
  • the center of the abnormal area of the insert is calculated to obtain the position information of the abnormal area of the insert.
  • the sending module 304 sends the attribute information to the correction device, including:
  • the type information and location information of the abnormal area of the insert are sent to the correction device.
  • the device of the embodiment of the present application can acquire the template image and the measured image of the mold, and determine the insert area of the measured image according to the insert area of the template image; according to the insert area of the template image and the measured image
  • the insert area of the image determines the insert abnormal area; determines the attribute information of the insert abnormal area; sends the attribute information to the correction device, so that the correction device performs insert correction on the mold according to the attribute information .
  • the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.
  • Embodiments of the present application further provide an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor, where the processor implements any of the above when executing the program
  • the mold processing method provided by the embodiment is not limited to a processor, a processor, and a computer program stored on the memory and running on the processor, where the processor implements any of the above when executing the program.
  • An embodiment of the present application further provides a computer-readable medium storing a computer program, and when the program is executed by a processor, the mold processing method provided by any of the foregoing embodiments is implemented.
  • FIG. 4 shows an exemplary architecture of a mold processing system according to an embodiment of the present application.
  • the mold processing system includes an electronic device 401 and a calibration device 402.
  • the electronic device 401 may be the electronic device described in the previous embodiments.
  • the calibration device 402 For the interaction process between the electronic device 401 and the calibration device 402, reference may be made to the descriptions of the previous embodiments, and details are not repeated here.
  • FIG. 5 a schematic structural diagram of a computer system 500 suitable for implementing the electronic device of the embodiment of the present application is shown.
  • the electronic device shown in FIG. 5 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
  • the computer system 500 includes a central processing unit (Central Processing Unit, CPU) 501, and the CPU 501 can be loaded into the computer according to a program stored in a read-only memory (Read-only Memory, ROM) 502 or from a storage part 508
  • a program in Random Access Memory (RAM) 503 performs various appropriate actions and processes.
  • RAM 503 In the RAM 503, various programs and data required for the operation of the system 500 are also stored.
  • the CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
  • An Input/Output (I/O) interface 505 is also connected to the bus 504 .
  • I/O Input/Output
  • the following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc. ; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network (Local Area Network, LAN) card, a modem, and the like.
  • the communication section 509 performs communication processing via a network such as the Internet.
  • a drive 510 is also connected to the I/O interface 505 as needed.
  • a removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 510 as needed so that a computer program read from the drive 510 is installed into the storage section 508 as needed.
  • embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication portion 509 and/or installed from the removable medium 511 .
  • the computer program is executed by the CPU 501, the above-described functions defined in the system of the present application are executed.
  • the computer-readable medium shown in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above.
  • Computer readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Flash memory, optical fiber, portable Compact Disc Read-Only Memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • the program code embodied on the computer readable medium may be transmitted by any suitable medium, including but not limited to: wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • the modules and/or units involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the described modules and/or units may also be provided in a processor, for example, it may be described as: a processor includes a first determination module, a second determination module, a third determination module and a sending module. Among them, the names of these modules do not constitute a limitation on the module itself under certain circumstances.
  • the present application also provides a computer-readable medium.
  • the computer-readable medium may be included in the device described in the above embodiments, or may exist alone without being assembled into the device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes: acquiring a template image and an actual measurement image of the mold, and inserting an insert according to the template image.
  • the area determines the insert area of the measured image; determines the insert abnormal area according to the insert area of the template image and the insert area of the measured image; determines the attribute information of the insert abnormal area; sends it to the calibration device the attribute information, so that the calibration device performs insert calibration on the mold according to the attribute information.
  • the template image and the measured image of the mold can be obtained, and the insert area of the measured image can be determined according to the insert area of the template image;
  • the insert area of the measured image determines the insert abnormal area; determines the attribute information of the insert abnormal area; sends the attribute information to the calibration device, so that the calibration device can insert the mold according to the attribute information. piece correction. That is, the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.

Abstract

Disclosed in the embodiments of the present application are a mould processing method and apparatus, an electronic device, a system, and a storage medium, the mould processing method comprising: acquiring a template image and an actual measured image of a mould and, on the basis of an insert area of the template image, determining an insert area of the actual measured image; on the basis of the insert area of the template image and the insert area of the actual measured image, determining an abnormal insert area; determining attribute information of the abnormal insert area; and sending the attribute information to a correction device, such that the correction device performs insert correction on the mould on the basis of the attribute information.

Description

模具处理方法、装置、电子设备、系统和存储介质Mold processing method, apparatus, electronic device, system and storage medium
本申请要求在2021年03月30日提交中国专利局、申请号为202110340045.3的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202110340045.3 filed with the China Patent Office on March 30, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及制造技术,例如涉及一种模具处理方法、装置、电子设备、系统和存储介质。The present application relates to manufacturing technology, for example, to a mold processing method, apparatus, electronic device, system and storage medium.
背景技术Background technique
嵌件注塑是一种将嵌件预先固定在模具中适当的位置,然后再注入塑料成型,开模后嵌件被冷却固化的塑料包紧埋在制品内得到带有如螺纹环和电极等嵌件的制品的方法,模具的嵌件状态直接关系到注塑产品质量。在实际生产过程中,可能会因为模具中出现嵌件漏放和错位等异常状态导致注塑产品报废,甚至可能会因为嵌件错位导致模具损坏,进而导致生产效率降低、生产成本增加。Insert injection molding is a method of pre-fixing the insert in the appropriate position in the mold, and then injecting plastic into the mold. After the mold is opened, the insert is cooled and solidified plastic is tightly embedded in the product to obtain inserts such as threaded rings and electrodes. The method of the product, the insert state of the mold is directly related to the quality of the injection molded product. In the actual production process, the injection molding products may be scrapped due to abnormal states such as missing and misplaced inserts in the mold, and even the mold may be damaged due to the misplacement of the inserts, which will lead to lower production efficiency and increased production costs.
发明内容SUMMARY OF THE INVENTION
本申请提供一种模具处理方法、装置、电子设备、系统和存储介质,能够提高生产效率、降低生产成本。The present application provides a mold processing method, device, electronic device, system and storage medium, which can improve production efficiency and reduce production cost.
提供一种模具处理方法,包括:Provide a mold processing method, including:
获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;Obtaining the template image and the measured image of the mold, and determining the insert area of the measured image according to the insert area of the template image;
根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;Determine the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image;
确定所述嵌件异常区域的属性信息;determining the attribute information of the abnormal area of the insert;
向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。The attribute information is sent to a calibration device, so that the calibration device performs insert calibration on the mold according to the attribute information.
还提供一种模具处理装置,包括:Also provided is a mold processing device, comprising:
第一确定模块,设置为获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;a first determining module, configured to obtain a template image and an actual measured image of the mold, and to determine the embedded area of the measured image according to the insert area of the template image;
第二确定模块,设置为根据所述模板图像的嵌件区域和所述实测图像的嵌 件区域确定嵌件异常区域;a second determining module, configured to determine an abnormal region of the inlay according to the inlay region of the template image and the inlay region of the measured image;
第三确定模块,设置为确定所述嵌件异常区域的属性信息;a third determining module, configured to determine the attribute information of the abnormal region of the insert;
发送模块,设置为向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。The sending module is configured to send the attribute information to a calibration device, so that the calibration device can perform insert calibration on the mold according to the attribute information.
还提供一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现如本申请任一实施例所述的模具处理方法。An electronic device is also provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the program, the implementation of any of the embodiments of the present application is implemented. The mold processing method described above.
还提供一种模具处理系统,包括校正设备以及用于执行本申请任一实施例所述的模具处理方法的电子设备。A mold processing system is also provided, including a calibration device and an electronic device for executing the mold processing method described in any embodiment of the present application.
还提供一种计算机可读存储介质,存储有计算机程序,其中,该计算机程序被处理器执行时实现如本申请任一实施例所述的模具处理方法。A computer-readable storage medium is also provided, storing a computer program, wherein, when the computer program is executed by a processor, the mold processing method according to any embodiment of the present application is implemented.
附图说明Description of drawings
图1是本申请实施例提供的模具处理方法的一个流程示意图。FIG. 1 is a schematic flowchart of a mold processing method provided by an embodiment of the present application.
图2是本申请实施例提供的模具处理方法的另一流程示意图。FIG. 2 is another schematic flowchart of the mold processing method provided by the embodiment of the present application.
图3是本申请实施例提供的模具处理装置的一个结构示意图。FIG. 3 is a schematic structural diagram of a mold processing device provided by an embodiment of the present application.
图4是本申请实施例提供的模具处理系统的一个结构示意图。FIG. 4 is a schematic structural diagram of a mold processing system provided by an embodiment of the present application.
图5是本申请实施例提供的电子设备的一个结构示意图。FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请进行说明。此处所描述的实施例仅仅用于解释本申请,而非对本申请的限定。为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be described below with reference to the accompanying drawings and embodiments. The embodiments described here are only used to explain the present application, but not to limit the present application. For convenience of description, the drawings only show some but not all structures related to the present application.
图1为本申请实施例提供的模具处理方法的一个流程示意图,该方法可以由本申请实施例提供的模具处理装置来执行,该装置可采用软件和/或硬件的方式实现。在一个实施例中,该装置可以集成在电子设备中,电子设备比如可以是个人计算机(Personal Computer,PC)、平板电脑、笔记本电脑、台式电脑等电子设备。以下实施例将以该装置集成在电子设备中为例进行说明,参考图1, 该方法可以包括如下步骤。FIG. 1 is a schematic flowchart of a mold processing method provided by an embodiment of the present application. The method may be executed by a mold processing device provided by an embodiment of the present application, and the device may be implemented in software and/or hardware. In one embodiment, the apparatus may be integrated in an electronic device, for example, the electronic device may be a personal computer (Personal Computer, PC), a tablet computer, a notebook computer, a desktop computer and other electronic devices. The following embodiments will be described by taking the device integrated into an electronic device as an example. Referring to FIG. 1 , the method may include the following steps.
步骤101,获取模具的模板图像和实测图像,并根据模板图像的嵌件区域确定实测图像的嵌件区域。In step 101, a template image and an actual measured image of the mold are acquired, and the insert area of the measured image is determined according to the insert area of the template image.
示例地,该模具可以为嵌件注塑模具。在一实施例中,可以预先将嵌件正确固定在模具中并拍摄模具,得到模具的模板图像,其中,正确固定在模具中的嵌件可以包括一个或多个。在实际生产中,可以实时拍摄模具,得到模具的实测图像。For example, the mold may be an insert injection mold. In one embodiment, the inserts can be correctly fixed in the mold in advance and the mold can be photographed to obtain a template image of the mold, wherein the inserts correctly fixed in the mold can include one or more inserts. In actual production, the mold can be photographed in real time, and the measured image of the mold can be obtained.
在一实施例中,可以采用人工框选的方法在模板图像中框选出嵌件区域,框选出的嵌件区域可以为圆形、矩形、多边形等,框选出的嵌件区域可以包括一个或多个,一个嵌件区域对应正确固定在模具中的一个嵌件。在模板图像中框选出嵌件区域之后,电子设备可以将模板图像的嵌件区域与实测图像进行匹配,从而确定出实测图像的嵌件区域。In one embodiment, a manual frame selection method can be used to frame the insert area in the template image, and the frame-selected insert area may be a circle, a rectangle, a polygon, etc., and the frame-selected insert area may include: One or more, an insert area corresponds to an insert that is properly seated in the mold. After the inlay area is framed in the template image, the electronic device may match the inlay area of the template image with the measured image, thereby determining the inlay area of the measured image.
步骤102,根据模板图像的嵌件区域和实测图像的嵌件区域确定嵌件异常区域。Step 102: Determine the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image.
在一实施例中,可以采用如下方式确定嵌件异常区域:In one embodiment, the abnormal region of the insert can be determined in the following manner:
(1)对比模板图像的嵌件区域和实测图像的嵌件区域,以获取模板图像的嵌件区域和实测图像的嵌件区域的差分图像。(1) Comparing the inlay area of the template image and the inlay area of the measured image to obtain a differential image of the inlay area of the template image and the inlay area of the measured image.
该差分图像能够显示出模板图像的嵌件区域和实测图像的嵌件区域的不同。The difference image can show the difference between the inlay area of the template image and the inlay area of the measured image.
(2)根据预设灰度阈值对差分图像进行区域过滤,得到候选区域。(2) Perform regional filtering on the differential image according to the preset grayscale threshold to obtain candidate regions.
比如,可以获取差分图像中每个像素点对应的模板图像坐标灰度值和实测图像坐标灰度值,模板图像坐标灰度值即模板图像的嵌件区域的像素点对应的坐标位置的灰度值,实测图像坐标灰度值即实测图像的嵌件区域的像素点对应的坐标位置的灰度值,计算每个像素点对应的模板图像坐标灰度值和实测图像坐标灰度值的差值,如果该差值超过预设灰度阈值,则将该像素点对应的区域保留,反之,如果该差值不超过预设灰度阈值,则将该像素点对应的区域过滤掉,保留的区域即为候选区域,预设灰度阈值可自适应取值。For example, the coordinate gray value of the template image corresponding to each pixel in the differential image and the gray value of the measured image coordinate can be obtained. The coordinate gray value of the template image is the gray value of the coordinate position corresponding to the pixel in the embedded area of the template image. value, the gray value of the measured image coordinate is the gray value of the coordinate position corresponding to the pixel point in the embedded area of the measured image, and calculate the difference between the gray value of the template image coordinate corresponding to each pixel point and the gray value of the measured image coordinate , if the difference exceeds the preset grayscale threshold, the area corresponding to the pixel is retained; otherwise, if the difference does not exceed the preset grayscale threshold, the area corresponding to the pixel is filtered out, and the reserved area That is, the candidate area, and the preset grayscale threshold can be adaptively selected.
在一实施例中,若两幅图像相似度很高,则在进行差分之后,保留的候选区域会比较少;若两幅图像相似度较低,明显不同,则在进行差分之后,保留的候选区域会比较多。In one embodiment, if the similarity between the two images is very high, after the difference is performed, the remaining candidate regions will be less; if the similarity between the two images is low and obviously different, after the difference is performed, the remaining candidate regions There will be more areas.
(3)根据候选区域确定嵌件异常区域。(3) Determine the abnormal area of the insert according to the candidate area.
在一实施例中,保留的候选区域并不一定都是嵌件异常区域,需要识别判 断。本申请实施例中,可以设置第一面积阈值,在得到候选区域之后,可以基于第一面积阈值对候选区域进行区域过滤,得到嵌件异常区域。In one embodiment, the reserved candidate regions are not necessarily all abnormal regions of the insert, and need to be identified and judged. In this embodiment of the present application, a first area threshold may be set, and after a candidate area is obtained, area filtering may be performed on the candidate area based on the first area threshold to obtain an abnormal insert area.
比如,可以判断每个候选区域的面积是否大于第一面积阈值,将大于第一面积阈值的候选区域保留,将不大于第一面积阈值的候选区域过滤掉,保留的候选区域即为嵌件异常区域。For example, it is possible to determine whether the area of each candidate area is larger than the first area threshold, reserve the candidate area larger than the first area threshold, filter out the candidate area that is not larger than the first area threshold, and the retained candidate area is the insert abnormality area.
步骤103,确定嵌件异常区域的属性信息。Step 103: Determine the attribute information of the abnormal area of the insert.
示例地,嵌件异常区域的属性信息可以包括嵌件异常区域的类型信息和位置信息。For example, the attribute information of the insert abnormal area may include type information and location information of the insert abnormal area.
通过大量的实验可知,有两种典型的嵌件异常状态,即嵌件漏放和错位,因而,本申请实施例中,嵌件异常区域的类型信息可以包括漏放和错位。漏放和错位有漏放和错位对应的特征,其中,漏放通常呈现较大面积的异常,比如整个嵌件所在区域均异常;而错位通常呈现较小面积的异常,比如只是嵌件边缘区域异常。在本申请实施例中,可以根据这些特征设置第二面积阈值,利用第二面积阈值对嵌件异常区域进行类型识别,得到嵌件异常区域的类型信息。Through a large number of experiments, it can be known that there are two typical abnormal states of the insert, that is, the leakage of the insert and the dislocation. Therefore, in the embodiment of the present application, the type information of the abnormal region of the insert may include the leakage and the dislocation. Leakage and dislocation have characteristics corresponding to leakage and dislocation. Among them, leakage usually shows a large area of anomalies, such as the entire area where the insert is located; while dislocation usually shows a small area of anomaly, such as only the edge area of the insert. abnormal. In the embodiment of the present application, a second area threshold may be set according to these characteristics, and the type of the abnormal area of the insert may be identified by using the second area threshold to obtain type information of the abnormal area of the insert.
比如,可以判断每个嵌件异常区域的面积是否大于第二面积阈值,将大于第二面积阈值的嵌件异常区域的类型识别为漏放,将不大于第二面积阈值的嵌件异常区域的类型识别为错位。For example, it can be determined whether the area of each insert abnormal area is greater than the second area threshold, and the type of the insert abnormal area larger than the second area threshold can be identified as missing, and the type of the insert abnormal area that is not larger than the second area threshold can be identified. Type identification is misplaced.
在一实施例中,嵌件异常区域的位置信息可以通过计算嵌件异常区域的中心得到。比如可以确定出嵌件异常区域的外接矩形,将该外接矩形的中心作为嵌件异常区域的中心,获取该中心的坐标信息,将该坐标信息作为嵌件异常区域的位置信息。此外,还可以通过某些方式确定嵌件异常区域的重心,获取该重心的坐标信息,将该坐标信息作为嵌件异常区域的位置信息,此处不做限定。In one embodiment, the position information of the abnormal area of the insert can be obtained by calculating the center of the abnormal area of the insert. For example, the circumscribing rectangle of the abnormal area of the insert may be determined, the center of the circumscribing rectangle may be used as the center of the abnormal area of the insert, the coordinate information of the center may be obtained, and the coordinate information may be used as the position information of the abnormal area of the insert. In addition, the center of gravity of the abnormal region of the insert can also be determined in some ways, the coordinate information of the center of gravity can be obtained, and the coordinate information can be used as the position information of the abnormal region of the insert, which is not limited here.
步骤104,向校正设备发送该属性信息,以使得校正设备根据该属性信息对模具进行嵌件校正。Step 104: Send the attribute information to the calibration device, so that the calibration device performs insert calibration on the mold according to the attribute information.
示例地,可以向校正设备发送嵌件异常区域的类型信息和位置信息,以使得校正设备根据嵌件异常区域的类型信息和位置信息对模具进行嵌件校正。其中,校正设备可以是机械手、机器人等,此处不做限定。For example, the type information and position information of the abnormal area of the insert may be sent to the correction device, so that the correction device performs insert correction on the mold according to the type information and the position information of the abnormal area of the insert. Wherein, the calibration device may be a manipulator, a robot, etc., which is not limited here.
在一种可能的实现方式中,还可以根据模具配置的嵌件数量确定向校正设备发送的属性信息。比如,当模具配置的嵌件只有一个时,在确定出嵌件异常区域的属性信息后,可以只向校正设备发送嵌件异常区域的类型信息;而当模具配置的嵌件有多个时,在确定出嵌件异常区域的属性信息后,可以向校正设备发送嵌件异常区域的类型信息和位置信息。In a possible implementation manner, the attribute information sent to the calibration device may also be determined according to the number of inserts configured in the mold. For example, when there is only one insert configured in the mold, after determining the attribute information of the abnormal area of the insert, only the type information of the abnormal area of the insert can be sent to the correction device; and when there are multiple inserts configured in the mold, After the attribute information of the abnormal area of the insert is determined, the type information and location information of the abnormal area of the insert may be sent to the correction device.
本申请实施例中,可以获取模具的模板图像和实测图像,并根据所述模板 图像的嵌件区域确定所述实测图像的嵌件区域;根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;确定所述嵌件异常区域的属性信息;向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。即本申请实施例可以根据模具的模板图像和实测图像自动对模具进行嵌件状态检测并校正嵌件异常,从而避免了因模具的嵌件状态异常导致的产品报废、模具损坏等问题,提高了生产效率、降低了生产成本。In the embodiment of the present application, the template image and the measured image of the mold can be acquired, and the insert area of the measured image can be determined according to the insert area of the template image; the insert area of the template image and the measured image can be determined according to the Determine the abnormal area of the insert; determine the attribute information of the abnormal area of the insert; send the attribute information to the calibration device, so that the calibration device can perform insert calibration on the mold according to the attribute information. That is, the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.
下面说明本申请实施例提供的模具处理方法,如图2所示,该模具处理方法包括如下步骤。The following describes the mold processing method provided by the embodiments of the present application. As shown in FIG. 2 , the mold processing method includes the following steps.
步骤201,获取模具的原始尺寸的模板图像和原始尺寸的实测图像。In step 201, a template image of the original size of the mold and an actual measured image of the original size are acquired.
示例地,该模具可以为嵌件注塑模具。在一实施例中,可以预先将嵌件正确固定在模具中并拍摄模具,得到模具的模板图像,其中,正确固定在模具中的嵌件可以包括一个或多个。在实际生产中,可以实时拍摄模具,得到模具的实测图像。For example, the mold may be an insert injection mold. In one embodiment, the inserts can be correctly fixed in the mold in advance and the mold can be photographed to obtain a template image of the mold, wherein the inserts correctly fixed in the mold can include one or more inserts. In actual production, the mold can be photographed in real time, and the measured image of the mold can be obtained.
步骤202,获取在原始尺寸的模板图像中框选的多个兴趣区域。Step 202: Acquire multiple regions of interest framed in the template image of the original size.
在一实施例中,可以采用人工框选的方法在模板图像中框选出兴趣区域(region of interest,ROI),框选出的兴趣区域可以为圆形、矩形、多边形等,框选出的兴趣区域可以包括一个或多个,一个兴趣区域对应正确固定在模具中的一个嵌件,即每个兴趣区域为包含嵌件的区域。In one embodiment, a manual frame selection method can be used to frame a region of interest (ROI) in the template image, and the framed region of interest can be a circle, a rectangle, a polygon, etc. The regions of interest may include one or more regions, and one region of interest corresponds to one insert correctly fixed in the mold, that is, each region of interest is an area containing the insert.
步骤203,将多个兴趣区域进行合并处理,得到原始尺寸的模板图像的嵌件区域。 Step 203 , combine multiple interest regions to obtain the embedded region of the template image of the original size.
在一实施例中,当框选的兴趣区域不止一个时,可以将多个兴趣区域进行合并处理,以减少区域数量,便于后续处理。In one embodiment, when more than one area of interest is framed, multiple areas of interest may be combined to reduce the number of areas and facilitate subsequent processing.
在一实施例中,比如可以计算多个兴趣区域的最小外接矩形,将该最小外接矩形对应的区域确定为原始尺寸的模板图像的嵌件区域。其中,最小外接矩形可采用如下公式计算得到:In an embodiment, for example, the minimum circumscribed rectangle of multiple interest regions may be calculated, and the area corresponding to the minimum circumscribed rectangle is determined as the embedded area of the template image of the original size. Among them, the minimum circumscribed rectangle can be calculated by the following formula:
Figure PCTCN2021097262-appb-000001
Figure PCTCN2021097262-appb-000001
其中,(ROI.x,ROI.y)表示最小外接矩形的左上角坐标,(roi 1.x,roi 1.y)、(roi n.x、roi n.y)分别表示第一个兴趣区域的左上角坐标和第n个兴趣区域的 左上角坐标,n为大于或等于2的整数,ROI.width表示最小外接矩形的宽,ROI.height表示最小外接矩形的高,roi n.width表示第n个兴趣区域的宽,roi n.height表示第n个兴趣区域的高。 Among them, (ROI.x, ROI.y) represents the coordinates of the upper left corner of the minimum circumscribed rectangle, (roi 1 .x, roi 1 .y), (roi n .x, roi n .y) represent the first region of interest, respectively The coordinates of the upper left corner and the upper left corner of the nth region of interest, n is an integer greater than or equal to 2, ROI.width represents the width of the smallest bounding rectangle, ROI.height represents the height of the smallest bounding rectangle, and roi n.width represents the first The width of n regions of interest, roi n.height represents the height of the nth region of interest.
在一实施例中,在所述将所述原始尺寸的模板图像和所述原始尺寸的实测图像进行缩小处理之前,还包括:确定所述原始尺寸的模板图像的嵌件区域;对所述原始尺寸的模板图像的嵌件区域进行滤波降噪处理。In an embodiment, before the reducing the original size template image and the original size measured image, the method further includes: determining an inlay area of the original size template image; The embedded area of the template image of the size is filtered and denoised.
步骤204,对原始尺寸的模板图像的嵌件区域进行滤波降噪处理。Step 204: Perform filtering and noise reduction processing on the embedded region of the template image of the original size.
示例地,可以采用自适应中值滤波器(Adaptive Median Filter)对原始尺寸的模板图像的嵌件区域进行滤波降噪处理,自适应中值滤波器不但能够滤除概率较大的椒盐噪声,还能够平滑其他非脉冲噪声,尽可能的保护图像中细节信息,避免图像边缘的细化或者粗化。For example, an adaptive median filter (Adaptive Median Filter) can be used to filter and denoise the embedded area of the template image of the original size. The adaptive median filter can not only filter out the salt and pepper noise with a high probability, but also It can smooth other non-impulsive noises, protect the details in the image as much as possible, and avoid the thinning or coarsening of the image edges.
自适应的中值滤波器需要一个矩形的窗口S xy,和常规中值滤波器不同的是这个窗口的大小会在滤波处理的过程中进行改变(增大)。滤波器的输出是一个像素值,该值用来替换滤波窗口的中心位置的点(x,y)处的像素值。 The adaptive median filter requires a rectangular window S xy , which differs from the conventional median filter in that the size of this window changes (increases) during the filtering process. The output of the filter is a pixel value that is used to replace the pixel value at the point (x,y) at the center of the filter window.
在描述自适应中值滤波器时需要用到如下的符号:The following notations are used to describe the adaptive median filter:
Z min=S xy中的最小灰度值; Z min = minimum gray value in S xy ;
Z max=S xy中的最大灰度值; Z max = maximum gray value in S xy ;
Z med=S xy中的像素值的中值; Z med = median of pixel values in S xy ;
Z xy表示坐标(x,y)处的灰度值; Z xy represents the gray value at the coordinate (x, y);
S max=S xy允许的最大窗口尺寸。 S max = maximum window size allowed by S xy .
自适应中值滤波器有两个处理过程,分别记为:A和B。The adaptive median filter has two processing procedures, denoted as: A and B respectively.
步骤A:该步骤目的是确定当前窗口内得到中值Z med是否是噪声。步骤如下: Step A: The purpose of this step is to determine whether the median Z med obtained in the current window is noise. Proceed as follows:
令A 1=Z med-Z minLet A 1 =Z med -Z min ;
A 2=Z med-Z maxA 2 =Z med -Z max ;
如果A 1>0且A 2<0,跳转到步骤B;否则,增大窗口的尺寸;如果增大后窗口的尺寸≤S max,则重复步骤A过程;否则,输出Z medIf A 1 >0 and A 2 <0, jump to step B; otherwise, increase the size of the window; if the size of the increased window≤S max , repeat the process of step A; otherwise, output Z med .
步骤B:Step B:
令B 1=Z xy-Z minLet B 1 =Z xy -Z min ;
B 2=Z xy-Z maxB 2 =Z xy -Z max ;
如果B 1>0且B 2<0,则输出Z xy;否则输出Z medIf B 1 >0 and B 2 <0, output Z xy ; otherwise, output Z med .
从上面步骤可知,噪声出现的概率较低,自适应中值滤波器可以较快的得出结果,不需要去增加窗口的尺寸;反之,噪声出现的概率较高,则需要增大滤波器的窗口尺寸。It can be seen from the above steps that the probability of noise occurrence is low, and the adaptive median filter can obtain results faster without increasing the size of the window; on the contrary, the probability of noise occurrence is high, it is necessary to increase the filter size window size.
本申请实施例仅以采用自适应中值滤波器为例进行说明,实际应用中,还可以采用其他滤波器进行滤波降噪,比如中值滤波器(Median Filter),此处不做限定。The embodiments of the present application only use an adaptive median filter as an example for description. In practical applications, other filters may also be used to perform filtering and noise reduction, such as a median filter (Median Filter), which is not limited here.
在一实施例中,所述将所述原始尺寸的模板图像和所述原始尺寸的实测图像进行缩小处理,得到缩小尺寸的模板图像和缩小尺寸的实测图像,包括:根据所述原始尺寸的模板图像的嵌件区域与所述原始尺寸的模板图像的尺寸关系确定缩放因子;根据所述缩放因子对所述原始尺寸的模板图像进行缩小处理,得到所述缩小尺寸的模板图像,并根据所述缩放因子对所述原始尺寸的实测图像进行缩小处理,得到所述缩小尺寸的实测图像。In an embodiment, the reducing the template image of the original size and the measured image of the original size to obtain the template image of the reduced size and the measured image of the reduced size, including: according to the template of the original size The size relationship between the embedded area of the image and the template image of the original size determines a scaling factor; the template image of the original size is reduced according to the scaling factor to obtain the template image of the reduced size, and according to the scaling factor The scaling factor reduces the actual measured image of the original size to obtain the actual measured image of the reduced size.
步骤205,根据原始尺寸的模板图像的嵌件区域与原始尺寸的模板图像的尺寸关系确定缩放因子。Step 205: Determine the scaling factor according to the size relationship between the insert area of the template image of the original size and the template image of the original size.
比如,可以根据原始尺寸的模板图像的嵌件区域与原始尺寸的模板图像的宽高关系确定缩放因子。在一个实施例中,缩放因子的计算方法可如下:For example, the scaling factor may be determined according to the width-height relationship between the embedded area of the template image of the original size and the template image of the original size. In one embodiment, the calculation method of the scaling factor may be as follows:
Figure PCTCN2021097262-appb-000002
Figure PCTCN2021097262-appb-000002
其中,G表示缩放因子,src.width表示原始尺寸的模板图像的嵌件区域的宽,src.height表示原始尺寸的模板图像的嵌件区域的高,dst.width表示原始尺寸的模板图像的宽,dst.height表示原始尺寸的模板图像的高。Among them, G represents the scaling factor, src.width represents the width of the embedded area of the template image of the original size, src.height represents the height of the embedded area of the template image of the original size, and dst.width represents the width of the template image of the original size , dst.height represents the height of the original size template image.
即如果原始尺寸的模板图像的嵌件区域的宽大于原始尺寸的模板图像的宽的一半,或者原始尺寸的模板图像的嵌件区域的高大于原始尺寸的模板图像的高的一半,则将缩放因子设置为0.25;否则,将缩放因子设置为0.5。i.e. if the width of the insert area of the original size template image is greater than half the width of the original size template image, or the height of the insert area of the original size template image is greater than half the height of the original size template image, the scaling will be performed. The factor is set to 0.25; otherwise, the scaling factor is set to 0.5.
步骤206,根据缩放因子对原始尺寸的模板图像进行缩小处理,得到缩小尺寸的模板图像,并根据缩放因子对原始尺寸的实测图像进行缩小处理,得到缩小尺寸的实测图像。 Step 206 , reducing the original size template image according to the scaling factor to obtain a reduced size template image, and reducing the original size measured image according to the scaling factor to obtain a reduced size measured image.
由于采用模板匹配的方法确定嵌件区域,图像的尺寸越大,耗时越长,检测效率越低,因而本申请实施例中,可以将原始尺寸的模板图像和原始尺寸的实测图像均作缩小处理,采用小尺寸的图像进行模板匹配,以提高后续的匹配 检测速度。Since the template matching method is used to determine the insert area, the larger the size of the image, the longer the time-consuming and the lower the detection efficiency. Therefore, in the embodiment of the present application, both the template image of the original size and the measured image of the original size can be reduced processing, using small-sized images for template matching to improve the speed of subsequent matching detection.
在一实施例中,所述获取模具的模板图像和实测图像,包括:获取原始尺寸的模板图像和原始尺寸的实测图像。In one embodiment, the acquiring the template image and the measured image of the mold includes: acquiring the template image of the original size and the measured image of the original size.
所述根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域,包括:将所述原始尺寸的模板图像和所述原始尺寸的实测图像进行缩小处理,得到缩小尺寸的模板图像和缩小尺寸的实测图像;将所述缩小尺寸的模板图像的嵌件区域与所述缩小尺寸的实测图像进行匹配,得到所述缩小尺寸的实测图像的嵌件区域。The determining of the inlay area of the measured image according to the inlay area of the template image includes: reducing the template image of the original size and the measured image of the original size to obtain the template image of reduced size and the measured image of the original size. A reduced-size measured image; matching the insert area of the reduced-sized template image with the reduced-sized measured image to obtain an insert area of the reduced-sized measured image.
步骤207,将缩小尺寸的模板图像的嵌件区域与缩小尺寸的实测图像进行匹配,得到缩小尺寸的实测图像的嵌件区域。 Step 207 , matching the embedded area of the reduced-sized template image with the reduced-sized measured image to obtain the embedded area of the reduced-sized measured image.
在一实施例中,所述根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域,包括:根据所述缩放因子对所述缩小尺寸的实测图像的嵌件区域进行尺寸还原处理,得到所述原始尺寸的实测图像的嵌件区域;根据所述原始尺寸的模板图像的嵌件区域和所述原始尺寸的实测图像的嵌件区域确定所述嵌件异常区域。In one embodiment, the determining an abnormal area of the insert according to the insert area of the template image and the insert area of the measured image includes: adjusting the insert of the reduced size measured image according to the scaling factor The size reduction process is performed on the area to obtain the insert area of the measured image of the original size; the abnormal area of the insert is determined according to the insert area of the template image of the original size and the insert area of the measured image of the original size .
步骤208,根据缩放因子对缩小尺寸的实测图像的嵌件区域进行尺寸还原处理,得到原始尺寸的实测图像的嵌件区域。 Step 208 , performing a size reduction process on the embedded area of the reduced-sized measured image according to the scaling factor, to obtain the embedded area of the actual measured image of the original size.
由于后续的差分计算,需要利用原始尺寸的图像进行,因而在得到缩小尺寸的实测图像的嵌件区域之后,可以根据前面采用的缩放因子对缩小尺寸的实测图像的嵌件区域进行尺寸还原处理,得到原始尺寸的实测图像的嵌件区域,可采用如下公式做还原处理:Since the subsequent difference calculation needs to be performed using the original size image, after obtaining the embedded area of the reduced size measured image, the size reduction process can be performed on the embedded area of the reduced size measured image according to the previously used scaling factor. To obtain the inlay area of the measured image of the original size, the following formula can be used for restoration processing:
Figure PCTCN2021097262-appb-000003
Figure PCTCN2021097262-appb-000003
其中,P(a,b)为缩小尺寸后匹配得到的位置坐标,P(x,y)为映射还原到原始尺寸的图像中的坐标。Among them, P(a,b) is the position coordinate obtained by matching after reducing the size, and P(x,y) is the coordinate in the image that is mapped and restored to the original size.
在一实施例中,所述根据所述原始尺寸的模板图像的嵌件区域和所述原始尺寸的实测图像的嵌件区域确定所述嵌件异常区域,包括:获取所述原始尺寸的模板图像的嵌件区域和所述原始尺寸的实测图像的嵌件区域的差分图像;根据预设灰度阈值对所述差分图像进行区域过滤,得到候选区域;根据所述候选区域确定所述嵌件异常区域。In an embodiment, the determining the abnormal insert region according to the insert region of the original size template image and the insert region of the original size measured image includes: acquiring the original size template image The difference image of the insert area of the original size and the insert area of the measured image of the original size; the area filter is performed on the difference image according to the preset grayscale threshold to obtain a candidate area; the abnormality of the insert is determined according to the candidate area area.
步骤209,获取原始尺寸的模板图像的嵌件区域和原始尺寸的实测图像的嵌 件区域的差分图像。Step 209: Obtain a difference image of the insert area of the template image of the original size and the insert area of the measured image of the original size.
该差分图像能够显示出模板图像的嵌件区域和实测图像的嵌件区域的不同。The difference image can show the difference between the inlay area of the template image and the inlay area of the measured image.
步骤210,根据预设灰度阈值对差分图像进行区域过滤,得到候选区域。Step 210: Perform regional filtering on the differential image according to a preset grayscale threshold to obtain a candidate region.
比如,可以获取差分图像中每个像素点对应的模板图像坐标灰度值和实测图像坐标灰度值,模板图像坐标灰度值即模板图像的嵌件区域的像素点对应的坐标位置的灰度值,实测图像坐标灰度值即实测图像的嵌件区域的像素点对应的坐标位置的灰度值,计算每个像素点对应的模板图像坐标灰度值和实测图像坐标灰度值的差值,如果该差值超过预设灰度阈值,则将该像素点对应的区域保留,反之,如果该差值不超过预设灰度阈值,则将该像素点对应的区域过滤掉,保留的区域即为候选区域,预设灰度阈值可自适应取值。For example, the coordinate gray value of the template image corresponding to each pixel in the differential image and the gray value of the measured image coordinate can be obtained. The coordinate gray value of the template image is the gray value of the coordinate position corresponding to the pixel in the embedded area of the template image. value, the gray value of the measured image coordinate is the gray value of the coordinate position corresponding to the pixel point in the embedded area of the measured image, and calculate the difference between the gray value of the template image coordinate corresponding to each pixel point and the gray value of the measured image coordinate , if the difference exceeds the preset grayscale threshold, the area corresponding to the pixel is retained; otherwise, if the difference does not exceed the preset grayscale threshold, the area corresponding to the pixel is filtered out, and the reserved area That is, the candidate area, and the preset grayscale threshold can be adaptively selected.
在一实施例中,可以采用如下公式对差分图像进行区域过滤:In one embodiment, the following formula can be used to perform regional filtering on the differential image:
Figure PCTCN2021097262-appb-000004
Figure PCTCN2021097262-appb-000004
其中,D(x,y)表示区域的判断结果,当D(x,y)=1时,对应区域保留,当D(x,y)=0时,对应区域过滤掉,M(x,y)表示模板图像坐标灰度值,N(x,y)表示实测图像坐标灰度值,T表示预设灰度阈值。Among them, D(x,y) represents the judgment result of the area. When D(x,y)=1, the corresponding area is reserved. When D(x,y)=0, the corresponding area is filtered out, and M(x,y) ) represents the coordinate gray value of the template image, N(x, y) represents the coordinate gray value of the measured image, and T represents the preset gray threshold.
在一实施例中,所述根据所述候选区域确定所述嵌件异常区域,包括:根据第一面积阈值对所述候选区域进行区域过滤,得到所述嵌件异常区域。In one embodiment, the determining the abnormal region of the insert according to the candidate region includes: performing regional filtering on the candidate region according to a first area threshold to obtain the abnormal region of the insert.
步骤211,根据第一面积阈值对候选区域进行区域过滤,得到嵌件异常区域。Step 211: Perform area filtering on the candidate area according to the first area threshold to obtain the abnormal area of the insert.
在一实施例中,由于保留的候选区域并不一定都是嵌件异常区域,需要识别判断。本申请实施例中,可以设置第一面积阈值,在得到候选区域之后,可以基于第一面积阈值对候选区域进行区域过滤,得到嵌件异常区域。In one embodiment, since the reserved candidate regions are not necessarily all abnormal regions of the insert, identification and judgment are required. In this embodiment of the present application, a first area threshold may be set, and after a candidate area is obtained, area filtering may be performed on the candidate area based on the first area threshold to obtain an abnormal insert area.
比如,可以判断每个候选区域的面积是否大于第一面积阈值,将大于第一面积阈值的候选区域保留,将不大于第一面积阈值的候选区域过滤掉,保留的候选区域即为嵌件异常区域。For example, it is possible to determine whether the area of each candidate area is larger than the first area threshold, reserve the candidate area larger than the first area threshold, filter out the candidate area that is not larger than the first area threshold, and the retained candidate area is the insert abnormality area.
步骤212,根据第二面积阈值对嵌件异常区域进行类型识别,得到嵌件异常区域的类型信息。 Step 212 , perform type identification on the abnormal area of the insert according to the second area threshold, and obtain the type information of the abnormal area of the insert.
通过大量的实验可知,有两种典型的嵌件异常状态,即嵌件漏放和错位,因而,本申请实施例中,嵌件异常区域的类型信息可以包括漏放和错位。漏放和错位有漏放和错位对应的特征,其中,漏放通常呈现较大面积的异常,比如整个嵌件所在区域均异常;而错位通常呈现较小面积的异常,比如只是嵌件边 缘区域异常。在本申请实施例中,可以根据这些特征设置第二面积阈值,利用第二面积阈值对嵌件异常区域进行类型识别,得到嵌件异常区域的类型信息。Through a large number of experiments, it can be known that there are two typical abnormal states of the insert, that is, the leakage of the insert and the dislocation. Therefore, in the embodiment of the present application, the type information of the abnormal region of the insert may include the leakage and the dislocation. Leakage and dislocation have characteristics corresponding to leakage and dislocation. Among them, leakage usually shows a large area of anomalies, such as the entire area where the insert is located; while dislocation usually shows a small area of anomaly, such as only the edge area of the insert. abnormal. In this embodiment of the present application, a second area threshold may be set according to these features, and the type of the abnormal area of the insert may be identified by using the second area threshold to obtain type information of the abnormal area of the insert.
比如,可以判断每个嵌件异常区域的面积是否大于第二面积阈值,将大于第二面积阈值的嵌件异常区域的类型识别为漏放,将不大于第二面积阈值的嵌件异常区域的类型识别为错位。For example, it can be determined whether the area of each insert abnormal area is greater than the second area threshold, and the type of the insert abnormal area larger than the second area threshold can be identified as missing, and the type of the insert abnormal area that is not larger than the second area threshold can be identified. Type identification is misplaced.
步骤213,计算嵌件异常区域的中心,得到嵌件异常区域的位置信息。Step 213: Calculate the center of the abnormal area of the insert to obtain the position information of the abnormal area of the insert.
在一实施例中,嵌件异常区域的位置信息可以通过计算嵌件异常区域的中心得到。比如可以确定出嵌件异常区域的外接矩形,将该外接矩形的中心作为嵌件异常区域的中心,获取该中心的坐标信息,将该坐标信息作为嵌件异常区域的位置信息。此外,还可以通过某些方式确定嵌件异常区域的重心,获取该重心的坐标信息,将该坐标信息作为嵌件异常区域的位置信息,此处不做限定。In one embodiment, the position information of the abnormal area of the insert can be obtained by calculating the center of the abnormal area of the insert. For example, the circumscribing rectangle of the abnormal area of the insert may be determined, the center of the circumscribing rectangle may be used as the center of the abnormal area of the insert, the coordinate information of the center may be obtained, and the coordinate information may be used as the position information of the abnormal area of the insert. In addition, the center of gravity of the abnormal region of the insert can also be determined in some ways, the coordinate information of the center of gravity can be obtained, and the coordinate information can be used as the position information of the abnormal region of the insert, which is not limited here.
步骤214,向校正设备发送嵌件异常区域的类型信息和位置信息,以使得校正设备根据嵌件异常区域的类型信息和位置信息对模具进行嵌件校正。 Step 214 , sending the type information and position information of the abnormal area of the insert to the correction device, so that the correction device performs insert correction on the mold according to the type information and the position information of the abnormal area of the insert.
在一种可能的实现方式中,还可以根据模具配置的嵌件数量确定向校正设备发送的属性信息。比如,当模具配置的嵌件只有一个时,在确定出嵌件异常区域的属性信息后,可以只向校正设备发送嵌件异常区域的类型信息;而当模具配置的嵌件有多个时,在确定出嵌件异常区域的属性信息后,可以向校正设备发送嵌件异常区域的类型信息和位置信息。In a possible implementation manner, the attribute information sent to the calibration device may also be determined according to the number of inserts configured in the mold. For example, when there is only one insert configured in the mold, after determining the attribute information of the abnormal area of the insert, only the type information of the abnormal area of the insert can be sent to the correction device; and when there are multiple inserts configured in the mold, After the attribute information of the abnormal area of the insert is determined, the type information and location information of the abnormal area of the insert may be sent to the correction device.
示例地,校正设备可以是机械手、机器人等,此处不做限定。For example, the correction device may be a manipulator, a robot, etc., which is not limited here.
本申请实施例中,可以获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;确定所述嵌件异常区域的属性信息;向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。即本申请实施例可以根据模具的模板图像和实测图像自动对模具进行嵌件状态检测并校正嵌件异常,从而避免了因模具的嵌件状态异常导致的产品报废、模具损坏等问题,提高了生产效率、降低了生产成本。In the embodiment of the present application, the template image and the measured image of the mold can be acquired, and the insert area of the measured image can be determined according to the insert area of the template image; the insert area of the template image and the measured image can be determined according to the Determine the abnormal area of the insert; determine the attribute information of the abnormal area of the insert; send the attribute information to the calibration device, so that the calibration device can perform insert calibration on the mold according to the attribute information. That is, the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.
虽然图2的流程图中的多个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。Although a plurality of steps in the flowchart of FIG. 2 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these sub-steps or stages The sequence is also not necessarily sequential, but may be performed alternately or alternately with other steps or sub-steps of other steps or at least a portion of a phase.
图3是本申请是实施例提供的模具处理装置的一个结构示意图,该装置适用于执行本申请实施例提供的模具处理方法。如图3所示,该装置可以包括以下模块。FIG. 3 is a schematic structural diagram of a mold processing device provided by an embodiment of the present application, and the device is suitable for executing the mold processing method provided by the embodiment of the present application. As shown in Figure 3, the apparatus may include the following modules.
第一确定模块301,设置为获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;The first determination module 301 is configured to obtain a template image and an actual measured image of the mold, and to determine the embedded area of the actual measured image according to the embedded area of the template image;
第二确定模块302,设置为根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;The second determining module 302 is configured to determine the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image;
第三确定模块303,设置为确定所述嵌件异常区域的属性信息;The third determining module 303 is configured to determine the attribute information of the abnormal region of the insert;
发送模块304,设置为向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。The sending module 304 is configured to send the attribute information to a calibration device, so that the calibration device performs insert calibration on the mold according to the attribute information.
一实施例中,所述第一确定模块301获取模具的模板图像和实测图像,包括:In one embodiment, the first determination module 301 obtains the template image and the measured image of the mold, including:
获取原始尺寸的所述模板图像和原始尺寸的所述实测图像;Obtain the template image of the original size and the measured image of the original size;
所述根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域,包括:The determining of the inlay area of the measured image according to the inlay area of the template image includes:
将原始尺寸的所述模板图像和原始尺寸的所述实测图像进行缩小处理,得到缩小尺寸的所述模板图像和缩小尺寸的所述实测图像;performing reduction processing on the template image of the original size and the measured image of the original size to obtain the template image of the reduced size and the measured image of the reduced size;
将缩小尺寸的所述模板图像的嵌件区域与缩小尺寸的所述实测图像进行匹配,得到缩小尺寸的所述实测图像的嵌件区域。Matching the inlay area of the reduced-sized template image with the reduced-sized measured image to obtain the reduced-sized inlaid area of the measured image.
一实施例中,所述第一确定模块301将原始尺寸的所述模板图像和原始尺寸的所述实测图像进行缩小处理,得到缩小尺寸的所述模板图像和缩小尺寸的所述实测图像,包括:In an embodiment, the first determining module 301 performs reduction processing on the template image of the original size and the measured image of the original size, to obtain the template image of the reduced size and the measured image of the reduced size, including :
根据原始尺寸的所述模板图像的嵌件区域与原始尺寸的所述模板图像的尺寸关系确定缩放因子;determining a scaling factor according to the size relationship between the insert region of the template image of the original size and the template image of the original size;
根据所述缩放因子对原始尺寸的所述模板图像进行缩小处理,得到缩小尺寸的所述模板图像,并根据所述缩放因子对原始尺寸的所述实测图像进行缩小处理,得到缩小尺寸的所述实测图像。The template image of the original size is reduced according to the scaling factor to obtain the template image of reduced size, and the actual measured image of the original size is reduced according to the scaling factor to obtain the reduced size of the template image. Measured image.
一实施例中,所述装置还包括:In one embodiment, the device further includes:
第四确定模块,设置为确定原始尺寸的所述模板图像的嵌件区域;a fourth determining module, configured to determine the insert area of the template image of the original size;
降噪模块,设置为对原始尺寸的所述模板图像的嵌件区域进行滤波降噪处理。A noise reduction module, configured to perform filtering and noise reduction processing on the embedded region of the template image of the original size.
一实施例中,所述第四确定模块确定原始尺寸的所述模板图像的嵌件区域,包括:In one embodiment, the fourth determining module determines the insert area of the template image in the original size, including:
获取在原始尺寸的所述模板图像中框选的多个兴趣区域;acquiring multiple regions of interest framed in the template image of the original size;
将所述多个兴趣区域进行合并处理,得到原始尺寸的所述模板图像的嵌件区域。The multiple interest regions are merged to obtain the embedded region of the template image in the original size.
一实施例中,所述第二确定模块302根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域,包括:In one embodiment, the second determining module 302 determines the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image, including:
根据所述缩放因子对缩小尺寸的所述实测图像的嵌件区域进行尺寸还原处理,得到原始尺寸的所述实测图像的嵌件区域;Perform size reduction processing on the embedded area of the reduced size of the measured image according to the scaling factor, to obtain the original size of the embedded area of the measured image;
根据原始尺寸的所述模板图像的嵌件区域和原始尺寸的所述实测图像的嵌件区域确定所述嵌件异常区域。The abnormal area of the insert is determined according to the insert area of the template image of the original size and the insert area of the measured image of the original size.
一实施例中,所述第二确定模块302根据原始尺寸的所述模板图像的嵌件区域和原始尺寸的所述实测图像的嵌件区域确定所述嵌件异常区域,包括:In one embodiment, the second determining module 302 determines the abnormal insert area according to the insert area of the template image of the original size and the insert area of the measured image of the original size, including:
获取原始尺寸的所述模板图像的嵌件区域和原始尺寸的所述实测图像的嵌件区域的差分图像;obtaining a differential image of the insert area of the template image of the original size and the insert area of the measured image of the original size;
根据预设灰度阈值对所述差分图像进行区域过滤,得到候选区域;Perform regional filtering on the differential image according to a preset grayscale threshold to obtain a candidate region;
根据所述候选区域确定所述嵌件异常区域。The insert abnormal area is determined according to the candidate area.
一实施例中,所述第二确定模块302根据所述候选区域确定所述嵌件异常区域,包括:In one embodiment, the second determining module 302 determines the abnormal region of the insert according to the candidate region, including:
根据第一面积阈值对所述候选区域进行区域过滤,得到所述嵌件异常区域。Area filtering is performed on the candidate area according to the first area threshold to obtain the abnormal area of the insert.
一实施例中,所述第三确定模块303确定所述嵌件异常区域的属性信息,包括:In one embodiment, the third determining module 303 determines the attribute information of the abnormal region of the insert, including:
根据第二面积阈值对所述嵌件异常区域进行类型识别,得到所述嵌件异常区域的类型信息;Perform type identification on the abnormal area of the insert according to the second area threshold, and obtain the type information of the abnormal area of the insert;
计算所述嵌件异常区域的中心,得到所述嵌件异常区域的位置信息。The center of the abnormal area of the insert is calculated to obtain the position information of the abnormal area of the insert.
一实施例中,所述发送模块304向校正设备发送所述属性信息,包括:In an embodiment, the sending module 304 sends the attribute information to the correction device, including:
向所述校正设备发送所述嵌件异常区域的类型信息和位置信息。The type information and location information of the abnormal area of the insert are sent to the correction device.
为描述的方便和简洁,仅以上述多个功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述功能模块的工作过程,可以参考前述方法实施例中的对应过程,在此不再 赘述。For the convenience and simplicity of description, only the division of the above-mentioned multiple functional modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules as required, that is, the internal structure of the device is divided into different functional modules. , to complete all or part of the functions described above. For the working processes of the functional modules described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
本申请实施例的装置,可以获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;确定所述嵌件异常区域的属性信息;向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。即本申请实施例可以根据模具的模板图像和实测图像自动对模具进行嵌件状态检测并校正嵌件异常,从而避免了因模具的嵌件状态异常导致的产品报废、模具损坏等问题,提高了生产效率、降低了生产成本。The device of the embodiment of the present application can acquire the template image and the measured image of the mold, and determine the insert area of the measured image according to the insert area of the template image; according to the insert area of the template image and the measured image The insert area of the image determines the insert abnormal area; determines the attribute information of the insert abnormal area; sends the attribute information to the correction device, so that the correction device performs insert correction on the mold according to the attribute information . That is, the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.
本申请实施例还提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述任一实施例提供的模具处理方法。Embodiments of the present application further provide an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor, where the processor implements any of the above when executing the program The mold processing method provided by the embodiment.
本申请实施例还提供了一种计算机可读介质,存储有计算机程序,所述程序被处理器执行时实现上述任一实施例提供的模具处理方法。An embodiment of the present application further provides a computer-readable medium storing a computer program, and when the program is executed by a processor, the mold processing method provided by any of the foregoing embodiments is implemented.
图4示出了本申请实施例的模具处理系统的示例性架构,如图4所示,模具处理系统中包括电子设备401和校正设备402,电子设备401可为前面实施例描述的电子设备,电子设备401和校正设备402之间的交互过程可参阅前面实施例的描述,此处不再赘述。FIG. 4 shows an exemplary architecture of a mold processing system according to an embodiment of the present application. As shown in FIG. 4 , the mold processing system includes an electronic device 401 and a calibration device 402. The electronic device 401 may be the electronic device described in the previous embodiments. For the interaction process between the electronic device 401 and the calibration device 402, reference may be made to the descriptions of the previous embodiments, and details are not repeated here.
下面参考图5,示出了适于用来实现本申请实施例的电子设备的计算机系统500的结构示意图。图5示出的电子设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Referring to FIG. 5 below, a schematic structural diagram of a computer system 500 suitable for implementing the electronic device of the embodiment of the present application is shown. The electronic device shown in FIG. 5 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
如图5所示,计算机系统500包括中央处理单元(Central Processing Unit,CPU)501,CPU 501可以根据存储在只读存储器(Read-only Memory,ROM)502中的程序或者从存储部分508加载到随机访问存储器(Random Access Memory,RAM)503中的程序而执行多种适当的动作和处理。在RAM 503中,还存储有系统500操作所需的多种程序和数据。CPU 501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(Input/Output,I/O)接口505也连接至总线504。As shown in FIG. 5 , the computer system 500 includes a central processing unit (Central Processing Unit, CPU) 501, and the CPU 501 can be loaded into the computer according to a program stored in a read-only memory (Read-only Memory, ROM) 502 or from a storage part 508 A program in Random Access Memory (RAM) 503 performs various appropriate actions and processes. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An Input/Output (I/O) interface 505 is also connected to the bus 504 .
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如局域网(Local Area Network,LAN)卡、调制解调器等的网络接口卡的通信部分509。 通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从驱动器510上读出的计算机程序根据需要被安装入存储部分508。The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc. ; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network (Local Area Network, LAN) card, a modem, and the like. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 510 as needed so that a computer program read from the drive 510 is installed into the storage section 508 as needed.
根据本申请公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请公开的实施例包括一种计算机程序产品,计算机程序产品包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被CPU 501执行时,执行本申请的系统中限定的上述功能。According to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 509 and/or installed from the removable medium 511 . When the computer program is executed by the CPU 501, the above-described functions defined in the system of the present application are executed.
本申请所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、ROM、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。The computer-readable medium shown in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. Computer readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Flash memory, optical fiber, portable Compact Disc Read-Only Memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . The program code embodied on the computer readable medium may be transmitted by any suitable medium, including but not limited to: wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
附图中的流程图和框图,图示了按照本申请多种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定 的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
描述于本申请实施例中所涉及到的模块和/或单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块和/或单元也可以设置在处理器中,例如,可以描述为:一种处理器包括第一确定模块、第二确定模块、第三确定模块和发送模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定。The modules and/or units involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner. The described modules and/or units may also be provided in a processor, for example, it may be described as: a processor includes a first determination module, a second determination module, a third determination module and a sending module. Among them, the names of these modules do not constitute a limitation on the module itself under certain circumstances.
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;确定所述嵌件异常区域的属性信息;向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。As another aspect, the present application also provides a computer-readable medium. The computer-readable medium may be included in the device described in the above embodiments, or may exist alone without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes: acquiring a template image and an actual measurement image of the mold, and inserting an insert according to the template image. The area determines the insert area of the measured image; determines the insert abnormal area according to the insert area of the template image and the insert area of the measured image; determines the attribute information of the insert abnormal area; sends it to the calibration device the attribute information, so that the calibration device performs insert calibration on the mold according to the attribute information.
根据本申请实施例的技术方案,可以获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;确定所述嵌件异常区域的属性信息;向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。即本申请实施例可以根据模具的模板图像和实测图像自动对模具进行嵌件状态检测并校正嵌件异常,从而避免了因模具的嵌件状态异常导致的产品报废、模具损坏等问题,提高了生产效率、降低了生产成本。According to the technical solutions of the embodiments of the present application, the template image and the measured image of the mold can be obtained, and the insert area of the measured image can be determined according to the insert area of the template image; The insert area of the measured image determines the insert abnormal area; determines the attribute information of the insert abnormal area; sends the attribute information to the calibration device, so that the calibration device can insert the mold according to the attribute information. piece correction. That is, the embodiment of the present application can automatically detect the insert state of the mold according to the template image and the measured image of the mold and correct the abnormality of the insert, thereby avoiding the problems of product scrapping and mold damage caused by the abnormal state of the insert of the mold, and improving the performance of the mold. Production efficiency, reduce production costs.

Claims (14)

  1. 一种模具处理方法,包括:A mold processing method, comprising:
    获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;Obtaining the template image and the measured image of the mold, and determining the insert area of the measured image according to the insert area of the template image;
    根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;Determine the abnormal area of the insert according to the insert area of the template image and the insert area of the measured image;
    确定所述嵌件异常区域的属性信息;determining the attribute information of the abnormal area of the insert;
    向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。The attribute information is sent to a calibration device, so that the calibration device performs insert calibration on the mold according to the attribute information.
  2. 根据权利要求1所述的方法,其中,所述获取模具的模板图像和实测图像,包括:The method according to claim 1, wherein the acquiring the template image and the measured image of the mold comprises:
    获取原始尺寸的模板图像和原始尺寸的实测图像;Obtain the original size template image and the original size measured image;
    所述根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域,包括:The determining of the inlay area of the measured image according to the inlay area of the template image includes:
    将所述原始尺寸的模板图像和所述原始尺寸的实测图像进行缩小处理,得到缩小尺寸的模板图像和缩小尺寸的实测图像;The template image of the original size and the measured image of the original size are reduced to obtain the template image of the reduced size and the measured image of the reduced size;
    将所述缩小尺寸的模板图像的嵌件区域与所述缩小尺寸的实测图像进行匹配,得到所述缩小尺寸的实测图像的嵌件区域。Matching the embedded region of the reduced-size template image with the reduced-size measured image to obtain the embedded region of the reduced-sized measured image.
  3. 根据权利要求2所述的方法,其中,所述将所述原始尺寸的模板图像和所述原始尺寸的实测图像进行缩小处理,得到缩小尺寸的模板图像和缩小尺寸的实测图像,包括:The method according to claim 2, wherein the reducing the template image of the original size and the measured image of the original size to obtain the template image of the reduced size and the measured image of the original size, comprising:
    根据所述原始尺寸的模板图像的嵌件区域与所述原始尺寸的模板图像的尺寸关系确定缩放因子;determining a scaling factor according to the size relationship between the insert area of the original size template image and the original size template image;
    根据所述缩放因子对所述原始尺寸的模板图像进行缩小处理,得到所述缩小尺寸的模板图像,并根据所述缩放因子对所述原始尺寸的实测图像进行缩小处理,得到所述缩小尺寸的实测图像。The original-sized template image is reduced according to the scaling factor to obtain the reduced-sized template image, and the original-sized measured image is reduced according to the scaling factor to obtain the reduced-sized template image. Measured image.
  4. 根据权利要求2所述的方法,其中,在所述将所述原始尺寸的模板图像和所述原始尺寸的实测图像进行缩小处理之前,还包括:The method according to claim 2, wherein before the reducing the template image of the original size and the measured image of the original size, the method further comprises:
    确定所述原始尺寸的模板图像的嵌件区域;determining an inset region of the original size template image;
    对所述原始尺寸的模板图像的嵌件区域进行滤波降噪处理。Filtering and noise reduction processing is performed on the embedded region of the template image of the original size.
  5. 根据权利要求4所述的方法,其中,所述确定所述原始尺寸的模板图像的嵌件区域,包括:5. The method of claim 4, wherein said determining an inset area of the original size template image comprises:
    获取在所述原始尺寸的模板图像中框选的多个兴趣区域;acquiring multiple regions of interest framed in the template image of the original size;
    将所述多个兴趣区域进行合并处理,得到所述原始尺寸的模板图像的嵌件区域。The multiple interest regions are merged to obtain the embedded region of the template image of the original size.
  6. 根据权利要求3所述的方法,其中,所述根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域,包括:The method according to claim 3, wherein the determining the abnormal region of the inlay according to the inlay region of the template image and the inlay region of the measured image comprises:
    根据所述缩放因子对所述缩小尺寸的实测图像的嵌件区域进行尺寸还原处理,得到所述原始尺寸的实测图像的嵌件区域;Perform size reduction processing on the embedded area of the reduced-size measured image according to the scaling factor, to obtain the embedded area of the original-sized measured image;
    根据所述原始尺寸的模板图像的嵌件区域和所述原始尺寸的实测图像的嵌件区域确定所述嵌件异常区域。The abnormality area of the insert is determined according to the insert area of the template image of the original size and the insert area of the measured image of the original size.
  7. 根据权利要求6所述的方法,其中,所述根据所述原始尺寸的模板图像的嵌件区域和所述原始尺寸的实测图像的嵌件区域确定所述嵌件异常区域,包括:The method according to claim 6, wherein the determining the abnormal insert area according to the insert area of the template image of the original size and the insert area of the measured image of the original size comprises:
    获取所述原始尺寸的模板图像的嵌件区域和所述原始尺寸的实测图像的嵌件区域的差分图像;obtaining a differential image of the insert area of the template image of the original size and the insert area of the measured image of the original size;
    根据预设灰度阈值对所述差分图像进行区域过滤,得到候选区域;Perform regional filtering on the differential image according to a preset grayscale threshold to obtain a candidate region;
    根据所述候选区域确定所述嵌件异常区域。The insert abnormal area is determined according to the candidate area.
  8. 根据权利要求7所述的方法,其中,所述根据所述候选区域确定所述嵌件异常区域,包括:The method according to claim 7, wherein the determining the abnormal region of the insert according to the candidate region comprises:
    根据第一面积阈值对所述候选区域进行区域过滤,得到所述嵌件异常区域。Area filtering is performed on the candidate area according to the first area threshold to obtain the abnormal area of the insert.
  9. 根据权利要求1至8中任一项所述的方法,其中,所述确定所述嵌件异常区域的属性信息,包括:The method according to any one of claims 1 to 8, wherein the determining the attribute information of the abnormal region of the insert comprises:
    根据第二面积阈值对所述嵌件异常区域进行类型识别,得到所述嵌件异常区域的类型信息;Perform type identification on the abnormal area of the insert according to the second area threshold, and obtain the type information of the abnormal area of the insert;
    计算所述嵌件异常区域的中心,得到所述嵌件异常区域的位置信息。The center of the abnormal area of the insert is calculated to obtain the position information of the abnormal area of the insert.
  10. 根据权利要求9所述的方法,其中,所述向校正设备发送所述属性信息,包括:The method according to claim 9, wherein the sending the attribute information to the correction device comprises:
    向所述校正设备发送所述嵌件异常区域的类型信息和位置信息。The type information and location information of the abnormal area of the insert are sent to the correction device.
  11. 一种模具处理装置,包括:A mold processing device, comprising:
    第一确定模块,设置为获取模具的模板图像和实测图像,并根据所述模板图像的嵌件区域确定所述实测图像的嵌件区域;a first determining module, configured to obtain a template image and an actual measured image of the mold, and to determine the embedded area of the measured image according to the insert area of the template image;
    第二确定模块,设置为根据所述模板图像的嵌件区域和所述实测图像的嵌件区域确定嵌件异常区域;a second determining module, configured to determine an abnormal region of the inlay according to the inlay region of the template image and the inlay region of the measured image;
    第三确定模块,设置为确定所述嵌件异常区域的属性信息;a third determining module, configured to determine the attribute information of the abnormal region of the insert;
    发送模块,设置为向校正设备发送所述属性信息,以使得所述校正设备根据所述属性信息对所述模具进行嵌件校正。The sending module is configured to send the attribute information to a calibration device, so that the calibration device can perform insert calibration on the mold according to the attribute information.
  12. 一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至10中任一项所述的模具处理方法。An electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the computer program as claimed in claims 1 to 10 when the processor executes the computer program The mold processing method of any one.
  13. 一种模具处理系统,包括校正设备以及用于执行如权利要求1至10中任一项所述的模具处理方法的电子设备。A mold processing system comprising a calibration device and an electronic device for performing the mold processing method of any one of claims 1 to 10.
  14. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至10中任一项所述的模具处理方法。A computer-readable storage medium storing a computer program, wherein the computer program implements the mold processing method according to any one of claims 1 to 10 when the computer program is executed by a processor.
PCT/CN2021/097262 2021-03-30 2021-05-31 Mould processing method and apparatus, electronic device, system, and storage medium WO2022205606A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110340045.3A CN113160148A (en) 2021-03-30 2021-03-30 Mold processing method, mold processing device, electronic apparatus, mold processing system, and storage medium
CN202110340045.3 2021-03-30

Publications (1)

Publication Number Publication Date
WO2022205606A1 true WO2022205606A1 (en) 2022-10-06

Family

ID=76885801

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/097262 WO2022205606A1 (en) 2021-03-30 2021-05-31 Mould processing method and apparatus, electronic device, system, and storage medium

Country Status (2)

Country Link
CN (1) CN113160148A (en)
WO (1) WO2022205606A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103407283A (en) * 2013-08-21 2013-11-27 日东电子科技(深圳)有限公司 Solder paste printing press and vision aligning method thereof
CN104899597A (en) * 2015-04-16 2015-09-09 厦门博视源机器视觉技术有限公司 Mould protector specific to insert molding and realization method thereof
CN105046271A (en) * 2015-06-25 2015-11-11 哈尔滨工业大学 MELF (Metal Electrode Leadless Face) component positioning and detecting method based on match template
US20200068081A1 (en) * 2018-08-23 2020-02-27 Konica Minolta, Inc. Image inspection device and program
CN111369513A (en) * 2020-02-28 2020-07-03 广州视源电子科技股份有限公司 Abnormity detection method, abnormity detection device, terminal equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107576667A (en) * 2017-10-13 2018-01-12 成都精工华耀机械制造有限公司 A kind of railway rail clip abnormality detection system based on linear array thermal camera

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103407283A (en) * 2013-08-21 2013-11-27 日东电子科技(深圳)有限公司 Solder paste printing press and vision aligning method thereof
CN104899597A (en) * 2015-04-16 2015-09-09 厦门博视源机器视觉技术有限公司 Mould protector specific to insert molding and realization method thereof
CN105046271A (en) * 2015-06-25 2015-11-11 哈尔滨工业大学 MELF (Metal Electrode Leadless Face) component positioning and detecting method based on match template
US20200068081A1 (en) * 2018-08-23 2020-02-27 Konica Minolta, Inc. Image inspection device and program
CN111369513A (en) * 2020-02-28 2020-07-03 广州视源电子科技股份有限公司 Abnormity detection method, abnormity detection device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN113160148A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
US9418319B2 (en) Object detection using cascaded convolutional neural networks
CN110008806B (en) Information processing device, learning processing method, learning device, and object recognition device
WO2021189848A1 (en) Model training method and apparatus, cup-to-disc ratio determination method and apparatus, and device and storage medium
CN110705583A (en) Cell detection model training method and device, computer equipment and storage medium
WO2020082731A1 (en) Electronic device, credential recognition method and storage medium
US20150206318A1 (en) Method and apparatus for image enhancement and edge verificaton using at least one additional image
US20180253852A1 (en) Method and device for locating image edge in natural background
US10169673B2 (en) Region-of-interest detection apparatus, region-of-interest detection method, and recording medium
US11551388B2 (en) Image modification using detected symmetry
CN111862187B (en) Cup-to-tray ratio determining method, device, equipment and storage medium based on neural network
WO2019128504A1 (en) Method and apparatus for image processing in billiards game, and terminal device
US11720745B2 (en) Detecting occlusion of digital ink
US20130201358A1 (en) Efficient Line Detection Method
WO2021227723A1 (en) Target detection method and apparatus, computer device and readable storage medium
WO2021139180A1 (en) Missing card corner inspection method and apparatus, computer device, and storage medium
CN112651953A (en) Image similarity calculation method and device, computer equipment and storage medium
EP2536123A1 (en) Image processing method and image processing apparatus
WO2022205606A1 (en) Mould processing method and apparatus, electronic device, system, and storage medium
JP7121132B2 (en) Image processing method, apparatus and electronic equipment
WO2019109410A1 (en) Fully convolutional network model training method for splitting abnormal signal region in mri image
US20230048643A1 (en) High-Precision Map Construction Method, Apparatus and Electronic Device
CN107239776B (en) Method and apparatus for tilt image correction
CN111429450B (en) Corner point detection method, system, equipment and storage medium
CN114596210A (en) Noise estimation method, device, terminal equipment and computer readable storage medium
TW202129540A (en) Method and device for recognizing character and storage medium

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: 21934255

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: 21934255

Country of ref document: EP

Kind code of ref document: A1