Aerospace-grade master alloy morphology detection method and system based on visual recognition

Through a visual recognition-based method, multi-angle image acquisition is performed using hexagonal light source group and vertical shooting equipment, and combining grayscale conversion and image layering technology, the damage range of the intermediate alloy is automatically identified, solving the low efficiency and accuracy of the existing detection methods. The problem of insufficient results enables efficient and accurate detection of intermediate alloy morphology.

CN119125169BActive Publication Date: 2025-02-25BAOJI JIACHENG RARE METAL MATERIALS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411588347.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-25
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

The existing intermediate alloy morphology detection methods are inefficient and insufficient in accuracy, and require automated and high-precision detection methods.

Method used

Using aerospace-level intermediate alloy morphology detection method based on visual recognition, hexagonal three-dimensional shooting of alloy samples to be tested is carried out through a hexagonal light source group and vertical shooting equipment, obtaining multi-angle images, performing grayscale conversion and image layering, and combining grayscale Detection accuracy setting and feature analysis to automatically identify the alloy damage range.

Benefits of technology

The accuracy and efficiency of intermediate alloy morphology detection is improved, and the automated detection process is realized, reducing the impact of human subjective judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of alloy visual recognition, and is a method and system for detecting the morphology of an aerospace-grade intermediate alloy based on visual recognition, comprising: photographing an alloy sample to be tested to obtain a grayscale alloy image set, sequentially extracting grayscale alloy images from the grayscale alloy image set, obtaining a grayscale detection accuracy group according to the grayscale alloy image, obtaining a layered alloy image group according to the grayscale detection accuracy group, performing feature analysis on the layered alloy image to obtain an image grayscale mean difference, judging whether the image grayscale mean difference is less than a standard grayscale mean difference, if not, returning to the step of obtaining the grayscale detection accuracy group, if less than, recording the layered alloy image as a target alloy image, performing morphology analysis according to the target alloy image set, and obtaining an alloy damage range. The present invention can improve the accuracy and efficiency of aerospace-grade intermediate alloy morphology detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of alloy visual recognition, and in particular to an aerospace-grade intermediate alloy morphology detection method and system based on visual recognition. Background Art

[0002] As a functional material, master alloys can improve the performance of alloys, so they are widely used in aerospace. For example, vanadium-aluminum alloys are used in the construction of key parts such as aerospace engines and structural parts. In order to ensure the safety and reliability of aerospace, aerospace-grade master alloys need to be regularly tested for morphology.

[0003] The current method for detecting the morphology of intermediate alloys is mainly achieved through manual observation using a scanning electron microscope. Although this method can realize the morphology detection of intermediate alloys, it requires a lot of time and human resources, which reduces the efficiency of intermediate alloy morphology detection, and human subjective judgment will reduce the accuracy of intermediate alloy morphology detection. Summary of the invention

[0004] The present invention provides an aerospace-grade master alloy morphology detection method and system based on visual recognition, the main purpose of which is to improve the accuracy and efficiency of aerospace-grade master alloy morphology detection.

[0005] To achieve the above-mentioned purpose, the present invention provides an aerospace-grade intermediate alloy morphology detection method based on visual recognition, comprising: receiving a morphology detection instruction, starting a pre-constructed hexagonal light source group based on the morphology detection instruction, wherein the hexagonal light source group includes six light-emitting devices, and the hexagonal light source group is installed in a morphology detection platform, and the morphology detection platform also includes: an alloy sample to be tested, an alloy fixing carrier and a vertical shooting device; using the hexagonal light source group and the vertical shooting device to perform six-dimensional stereoscopic shooting of the alloy sample to be tested to obtain an azimuthal alloy image set, wherein the azimuthal alloy image set includes six images shot at different illumination angles, the alloy sample to be tested is placed on the alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested; performing grayscale conversion on the azimuthal alloy image set to obtain a grayscale alloy image set, and sequentially extracting grayscale alloy images from the grayscale alloy image set; performing grayscale detection accuracy setting based on the grayscale alloy image to obtain a grayscale detection image set. precision group; based on the grayscale detection precision group, the grayscale alloy image is layered to obtain a layered alloy image group, wherein the number of layered alloy images in the layered alloy image group is the number of grayscale detection precisions in the grayscale detection precision group plus 1; layered alloy images are extracted in sequence in the layered alloy image group, and grayscale feature analysis is performed on the layered alloy images to obtain an image grayscale mean difference; it is determined whether the image grayscale mean difference is less than a preset standard grayscale mean difference; if the image grayscale mean difference is not less than the standard grayscale mean difference, the grayscale alloy image is updated using the layered alloy image, and the step of setting the grayscale detection precision based on the grayscale alloy image is returned; if the image grayscale mean difference is less than the standard grayscale mean difference, the layered alloy image is recorded as a target alloy image; the target alloy images are summarized to obtain a target alloy image set, and a morphological analysis is performed on the alloy sample to be tested according to the target alloy image set to obtain the alloy damage range, and the aerospace-grade intermediate alloy morphology detection based on visual recognition is completed.

[0006] Optionally, the method of using a hexagonal light source group and a vertical shooting device to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuth alloy image set includes: identifying the sample center point of the alloy sample to be tested, recording the sample center point as the azimuth origin, and constructing spatial coordinates of the hexagonal light source group and the alloy sample to be tested based on the azimuth origin to obtain a sample detection space, wherein the azimuth origin and two light sources in the hexagonal light source group are on the same straight line in the vertical plane of the sample detection space; extracting irradiation light sources in the hexagonal light source group in sequence, and identifying the irradiation azimuth of the irradiation light source in the sample detection space; under the irradiation of the irradiation light source, starting the vertical shooting device and using the vertical shooting device to shoot the alloy sample to be tested to obtain a shot alloy image, wherein no two or more irradiation light sources are started at the same time in the sample detection space; marking the shot alloy image with the irradiation azimuth to obtain an azimuth alloy image, and turning off the irradiation light source after completing the shooting of the azimuth total image; and summarizing the azimuth alloy images to obtain an azimuth alloy image set.

[0007] Optionally, the grayscale detection accuracy setting based on the grayscale alloy image to obtain a grayscale detection accuracy group includes: extracting grayscale pixels in the grayscale alloy image in turn, identifying the pixel grayscale values ​​of the grayscale pixels, and obtaining a pixel grayscale value set; performing frequency statistics on each pixel grayscale value in the pixel grayscale value set to obtain a grayscale frequency set, wherein the number of grayscale frequencies in the grayscale frequency set is the same as the number of pixel grayscale values ​​in the pixel grayscale value set; according to a preset detection accuracy level, performing maximum frequency extraction in the grayscale frequency set to obtain a stratified frequency group, wherein the number of stratified frequencies in the stratified frequency group is equal to the detection accuracy level; identifying stratified grayscale value groups corresponding to the stratified frequency groups in the pixel grayscale value set, sorting the stratified grayscale value groups to obtain stratified grayscale sequence groups, wherein the stratified grayscale values ​​in the stratified grayscale sequence groups are arranged in order from small to large; extracting stratified grayscale values ​​in the stratified grayscale sequence groups in turn, and identifying stratified grayscale values ​​in the stratified grayscale sequence groups. The neighboring grayscale values ​​of the layer grayscale value are used to calculate the layered grayscale difference between the neighboring grayscale values ​​and the layered grayscale value; whether the layered grayscale difference is greater than the preset standard layered difference; if the layered grayscale difference is greater than the standard layered difference, the layered grayscale value and the neighboring grayscale value are respectively recorded as the first alternative grayscale value and the second alternative grayscale value, and the average alternative grayscale value of the first alternative grayscale value and the second alternative grayscale value is calculated; the first alternative grayscale value, the second alternative grayscale value and the average alternative grayscale value are respectively summarized to obtain the first alternative grayscale value set, the second alternative grayscale value set and the average alternative grayscale value set; the first alternative grayscale value set and the second alternative grayscale value set in the layered grayscale sequence group are replaced by the average alternative grayscale value set to obtain a grayscale detection accuracy group; the layered grayscale sequence group is updated by the grayscale detection accuracy group, and the step of extracting the layered grayscale values ​​in the layered grayscale sequence group in sequence is returned to the step of extracting the layered grayscale values ​​in the layered grayscale sequence group in sequence until there is no layered grayscale difference greater than the standard layered difference.

[0008] Optionally, the grayscale alloy image is layered based on the grayscale detection accuracy group to obtain a layered alloy image group, including: obtaining the minimum grayscale value and the maximum grayscale value of the grayscale alloy image, setting a layered grayscale range group according to the minimum grayscale value, the maximum grayscale value and the grayscale detection accuracy group, wherein the number of layered grayscale ranges in the layered grayscale range group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1; extracting layered grayscale ranges in the layered grayscale range group in turn, and based on the layered grayscale ranges, delineating non-target layered areas in the grayscale alloy image, wherein the grayscale value of each pixel in the non-target layered area is not in the layered grayscale range; identifying a non-target pixel point set in the non-target layered area, updating the non-target pixel point set with a preset zero grayscale value to obtain a background pixel point set, and updating the non-target layered area with the background pixel point set to obtain a layered background area; updating the grayscale alloy image with the layered background area to obtain a layered alloy image, and summarizing the layered alloy images to obtain a layered alloy image group.

