A method, device and storage medium for extracting effective areas of moiré fringes

Through Otsu algorithm and mathematical morphological processing, the effective area of ​​moiré stripes is automatically extracted, solving the problem of inefficiency in traditional methods and achieving high-precision moiré stripes area extraction.

CN117094981BActive Publication Date: 2025-08-19NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311177090.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-08-19
Estimated Expiration
2043-09-13

AI Technical Summary

Technical Problem

The existing moiré effective area extraction method relies on naked eye observation and manual pixel setting, resulting in inefficiency and inaccuracy.

Method used

Using the combined Otsu algorithm and mathematical morphology, the effective area of ​​moiré stripes is automatically extracted by obtaining the grayscale value subtraction, projection and mathematical morphology of straight and deflected stripes images.

Benefits of technology

It realizes intelligent and precise extraction of the effective area of ​​Moir stripes, improving the extraction efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117094981B_ABST
    Figure CN117094981B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and storage medium for extracting an effective area of moiré fringes. The method comprises the following steps: obtaining a straight fringe image and a deflected fringe image of exactly the same size and position; converting the straight fringe image and the deflected fringe image into grayscale images, and performing binarization processing on the two grayscale images to obtain two binarized images; subtracting the values of corresponding pixel points of the two binarized images and taking the absolute values to obtain a processed image D; projecting the processed image D onto the horizontal axis and the vertical axis respectively, finding the starting and ending positions of the fringe deflection and the coordinates of a circumscribed rectangle of the image; obtaining the side length of the effective area by averaging the fringe deflection length and the side length of the circumscribed rectangle; placing the fringe deflection at the center according to the side length of the effective area, and finally extracting the effective area of the fringe image. The present invention realizes intelligent and precise extraction of the effective area of moiré fringes and has better universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method, a device and a storage medium for extracting a moire fringe effective area, and belongs to the technical field of optical measurement. Background Art

[0002] Moiré tomography, a branch of optical computed tomography, offers the advantages of real-time, stability, and non-contact performance, making it widely used in flow field detection. When using moiré tomography to measure key parameters of complex flow fields, it is necessary to extract the phase information of the flow field. Prior to this, the effective area of the moiré fringes in the measured field must be captured. Traditional algorithms rely primarily on visual observation and manual pixel setting to capture the effective area of the image. This approach is inherently inaccurate and requires changing the corresponding pixels when running different images, making it inefficient and unintelligent. Summary of the Invention

[0003] In order to solve the practical problems existing in the extraction of effective areas of moiré fringes, the present invention provides a high-precision and easy-to-implement method for intelligently extracting effective areas of fringes by combining the Otsu algorithm and mathematical morphology, so as to ultimately improve the efficiency of extracting phase information of the measured flow field.

[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0005] In a first aspect, the present invention provides a method for extracting an effective area of a moiré fringe, comprising:

[0006] Obtain a straight fringe image and a deflected fringe image with exactly the same size and position;

[0007] Converting the straight fringe image and the deflected fringe image into grayscale images, and performing binarization processing on the two grayscale images to obtain two binary images;

[0008] Subtract the values of the corresponding pixels of the two binary images and take the absolute value to obtain the processed image D;

[0009] After projecting the processed image D onto the horizontal and vertical axes respectively, find the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle;

[0010] The side length of the effective area is obtained by averaging the stripe deflection length and the side length of the circumscribed rectangle.

[0011] The fringe deflection is placed at the center according to the side length of the effective area, and finally the effective area of the fringe pattern is extracted.

[0012] Furthermore, the binarization processing of the two grayscale images to obtain two binary images includes:

[0013] The optimal binarization threshold of two grayscale images is calculated using the Otsu algorithm, specifically:

[0014] Set a pixel gray value threshold, record the number of pixels with gray values less than the threshold as N0, and the number of pixels with gray values greater than or equal to the threshold as N1, then:

[0015] ω0=N0 / (M×N), (1)

[0016] ω1=N1 / (M×N), (2)

[0017] N0+N1=M×N, (3)

[0018] 1=ω0+ω1, (4)

[0019] μ=ω0×μ0+ω1×μ1, (5)

[0020] g=ω0×(μ0-μ) 2 +ω1×(μ1-μ) 2 , (6)

[0021] Among them, g is the inter-class variance, the proportion of foreground related pixels in the entire image is expressed as ω0, the average foreground grayscale is recorded as μ0, the proportion of background pixels in the entire image is recorded as ω1, its average grayscale is recorded as μ1, and the total average grayscale of the image is recorded as μ;

