Quality detection method and system for vacuum isothermal forging die
Through 3D cameras and image processing technology, the quality problems of vacuum isothermal forging molds are quickly identified, and the problems of difficulty and low efficiency in the existing technology are solved, thus achieving efficient and accurate detection of mold quality and guaranteeing forging forming accuracy.
Patent Information
- Application Number
- CN202411943805.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to quickly and accurately detect the quality of vacuum isothermal forging molds, resulting in the impact of forging accuracy.
The mold is scanned by a 3D camera, and the detected image is divided into local areas using an image processing algorithm, local entropy is calculated, and the area of interest is determined. The target area image is extracted by the watershed segmentation method, and the mold quality is identified by the area threshold and direction variance.
It realizes rapid and accurate detection of mold quality, can process a large number of images in a short time, detect tiny defects and defects, and ensures the forming accuracy of forgings and quality control of production processes.
Smart Images

Figure CN119887667A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of intelligent manufacturing technology, and specifically relates to a quality inspection method and system for a vacuum isothermal forging die. Background Art
[0002] Vacuum isothermal forging is a process that uses a vacuum environment to heat the die to the same temperature as the forging, and forms complex precision forgings at a lower deformation rate and fewer forging times under constant temperature conditions.
[0003] Although vacuum isothermal forging reduces the deformation resistance and flow resistance of the forging process to a certain extent, and solves the oxidation problem of dies and forgings, it is more dependent on the quality of the forging die. The quality of the die is directly related to the quality of the forging. If there is a quality problem with the die, it will have a serious impact on the accuracy of the forging.
[0004] However, due to the particularity and irregularity of different forgings and dies, it is difficult to accurately and quickly detect the die status manually, resulting in the frequent failure to deliver forgings within the expected time limit and standards. Summary of the invention
[0005] The embodiments of the present application provide a quality inspection method and system for a vacuum isothermal forging die to solve the above-mentioned technical problems in the prior art.
[0006] A first aspect of an embodiment of the present application provides a quality inspection method for a vacuum isothermal forging die, comprising: Scan the mold to be inspected by a 3D camera to obtain an inspection image of the mold to be inspected; The detection image is divided into several local areas, the local entropy of each local area is calculated, and the image of the region of interest is determined according to the local entropy; By using the watershed segmentation method, the target area image is extracted within the area of interest image; The mold quality is identified by calculating the area threshold and horizontal and vertical variance of the target area image.
[0007] In some embodiments, the mold to be inspected is scanned by a 3D camera to obtain a detection image of the mold to be inspected, wherein the 3D camera is carried by a servo motor. When the industrial computer sends a detection instruction, the servo motor drives the 3D camera to move along a predetermined path. During the movement, the 3D camera scans and shoots the mold to be inspected to obtain a detection image of the mold to be inspected.
[0008] In some embodiments, the step of dividing the detected image into a plurality of local regions, calculating the local entropy of each local region, and determining the region of interest image according to the local entropy specifically includes the following steps: The size is The detection image Divide into The size is Local area ,in, , ; For each local area , calculate their local entropy values respectively , and search for the maximum value of the local entropy value in the entire detection image and minimum value ; According to the maximum value of local entropy and minimum value , set the segmentation threshold , determine the local entropy value Less than the segmentation threshold The local area is the region of interest image.
[0009] In some embodiments, the maximum value of the local entropy value and minimum value , set the segmentation threshold , determine the local entropy value Less than the segmentation threshold The local area is the region of interest image, where the segmentation threshold The calculation method is expressed by the following formula: In the above formula, represents the segmentation threshold; Represents a constant, usually a constant between 3 and 5; Represents the minimum value of local entropy; Indicates the maximum value of local entropy.
[0010] In some embodiments, the step of extracting the target area image from the area of interest image by using the watershed segmentation method specifically includes the following steps: Extracting the foreground image based on the region of interest image; According to the foreground image, the redundant background noise is removed by morphological operation to obtain a morphological image; Perform Euclidean distance transformation on the morphological image to obtain a distance image; Performing connected region analysis on the distance image to obtain all connected regions of the distance image, and using the connected regions as the labeled image; According to the morphological image, distance image and connected region marker image, mask markers are made and watershed segmentation is performed to obtain the target region image.
[0011] In some embodiments, removing redundant background noise through morphological operation according to the foreground image to obtain a morphological image comprises the following steps: Select a 5×5 rectangular kernel structure element to perform an erosion operation on the foreground image to remove discrete noise and shrink the image boundary; Select a 7×7 rectangular kernel structure element to perform an opening operation on the image to obtain a morphological image.
[0012] In some embodiments, the connected region analysis is performed on the distance image to obtain all connected regions of the distance image, and the connected regions are used as the marker image, wherein the connected region analysis based on the seed filling method is adopted, and specifically includes the following steps: (1) Scan the range image P line by line until the current pixel is a foreground pixel, that is, , specifically including the following steps: 1) As a seed, give it a label label, and then push all neighboring pixels with the same value as the top pixel into the stack; 2) Pop the top pixel of the stack, assign it the same label, and then push all neighboring pixels with the same value as the top pixel into the stack; 3) Repeat step 2) until the element in the stack is empty, and a connected area in the distance image P is found. The pixel values in the area are marked as label; (2) Repeat step (1) until the scan is completed and all connected areas of the distance image P are obtained.
[0013] In some embodiments, the method of making mask marks based on the morphological image, the distance image and the connected region mark image, performing watershed segmentation, and obtaining the target region image specifically includes the following steps: The morphological image and the distance image are subtracted, the image pixels after the subtraction are traversed, the non-zero pixels are found, and the corresponding positions in the marked image are marked to obtain the watershed mask mark. Based on the watershed mask mark, the target area image is obtained.
[0014] In some embodiments, the identification of mold quality by calculating the area threshold and horizontal and vertical variances of the target area image specifically includes the following contents: Determine whether the maximum connected domain area of the target area image is greater than the set first area threshold. If it is greater, it is determined to be a pore quality problem; if it is less than, it is determined to be a crack quality problem or there is no quality problem. In this case, further judgment is required, including the following: Calculate the variance value, variance mean and store the minimum variance value of the target area image in the horizontal and vertical directions; By comparing the minimum variance values in the horizontal and vertical directions, the direction with the smaller variance value is the direction with quality problems; After determining the direction, the difference between the variance mean and the minimum variance value in this direction is used to determine whether the image has quality problems by setting the difference threshold. If the difference is greater than the domain threshold, it is judged as a crack quality problem. If the difference is less than the threshold, the mold has no quality problems.
[0015] As can be seen from the above, the embodiment of the present application collects image information of the mold through a 3D camera, and then uses an image processing algorithm to analyze and process the image to detect the quality of the mold. It not only has the advantages of non-contact, fast speed, high precision, and good repeatability, but also can quickly process and analyze a large number of mold images in a short time, realize comprehensive detection of the mold surface, and can detect tiny defects and flaws, such as cracks, pores, etc.
[0016] Furthermore, the scheme described in the above embodiment can not only detect the mold before forging production, but also perform real-time detection of mold quality during forging production, thereby achieving quality control and feedback of the entire production process. Therefore, it is possible to effectively control the influence of the mold on the forming accuracy of the forging.
[0017] A second aspect of an embodiment of the present application provides a quality inspection system for a vacuum isothermal forging die, comprising: An image acquisition module is used to scan the mold to be inspected through a 3D camera to obtain an inspection image of the mold to be inspected; The first extraction module is used to divide the detection image into a number of local areas, calculate the local entropy of each local area, and determine the image of the region of interest according to the local entropy; The second extraction module is used to extract the target area image in the area of interest image by using a watershed segmentation method; The detection module is used to identify the mold quality by calculating the area threshold and horizontal and vertical variance of the target area image.
[0018] A third aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0019] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0020] A fifth aspect of the present application provides a computer program product, which, when executed on a terminal, enables the terminal to execute the steps of the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 It is a flow chart of a quality inspection method for a vacuum isothermal forging die provided in an embodiment of the present application; Figure 2 It is a structural schematic diagram of a quality inspection system for a vacuum isothermal forging die provided in an embodiment of the present application; Figure 3 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0024] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0025] It should be further understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0026] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0027] It should be further understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0028] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0029] See also Figure 1 , Figure 1 1 is a flow chart of a quality inspection method for a vacuum isothermal forging die provided in an embodiment of the present application. Figure 1 As shown, a quality inspection method for a vacuum isothermal forging die comprises the following steps: Step 1, scanning the mold to be inspected by a 3D camera to obtain an inspection image of the mold to be inspected; Step 2, dividing the detected image into several local areas, calculating the local entropy of each local area, and determining the image of the region of interest according to the local entropy; Step 3, extracting the target area image in the region of interest image by using the watershed segmentation method; Step 4: Identify the mold quality by calculating the area threshold and horizontal and vertical variances of the target area image.
[0030] It can be seen that the embodiment of the present application collects image information of the mold through a 3D camera, and then uses an image processing algorithm to analyze and process the image to detect the quality of the mold. It not only has the advantages of non-contact, fast speed, high precision, and good repeatability, but also can quickly process and analyze a large number of mold images in a short time, realize comprehensive detection of the mold surface, and can detect tiny defects and flaws, such as cracks, pores, etc.
[0031] Furthermore, the scheme described in the above embodiment can not only detect the mold before forging production, but also perform real-time detection of mold quality during forging production, thereby achieving quality control and feedback of the entire production process. Therefore, it is possible to effectively control the influence of the mold on the forming accuracy of the forging.
[0032] In an embodiment of the present application, step 1 is to scan the mold to be inspected by a 3D camera to obtain a detection image of the mold to be inspected, wherein the 3D camera can be carried by a servo motor. When the industrial computer sends a detection instruction, the servo motor drives the 3D camera to move along a predetermined path. During the movement, the 3D camera scans and shoots the mold to be inspected to obtain a detection image of the mold to be inspected.
[0033] In the embodiment of the present application, step 2, dividing the detected image into several local areas, calculating the local entropy of each local area, and determining the image of the region of interest according to the local entropy, may specifically include the following steps: The size is The detection image Divide into The size is Local area ,in, , ; For each local area , calculate their local entropy values respectively , and search for the maximum value of the local entropy value in the entire detection image and minimum value ; According to the maximum value of local entropy and minimum value , set the segmentation threshold , determine the local entropy value Less than the segmentation threshold The local area is the region of interest image, where the segmentation threshold The calculation method can be expressed by the following formula: In the above formula, represents the segmentation threshold; Indicates a constant. In order to detect weak targets, a constant between 3 and 5 is usually selected; Represents the minimum value of local entropy; Indicates the maximum value of local entropy.
[0034] Most of the quality problems of molds are small problems that are difficult to observe with the human eye in the early stage, such as cracks or pores. If small problems are not discovered in time, they will gradually develop into big problems. Therefore, by regularly or in real time detecting small problems of molds, it is possible to ensure the accuracy or quality of forgings and avoid the occurrence of big problems.
[0035] However, small problems of the mold that are difficult to observe with the human eye (i.e., small targets) are also difficult to accurately and quickly search for when the inspection image of the mold to be inspected is obtained by a 3D camera. This is because the characteristics of small targets in the image are mostly that the number of pixels they occupy does not exceed 0.15% of the total number of pixels, the signal-to-noise ratio is low, the brightness is weak, and there is a lack of effective shape and texture features. Based on the above characteristics of weak targets, it can be seen that the target is relatively small in size and has relatively weak energy. It is very likely that it is not the point with the maximum grayscale value in the entire image, but only the grayscale maximum value in its local area. That is, in a local area of the image, the energy of the target can easily cause a large change in the entropy value of the local area. The background area around the weak target has a relatively stable texture distribution feature, so the local entropy value is large. For the weak target area, due to the large grayscale fluctuations, its entropy value is small. Therefore, the detection image can be divided into several local areas, and the local entropy of each local area is calculated. The image of the region of interest is determined based on the local entropy, that is, the weak target is roughly located.
[0036] In the embodiment of the present application, step 3, extracting the target area image in the area of interest image by the watershed segmentation method, may specifically include the following steps: Extracting the foreground image based on the region of interest image; According to the foreground image, the redundant background noise is removed by morphological operation to obtain a morphological image; Perform Euclidean distance transformation on the morphological image to obtain a distance image; Performing connected region analysis on the distance image to obtain all connected regions of the distance image, and using the connected regions as the labeled image; According to the morphological image, distance image and connected region marker image, mask markers are made and watershed segmentation is performed to obtain the target region image.
[0037] Since there may be multiple targets in the image of the region of interest, and multiple target images are likely to be adhered to each other, the target image adhesion degree is unevenly distributed, which will seriously affect the image segmentation accuracy. Therefore, the embodiment of the present application can remove excess background noise by performing morphological operations on the foreground image, and combine the distance image and the connected area analysis mark image for mask marking, which can effectively improve the watershed segmentation accuracy and segmentation efficiency. Obviously, the above steps are equivalent to accurately positioning small targets.
[0038] Since the region of interest image is a local area of the inspection image of the mold to be inspected obtained by scanning the mold to be inspected with a 3D camera, the region of interest image naturally includes a foreground image and a background image. Therefore, the foreground image is extracted based on the region of interest image. During the specific operation, the region of interest image and the background image can be subtracted to obtain the foreground image, which is equivalent to a rough extraction of the foreground image to prepare for the subsequent precise image segmentation.
[0039] For example, according to the foreground image, removing redundant background noise by morphological operation to obtain a morphological image may include the following steps: Select a 5×5 rectangular kernel structure element to perform an erosion operation on the foreground image to remove discrete noise and shrink the image boundary; Select a 7×7 rectangular kernel structure element to perform an opening operation on the image to obtain a morphological image.
[0040] For example, a Euclidean distance transform is performed on a morphological image to obtain a distance image, wherein the distance image essentially takes the distance between each non-zero pixel in the image and the nearest zero-point pixel as the pixel at the corresponding position in the distance image. The distance image can make the pixels in the center area of the object more prominent. The closer to the center position, the higher the pixel grayscale value, and the brighter it appears in the distance image; the closer to the boundary, the lower the pixel grayscale value, and the darker the image appears.
[0041] For example, a connected region analysis is performed on the distance image to obtain all connected regions of the distance image, and the connected regions are used as the labeled image. The connected region analysis based on the seed filling method can be used, which can specifically include the following steps: (1) Scan the range image P line by line until the current pixel is a foreground pixel, that is, , specifically including the following steps: 1) As a seed, give it a label label, and then push all neighboring pixels with the same value as the top pixel into the stack; 2) Pop the top pixel of the stack, assign it the same label, and then push all neighboring pixels with the same value as the top pixel into the stack; 3) Repeat step 2) until the element in the stack is empty, and a connected area in the distance image P is found. The pixel values in the area are marked as label; (2) Repeat step (1) until the scan is completed and all connected areas of the distance image P are obtained.
[0042] For example, according to the morphological image, the distance image and the connected region marker image, a mask marker is made, and watershed segmentation is performed to obtain a target region image, which may specifically include the following steps: The morphological image and the distance image are subtracted, the image pixels after the subtraction are traversed, the non-zero pixels are found, and the corresponding positions in the marked image are marked to obtain the watershed mask mark. Based on the watershed mask mark, the target area image is obtained.
[0043] In the embodiment of the present application, step 4, identifying the mold quality by calculating the area threshold and horizontal and vertical variances of the target area image, may specifically include the following contents: It is determined whether the maximum connected domain area of the target area image is greater than the set first area threshold. If it is greater, it is determined to be a pore quality problem; if it is less than, it is determined to be a crack quality problem or there is no quality problem. In this case, further judgment is required, which may include the following: Calculate the variance value, variance mean and store the minimum variance value of the target area image in the horizontal and vertical directions; By comparing the minimum variance values in the horizontal and vertical directions, the direction with the smaller variance value is the direction with quality problems; After determining the direction, the difference between the variance mean and the minimum variance value in this direction is used to determine whether the image has quality problems by setting the difference threshold. If the difference is greater than the domain threshold, it is judged as a crack quality problem. If the difference is less than the threshold, the mold has no quality problems.
[0044] Obviously, the above solution provided in the embodiment of the present application can quickly and accurately detect whether there are quality problems with the mold, and when there are quality problems, it can distinguish whether it is a porosity-type quality problem or a crack-type quality problem, thereby providing a reference for subsequent mold repair or maintenance.
[0045] See also Figure 2 , Figure 2 This is a structural schematic diagram of a quality inspection system for a vacuum isothermal forging die provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0046] The quality inspection system of the vacuum isothermal forging die comprises: The image acquisition module 1 is used to scan the mold to be inspected through a 3D camera to obtain a detection image of the mold to be inspected; The first extraction module 2 is used to divide the detection image into a number of local areas, calculate the local entropy of each local area, and determine the image of the region of interest according to the local entropy; The second extraction module 3 is used to extract the target area image in the area of interest image by using the watershed segmentation method; The detection module 4 is used to identify the mold quality by calculating the area threshold and the horizontal and vertical variances of the target area image.
[0047] It can be seen that the embodiment of the present application collects image information of the mold through a 3D camera, and then uses an image processing algorithm to analyze and process the image to detect the quality of the mold. It not only has the advantages of non-contact, fast speed, high precision, and good repeatability, but also can quickly process and analyze a large number of mold images in a short time, realize comprehensive detection of the mold surface, and can detect tiny defects and flaws, such as cracks, pores, etc.
[0048] Furthermore, the scheme described in the above embodiment can not only detect the mold before forging production, but also perform real-time detection of mold quality during forging production, thereby achieving quality control and feedback of the entire production process. Therefore, it is possible to effectively control the influence of the mold on the forming accuracy of the forging.
[0049] Figure 3 is a structural diagram of a terminal provided in an embodiment of the present application. As shown in the figure, the terminal 3 of this embodiment includes: at least one processor 30 ( Figure 3 Only one is shown in the figure), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above-mentioned method embodiments when executing the computer program 32.
[0050] The terminal 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of terminal 3 and does not constitute a limitation on terminal 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0051] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0052] The memory 31 may be an internal storage unit of the terminal 3, such as a hard disk or memory of the terminal 3. The memory 31 may also be an external storage device of the terminal 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal 3. The memory 31 is used to store the computer program and other programs and data required by the terminal. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0053] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).
[0054] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.
[0055] Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.
[0056] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0057] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0058] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0059] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0060] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0061] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0062] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0063] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on a terminal, the terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0064] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A quality inspection method for a vacuum isothermal forging die, characterized in that: include: Scan the mold to be inspected by a 3D camera to obtain an inspection image of the mold to be inspected; The detection image is divided into several local areas, the local entropy of each local area is calculated, and the image of the region of interest is determined according to the local entropy; By using the watershed segmentation method, the target area image is extracted within the area of interest image; The mold quality is identified by calculating the area threshold and horizontal and vertical variance of the target area image.
2. The quality inspection method for vacuum isothermal forging dies according to claim 1, characterized in that: The mold to be inspected is scanned by a 3D camera to obtain a detection image of the mold to be inspected, wherein the 3D camera is carried by a servo motor. When the industrial computer sends a detection instruction, the servo motor drives the 3D camera to move along a predetermined path. During the movement, the 3D camera scans and photographs the mold to be inspected to obtain a detection image of the mold to be inspected.
3. The quality inspection method for vacuum isothermal forging dies according to claim 1, characterized in that: The detection image is divided into several local areas, the local entropy of each local area is calculated, and the image of the region of interest is determined according to the local entropy, which specifically includes the following steps: The size is The detection image Divide into The size is Local area ,in, , ; For each local area , calculate their local entropy values respectively , and search for the maximum value of the local entropy value in the entire detection image and minimum value ; According to the maximum value of local entropy and minimum value , set the segmentation threshold , determine the local entropy value Less than the segmentation threshold The local area is the region of interest image.
4. The quality inspection method for vacuum isothermal forging dies according to claim 3, characterized in that: The maximum value of the local entropy value and minimum value , set the segmentation threshold , determine the local entropy value Less than the segmentation threshold The local area is the region of interest image, where the segmentation threshold The calculation method is expressed by the following formula: In the above formula, represents the segmentation threshold; Represents a constant, usually a constant between 3 and 5; Represents the minimum value of local entropy; Indicates the maximum value of local entropy.
5. The quality inspection method for vacuum isothermal forging dies according to claim 1, characterized in that: The method of extracting the target area image from the area of interest image by the watershed segmentation method specifically includes the following steps: Extracting the foreground image based on the region of interest image; According to the foreground image, the redundant background noise is removed by morphological operation to obtain a morphological image; Perform Euclidean distance transformation on the morphological image to obtain a distance image; Performing connected region analysis on the distance image to obtain all connected regions of the distance image, and using the connected regions as the labeled image; According to the morphological image, distance image and connected region marker image, mask markers are made and watershed segmentation is performed to obtain the target region image.
6. The quality inspection method for vacuum isothermal forging dies according to claim 5, characterized in that: The method of removing redundant background noise by morphological operation according to the foreground image to obtain a morphological image includes the following steps: Select a 5×5 rectangular kernel structure element to perform an erosion operation on the foreground image to remove discrete noise and shrink the image boundary; Select a 7×7 rectangular kernel structure element to perform an opening operation on the image to obtain a morphological image.
7. The quality inspection method for vacuum isothermal forging dies according to claim 5, characterized in that: The connected region analysis is performed on the distance image to obtain all connected regions of the distance image, and the connected regions are used as the marked images, wherein the connected region analysis based on the seed filling method is adopted, and specifically includes the following steps: (1) Scan the range image P line by line until the current pixel is a foreground pixel, that is, , specifically including the following steps: 1) As a seed, give it a label label, and then push all neighboring pixels with the same value as the top pixel into the stack; 2) Pop the top pixel of the stack, assign it the same label, and then push all neighboring pixels with the same value as the top pixel into the stack; 3) Repeat step 2) until the element in the stack is empty, and a connected area in the distance image P is found. The pixel values in the area are marked as label; (2) Repeat step (1) until the scan is completed and all connected areas of the distance image P are obtained.
8. The quality inspection method for vacuum isothermal forging dies according to claim 5, characterized in that: The method of making mask marks according to the morphological image, the distance image and the connected region mark image, performing watershed segmentation and obtaining the target region image specifically comprises the following steps: The morphological image and the distance image are subtracted, the image pixels after the subtraction are traversed, the non-zero pixels are found, and the corresponding positions in the marked image are marked to obtain the watershed mask mark. Based on the watershed mask mark, the target area image is obtained.
9. The quality inspection method for vacuum isothermal forging dies according to claim 1, characterized in that: The mold quality is identified by calculating the area threshold and horizontal and vertical variances of the target area image, which specifically includes the following contents: Determine whether the maximum connected domain area of the target area image is greater than the set first area threshold. If it is greater, it is determined to be a pore quality problem; if it is less than, it is determined to be a crack quality problem or there is no quality problem. In this case, further judgment is required, including the following: Calculate the variance value, variance mean and store the minimum variance value of the target area image in the horizontal and vertical directions; By comparing the minimum variance values in the horizontal and vertical directions, the direction with the smaller variance value is the direction with quality problems; After determining the direction, the difference between the variance mean and the minimum variance value in this direction is used to determine whether the image has quality problems by setting the difference threshold. If the difference is greater than the domain threshold, it is judged as a crack quality problem. If the difference is less than the threshold, the mold has no quality problems.
10. A quality inspection system for vacuum isothermal forging dies, characterized in that: include: An image acquisition module is used to scan the mold to be inspected through a 3D camera to obtain an inspection image of the mold to be inspected; The first extraction module is used to divide the detection image into a number of local areas, calculate the local entropy of each local area, and determine the image of the region of interest according to the local entropy; The second extraction module is used to extract the target area image in the area of interest image by using a watershed segmentation method; The detection module is used to identify the mold quality by calculating the area threshold and horizontal and vertical variance of the target area image.