[0009] Optionally, the grayscale feature analysis of the layered alloy image to obtain the grayscale mean difference of the image includes: extracting grayscale frequencies in a grayscale frequency set in sequence, performing distribution probability statistics on the grayscale frequencies based on the grayscale frequency set, and obtaining pixel distribution probability, wherein the pixel distribution probability is expressed as:

[0010] ,in, represents the pixel distribution probability, represents the grayscale frequency, Represents the number of grayscale frequencies in the grayscale frequency set, represents the i-th grayscale frequency; summarizing the pixel distribution probability to obtain a pixel distribution probability set, identifying a layered pixel probability set corresponding to the layered alloy image in the pixel distribution probability set, wherein the layered pixel probabilities in the layered pixel probability set are arranged in order from small to large; according to the layered pixel probability set, calculating the distribution probability mean of the layered alloy image, wherein the distribution probability mean is expressed as:

[0011] ,in, represents the mean of the distribution probability, represents the number of layered pixel probabilities in the layered pixel probability set, j represents the sequence number of the layered pixel probability in the layered pixel probability set, represents the j-th layer pixel probability, represents the pixel probability of the kth layer;

[0012] The image grayscale mean difference of the layered alloy image is calculated according to the distribution probability mean.

[0013] Optionally, the image grayscale mean difference of the stratified alloy image is calculated according to the distribution probability mean, including: extracting a target stratified area in the stratified alloy image, wherein the target stratified area is the area remaining after removing the non-target stratified area in the stratified alloy image; extracting stratified pixel probabilities in sequence in the stratified pixel probability set, obtaining target distribution grayscale values ​​corresponding to the stratified pixel probabilities, and identifying a target distribution pixel point group corresponding to the target distribution grayscale value in the target stratified area; identifying the distribution proportion area occupied by the target distribution pixel point group in the target stratified area, summarizing the distribution proportion area, and obtaining a distribution proportion area set, wherein the distribution proportion area in the distribution proportion area set corresponds one-to-one to the stratified pixel probability in the stratified pixel probability set; and calculating the image grayscale mean difference according to the distribution proportion area set and the distribution probability mean using the following formula:

[0014] ,in, Represents the grayscale mean difference of the image. Indicates Distribution ratio area, Indicates Hierarchical pixel probabilities.

[0015] Optionally, the method of performing morphological analysis on the alloy sample to be tested according to the target alloy image set to obtain the alloy damage range includes: performing similar image pairing on the target alloy image set to obtain a paired alloy image group set, wherein each paired alloy image group in the paired alloy image group set includes two target alloy images; sequentially extracting paired alloy image groups from the paired alloy image group set to obtain a first similar image and a second similar image in the paired alloy image group; sequentially extracting first valid pixel points from the first similar image to respectively identify a first valid grayscale value and a first valid coordinate of the first valid pixel point; based on the first valid coordinates, Identify a second co-located pixel in the second similar image, identify a second co-located grayscale value of the second co-located pixel, and determine whether the second co-located grayscale value is zero; if the second co-located grayscale value is not zero, record the second co-located grayscale value as a second effective grayscale value, and calculate the average effective grayscale value of the first effective grayscale value and the second effective grayscale value; summarize the average effective grayscale values ​​to obtain an average effective grayscale value set, use the average effective grayscale value set to update the first similar image to obtain an effective similar image, and calculate the effective grayscale variance of the effective similar image; compare the first similar image with the second similar image Replace, and return to the step of sequentially extracting the first valid pixel point in the first similar image until two valid grayscale variances and two valid similar images are obtained; calculate the effective difference between the two valid grayscale variances, and determine whether the effective difference is less than the preset standard deviation; if the effective difference is less than the standard deviation, both of the two valid similar images are recorded as target effective similar images, and the target effective similar images are summarized to obtain a target effective similar image set; edge recognition is performed on the target effective similar image set to obtain a target texture image set, and target texture images are sequentially extracted from the target texture image set to identify the number of image textures and the length of image textures in the target texture image; the number of image textures and the length of image textures are summarized to obtain an image texture number set and an image texture length set, and the maximum number of textures and the minimum number of textures in the image texture number set are extracted, and the maximum texture length and the minimum texture length in the image texture length set are extracted; set the texture number factor and the texture length factor, and calculate the maximum alloy damage value and the minimum alloy damage value according to the maximum texture number, the minimum texture number, the maximum texture length, the minimum texture length, the texture number factor and the texture length factor, wherein the maximum alloy damage value and the minimum alloy damage value are respectively expressed as:

[0016] , ,in, represents the maximum alloy damage value, Represents the texture quantity factor, Indicates the maximum number of textures, represents the texture length factor, Indicates the maximum texture length, represents the minimum alloy damage value, Indicates the minimum number of textures, Indicates the minimum texture length; determines the alloy damage range based on the maximum alloy damage value and the minimum alloy damage value.

[0017] Optionally, the target alloy image set is paired with similar images to obtain a paired alloy image group set, including: performing the following operations on each target alloy image in the target alloy image set: eliminating the target alloy image from the target alloy image set to obtain a comparison alloy image set, and extracting comparison alloy images in the comparison alloy image set in sequence; respectively identifying the effective target area of ​​the target alloy image and the effective comparison area of ​​the comparison alloy image, and respectively calculating the effective target area ratio of the effective target area and the effective comparison area ratio of the effective comparison area; respectively calculating the effective target grayscale mean of the effective target area and the effective comparison grayscale mean of the effective comparison area; performing a similarity comparison according to the effective target area ratio, the effective comparison area ratio, the effective target grayscale mean and the effective comparison grayscale mean to obtain a comparison result, wherein the comparison result includes: similar images and non-similar images; pairing the target alloy image and the comparison alloy image whose comparison results are similar images to obtain a paired alloy image group; and summarizing the paired alloy image group to obtain a paired alloy image group set.

[0018] Optionally, the similarity comparison is performed according to the effective target area ratio, the effective contrast area ratio, the effective target grayscale mean and the effective contrast grayscale mean to obtain the comparison result, including: calculating the effective target area ratio and the effective contrast area ratio The difference in the proportion of the proportion of the area, calculating the grayscale mean difference between the effective target grayscale mean and the effective contrast grayscale mean; judging whether the proportion area difference is greater than a preset standard area difference; if the proportion area difference is greater than the standard area difference, the comparison result is recorded as a non-similar image; if the proportion area difference is not greater than the standard area difference, judging whether the grayscale mean difference is greater than the preset standard mean difference; if the grayscale mean difference is greater than the standard mean difference, the comparison result is recorded as a non-similar image; if the grayscale mean difference is not greater than the standard mean difference, the comparison result is recorded as a similar image.

[0019] To achieve the above-mentioned purpose, the present invention also provides an aerospace-grade intermediate alloy morphology detection system based on visual recognition, comprising: a detection instruction receiving module, used to receive a morphology detection instruction, and start a pre-built hexagonal light source group based on the morphology detection instruction, wherein the hexagonal light source group includes six light-emitting devices, and the hexagonal light source group is installed in a morphology detection platform, and the morphology detection platform also includes: an alloy sample to be tested, an alloy fixing carrier and a vertical shooting device; a grayscale image shooting module, used to use the hexagonal light source group and the vertical shooting device to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuth alloy image set, wherein the azimuth alloy image set includes six shooting images with different illumination angles, the alloy sample to be tested is placed on the alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested, the azimuth alloy image set is gray-converted to obtain a grayscale alloy image set, and grayscale alloy images are sequentially extracted from the grayscale alloy image set; a grayscale mean difference calculation module, used to perform six-dimensional shooting of the alloy sample to be tested based on the grayscale alloy image set. The grayscale detection accuracy is set for the grayscale alloy image to obtain a grayscale detection accuracy group, and the grayscale alloy image is layered based on the grayscale detection accuracy group to obtain a layered alloy image group, wherein the number of layered alloy images in the layered alloy image group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1, and layered alloy images are sequentially extracted from the layered alloy image group, and grayscale feature analysis is performed on the layered alloy images to obtain an image grayscale mean difference; a damage range determination module is used to determine whether the image grayscale mean difference is less than a preset standard grayscale mean difference, if the image grayscale mean difference is not less than the standard grayscale mean difference, the grayscale alloy image is updated using the layered alloy image, and the step of setting the grayscale detection accuracy based on the grayscale alloy image is returned, if the image grayscale mean difference is less than the standard grayscale mean difference, the layered alloy image is recorded as a target alloy image, the target alloy image is summarized to obtain a target alloy image set, and a morphological analysis is performed on the alloy sample to be tested according to the target alloy image set to obtain the alloy damage range.