[0022] Substituting formula (5) into formula (6) yields the equivalent formula:

[0023] g=ω0×ω1×(μ0-μ1) 2 . (7)

[0024] Afterwards, the traversal algorithm is used to obtain the segmentation threshold T of the foreground and background of the target with the largest inter-class variance g;

[0025] The two grayscale images are divided into foreground and background parts by the segmentation threshold T, and two binary images are obtained.

[0026] Furthermore, mathematical morphology is used to further reduce the noise of the two binary images. The noise in the binary images is removed by erosion and dilation of the opening operation, which includes:

[0027] aΘb represents the erosion of a by b, specifically defined as:

[0028]

[0029] Among them, aΘb can be regarded as the set of all x such that b is included in a after being translated by x;

[0030] It represents the expansion of a by b, which is defined as:

[0031]

[0032] The expansion steps are: b first maps about the origin, then translates x, and expands After being translated by x, it will cause it to have at least one non-zero common element with a;

[0033] Based on the above process, two relatively pure binary images can be obtained.

[0034] Furthermore, after projecting the processed image D onto the horizontal axis and the vertical axis respectively, finding the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle includes:

[0035] Project the processed image D onto the horizontal axis to obtain a row sequence X: (1) Find the starting position in the sequence that is greater than 0, which can be identified as the horizontal coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern; (2) Find the positions of all elements in the sequence that are greater than the average value of all elements in the sequence, and the first position can be identified as the starting position of the fringe deflection, and the last position as the ending position of the fringe deflection;

[0036] Project the processed image D onto the vertical axis to obtain a row sequence Y. Find the starting position greater than 0 in the sequence, and you can identify it as the vertical coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern.

[0037] In a second aspect, the present invention provides a moire fringe effective area extraction device, comprising:

[0038] An acquisition module is used to acquire a straight stripe image and a deflected stripe image with the same size and position;

[0039] A binarization processing module, configured to convert the straight fringe image and the deflected fringe image into grayscale images, and perform binarization processing on the two grayscale images to obtain two binarized images;

[0040] The first processing module is used to subtract the values of corresponding pixels of the two binary images and take the absolute value to obtain a processed image D;

[0041] The second processing module is used to project the processed image D onto the horizontal axis and the vertical axis respectively, and find the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle;

[0042] The effective area side length calculation module is used to calculate the effective area side length by averaging the stripe deflection length and the circumscribed rectangle side length;

[0043] The effective area extraction module is used to deflect the fringe at the center according to the side length of the effective area, and finally extract the effective area of the fringe image.

[0044] Furthermore, in the binarization processing module, the two grayscale images are binarized to obtain two binary images, including:

[0045] The optimal binarization threshold of two grayscale images is calculated using the Otsu algorithm, specifically:

[0046] Set a pixel gray value threshold, record the number of pixels with gray values less than the threshold as N0, and the number of pixels with gray values greater than or equal to the threshold as N1, then:

[0047] ω0=N0 / (M×N), (1)

[0048] ω1=N1 / (M×N), (2)

[0049] N0+N1=M×N, (3)

[0050] 1=ω0+ω1, (4)

[0051] μ=ω0×μ0+ω1×μ1, (5)

[0052] g=ω0×(μ0-μ) 2 +ω1×(μ1-μ) 2 , (6)

[0053] Among them, g is the inter-class variance, the ratio of foreground related pixels to the entire image is expressed as ω0, the foreground average grayscale is recorded as μ0, and the ratio of background pixels to the entire image is recorded as ω 1 , its average grayscale is recorded as μ1, and the total average grayscale of the image is recorded as μ;

[0054] Substituting formula (5) into formula (6) yields the equivalent formula:

[0055] g=ω0×ω1×(μ0-μ1) 2 . (7)

[0056] Afterwards, the traversal algorithm is used to obtain the segmentation threshold T of the foreground and background of the target with the largest inter-class variance g;

[0057] The two grayscale images are divided into foreground and background parts by the segmentation threshold T, and two binary images are obtained.

[0058] Furthermore, a noise reduction module is included, which is used to further reduce the noise of the two binary images by using mathematical morphology, and remove the noise in the binary images by erosion and expansion of the opening operation, specifically including:

[0059] aΘb represents the erosion of a by b, specifically defined as:

[0060]

[0061] Among them, aΘb can be regarded as the set of all x such that b is included in a after being translated by x;

