A powder metallurgy imaging method, system and storage medium based on linear grayscale

Through the powder metallurgy imaging method based on linear grayscale, the multifocal segment image taken by the microscope is processed using image processing technology to achieve clear display of the full focal segment, solving the problems of manual operation and repeated focus in powder metallurgy production, and improving operation efficiency and visual health.

CN119540667BActive Publication Date: 2025-04-11广东德智矩阵科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510106774.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-04-11
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

The prior art cannot provide an effective powder metallurgy imaging method, which leads to inconvenient manual operation during production and processing, requiring repeated focus, resulting in eye fatigue and inefficiency of the operator.

Method used

Using a powder metallurgical imaging method based on linear grayscale, the multifocal segment image taken by a microscope is obtained, and blob analysis, linear grayscale transformation, grayscale spatial transformation, grayscale alignment and grayscale fusion are performed to achieve clear display of the full focal segment of the image.

Benefits of technology

Display clear product images of different focusing profiles in real time in the display, solving the problems of inaccurate hand focus, eye fatigue, and inefficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540667B_ABST
    Figure CN119540667B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the technical field of computer vision, and provides a powder metallurgy imaging method, system and storage medium based on linear grayscale. The method comprises the following steps: 1. acquiring multi-focal-segment images of a workpiece taken by a microscope; 2. segmenting the images by a blob analysis tool and performing linear grayscale transformation on highlight areas and black areas respectively according to the high-reflection and non-reflection conditions of different metal sections; 3. converting the grayscale space of the image type converted to a real number type after the grayscale linear transformation, and transforming the image into an 8-bit grayscale byte type; 4. grayscale fusion of images of adjacent focal lengths by using an 8-neighborhood calculation method; and grayscale pixel fusion after linear grayscale operation, so that clear images of products with different focus sections can be displayed in real time on a display, thereby solving the problems of inaccurate manual focusing, eye fatigue and low efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision, and in particular relates to a powder metallurgy imaging method, system and storage medium based on linear grayscale. Background Art

[0002] Powder metallurgy is an advanced material forming technology that manufactures parts of various shapes and sizes by pressing and sintering metal powder. In the production process of powder metallurgy, appearance inspection is an important part of quality control, which can ensure the surface quality of the product and avoid defects and damage.

[0003] At present, the metallographic microscope is one of the most commonly used equipment for observing the microstructure of materials. It consists of a metallographic objective lens / focusing system / illumination optical path / frame. By magnifying the microstructure of the sample, the operator can intuitively observe the grain size, morphology, distribution, and phase content and distribution of the material.

[0004] In the powder metallurgy industry, metallographic microscopes usually use a magnification of 120 to 1500 times. During use, the operator manually turns the fine-tuning hand wheel and observes the surface structure of the product through the eyepiece. Due to the high magnification, slight vibrations appear extremely violent in the human eye. When the human hand rotates the fine-tuning hand wheel, it is not easy to control the measurement, and overfocus often occurs, requiring repeated fine-tuning. During the entire process, the human eye needs to stare at the product through the eyepiece, which is very harmful to vision. According to statistics, operators of metallographic microscopes need to rotate every month, which brings inconvenience to the management of enterprises. Summary of the invention

[0005] The purpose of the present invention is to provide a powder metallurgy imaging method, system and storage medium based on linear grayscale, aiming to solve the problem that the prior art cannot provide an effective powder metallurgy imaging method, resulting in inconvenient manual operation during the production and processing process and the need for repeated focusing.

[0006] In one aspect, the present invention provides a powder metallurgy imaging method based on linear grayscale, the method comprising the following steps:

[0007] Step 1: Obtain a multi-focal image of the workpiece taken by a microscope;

[0008] Step 2: According to the high-reflection and non-reflection conditions of different metal sections, the blob analysis tool is used to segment the image and perform linear grayscale transformation on the highlight area and black area respectively;

[0009] Step 3: Convert the grayscale space of the image type that is converted into a real number type after the grayscale linear transformation, and transform the image into an 8-bit grayscale byte type;

[0010] Step 4: Use the 8-neighborhood calculation method to perform grayscale fusion on images of adjacent focal lengths.

[0011] In the powder metallurgy imaging method based on linear grayscale described in the present invention, the model of linear grayscale transformation is: ;

[0012] in: is the pixel gray value after linear transformation, is the grayscale value of the original image pixel, A is the grayscale transformation coefficient, B is the overall grayscale offset of the image, (x, y) is the pixel coordinate, and + represents the sum operation.

[0013] The linear grayscale-based powder metallurgy imaging method described in the present invention, wherein A<1 corresponds to a highlight area, A>1 corresponds to a black area; B>0 corresponds to overall brightening of the image, and B<0 corresponds to overall darkening of the image.

[0014] In the linear grayscale-based powder metallurgy imaging method of the present invention, the model of image grayscale space transformation is:

[0015] ;