[0020] In order to solve the above problems, the present invention also provides an electronic device, which includes: a memory storing at least one instruction; and a processor executing the instructions stored in the memory to implement the above-mentioned aerospace-grade intermediate alloy morphology detection method based on visual recognition.

[0021] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned aerospace-grade intermediate alloy morphology detection method based on visual recognition.

[0022] In order to solve the problem described in the background technology, the present invention first receives a shape detection instruction, and starts a hexagonal light source group based on the shape detection instruction. The hexagonal light source group is automatically started by receiving the detection instruction, so as to realize the automation of the detection process and improve the detection efficiency of the intermediate alloy. Then, the hexagonal light source group and the vertical shooting device are used to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuth alloy image set. This step obtains a comprehensive image of the alloy sample to be tested through multi-angle shooting, which is helpful to capture various details of the alloy sample to be tested and provide rich data for subsequent image analysis. Then, the azimuth alloy image set is gray-converted to obtain a gray-scale alloy image. The grayscale conversion is used to reduce the complexity of subsequent image processing, while retaining the key texture information of the orientation alloy image, laying the foundation for feature extraction and analysis. Furthermore, the grayscale alloy images are extracted in sequence from the grayscale alloy image set, and the grayscale detection accuracy is set based on the grayscale alloy image to obtain a grayscale detection accuracy group. The setting of the grayscale detection accuracy makes it possible to adjust the detection level according to different needs, improve the flexibility and adaptability of the detection, and thus improve the detection accuracy and efficiency. Next, the grayscale alloy images are layered based on the grayscale detection accuracy group to obtain a layered alloy image group. The grayscale alloy images are layered. Layering helps to distinguish the grayscale features of different grayscale ranges in the grayscale alloy image, making the subsequent feature analysis more accurate. The layered alloy images are extracted in turn in the layered alloy image group, and the grayscale feature analysis of the layered alloy images is performed to obtain the image grayscale mean difference. This step performs grayscale feature analysis on layered alloy images of different levels to make the obtained image grayscale mean difference more accurate. By judging whether the image grayscale mean difference is less than the standard grayscale mean difference, it can be understood whether the current image layering is accurate. If the image grayscale mean difference is not less than the standard grayscale mean difference, it means that the current image layering is not accurate enough, and the grayscale alloy image needs to be layered using the layered alloy image. Update, and return to the step of setting the grayscale detection accuracy based on the grayscale alloy image. If the image grayscale mean difference is less than the standard grayscale mean difference, it means that the image stratification is accurate enough at this time, and the stratified alloy image needs to be recorded as the target alloy image. Finally, the target alloy image is summarized to obtain a target alloy image set. According to the target alloy image set, the morphology analysis of the alloy sample to be tested is performed to obtain the alloy damage range. By comprehensively analyzing the target alloy image set, the damage range of the intermediate alloy can be accurately identified and evaluated, and the efficiency and accuracy of the intermediate alloy morphology detection are improved, and the aerospace-grade intermediate alloy morphology detection based on visual recognition is completed. Therefore, the present invention can improve the accuracy and efficiency of aerospace-grade intermediate alloy morphology detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic flow chart of a method for detecting the morphology of an aerospace-grade master alloy based on visual recognition provided by one embodiment of the present invention; Figure 2A functional module diagram of an aerospace-grade master alloy morphology detection system based on visual recognition provided by one embodiment of the present invention; Figure 3 A schematic structural diagram of an electronic device for implementing the aerospace-grade intermediate alloy morphology detection method based on visual recognition provided in one embodiment of the present invention; the realization of the purpose of the present invention, the functional features and advantages will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0024] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0025] The embodiment of the present application provides an aerospace-grade intermediate alloy morphology detection method based on visual recognition. The execution subject of the aerospace-grade intermediate alloy morphology detection method based on visual recognition includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the aerospace-grade intermediate alloy morphology detection method based on visual recognition can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0026] Reference Figure 1 As shown, it is a schematic flow chart of an aerospace-grade intermediate alloy morphology detection method based on visual recognition provided by an embodiment of the present invention. In this embodiment, the aerospace-grade intermediate alloy morphology detection method based on visual recognition includes: S1, receiving a morphology detection instruction, and starting a pre-built hexagonal light source group based on the morphology detection instruction, wherein the hexagonal light source group includes six light-emitting devices, and the hexagonal light source group is installed in a morphology detection platform, and the morphology detection platform also includes: an alloy sample to be tested, an alloy fixing carrier, and a vertical shooting device.

[0027] It can be understood that the morphology detection instruction refers to an instruction initiated manually to perform morphology detection on the alloy sample to be tested, and the hexagonal light source group refers to a light source combination for irradiating the alloy sample to be tested. The hexagonal light source group includes six lighting devices, wherein the lighting devices are, for example, LED lights, which are located obliquely above the alloy sample to be tested and contain the alloy sample to be tested therein, and form a regular hexagonal shape.

[0028] It should be explained that the alloy sample to be tested refers to an aerospace-grade intermediate alloy, wherein the aerospace-grade intermediate alloy is an intermediate product used to manufacture high-performance alloy materials in the aerospace field, such as vanadium-aluminum intermediate alloy. The alloy sample to be tested is a rectangular plate-like solid. The alloy fixing carrier refers to a metal flat plate that carries the alloy sample to be tested. The alloy fixing carrier should have a lighter color, such as white, to prevent subsequent filming of the alloy sample to be tested from being affected. The vertical shooting device refers to a device that captures images of the alloy sample to be tested, such as a high-definition camera.

[0029] For example, Xiao Zhang is a technician in an alloy processing plant. One day, Xiao Zhang needs to perform morphology analysis on a certain type of aerospace-grade intermediate alloy. Xiao Zhang obtains a sample of the alloy to be tested by cutting and other methods, and fixes the alloy sample to be tested on an alloy fixing carrier. Then Xiao Zhang sends a morphology detection instruction to the morphology detection platform through intelligent software to complete the startup of the hexagonal light source group.

[0030] S2. Use a hexagonal light source group and a vertical shooting device to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuthal alloy image set, wherein the azimuthal alloy image set includes images shot at six different lighting angles. The alloy sample to be tested is placed on an alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested.

[0031] It can be understood that the azimuth alloy image refers to an image of the alloy sample to be tested taken by a vertical shooting device under the illumination of light sources in different azimuths.

[0032] In detail, the method uses a hexagonal light source group and a vertical shooting device to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuth alloy image set, including: identifying the sample center point of the alloy sample to be tested, recording the sample center point as the azimuth origin, and constructing spatial coordinates of the hexagonal light source group and the alloy sample to be tested based on the azimuth origin to obtain a sample detection space, wherein the azimuth origin and two light sources in the hexagonal light source group are on the same straight line in the vertical plane of the sample detection space; extracting irradiation light sources in the hexagonal light source group in sequence, and identifying the irradiation azimuth of the irradiation light source in the sample detection space; under the irradiation of the irradiation light source, starting the vertical shooting device and using the vertical shooting device to shoot the alloy sample to be tested to obtain a shot alloy image, wherein no two or more irradiation light sources are started at the same time in the sample detection space; marking the shot alloy image with the irradiation azimuth to obtain an azimuth alloy image, and turning off the irradiation light source after completing the shooting of the azimuth total image; and summarizing the azimuth alloy images to obtain an azimuth alloy image set.

[0033] It can be understood that the sample center point refers to the plane center point of the alloy sample to be tested, the sample detection space refers to the coordinate space of the alloy sample to be tested and the hexagonal light source group, the irradiation light source refers to the light source currently irradiating the alloy sample to be tested, the irradiation orientation refers to the coordinates of the irradiation light source in the sample detection space, and the captured alloy image refers to the image of the alloy sample to be tested taken by a vertical shooting device under specific irradiation conditions.

[0034] For example, after Xiao Zhang correctly installed the alloy sample to be tested and the hexagonal light source group, he used computer software to construct a spatial coordinate system between the alloy sample to be tested and the hexagonal light source group to obtain the spatial coordinate relationship between them. Then Xiao Zhang started one of the illumination light sources in the hexagonal light source group, and under the illumination condition of the illumination light source, used a vertical shooting device to shoot the alloy sample to obtain a photographed alloy image, and marked the illumination orientation of the illumination light source on the photographed alloy image to obtain an azimuthal alloy image. After completing the acquisition of the azimuthal alloy image, Xiao Zhang turned off the illumination light source and started another illumination light source in the hexagonal light source group, and repeated the above steps until six azimuthal alloy images were obtained to obtain an azimuthal alloy image set.

[0035] S3, performing grayscale conversion on the orientation alloy image set to obtain a grayscale alloy image set, and sequentially extracting grayscale alloy images from the grayscale alloy image set.

[0036] It can be understood that the grayscale alloy image refers to the azimuthal alloy image after grayscale conversion. Since the azimuthal alloy image contains three color channels, namely red, blue and green, in order to reduce the complexity of subsequent image processing, the azimuthal alloy image is converted into a grayscale image with only one color channel.