[0062] It represents the expansion of a by b, which is defined as:

[0063]

[0064] The expansion steps are: b first maps about the origin, then translates x, and expands After being translated by x, it will cause it to have at least one non-zero common element with a;

[0065] Based on the above process, two relatively pure binary images can be obtained.

[0066] Furthermore, in the second processing module, after projecting the processed image D onto the horizontal axis and the vertical axis respectively, finding the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle includes:

[0067] Project the processed image D onto the horizontal axis to obtain a row sequence X: (1) Find the starting position in the sequence that is greater than 0, which can be identified as the horizontal coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern; (2) Find the positions of all elements in the sequence that are greater than the average value of all elements in the sequence, and the first position can be identified as the starting position of the fringe deflection, and the last position as the ending position of the fringe deflection;

[0068] Project the processed image D onto the vertical axis to obtain a row sequence Y. Find the starting position greater than 0 in the sequence, and you can identify it as the vertical coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern.

[0069] In a third aspect, the present invention provides an electronic device including a processor and a storage medium;

[0070] The storage medium is used to store instructions;

[0071] The processor is configured to operate according to the instructions to execute the steps of any of the aforementioned methods.

[0072] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the aforementioned methods when executed by a processor.

[0073] Compared with the prior art, the present invention has the following beneficial effects:

[0074] The present invention provides a method, device and storage medium for extracting the effective area of moiré fringes, which replace the traditional method of relying on naked eye observation and manual setting of pixel points, and realize intelligent and accurate extraction of the effective area of moiré fringes with better universality. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 is a schematic diagram of a deflected fringe image provided by an embodiment of the present invention;

[0076] Figure 2 is a schematic diagram of a straight stripe image provided by an embodiment of the present invention;

[0077] Figure 3 is a deflected fringe grayscale image provided by an embodiment of the present invention;

[0078] Figure 4 is a straight stripe grayscale image provided by an embodiment of the present invention;

[0079] Figure 5 is a schematic diagram of a deflected fringe image after binarization processing provided by an embodiment of the present invention;

[0080] Figure 6 is a schematic diagram of a vertical stripe image after binarization processing provided by an embodiment of the present invention;

[0081] Figure 7 This is a schematic diagram of image subtraction and absolute value calculation provided by an embodiment of the present invention;

[0082] Figure 8 Schematic diagram of the effective area provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0083] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.

[0084] Example 1

[0085] This embodiment introduces a method for extracting effective areas of moiré fringes, including:

[0086] Obtain a straight fringe image and a deflected fringe image with exactly the same size and position;

[0087] Converting the straight fringe image and the deflected fringe image into grayscale images, and performing binarization processing on the two grayscale images to obtain two binary images;

[0088] Subtract the values of the corresponding pixels of the two binary images and take the absolute value to obtain the processed image D;

[0089] After projecting the processed image D onto the horizontal and vertical axes respectively, find the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle;

[0090] The side length of the effective area is obtained by averaging the stripe deflection length and the side length of the circumscribed rectangle.

[0091] The fringe deflection is placed at the center according to the side length of the effective area, and finally the effective area of the fringe pattern is extracted.

[0092] The application process of the moiré fringe effective area extraction method provided in this embodiment specifically involves the following steps:

[0093] like Figure 1 、 Figure 2 As shown in the figure, we can generally obtain a straight fringe image and a deflected fringe image with the same size and position. First, convert the two moiré fringe images obtained from the experiment into grayscale images. In the program, each pixel corresponds to a matrix with a grayscale value from 0 to 1. The result is shown in the figure. Figure 3 、 Figure 4 Next, the grayscale image is further binarized, that is, the image is divided into foreground and background, as shown in Figure 5 、 Figure 6 As shown, the specific steps include two steps.

[0094] Step 1: Calculate the optimal binarization threshold value using the Otsu algorithm, that is, the grayscale value of the pixels that divide the foreground and background. The main process of the Otsu algorithm, also known as the maximum inter-class variance method, is to assume a pixel grayscale value threshold optimalthreshold, denote the number of pixels with grayscale values less than the threshold as N0, and the number of pixels with grayscale values greater than or equal to the threshold optimalthreshold as N1, then:

[0095] ω0=N0 / (M×N), (1)

[0096] ω1=N1 / (M×N), (2)

[0097] N0+N1=M×N, (3)

[0098] 1=ω0+ω1, (4)

[0099] μ=ω0×μ0+ω 1 ×μ1, (5)