[0016] Represents the pixel grayscale value after grayscale space transformation.

[0017] The linear grayscale-based powder metallurgy imaging method of the present invention, wherein before executing step 4 and after step 3, the method further comprises:

[0018] The grayscale alignment algorithm is used to perform displacement alignment on the images.

[0019] The linear grayscale-based powder metallurgy imaging method of the present invention comprises the following steps: taking the Nth image as a reference, the N+1th image is displaced;

[0020] The grayscale alignment algorithm is:

[0021]

[0022] in, is the grayscale value of the pixel at the coordinate position (x, y) of the Nth image;

[0023] is the grayscale value of the pixel at the coordinate position (x+u, y+v) of the N+1th image;

[0024] is the average gray value of the Nth image;

[0025] is the grayscale value of the pixel at position (u, v) in the N+1th image;

[0026] (u,v) is the search position of the grayscale feature of the Nth image in the N+1th image, where u represents the X direction and v represents the Y direction;

[0027] Score is the calculated similarity. When Score>0.7, the grayscale feature search is considered complete, and the pixel displacement of the N+1th image is u,v.

[0028] The linear grayscale-based powder metallurgy imaging method of the present invention, wherein step 4 specifically comprises:

[0029] After the N+1th image and the Nth image are aligned, the pixels at the corresponding positions of the Nth and N+1th images and the 8 adjacent pixels are scanned respectively, and the pixel with the largest grayscale difference is selected as the grayscale value of the image at that position after grayscale fusion to extract the clearest pixel at the same coordinate position of different images.

[0030] In the linear grayscale-based powder metallurgy imaging method of the present invention, the grayscale fusion model is:

[0031] ;

[0032] ;

[0033] ;

[0034] Among them, Gn is a normalization function, which aims to improve the stability and convergence speed of the model during training.

[0035] Represents the grayscale value of the pixel at the image coordinate (i, j),

[0036] It is the pixel gray value of the image at the coordinate (x, y) after grayscale fusion.

[0037] On the other hand, the present invention also provides a computer control system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0038] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0039] The beneficial effects of the present invention are:

[0040] By using linear grayscale operation followed by grayscale pixel fusion, clear product images with different focus profiles can be displayed in real time on the monitor, solving the problems of inaccurate manual focusing, eye fatigue, and low efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flow chart for realizing the linear grayscale-based powder metallurgy imaging method of the present invention.

[0042] Figure 2 It is a comparison diagram of the actual situation before and after the treatment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0044] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments:

[0045] Embodiment 1:

[0046] Figure 1 The implementation process of the linear grayscale-based powder metallurgy imaging method provided in the first embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0047] The method of this embodiment includes the following steps:

[0048] Step 1: Obtain a multi-focal image of the workpiece taken by a microscope;

[0049] Step 2: According to the high-reflection and non-reflection conditions of different metal sections, the blob analysis tool is used to segment the image and perform linear grayscale transformation on the highlight area and black area respectively;

[0050] Step 3: Convert the grayscale space of the image type that is converted into a real number type after the grayscale linear transformation, and transform the image into an 8-bit grayscale byte type;

[0051] Step 4: Use the 8-neighborhood calculation method to perform grayscale fusion on images of adjacent focal lengths.

[0052] Preferably, the model of linear grayscale transformation used in the above steps is: ;

[0053] in: is the pixel gray value after linear transformation, is the grayscale value of the original image pixel, A is the grayscale transformation coefficient, B is the overall grayscale offset of the image, (x, y) is the pixel coordinate, and + represents the sum operation; where A<1 corresponds to the highlight area, A>1 corresponds to the black area; B>0 corresponds to the overall brightening of the image, and B<0 corresponds to the overall darkening of the image. Generally, the value range of A is [-255, 255] and the value range of B is [-65025, 65025].

[0054] Preferably, the model of image grayscale space transformation used in the above steps is:

[0055] ;

[0056] Represents the pixel grayscale value after grayscale space transformation.

[0057] Preferably, before executing step 4 and after step 3, the method further includes:

[0058] The grayscale alignment algorithm is used to perform displacement alignment on the image;

[0059] Specifically, taking the Nth image as a reference, the N+1th image is shifted;

[0060] The grayscale alignment algorithm is:

[0061]

[0062] in, is the grayscale value of the pixel at the coordinate position (x, y) of the Nth image;

[0063] is the grayscale value of the pixel at the coordinate position (x+u, y+v) of the N+1th image;

[0064] is the average gray value of the Nth image;

[0065] is the grayscale value of the pixel at position (u, v) in the N+1th image;

[0066] (u,v) is the search position of the grayscale feature of the Nth image in the N+1th image, where u represents the X direction and v represents the Y direction;

[0067] Score is the calculated similarity, and its value range is generally between [0,1]. Endpoint 0 means that the two compared objects are not similar, and endpoint 1 means that the two compared objects are exactly the same. When Score>0.7, it is considered that the grayscale feature search is completed, and the pixel displacement of the N+1th image is u,v.