[0037] S4. Setting grayscale detection accuracy based on the grayscale alloy image to obtain a grayscale detection accuracy group.

[0038] It can be understood that the grayscale detection accuracy refers to the grayscale value used to represent the degree of stratification fineness when the grayscale alloy image is subsequently stratified. The grayscale detection accuracy should be set according to the grayscale information represented in the grayscale alloy image.

[0039] In detail, the grayscale detection accuracy setting based on the grayscale alloy image to obtain a grayscale detection accuracy group includes: extracting grayscale pixels in the grayscale alloy image in turn, identifying the pixel grayscale values ​​of the grayscale pixels, and obtaining a pixel grayscale value set; performing frequency statistics on each pixel grayscale value in the pixel grayscale value set to obtain a grayscale frequency set, wherein the number of grayscale frequencies in the grayscale frequency set is the same as the number of pixel grayscale values ​​in the pixel grayscale value set; according to a preset detection accuracy level, performing maximum frequency extraction in the grayscale frequency set to obtain a stratified frequency group, wherein the number of stratified frequencies in the stratified frequency group is equal to the detection accuracy level; identifying stratified grayscale value groups corresponding to the stratified frequency groups in the pixel grayscale value set, sorting the stratified grayscale value groups, and obtaining stratified grayscale sequence groups, wherein the stratified grayscale values ​​in the stratified grayscale sequence groups are arranged in order from small to large; extracting stratified grayscale values ​​in the stratified grayscale sequence groups in turn, and identifying stratified grayscale values ​​in the stratified grayscale sequence groups. The neighboring grayscale values ​​of the layer grayscale value are used to calculate the layered grayscale difference between the neighboring grayscale values ​​and the layered grayscale value; whether the layered grayscale difference is greater than the preset standard layered difference; if the layered grayscale difference is greater than the standard layered difference, the layered grayscale value and the neighboring grayscale value are respectively recorded as the first alternative grayscale value and the second alternative grayscale value, and the average alternative grayscale value of the first alternative grayscale value and the second alternative grayscale value is calculated; the first alternative grayscale value, the second alternative grayscale value and the average alternative grayscale value are respectively summarized to obtain the first alternative grayscale value set, the second alternative grayscale value set and the average alternative grayscale value set; the first alternative grayscale value set and the second alternative grayscale value set in the layered grayscale sequence group are replaced by the average alternative grayscale value set to obtain a grayscale detection accuracy group; the layered grayscale sequence group is updated by the grayscale detection accuracy group, and the step of extracting the layered grayscale values ​​in the layered grayscale sequence group in sequence is returned to the step of extracting the layered grayscale values ​​in the layered grayscale sequence group in sequence until there is no layered grayscale difference greater than the standard layered difference.

[0040] It can be understood that the pixel grayscale value refers to the grayscale value of the grayscale pixel point, the grayscale frequency refers to the number of times the pixel grayscale value appears in the pixel grayscale value set, the detection accuracy level refers to an artificially set constant used to represent the degree of image stratification fineness, for example: 3, the larger the detection accuracy level, the higher the stratification fineness, the stratification frequency group refers to the combination of the first a largest grayscale frequencies in the grayscale frequency set, where a represents the detection accuracy level, the stratification grayscale value refers to the pixel grayscale value corresponding to the stratification frequency, the stratification grayscale sequence group refers to the sorted stratification grayscale value group, the neighbor grayscale value refers to the grayscale value right adjacent to the stratification grayscale value in the stratification grayscale sequence group, the stratification grayscale difference refers to the difference between the neighbor grayscale value and the stratification grayscale value, the standard stratification difference refers to the artificially set grayscale difference, and the average replacement grayscale value refers to the average value of the first replacement grayscale value and the second replacement grayscale value.

[0041] It needs to be explained that the detailed steps of replacing the first alternative grayscale value set and the second alternative grayscale value set in the hierarchical grayscale sequence group with the average alternative grayscale value set are: eliminating the first alternative grayscale value set and the second alternative grayscale value set from the hierarchical grayscale sequence group, and adding the average alternative grayscale value set to the hierarchical grayscale sequence group after elimination.

[0042] S5. Layering the grayscale alloy image based on the grayscale detection accuracy group to obtain a layered alloy image group, wherein the number of layered alloy images in the layered alloy image group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1.

[0043] It can be understood that the layered alloy image group refers to a combination of grayscale alloy images after image layering, wherein different layered alloy images represent different grayscale information of the alloy sample to be tested.

[0044] In detail, the grayscale alloy image is layered based on the grayscale detection accuracy group to obtain a layered alloy image group, including: obtaining the minimum grayscale value and the maximum grayscale value of the grayscale alloy image, setting a layered grayscale range group according to the minimum grayscale value, the maximum grayscale value and the grayscale detection accuracy group, wherein the number of layered grayscale ranges in the layered grayscale range group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1; extracting layered grayscale ranges in the layered grayscale range group in turn, and delineating non-target layered areas in the grayscale alloy image based on the layered grayscale ranges, wherein the grayscale values ​​of each pixel in the non-target layered area are not in the layered grayscale range; identifying a non-target pixel point set in the non-target layered area, updating the non-target pixel point set with a preset zero grayscale value to obtain a background pixel point set, and updating the non-target layered area with the background pixel point set to obtain a layered background area; updating the grayscale alloy image with the layered background area to obtain a layered alloy image, and summarizing the layered alloy images to obtain a layered alloy image group.

[0045] It can be understood that the minimum grayscale value and the maximum grayscale value refer to the minimum grayscale value and the maximum grayscale value in the grayscale alloy image respectively, the layered grayscale range group refers to a combination of grayscale ranges set according to the grayscale detection accuracy, the non-target layered area refers to a grayscale alloy image where the grayscale value of the pixel is not within the layered grayscale range, the non-target pixel point set refers to the set of pixel points in the non-target layered area, the zero grayscale value index is a grayscale value of 0, the background pixel point set refers to a set of pixel points whose grayscale values ​​are all 0, and the layered background area refers to a non-target layered area where the pixels are all from the background pixel point set.

[0046] For example, the minimum grayscale value and maximum grayscale value of a grayscale alloy image are 0 and 250 respectively, and the grayscale detection accuracy group is (50, 100, 150, 200), then the layered grayscale range group is: [(0, 50), (50, 100), (100, 150), (150, 200), (200, 250)].

[0047] S6. Extracting stratified alloy images in the stratified alloy image group in sequence, performing grayscale feature analysis on the stratified alloy images, and obtaining image grayscale mean difference.

[0048] It can be understood that the image grayscale mean difference refers to a numerical value used to represent the degree of difference in grayscale values ​​in the layered alloy image.

[0049] In detail, the grayscale feature analysis of the layered alloy image is performed to obtain the grayscale mean difference of the image, including: extracting grayscale frequencies in the grayscale frequency set in sequence, performing distribution probability statistics on the grayscale frequencies based on the grayscale frequency set, and obtaining pixel distribution probability, wherein the pixel distribution probability is expressed as:

[0050] ,in, represents the pixel distribution probability, represents the grayscale frequency, Represents the number of grayscale frequencies in the grayscale frequency set, represents the i-th grayscale frequency; summarizing the pixel distribution probability to obtain a pixel distribution probability set, identifying a layered pixel probability set corresponding to the layered alloy image in the pixel distribution probability set, wherein the layered pixel probabilities in the layered pixel probability set are arranged in order from small to large; according to the layered pixel probability set, calculating the distribution probability mean of the layered alloy image, wherein the distribution probability mean is expressed as:

[0051] ,in, represents the mean of the distribution probability, represents the number of layered pixel probabilities in the layered pixel probability set, j represents the sequence number of the layered pixel probability in the layered pixel probability set, represents the j-th layer pixel probability, represents the kth layer pixel probability; and according to the distribution probability mean, the image grayscale mean difference of the layered alloy image is calculated.

[0052] It can be understood that the pixel distribution probability refers to a numerical value used to represent the distribution of pixel points in the entire image, the layered pixel probability set refers to a set of pixel distribution probabilities corresponding to each pixel point in the layered alloy image, and the distribution probability mean refers to a numerical value used to represent the average value of the pixel distribution probability in the layered alloy image. Since different pixels have different grayscale values, and the more grayscale values ​​are displayed in the layered image, the more obvious the image effect is, in order to make the subsequent contrast between different layered alloy images clearer, it is necessary to add a corresponding calculation adjustment coefficient to each layered pixel probability, where the calculation adjustment coefficient is the serial number of the layered pixel probability in the layered pixel probability set, so that pixels with more grayscale values ​​can represent the grayscale characteristics of the layered alloy image.