[0100] g=ω0×(μ0-μ) 2 +ω1×(μ1-μ) 2 , (6)

[0101] Among them, g is the between-class variance, the proportion of foreground related pixels in the entire image is expressed as ω0, the average foreground grayscale is recorded as μ0, the proportion of background pixels in the entire image is recorded as ω1, its average grayscale is recorded as μ1, and the total average grayscale of the image is recorded as μ.

[0102] Substituting formula (5) into formula (6) yields the equivalent formula:

[0103] g=ω0×ω1×(μ0-μ1) 2 . (7)

[0104] Afterwards, the traversal algorithm is used to obtain the segmentation threshold T (optimal threshold) of the foreground and background of the target with the largest inter-class variance g.

[0105] Step 2: Use mathematical morphology to further reduce the noise of the binary image. The main process is to remove the noise in the binary image through erosion and expansion of the opening operation.

[0106] Erosion is a technique that can eliminate the boundary points of an object. It can effectively remove all objects smaller than the target structural element. aΘb represents the erosion of a by b, which is specifically defined as:

[0107]

[0108] Here, aΘb can be regarded as the set of all x such that b is included in a after being translated by x.

[0109] The effect of dilation is to expand the target area and fill the gaps inside the object, thereby achieving connectivity between two objects that are close to each other. It represents the expansion of a by b, which is defined as:

[0110]

[0111] The expansion steps are: b first maps about the origin, then translates x, and expands After being translated by x, it will cause it to have at least one non-zero common element with a.

[0112] Based on the above process, two relatively pure binary images can be obtained. Then, the values of the corresponding pixels of the two images are subtracted and the absolute value is taken. The areas where the stripes are straight will cancel each other out and become 0, while the areas where the stripes are deflected will become 1. Figure 7) is projected onto the horizontal axis to obtain a row sequence X: (1) Find the starting position in the sequence that is greater than 0, which can be identified as the horizontal coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern; (2) Find the positions of all elements in the sequence that are greater than the average value of all elements in the sequence, and the first position can be roughly identified as the starting position of the fringe deflection, and the last position as the ending position of the fringe deflection.

[0113] Similarly, the processed image D (as shown in the example Figure 7 ) is projected onto the vertical axis to obtain a row sequence Y. Find the starting position of the sequence that is greater than 0, and it can be identified as the vertical coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern.

[0114] At this point, we have obtained the starting and ending positions of the fringe deflection and the coordinates of the circumscribed rectangle of the image. The side length of the effective area is obtained by averaging the fringe deflection length and the side length of the circumscribed rectangle. The fringe deflection is placed in the center according to the side length of the effective area, and the effective area of the fringe image is finally extracted, as shown in the following example: Figure 8 shown.

[0115] The algorithm described in this patent replaces the traditional method of relying on visual observation and manual setting of pixel points, achieving intelligent and precise extraction of the effective area of Moire fringes, and has better universality.

[0116] Example 2

[0117] This embodiment provides a device for extracting an effective area of a moiré fringe, comprising:

[0118] An acquisition module is used to acquire a straight stripe image and a deflected stripe image with the same size and position;

[0119] A binarization processing module, configured to convert the straight fringe image and the deflected fringe image into grayscale images, and perform binarization processing on the two grayscale images to obtain two binarized images;

[0120] The first processing module is used to subtract the values of corresponding pixels of the two binary images and take the absolute value to obtain a processed image D;

[0121] The second processing module is used to project the processed image D onto the horizontal axis and the vertical axis respectively, and find the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle;

[0122] The effective area side length calculation module is used to calculate the effective area side length by averaging the stripe deflection length and the circumscribed rectangle side length;

[0123] The effective area extraction module is used to deflect the fringe at the center according to the side length of the effective area, and finally extract the effective area of the fringe image.

[0124] In a further embodiment, the binarization processing module performs binarization processing on two grayscale images to obtain two binary images, including:

[0125] The optimal binarization threshold of two grayscale images is calculated using the Otsu algorithm, specifically:

[0126] Set a pixel gray value threshold, record the number of pixels with gray values less than the threshold as N0, and the number of pixels with gray values greater than or equal to the threshold as N1, then:

[0127] ω0=N0 / (M×N), (1)

[0128] ω1=N1 / (M×N), (2)

[0129] N0+N1=M×N, (3)

[0130] 1=ω0+ω1, (4)

[0131] μ=ω0×μ0+ω1×μ1, (5)