[0068] Furthermore, step four specifically includes:

[0069] After the N+1th image and the Nth image are aligned, the pixels at the corresponding positions of the Nth and N+1th images and the 8 adjacent pixels are scanned respectively, and the pixel with the largest grayscale difference is selected as the grayscale value of the image at that position after grayscale fusion to extract the clearest pixel at the same coordinate position of different images.

[0070] Preferably, the grayscale fusion model used in the above steps is:

[0071] ;

[0072] ;

[0073] ;

[0074] Among them, Gn is a normalization function, which aims to improve the stability and convergence speed of the model during training.

[0075] Represents the grayscale value of the pixel at the image coordinate (i, j). The value range of i and j is the pixel length and width range of the actual image.

[0076] It is the pixel gray value of the image at the coordinate (x, y) after grayscale fusion.

[0077] The present invention adopts linear grayscale operation and then grayscale pixel fusion, that is, after the steps of collecting multi-focal length images - linear grayscale transformation of images - grayscale space transformation of images - grayscale alignment of images - grayscale fusion - obtaining a clear image of the full focal length, a clear product image with different focus sections can be displayed in real time on the display, as shown in the following example. Figure 2 As shown ( Figure 2 (a), (b) and (c) are respectively the actual top-level profile focus image, the intermediate transition image and the bottom-level profile focus image of the product during the focusing process, and (d) is the image obtained after fusion by the algorithm of the present invention), which solves the problems of inaccurate manual focusing, eye fatigue and low efficiency; in addition, if the image is still unclear after the Nth grayscale fusion, steps one to four are executed N+1 times in a cycle until a clear image after full focal length fusion is obtained.

[0078] Embodiment 2:

[0079] In an embodiment of the present invention, a computer control system is provided. For ease of description, only parts related to the embodiment of the present invention are shown.

[0080] The computer control system of the embodiment of the present invention comprises a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned various linear grayscale-based powder metallurgy imaging method embodiments are implemented.

[0081] Embodiment three:

[0082] In an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned linear grayscale-based powder metallurgy imaging method embodiment are implemented.

[0083] The computer-readable storage medium of the embodiment of the present invention may include any entity or device or recording medium capable of carrying computer program code, for example, ROM / RAM, magnetic disk, optical disk, flash memory and other memories.

[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A powder metallurgy imaging method based on linear grayscale, characterized in that: The method comprises the following steps: Step 1: Obtain a multi-focal image of the workpiece taken by a microscope; Step 2: According to the high-reflection and non-reflection conditions of different metal sections, the blob analysis tool is used to segment the image and perform linear grayscale transformation on the highlight area and black area respectively; Step 3: Convert the grayscale space of the image type that is converted into a real number type after the grayscale linear transformation, and transform the image into an 8-bit grayscale byte type; Step 4: Use the 8-neighborhood calculation method to perform grayscale fusion on images of adjacent focal lengths; Among them, the model of linear grayscale transformation is: ; in: is the pixel gray value after linear transformation, is the grayscale value of the original image pixel, A is the grayscale transformation coefficient, B is the overall grayscale offset of the image, (x, y) is the pixel coordinate, and + represents the sum operation; Among them, A<1 corresponds to the highlight area, A>1 corresponds to the black area; B>0 corresponds to the overall brightening of the image, and B<0 corresponds to the overall darkening of the image; The model of image grayscale space transformation is: ; Represents the pixel gray value after gray space transformation; Before executing step 4 and after step 3, the method further includes: The grayscale alignment algorithm is used to perform displacement alignment on the image; And taking the Nth image as the reference, the N+1th image is shifted; And the grayscale alignment algorithm is: in, is the grayscale value of the pixel at the coordinate position (x, y) of the Nth image, where N is a positive integer; is the grayscale value of the pixel at the coordinate position (x+u, y+v) of the N+1th image; is the average gray value of the Nth image; is the grayscale value of the pixel at position (u, v) in the N+1th image; (u,v) is the search position of the grayscale feature of the Nth image in the N+1th image, where u represents the X direction and v represents the Y direction; Score is the calculated similarity. When Score>0.7, the grayscale feature search is considered complete, and the pixel displacement of the N+1th image is u,v.

2. The powder metallurgy imaging method based on linear grayscale according to claim 1, characterized in that: Step 4 specifically includes: After the N+1th image and the Nth image are aligned, the pixels at the corresponding positions of the Nth and N+1th images and the 8 adjacent pixels are scanned respectively, and the pixel with the largest grayscale difference is selected as the grayscale value of the image at that position after grayscale fusion to extract the clearest pixel at the same coordinate position of different images.

3. A computer control system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 2 are implemented.

4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Rapid liquid mist characteristic measuring method based on digital image treatment technique

    CN104020086A

  • Method for solving limitation of depth of field of microscope

    CN112801913A