[0053] In detail, the image grayscale mean difference of the stratified alloy image is calculated according to the distribution probability mean, including: extracting the target stratified area in the stratified alloy image, wherein the target stratified area is the area remaining after removing the non-target stratified area in the stratified alloy image; extracting the stratified pixel probabilities in the stratified pixel probability set in turn, obtaining the target distribution grayscale values ​​corresponding to the stratified pixel probabilities, and identifying the target distribution pixel point group corresponding to the target distribution grayscale values ​​in the target stratified area; identifying the distribution proportion area occupied by the target distribution pixel point group in the target stratified area, summarizing the distribution proportion area, and obtaining a distribution proportion area set, wherein the distribution proportion area in the distribution proportion area set corresponds one-to-one to the stratified pixel probability in the stratified pixel probability set; and calculating the image grayscale mean difference according to the distribution proportion area set and the distribution probability mean using the following formula:

[0054] ,in, Represents the grayscale mean difference of the image. Indicates Distribution ratio area, Indicates Hierarchical pixel probabilities.

[0055] It can be understood that the target stratification area refers to the area outside the non-target stratification area in the stratified alloy image, the target distribution grayscale value refers to the grayscale value corresponding to the stratification pixel probability, for example: the stratification pixel probability with a grayscale value of 100 is 10%, then the target distribution grayscale value corresponding to 10% is 100, the target distribution pixel point group refers to the pixel point combination whose grayscale value is the target grayscale value in the target stratification area, and the distribution proportional area refers to the proportion of the total area composed of the target stratification pixel point group in the target stratification area, for example: the total area occupied by the target distribution pixel point group in the target stratification area is A, and the total area of ​​the target stratification area is B, then the distribution proportional area is: A / B.

[0056] S7. Determine whether the image grayscale mean difference is less than a preset standard grayscale mean difference.

[0057] It can be understood that the standard grayscale mean difference refers to the artificially set grayscale mean difference, which is used to distinguish the image grayscale mean difference. When the image grayscale mean difference is smaller than the standard grayscale mean difference, the current image stratification effect is better and can represent more grayscale values ​​in a certain area. When the image grayscale mean difference is not smaller than the standard grayscale mean difference, the current image stratification effect is not good and further stratification is required.

[0058] If the image grayscale mean difference is not less than the standard grayscale mean difference, S8 is executed to update the grayscale alloy image using the layered alloy image, and the process returns to the step of setting the grayscale detection accuracy based on the grayscale alloy image.

[0059] It should be explained that if the image grayscale mean difference is not less than the standard grayscale mean difference, it means that in the step of setting the grayscale detection accuracy, the grayscale detection accuracy group obtained cannot meet the actual needs and needs to be reset. In order to reduce the calculation complexity of the reset, it is only necessary to perform secondary stratification on the stratified alloy images that do not meet the image grayscale mean difference less than the standard grayscale mean difference after stratification.

[0060] If the image grayscale mean difference is less than the standard grayscale mean difference, S9 is executed to record the layered alloy image as a target alloy image.

[0061] It can be understood that when the image grayscale mean difference is less than the standard grayscale mean difference, it means that the grayscale value represented in the layered alloy image at this time is relatively single, which meets the actual needs.

[0062] S10, summarizing the target alloy images to obtain a target alloy image set, performing morphological analysis on the alloy sample to be tested according to the target alloy image set, obtaining the alloy damage range, and completing aerospace-grade intermediate alloy morphology detection based on visual recognition.

[0063] It can be understood that the alloy damage range refers to a numerical range used to indicate the degree of damage to the morphology of the alloy sample to be tested.

[0064] In detail, the method performs morphological analysis on the alloy sample to be tested according to the target alloy image set to obtain the alloy damage range, including: performing similar image pairing on the target alloy image set to obtain a paired alloy image group set, wherein each paired alloy image group in the paired alloy image group set includes two target alloy images; sequentially extracting paired alloy image groups from the paired alloy image group set to obtain a first similar image and a second similar image in the paired alloy image group; sequentially extracting first valid pixel points from the first similar image to respectively identify a first valid grayscale value and a first valid coordinate of the first valid pixel point; based on the first valid coordinate, Identify a second co-located pixel in the second similar image, identify a second co-located grayscale value of the second co-located pixel, and determine whether the second co-located grayscale value is zero; if the second co-located grayscale value is not zero, record the second co-located grayscale value as a second effective grayscale value, and calculate the average effective grayscale value of the first effective grayscale value and the second effective grayscale value; summarize the average effective grayscale values ​​to obtain an average effective grayscale value set, use the average effective grayscale value set to update the first similar image to obtain an effective similar image, and calculate the effective grayscale variance of the effective similar image; compare the first similar image with the second similar image Replace, and return to the step of sequentially extracting the first valid pixel point in the first similar image until two valid grayscale variances and two valid similar images are obtained; calculate the effective difference between the two valid grayscale variances, and determine whether the effective difference is less than the preset standard deviation; if the effective difference is less than the standard deviation, both of the two valid similar images are recorded as target effective similar images, and the target effective similar images are summarized to obtain a target effective similar image set; edge recognition is performed on the target effective similar image set to obtain a target texture image set, and target texture images are sequentially extracted from the target texture image set to identify the number of image textures and the length of image textures in the target texture image; the number of image textures and the length of image textures are summarized to obtain an image texture number set and an image texture length set, and the maximum number of textures and the minimum number of textures in the image texture number set are extracted, and the maximum texture length and the minimum texture length in the image texture length set are extracted; set the texture number factor and the texture length factor, and calculate the maximum alloy damage value and the minimum alloy damage value according to the maximum texture number, the minimum texture number, the maximum texture length, the minimum texture length, the texture number factor and the texture length factor, wherein the maximum alloy damage value and the minimum alloy damage value are respectively expressed as:

[0065] , ,in, represents the maximum alloy damage value, Represents the texture quantity factor, Indicates the maximum number of textures, represents the texture length factor, Indicates the maximum texture length, represents the minimum alloy damage value, Indicates the minimum number of textures, Indicates the minimum texture length; determines the alloy damage range based on the maximum alloy damage value and the minimum alloy damage value.

[0066] It can be understood that the paired alloy image group refers to a combination of two target alloy images, wherein the target alloy images in the paired alloy image group are highly similar, the first similar image and the second similar image respectively refer to the two target alloy images in the paired alloy image group, the first effective pixel point refers to the pixel point of the target stratification area in the first similar image, the first effective grayscale value and the first effective coordinate respectively refer to the grayscale value and coordinate value of the first effective pixel point, the second co-located pixel point refers to the pixel point whose coordinates are the first effective coordinates in the second similar image, the second co-located grayscale value is the grayscale value of the second co-located pixel point, the average effective grayscale value refers to the average of the first effective grayscale value and the second effective grayscale value, the effective grayscale variance refers to the variance of the grayscale values ​​of each pixel point in the effective similar image, and the effective difference refers to the difference between two effective grayscale variances.

[0067] It should be explained that the standard deviation value refers to a difference constant set artificially, the target texture image refers to a target effective similar image containing clear texture, wherein the method for edge recognition is: Sobel operator, Prewitt operator, etc., the image texture quantity and image texture length respectively refer to the number of textures and the total length of textures in the target texture image, the texture quantity factor refers to an artificially set constant used to represent the weight of the image texture quantity when calculating the alloy damage value, and the texture length factor refers to an artificially set constant used to represent the weight of the image texture length when calculating the alloy damage value. In the morphology judgment of aerospace-grade intermediate alloys, the judgment criteria of texture quantity and texture length are not the same for different types of aerospace-grade intermediate alloys, so it is necessary to set the texture quantity factor and the texture length factor.

[0068] In detail, the target alloy image set is subjected to similar image pairing to obtain a paired alloy image group set, including: performing the following operations on each target alloy image in the target alloy image set: eliminating the target alloy image from the target alloy image set to obtain a comparison alloy image set, and extracting comparison alloy images in the comparison alloy image set in sequence; respectively identifying the effective target area of ​​the target alloy image and the effective comparison area of ​​the comparison alloy image, and respectively calculating the effective target area ratio of the effective target area and the effective comparison area ratio of the effective comparison area; respectively calculating the effective target grayscale mean of the effective target area and the effective comparison grayscale mean of the effective comparison area; performing a similarity comparison according to the effective target area ratio, the effective comparison area ratio, the effective target grayscale mean and the effective comparison grayscale mean to obtain a comparison result, wherein the comparison result includes: similar images and non-similar images; pairing the target alloy image and the comparison alloy image whose comparison results are similar images to obtain a paired alloy image group; summarizing the paired alloy image group to obtain a paired alloy image group set.

[0069] It can be understood that the comparison alloy image refers to a target alloy image set that does not include a target alloy image, the effective target area refers to a target stratified area in the target alloy image, the effective comparison area refers to a target stratified area in the comparison alloy image, the effective target area ratio refers to the area ratio of the effective target area in the target alloy image, the effective comparison area ratio refers to the area ratio of the effective comparison area in the comparison alloy image, the effective target grayscale mean refers to the average grayscale value of each pixel in the effective target area, and the effective comparison grayscale mean refers to the average grayscale value of each pixel in the effective comparison area.