[0132] g=ω0×(μ0-μ) 2 +ω1×(μ1-μ) 2 , (6)

[0133] Among them, g is the inter-class variance, the proportion of foreground related pixels in the entire image is expressed as ω0, the average foreground grayscale is recorded as μ0, the proportion of background pixels in the entire image is recorded as ω1, its average grayscale is recorded as μ1, and the total average grayscale of the image is recorded as μ;

[0134] Substituting formula (5) into formula (6) yields the equivalent formula:

[0135] g=ω0×ω1×(μ0-μ1) 2 . (7)

[0136] Afterwards, the traversal algorithm is used to obtain the segmentation threshold T of the foreground and background of the target with the largest inter-class variance g;

[0137] The two grayscale images are divided into foreground and background parts by the segmentation threshold T, and two binary images are obtained.

[0138] In a further embodiment, a noise reduction module is further included, which is used to further reduce noise on the two binary images using mathematical morphology, and remove noise points in the binary images by erosion and dilation of the opening operation, specifically including:

[0139] aΘb represents the erosion of a by b, specifically defined as:

[0140]

[0141] Among them, aΘb can be regarded as the set of all x such that b is included in a after being translated by x;

[0142] It represents the expansion of a by b, which is defined as:

[0143]

[0144] The expansion steps are: b first maps about the origin, then translates x, and expands After being translated by x, it will cause it to have at least one non-zero common element with a;

[0145] Based on the above process, two relatively pure binary images can be obtained.

[0146] In a further embodiment, the second processing module projects the processed image D onto the horizontal axis and the vertical axis respectively, and then finds the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle, including:

[0147] Project the processed image D onto the horizontal axis to obtain a row sequence X: (1) Find the starting position in the sequence that is greater than 0, which can be identified as the horizontal coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern; (2) Find the positions of all elements in the sequence that are greater than the average value of all elements in the sequence, and the first position can be identified as the starting position of the fringe deflection, and the last position as the ending position of the fringe deflection;

[0148] Project the processed image D onto the vertical axis to obtain a row sequence Y. Find the starting position greater than 0 in the sequence, and you can identify it as the vertical coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern.

[0149] Example 3

[0150] This embodiment provides an electronic device, including a processor and a storage medium;

[0151] The storage medium is used to store instructions;

[0152] The processor is configured to operate according to the instructions to execute the steps of the method according to any one of the first embodiments.

[0153] Example 4

[0154] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of any one of the methods described in Embodiment 1 are implemented.

[0155] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for extracting effective areas of moiré fringes, characterized in that: include: Obtain a straight fringe image and a deflected fringe image with exactly the same size and position; Converting the straight fringe image and the deflected fringe image into grayscale images, and performing binarization processing on the two grayscale images to obtain two binary images; Subtract the values of the corresponding pixels of the two binary images and take the absolute value to obtain the processed image D; After projecting the processed image D onto the horizontal and vertical axes respectively, find the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle; including: Project the processed image D onto the horizontal axis to obtain a row sequence X: (1) Find the starting position in the sequence that is greater than 0, which can be identified as the horizontal coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern; (2) Find the positions of all elements in the sequence that are greater than the average value of all elements in the sequence, and the first position can be identified as the starting position of the fringe deflection, and the last position as the ending position of the fringe deflection; Project the processed image D onto the vertical axis to obtain a row sequence Y. Find the starting position of the sequence that is greater than 0, and you can identify it as the vertical coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern. The side length of the effective area is obtained by averaging the stripe deflection length and the side length of the circumscribed rectangle. The fringe deflection is placed at the center according to the side length of the effective area, and finally the effective area of the fringe pattern is extracted.

2. The method for extracting effective moiré fringe areas according to claim 1, wherein: The binarization process is performed on the two grayscale images to obtain two binarized images, including: The optimal binarization threshold of two grayscale images is calculated using the Otsu algorithm, specifically: Set a pixel gray value threshold, record the number of pixels with gray values less than the threshold as N0, and the number of pixels with gray values greater than or equal to the threshold as N1, then: ω0=N0 / (M×N), (1) ω1=N1 / (M×N), (2) N0+N1=M×N, (3) 1=ω0+ω1, (4) μ=ω0×μ0+ω1×μ1, (5) g=ω0×(μ0-μ) 2 +ω1×(μ1-μ) 2 , (6) Among them, g is the inter-class variance, the proportion of foreground related pixels in the entire image is expressed as ω0, the average foreground grayscale is recorded as μ0, the proportion of background pixels in the entire image is recorded as ω1, its average grayscale is recorded as μ1, and the total average grayscale of the image is recorded as μ; Substituting formula (5) into formula (6) yields the equivalent formula: g=ω0×ω1×(μ0-μ1) 2 , (7) Afterwards, the traversal algorithm is used to obtain the segmentation threshold T of the foreground and background of the target with the largest inter-class variance g; The two grayscale images are divided into foreground and background parts by the segmentation threshold T, and two binary images are obtained.