[0070] It should be explained that the calculation process of the effective target area ratio is as follows: identify the area C of the target alloy image, identify the area D of the effective target area, then the effective target ratio is expressed as: D / C, and the calculation process of the effective contrast area ratio is the same as the calculation process of the effective area ratio. The calculation process of the effective target grayscale mean is as follows: identify the grayscale values ​​of all pixels in the effective target area, obtain the grayscale value set, calculate the average value of all grayscale values ​​in the grayscale value set, and the average value is the effective target grayscale mean. The calculation process of the effective contrast grayscale mean is the same as the calculation process of the effective target grayscale mean.

[0071] In detail, the similarity comparison is performed according to the effective target area ratio, the effective contrast area ratio, the effective target grayscale mean and the effective contrast grayscale mean to obtain the comparison result, including: calculating the effective target area ratio and the effective contrast area ratio The difference in the proportion of the proportion of the area, calculating the grayscale mean difference between the effective target grayscale mean and the effective contrast grayscale mean; judging whether the proportion area difference is greater than a preset standard area difference; if the proportion area difference is greater than the standard area difference, the comparison result is recorded as a non-similar image; if the proportion area difference is not greater than the standard area difference, judging whether the grayscale mean difference is greater than the preset standard mean difference; if the grayscale mean difference is greater than the standard mean difference, the comparison result is recorded as a non-similar image; if the grayscale mean difference is not greater than the standard mean difference, the comparison result is recorded as a similar image.

[0072] It can be understood that the area ratio difference refers to the difference between the effective target area ratio and the effective contrast area ratio, the grayscale mean difference refers to the difference between the effective target grayscale mean and the effective contrast grayscale mean, the standard area difference refers to an artificially set area difference constant, and the standard mean difference refers to an artificially set mean difference constant.

[0073] In order to solve the problem described in the background technology, the present invention first receives a shape detection instruction, and starts a hexagonal light source group based on the shape detection instruction. The hexagonal light source group is automatically started by receiving the detection instruction, so as to realize the automation of the detection process and improve the detection efficiency of the intermediate alloy. Then, the hexagonal light source group and the vertical shooting device are used to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuth alloy image set. This step obtains a comprehensive image of the alloy sample to be tested through multi-angle shooting, which is helpful to capture various details of the alloy sample to be tested and provide rich data for subsequent image analysis. Then, the azimuth alloy image set is gray-converted to obtain a gray-scale alloy image. The grayscale conversion is used to reduce the complexity of subsequent image processing, while retaining the key texture information of the orientation alloy image, laying the foundation for feature extraction and analysis. Furthermore, the grayscale alloy images are extracted in sequence from the grayscale alloy image set, and the grayscale detection accuracy is set based on the grayscale alloy image to obtain a grayscale detection accuracy group. The setting of the grayscale detection accuracy makes it possible to adjust the detection level according to different needs, improve the flexibility and adaptability of the detection, and thus improve the detection accuracy and efficiency. Next, the grayscale alloy images are layered based on the grayscale detection accuracy group to obtain a layered alloy image group. The grayscale alloy images are layered. Layering helps to distinguish the grayscale features of different grayscale ranges in the grayscale alloy image, making the subsequent feature analysis more accurate. The layered alloy images are extracted in turn in the layered alloy image group, and the grayscale feature analysis of the layered alloy images is performed to obtain the image grayscale mean difference. This step performs grayscale feature analysis on layered alloy images of different levels to make the obtained image grayscale mean difference more accurate. By judging whether the image grayscale mean difference is less than the standard grayscale mean difference, it can be understood whether the current image layering is accurate. If the image grayscale mean difference is not less than the standard grayscale mean difference, it means that the current image layering is not accurate enough, and the grayscale alloy image needs to be layered using the layered alloy image. Update, and return to the step of setting the grayscale detection accuracy based on the grayscale alloy image. If the image grayscale mean difference is less than the standard grayscale mean difference, it means that the image stratification is accurate enough at this time, and the stratified alloy image needs to be recorded as the target alloy image. Finally, the target alloy image is summarized to obtain a target alloy image set. According to the target alloy image set, the morphology analysis of the alloy sample to be tested is performed to obtain the alloy damage range. By comprehensively analyzing the target alloy image set, the damage range of the intermediate alloy can be accurately identified and evaluated, and the efficiency and accuracy of the intermediate alloy morphology detection are improved, and the aerospace-grade intermediate alloy morphology detection based on visual recognition is completed. Therefore, the present invention can improve the accuracy and efficiency of aerospace-grade intermediate alloy morphology detection.

[0074] like Figure 2 , which is a functional module diagram of an aerospace-grade intermediate alloy morphology detection system based on visual recognition provided by one embodiment of the present invention.

[0075] The aerospace-grade intermediate alloy morphology detection system 100 based on visual recognition of the present invention can be installed in an electronic device. According to the functions to be implemented, the aerospace-grade intermediate alloy morphology detection system 100 based on visual recognition can include a detection instruction receiving module 101, a grayscale image shooting module 102, a grayscale mean difference calculation module 103 and a damage range determination module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0076] The detection instruction receiving module 101 is used to receive a shape detection instruction, and start a pre-built hexagonal light source group based on the shape detection instruction, wherein the hexagonal light source group includes six light-emitting devices, and the hexagonal light source group is installed in the shape detection platform, and the shape detection platform also includes: an alloy sample to be tested, an alloy fixing carrier and a vertical shooting device; the grayscale image shooting module 102 is used to use the hexagonal light source group and the vertical shooting device to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuth alloy image set, wherein the azimuth alloy image set includes six shooting images with different illumination angles, the alloy sample to be tested is placed on the alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested, the azimuth alloy image set is gray-converted to obtain a grayscale alloy image set, and grayscale alloy images are sequentially extracted from the grayscale alloy image set; the grayscale mean difference calculation module 103 is used to set the grayscale detection accuracy based on the grayscale alloy image, A grayscale detection accuracy group is obtained, and the grayscale alloy image is layered based on the grayscale detection accuracy group to obtain a layered alloy image group, wherein the number of layered alloy images in the layered alloy image group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1, and layered alloy images are sequentially extracted from the layered alloy image group, and grayscale feature analysis is performed on the layered alloy images to obtain an image grayscale mean difference; the damage range determination module 104 is used to determine whether the image grayscale mean difference is less than a preset standard grayscale mean difference. If the image grayscale mean difference is not less than the standard grayscale mean difference, the grayscale alloy image is updated using the layered alloy image, and the step of setting the grayscale detection accuracy based on the grayscale alloy image is returned. If the image grayscale mean difference is less than the standard grayscale mean difference, the layered alloy image is recorded as a target alloy image, and the target alloy image is summarized to obtain a target alloy image set. According to the target alloy image set, a morphological analysis is performed on the alloy sample to be tested to obtain the alloy damage range.

[0077] In detail, the modules in the aerospace-grade intermediate alloy morphology detection system 100 based on visual recognition in the embodiment of the present invention are used in the same manner as described above. Figure 1The same technical means are used as the aerospace-grade intermediate alloy morphology detection method based on visual recognition described in, and can produce the same technical effects, so they will not be repeated here.

[0078] like Figure 3 , is a schematic diagram of the structure of an electronic device for implementing an aerospace-grade intermediate alloy morphology detection method based on visual recognition provided by one embodiment of the present invention.

[0079] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an aerospace-grade intermediate alloy morphology detection method program based on visual recognition.

[0080] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the aerospace-grade intermediate alloy morphology detection method program based on visual recognition, but also can be used to temporarily store data that has been output or is to be output.

[0081] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as aerospace-grade intermediate alloy morphology detection method program based on visual recognition, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0082] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0083] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0084] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management system, so that the power management system can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0085] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0086] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0087] The aerospace-grade intermediate alloy morphology detection method program based on visual recognition stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve: receiving a morphology detection instruction, starting a pre-built hexagonal light source group based on the morphology detection instruction, wherein the hexagonal light source group includes six light-emitting devices, and the hexagonal light source group is installed in a morphology detection platform, and the morphology detection platform also includes: an alloy sample to be tested, an alloy fixing carrier, and a vertical shooting device; using the hexagonal light source group and the vertical shooting device to perform six-dimensional stereoscopic shooting of the alloy sample to be tested to obtain an azimuthal alloy image set, wherein the azimuthal alloy image set includes six images shot at different illumination angles, the alloy sample to be tested is placed on the alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested; gray-converting the azimuthal alloy image set to obtain a gray-scale alloy image set, and sequentially extracting gray-scale alloy images from the gray-scale alloy image set; gray-converting based on the gray-scale alloy image The grayscale detection accuracy is set to obtain a grayscale detection accuracy group; based on the grayscale detection accuracy group, the grayscale alloy image is layered to obtain a layered alloy image group, wherein the number of layered alloy images in the layered alloy image group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1; layered alloy images are sequentially extracted from the layered alloy image group, and grayscale feature analysis is performed on the layered alloy images to obtain an image grayscale mean difference; it is determined whether the image grayscale mean difference is less than a preset standard grayscale mean difference; if the image grayscale mean difference is not less than the standard grayscale mean difference, the grayscale alloy image is updated using the layered alloy image, and the step of setting the grayscale detection accuracy based on the grayscale alloy image is returned; if the image grayscale mean difference is less than the standard grayscale mean difference, the layered alloy image is recorded as a target alloy image; the target alloy images are summarized to obtain a target alloy image set, and a morphological analysis is performed on the alloy sample to be tested according to the target alloy image set to obtain the alloy damage range, and the aerospace-grade intermediate alloy morphology detection based on visual recognition is completed.