3. The method for extracting effective moiré fringe areas according to claim 1, wherein: Mathematical morphology is used to further reduce the noise of the two binary images. The noise in the binary images is removed by erosion and dilation of the opening operation, including: aΘb represents the erosion of a by b, specifically defined as: Among them, aΘb can be regarded as the set of all x such that b is included in a after being translated by x; It represents the expansion of a by b, which is defined as: The expansion steps are: b first maps about the origin, then translates x, and expands After being translated by x, it will cause it to have at least one non-zero common element with a.

4. A device for extracting effective areas of moiré fringes, characterized in that: include: An acquisition module is used to acquire a straight stripe image and a deflected stripe image with the same size and position; A binarization processing module, configured to convert the straight fringe image and the deflected fringe image into grayscale images, and perform binarization processing on the two grayscale images to obtain two binarized images; The first processing module is used to subtract the values of corresponding pixels of the two binary images and take the absolute value to obtain a processed image D; The second processing module is used to project the processed image D onto the horizontal axis and the vertical axis respectively, and then find the starting and ending positions of the fringe deflection and the coordinates of the image circumscribed rectangle; it includes: Project the processed image D onto the horizontal axis to obtain a row sequence X: (1) Find the starting position in the sequence that is greater than 0, which can be identified as the horizontal coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern; (2) Find the positions of all elements in the sequence that are greater than the average value of all elements in the sequence, and the first position can be identified as the starting position of the fringe deflection, and the last position as the ending position of the fringe deflection; Project the processed image D onto the vertical axis to obtain a row sequence Y. Find the starting position of the sequence that is greater than 0, and you can identify it as the vertical coordinate of the vertex of the circumscribed rectangle of the circular fringe pattern. The effective area side length calculation module is used to calculate the effective area side length by averaging the stripe deflection length and the circumscribed rectangle side length; The effective area extraction module is used to deflect the fringe at the center according to the side length of the effective area, and finally extract the effective area of the fringe image.

5. The moire fringe effective area extraction device according to claim 4, characterized in that: In the binarization processing module, two grayscale images are binarized to obtain two binarized images, including: The optimal binarization threshold of two grayscale images is calculated using the Otsu algorithm, specifically: Set a pixel gray value threshold, record the number of pixels with gray values less than the threshold as N0, and the number of pixels with gray values greater than or equal to the threshold as N1, then: ω0=N0 / (M×N), (1) ω1=N1 / (M×N), (2) N0+N1=M×N, (3) 1=ω0+ω1, (4) μ=ω0×μ0+ω1×μ1, (5) g=ω0×(μ0-μ) 2 +ω1×(μ1-μ) 2 , (6) Among them, g is the inter-class variance, the proportion of foreground related pixels in the entire image is expressed as ω0, the average foreground grayscale is recorded as μ0, the proportion of background pixels in the entire image is recorded as ω1, its average grayscale is recorded as μ1, and the total average grayscale of the image is recorded as μ; Substituting formula (5) into formula (6) yields the equivalent formula: g=ω0×ω1×(μ0-μ1) 2 , (7) Afterwards, the traversal algorithm is used to obtain the segmentation threshold T of the foreground and background of the target with the largest inter-class variance g; The two grayscale images are divided into foreground and background parts by the segmentation threshold T, and two binary images are obtained.

6. The moire fringe effective area extraction device according to claim 4, characterized in that: It also includes a denoising module for further denoising the two binary images using mathematical morphology. It removes noise points in the binary images through erosion and dilation of the opening operation. Specifically, it includes: aΘb represents the erosion of a by b, specifically defined as: Among them, aΘb can be regarded as the set of all x such that b is included in a after being translated by x; It represents the expansion of a by b, which is defined as: The expansion steps are: b first maps about the origin, then translates x, and expands After being translated by x, it will cause it to have at least one non-zero common element with a.

7. An electronic device, characterized in that: including processors and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.