[0088] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0089] Furthermore, if the module / unit integrated in the electronic device 1 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. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or system that can carry the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0090] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor of an electronic device, it can achieve: receiving a morphology detection instruction, starting a pre-constructed hexagonal light source group based on the morphology detection instruction, wherein the hexagonal light source group includes six light-emitting devices, and the hexagonal light source group is installed in a morphology detection platform, and the morphology detection platform also includes: an alloy sample to be tested, an alloy fixing carrier and a vertical shooting device; using the hexagonal light source group and the vertical shooting device to perform six-dimensional stereoscopic shooting of the alloy sample to be tested to obtain an azimuthal alloy image set, wherein the azimuthal alloy image set includes six images shot at different illumination angles, the alloy sample to be tested is placed on an alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested; grayscale conversion is performed on the azimuthal alloy image set to obtain a grayscale alloy image set, and grayscale alloy images are sequentially extracted from the grayscale alloy image set; grayscale detection precision is performed based on the grayscale alloy image The method comprises the steps of: performing image stratification on the grayscale alloy image based on the grayscale detection accuracy group to obtain a stratified alloy image group, wherein the number of stratified alloy images in the stratified alloy image group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1; extracting stratified alloy images in the stratified alloy image group in turn, performing grayscale feature analysis on the stratified alloy images, and obtaining an image grayscale mean difference; judging whether the image grayscale mean difference is less than a preset standard grayscale mean difference; if the image grayscale mean difference is not less than the standard grayscale mean difference, updating the grayscale alloy image using the stratified alloy image, and returning to the step of setting the grayscale detection accuracy based on the grayscale alloy image; if the image grayscale mean difference is less than the standard grayscale mean difference, recording the stratified alloy image as a target alloy image; summarizing the target alloy images to obtain a target alloy image set, performing morphological analysis on the alloy sample to be tested according to the target alloy image set, obtaining the alloy damage range, and completing the aerospace-grade intermediate alloy morphology detection based on visual recognition.

[0091] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and actual implementation may have other division methods.

[0092] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0093] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, 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 hardware plus software functional modules.

[0094] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for detecting the morphology of aerospace-grade master alloys based on visual recognition, characterized in that: The method comprises: receiving a morphology detection instruction, and starting a pre-built hexagonal light source group based on the morphology detection instruction, wherein the hexagonal light source group comprises six light-emitting devices, and the hexagonal light source group is installed in a morphology detection platform, and the morphology detection platform further comprises: an alloy sample to be tested, an alloy fixing carrier, and a vertical shooting device; using the hexagonal light source group and the vertical shooting device to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuthal alloy image set, wherein the azimuthal alloy image set comprises shooting images at six different illumination angles, the alloy sample to be tested is placed on the alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested; ... The invention relates to a method for performing six-dimensional stereoscopic shooting of an alloy sample to be tested by a source group and a vertical shooting device to obtain an azimuth alloy image set, comprising: identifying a sample center point of the alloy sample to be tested, recording the sample center point as an azimuth origin, constructing spatial coordinates of a hexagonal light source group and the alloy sample to be tested based on the azimuth origin, and obtaining a sample detection space, wherein the azimuth origin and two light sources in the hexagonal light source group are on the same straight line in a vertical plane of the sample detection space; extracting irradiation light sources in the hexagonal light source group in sequence, and identifying the irradiation azimuth of the irradiation light source in the sample detection space; under the irradiation of the irradiation light source, starting a vertical shooting device and using the vertical shooting device to shoot the alloy sample to be tested, and obtaining a shooting image set. alloy image, wherein no two or more illumination light sources are started at the same time in the sample detection space; the alloy image is marked by illumination orientation to obtain an orientation alloy image, and the illumination light source is turned off after the orientation aggregate image is taken; the orientation alloy images are summarized to obtain an orientation alloy image set; the orientation alloy image set is gray-scale converted to obtain a gray-scale alloy image set, and gray-scale alloy images are sequentially extracted from the gray-scale alloy image set; gray-scale detection accuracy is set based on the gray-scale alloy image to obtain a gray-scale detection accuracy group; the gray-scale detection accuracy is set based on the gray-scale alloy image to obtain a gray-scale detection accuracy group, including: in the gray-scale alloy image Extract grayscale pixels in sequence, identify the pixel grayscale values ​​of the grayscale pixels, and obtain a pixel grayscale value set; perform frequency statistics on each pixel grayscale value in the pixel grayscale value set to obtain a grayscale frequency set, wherein the number of grayscale frequencies in the grayscale frequency set is the same as the number of pixel grayscale values ​​in the pixel grayscale value set; perform maximum frequency extraction in the grayscale frequency set according to a preset detection accuracy level to obtain a stratified frequency group, wherein the number of stratified frequencies in the stratified frequency group is equal to the detection accuracy level; identify the stratified grayscale value group corresponding to the stratified frequency group in the pixel grayscale value set, sort the stratified grayscale value group, and obtain a stratified grayscale sequence group, wherein the stratified grayscale values ​​in the stratified grayscale sequence group are arranged in order from small to large;Extract the stratified grayscale values ​​in the stratified grayscale sequence group in sequence, identify the neighboring grayscale values ​​of the stratified grayscale values ​​in the stratified grayscale sequence group, calculate the stratified grayscale difference between the neighboring grayscale values ​​and the stratified grayscale values, wherein the neighboring grayscale value refers to the grayscale value that is right adjacent to the stratified grayscale value in the stratified grayscale sequence group; determine whether the stratified grayscale difference is greater than a preset standard stratified difference; if the stratified grayscale difference is greater than the standard stratified difference, record the stratified grayscale value and the neighboring grayscale value as the first alternative grayscale value and the second alternative grayscale value, respectively, and calculate the average alternative grayscale value of the first alternative grayscale value and the second alternative grayscale value; summarize the first alternative grayscale value, the second alternative grayscale value and the average alternative grayscale value, respectively, to obtain the first alternative grayscale value set, the second alternative grayscale value set and the average alternative grayscale value set; use the average alternative grayscale value set to replace the first alternative grayscale value set and the second alternative grayscale value set in the stratified grayscale sequence group to obtain Grayscale detection accuracy group; using the grayscale detection accuracy group to update the layered grayscale sequence group, and returning to the step of sequentially extracting layered grayscale values ​​in the layered grayscale sequence group until there is no layered grayscale difference greater than the standard layered difference; based on the grayscale detection accuracy group, the grayscale alloy image is layered to obtain a layered alloy image group, wherein the number of layered alloy images in the layered alloy image group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1; sequentially extracting layered alloy images in the layered alloy image group, performing grayscale feature analysis on the layered alloy images, and obtaining an image grayscale mean difference; the grayscale feature analysis on the layered alloy images to obtain an image grayscale mean difference includes: sequentially extracting grayscale frequencies in a grayscale frequency set, performing distribution probability statistics on the grayscale frequencies based on the grayscale frequency set, and obtaining a pixel distribution probability, wherein the pixel distribution probability is expressed as:; ,in, represents the pixel distribution probability, represents the grayscale frequency, Represents the number of grayscale frequencies in the grayscale frequency set, represents the i-th grayscale frequency; summarizing the pixel distribution probability to obtain a pixel distribution probability set, identifying a layered pixel probability set corresponding to the layered alloy image in the pixel distribution probability set, wherein the layered pixel probabilities in the layered pixel probability set are arranged in order from small to large; according to the layered pixel probability set, calculating the distribution probability mean of the layered alloy image, wherein the distribution probability mean is expressed as: ,in, represents the mean of the distribution probability, represents the number of layered pixel probabilities in the layered pixel probability set, j represents the sequence number of the layered pixel probability in the layered pixel probability set, represents the j-th layer pixel probability, represents the kth layer pixel probability; according to the distribution probability mean, calculate the image grayscale mean difference of the layered alloy image; the calculation of the image grayscale mean difference of the layered alloy image according to the distribution probability mean includes: extracting the target layered area in the layered alloy image, wherein the target layered area is the area remaining after removing the non-target layered area in the layered alloy image; extracting the layered pixel probabilities in the layered pixel probability set in turn, obtaining the target distribution grayscale value corresponding to the layered pixel probability, and identifying the target distribution pixel point group corresponding to the target distribution grayscale value in the target layered area; identifying the distribution proportion area occupied by the target distribution pixel point group in the target layered area, summarizing the distribution proportion area, and obtaining the distribution proportion area set, wherein the distribution proportion area in the distribution proportion area set corresponds to the layered pixel probability in the layered pixel probability set one by one; according to the distribution proportion area set and the distribution probability mean, calculating the image grayscale mean difference using the following formula: ,in, Represents the mean grayscale difference of the image. Indicates Distribution ratio area, Indicates Layered pixel probability; determine whether the image grayscale mean difference is less than a preset standard grayscale mean difference; if the image grayscale mean difference is not less than the standard grayscale mean difference, update the grayscale alloy image using the layered alloy image, and return to the step of setting the grayscale detection accuracy based on the grayscale alloy image; if the image grayscale mean difference is less than the standard grayscale mean difference, record the layered alloy image as a target alloy image; summarize the target alloy images to obtain a target alloy image set, perform morphological analysis on the alloy sample to be tested according to the target alloy image set, obtain the alloy damage range, and complete the aerospace-grade intermediate alloy morphology detection based on visual recognition.

2. The aerospace-grade master alloy morphology detection method based on visual recognition according to claim 1, characterized in that: The method of performing image stratification on the grayscale alloy image based on the grayscale detection accuracy group to obtain a stratified alloy image group includes: obtaining the minimum grayscale value and the maximum grayscale value of the grayscale alloy image, setting a stratified grayscale range group according to the minimum grayscale value, the maximum grayscale value and the grayscale detection accuracy group, wherein the number of stratified grayscale ranges in the stratified grayscale range group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1; extracting stratified grayscale ranges in the stratified grayscale range group in turn, and delineating non-target stratified areas in the grayscale alloy image based on the stratified grayscale ranges, wherein the grayscale values ​​of each pixel in the non-target stratified area are not in the stratified grayscale range; identifying a non-target pixel point set in the non-target stratified area, updating the non-target pixel point set with a preset zero grayscale value to obtain a background pixel point set, and updating the non-target stratified area with the background pixel point set to obtain a stratified background area; updating the grayscale alloy image with the stratified background area to obtain a stratified alloy image, and summarizing the stratified alloy images to obtain a stratified alloy image group.

3. The aerospace-grade master alloy morphology detection method based on visual recognition as claimed in claim 2, characterized in that: The method performs morphological analysis on the alloy sample to be tested according to the target alloy image set to obtain the alloy damage range, including: performing similar image pairing on the target alloy image set to obtain a paired alloy image group set, wherein each paired alloy image group in the paired alloy image group set includes two target alloy images; sequentially extracting paired alloy image groups from the paired alloy image group set to obtain a first similar image and a second similar image in the paired alloy image group; sequentially extracting first valid pixel points from the first similar image to respectively identify a first valid grayscale value and a first valid coordinate of the first valid pixel point; based on the first valid coordinate, Identify a second co-located pixel in the similar image, identify a second co-located grayscale value of the second co-located pixel, and determine whether the second co-located grayscale value is zero; if the second co-located grayscale value is not zero, record the second co-located grayscale value as a second effective grayscale value, and calculate the average effective grayscale value of the first effective grayscale value and the second effective grayscale value; summarize the average effective grayscale values ​​to obtain an average effective grayscale value set, use the average effective grayscale value set to update the first similar image to obtain an effective similar image, and calculate the effective grayscale variance of the effective similar image; replace the first similar image and the second similar image with each other , and return to the step of sequentially extracting the first valid pixel point in the first similar image until two valid grayscale variances and two valid similar images are obtained; the effective difference between the two valid grayscale variances is calculated to determine whether the effective difference is less than the preset standard deviation; if the effective difference is less than the standard deviation, the two valid similar images are both recorded as target effective similar images, and the target effective similar images are summarized to obtain a target effective similar image set; edge recognition is performed on the target effective similar image set to obtain a target texture image set, and target texture images are sequentially extracted from the target texture image set to identify the number of image textures and the length of image textures in the target texture image; the number of image textures and the length of image textures are summarized to obtain an image texture number set and an image texture length set, and the maximum number of textures and the minimum number of textures in the image texture number set are extracted, and the maximum texture length and the minimum texture length in the image texture length set are extracted; the texture number factor and the texture length factor are set, and the maximum alloy damage value and the minimum alloy damage value are calculated according to the maximum texture number, the minimum texture number, the maximum texture length, the minimum texture length, the texture number factor and the texture length factor, wherein the maximum alloy damage value and the minimum alloy damage value are respectively expressed as: , ,in, represents the maximum alloy damage value, Represents the texture quantity factor, Indicates the maximum number of textures, represents the texture length factor, Indicates the maximum texture length, represents the minimum alloy damage value, Indicates the minimum number of textures, Indicates the minimum texture length; determines the alloy damage range based on the maximum alloy damage value and the minimum alloy damage value.

4. The aerospace-grade master alloy morphology detection method based on visual recognition as claimed in claim 3, characterized in that: The method performs similar image pairing on the target alloy image set to obtain a paired alloy image group set, including: performing the following operations on each target alloy image in the target alloy image set: eliminating the target alloy image from the target alloy image set to obtain a comparison alloy image set, and extracting comparison alloy images in the comparison alloy image set in sequence; respectively identifying the effective target area of ​​the target alloy image and the effective comparison area of ​​the comparison alloy image, and respectively calculating the effective target area ratio of the effective target area and the effective comparison area ratio of the effective comparison area; respectively calculating the effective target grayscale mean of the effective target area and the effective comparison grayscale mean of the effective comparison area; performing similarity comparison according to the effective target area ratio, the effective comparison area ratio, the effective target grayscale mean and the effective comparison grayscale mean to obtain a comparison result, wherein the comparison result includes: similar images and non-similar images; pairing the target alloy image and the comparison alloy image whose comparison results are similar images to obtain a paired alloy image group; and summarizing the paired alloy image group to obtain a paired alloy image group set.

5. The aerospace-grade master alloy morphology detection method based on visual recognition according to claim 4, characterized in that: The similarity comparison is performed according to the effective target area ratio, the effective contrast area ratio, the effective target grayscale mean and the effective contrast grayscale mean to obtain the comparison result, including: calculating the effective target area ratio and the effective contrast area ratio The difference in the proportion of the proportion of the area, calculating the grayscale mean difference of the effective target grayscale mean and the effective contrast grayscale mean; judging whether the proportion area difference is greater than a preset standard area difference; if the proportion area difference is greater than the standard area difference, the comparison result is recorded as a non-similar image; if the proportion area difference is not greater than the standard area difference, judging whether the grayscale mean difference is greater than the preset standard mean difference; if the grayscale mean difference is greater than the standard mean difference, the comparison result is recorded as a non-similar image; if the grayscale mean difference is not greater than the standard mean difference, the comparison result is recorded as a similar image.

6. A system using the aerospace-grade master alloy morphology detection method based on visual recognition as claimed in claim 1, characterized in that: The system comprises: a detection instruction receiving module, which is used to receive a morphology detection instruction, and start a pre-built hexagonal light source group based on the morphology detection instruction, wherein the hexagonal light source group includes six light-emitting devices, and the hexagonal light source group is installed in a morphology detection platform, and the morphology detection platform also includes: an alloy sample to be tested, an alloy fixing carrier and a vertical shooting device; a grayscale image shooting module, which is used to use the hexagonal light source group and the vertical shooting device to perform six-dimensional shooting of the alloy sample to be tested to obtain an azimuth alloy image set, wherein the azimuth alloy image set includes six shooting images with different illumination angles, the alloy sample to be tested is placed on the alloy fixing carrier, and the hexagonal light source group and the vertical shooting device are respectively distributed obliquely above and directly above the alloy sample to be tested, the azimuth alloy image set is gray-converted to obtain a grayscale alloy image set, and grayscale alloy images are sequentially extracted from the grayscale alloy image set; a grayscale mean difference calculation module, which is used to set the grayscale detection accuracy based on the grayscale alloy image, to obtain to the grayscale detection accuracy group, and based on the grayscale detection accuracy group, the grayscale alloy image is layered to obtain a layered alloy image group, wherein the number of layered alloy images in the layered alloy image group is the number of grayscale detection accuracy in the grayscale detection accuracy group plus 1, and layered alloy images are sequentially extracted from the layered alloy image group, and grayscale feature analysis is performed on the layered alloy images to obtain an image grayscale mean difference; a damage range determination module is used to determine whether the image grayscale mean difference is less than a preset standard grayscale mean difference, if the image grayscale mean difference is not less than the standard grayscale mean difference, the grayscale alloy image is updated using the layered alloy image, and the step of setting the grayscale detection accuracy based on the grayscale alloy image is returned, if the image grayscale mean difference is less than the standard grayscale mean difference, the layered alloy image is recorded as a target alloy image, the target alloy image is summarized to obtain a target alloy image set, and a morphological analysis is performed on the alloy sample to be tested according to the target alloy image set to obtain the alloy damage range.

Citation Information

Patent Citations

  • Aluminum alloy auto part mold defect detection method based on image processing

    CN117011297A