Film spacing recognition method and device, electronic equipment and readable storage medium

By acquiring images of the membrane interface and using edge detection tools to filter out outer straight lines, the membrane spacing is calculated, which solves the problem of inaccurate membrane spacing identification in the prior art and improves the control accuracy of membrane spacing and the filtering and blocking effect.

CN116524170BActive Publication Date: 2026-04-10HUIYAN QIZHI (GUANGZHOU) PRECISION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUIYAN QIZHI (GUANGZHOU) PRECISION TECH CO LTD
Filing Date
2023-04-28
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In fields such as industrial production, machine vision inspection, and aerospace, existing technologies struggle to accurately identify and control the distance between multilayer membranes (membrane spacing), thus affecting filtration and barrier performance.

Method used

By acquiring images of the membrane junctions, edge detection tools are used to obtain the inter-membrane boundary lines. The outer lines are then selected, and the distances from points outside the outer lines to the outer lines are calculated to determine the inter-membrane spacing.

Benefits of technology

It enables accurate identification of membrane spacing, ensuring that the membrane spacing is within a certain range, thereby improving the controllability of filtration and barrier effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524170B_ABST
    Figure CN116524170B_ABST
Patent Text Reader

Abstract

The application provides a film spacing identification method and device, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring an image at the junction of two films; processing the image by an edge detection tool to obtain a plurality of film-to-film boundary straight lines; screening an outer straight line from the plurality of film-to-film boundary straight lines; and determining the film spacing of the two films by using the distance from the points on the film-to-film boundary straight lines outside the outer straight line to the outer straight line. Therefore, the method can be used for identifying the film spacing of the two films.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a film spacing recognition method and device, an electronic device and a readable storage medium. BACKGROUND

[0002] In the fields of industrial production, machine vision detection, aerospace, etc., it is usually required to arrange multiple layers of films on the surface or cavity of an object and control the distance between the films (i.e. film spacing) within a certain range, so as to achieve filtering, blocking, etc. by using the arranged films. Therefore, in order to control the film spacing within a certain range, it is crucial to recognize the film spacing. SUMMARY

[0003] The embodiments of the present application aim to provide a film spacing recognition method and device, an electronic device and a readable storage medium, which can be used to recognize film spacing.

[0004] The first aspect of the embodiments of the present application provides a film spacing recognition method, comprising:

[0005] obtaining an image of the intersection of two films;

[0006] processing the image by using an edge detection tool to obtain a plurality of film spacing boundary straight lines;

[0007] selecting an outer straight line from the plurality of film spacing boundary straight lines;

[0008] determining the film spacing of the two films by using the distance from the points on the film spacing boundary straight lines outside the outer straight line to the outer straight line.

[0009] In an embodiment, the processing of the image by using the edge detection tool to obtain a plurality of film spacing boundary straight lines specifically comprises: processing the image by using EDLine to obtain a plurality of film spacing boundary straight lines.

[0010] In an embodiment, before the step of selecting an outer straight line from the plurality of film spacing boundary straight lines, the method further comprises:

[0011] deleting the film spacing boundary straight lines with slopes beyond a preset range from the plurality of film spacing boundary straight lines; and

[0012] selecting an outer straight line from the plurality of film spacing boundary straight lines, specifically comprising:

[0013] selecting an outer straight line from the film spacing boundary straight lines remaining after the deletion.

[0014] In an embodiment, the deleting of the film spacing boundary straight lines with slopes beyond a preset range from the plurality of film spacing boundary straight lines specifically comprises:

[0015] For each of the plurality of inter-membrane boundary straight lines, a slope of the inter-membrane boundary straight line is calculated using coordinates of points on the inter-membrane boundary straight line, and it is determined whether the slope exceeds a preset range; wherein, in the case that the slope exceeds the preset range, the inter-membrane boundary straight line is deleted; or, in the case that the slope does not exceed the preset range, the inter-membrane boundary straight line is retained.

[0016] In an embodiment, the outer straight line is selected from the plurality of inter-membrane boundary straight lines, specifically comprising:

[0017] The parallel rate between each two of the inter-membrane boundary straight lines is determined.

[0018] For each of the inter-membrane boundary straight lines, the number of target parallel rates corresponding to the inter-membrane boundary straight line is determined; wherein, the target parallel rate is specifically a parallel rate with a value belonging to a target interval.

[0019] The inter-membrane boundary straight line with the largest number of target parallel rates is determined as the outer straight line.

[0020] In an embodiment, the parallel rate between each two of the inter-membrane boundary straight lines is determined, specifically comprising:

[0021] For each two of the inter-membrane boundary straight lines, vectors corresponding to the two inter-membrane boundary straight lines are generated using coordinates of points on the two inter-membrane boundary straight lines.

[0022] The cosine similarity between the vectors corresponding to the two inter-membrane boundary straight lines is calculated, and the cosine similarity is taken as the parallel rate between the two inter-membrane boundary straight lines.

[0023] In an embodiment, the inter-membrane distance of two membranes is determined using distances from points on the inter-membrane boundary straight line other than the outer straight line to the outer straight line, specifically comprising:

[0024] For each of the inter-membrane boundary straight lines other than the outer straight line, a distance from a point on the inter-membrane boundary straight line to the outer straight line is calculated.

[0025] The maximum distance or the average value of the distances is determined as the inter-membrane distance of the two membranes.

[0026] The second aspect of the embodiment of the present application provides an inter-membrane distance identification device, comprising:

[0027] An image acquisition unit is configured to acquire an image of a junction of two membranes.

[0028] An inter-membrane boundary straight line acquisition unit is configured to process the image by an edge detection tool to acquire a plurality of inter-membrane boundary straight lines.

[0029] An outer straight line screening unit is configured to screen an outer straight line from the plurality of inter-membrane boundary straight lines.

[0030] An inter-membrane distance determination unit is configured to determine the inter-membrane distance of the two membranes by using the distance from the point on the inter-membrane boundary straight line outside the outer straight line to the outer straight line.

[0031] The third aspect of the embodiment of the present application provides an electronic device, which comprises:

[0032] A memory is configured to store a computer program.

[0033] A processor is configured to execute the method in the first aspect of the embodiment of the present application and any embodiment thereof.

[0034] The fourth aspect of the embodiment of the present application provides a readable storage medium, which comprises a program, and when the program is executed on an electronic device, the electronic device can execute the method in any embodiment of the present application.

[0035] The inter-membrane distance identification provided by the embodiment of the present application comprises the following steps: acquiring an image at the junction of two membranes, processing the image by using an edge detection tool, obtaining a plurality of inter-membrane boundary straight lines, screening an outer straight line from the plurality of inter-membrane boundary straight lines, and determining the inter-membrane distance of the two membranes by using the distance from the point on the inter-membrane boundary straight line outside the outer straight line to the outer straight line. Therefore, the method can be used for the identification of the inter-membrane distance of the two membranes. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0037] Figure 1 The specific structure schematic diagram of the electronic device provided by an embodiment of the present application is shown in the following figure:

[0038] Figure 2 The interaction schematic diagram of the server and the user terminal provided by an embodiment of the present application is shown in the following figure:

[0039] Figure 3 The specific flow schematic diagram of the inter-membrane distance identification method provided by an embodiment of the present application is shown in the following figure:

[0040] Figure 4 The specific structure schematic diagram of the inter-membrane junction provided by an embodiment of the present application is shown in the following figure:

[0041] Figure 5For an embodiment of the present application, a specific structure diagram of the film spacing identification device is provided. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, the terms “first”, “second”, and the like are only used for differentiation and description, and cannot be understood as indicating or implying relative importance.

[0043] As described above, in the fields of industrial production, machine vision detection, aerospace, and the like, it is usually required to arrange multiple layers of films at the surface or cavity of an object and control the distance between the films within a certain range, so as to achieve filtering, blocking, and the like by using the arranged films. Therefore, in order to control the film spacing within a certain range, it is crucial to identify the film spacing.

[0044] Therefore, an electronic device is provided in an embodiment of the present application. As shown in Figure 1 A specific structure diagram of the electronic device 1 is shown. The electronic device 1 includes at least one processor 11 and a memory 12, Figure 1 The processor 11 and the memory 12 can be connected through a bus 10. The memory 12 stores instructions executable by the processor 11. The instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the processes of the method in the embodiments described below.

[0045] In actual applications, the electronic device 1 can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, or a large server or a server cluster composed of the same, and the like.

[0046] In an embodiment, the electronic device 1 can serve as a server. The server can receive an image of the intersection of two films and identify the film spacing by executing all or part of the processes of the method in the embodiments of the present application. Of course, the server can also feed back the identification result to a user terminal. As shown in Figure 2 The server can connect multiple user terminals 2, so that the server can receive the image uploaded by each user terminal 2.

[0047] In an embodiment, the electronic device 1 can also serve as a user terminal. For example, the user terminal can be a mobile phone or a computer of a user, so that the user can collect the image of the intersection of the films through an image collection device (such as a camera) on the user terminal and identify the film spacing by executing all or part of the processes of the method in the embodiments of the present application.

[0048] The film spacing identification method provided in an embodiment of the present application can identify the film spacing by the method. Part or all of the steps of the method can be executed by the electronic device 1 as shown in Figure 1 The electronic device 1 as shown inFigure 3 As shown in the method comprises the following steps:

[0049] Step S31: Obtain an image of the intersection of the two films.

[0050] As shown in the intersection of the two films (film A and film B respectively), in practical applications, the film spacing d between film A and film B needs to be controlled within a certain range, such as within the range of 100±10mm, and the film spacing d needs to be controlled within the range of 90mm-110mm, so as to achieve the effect of filtering, blocking, etc., therefore the film spacing needs to be identified. Figure 4

[0051] Among them, the image content of the image of the intersection of the two films includes the intersection of the two films, and of course can also include the two films. For example, in combination with the above Figure 4 At this time, the image content of the image of the intersection of the two films can include film A, film B and the intersection between film A and film B, so that the film spacing between film A and film B can be obtained by identifying the image, especially the intersection between film A and film B. In addition, the film can refer to various films in industrial production, such as filter membranes, corrosion-resistant plating films, diaphragms, etc., and can also include components of the structure type of the film, such as thin plate-shaped nets, thin plate-shaped circuit boards, electrode plates or thin plate-shaped other similar structures.

[0052] For the specific implementation of this step S31, such as can be through the image acquisition device to collect the image of the intersection of the two films; can also be to obtain the image of the intersection of the two films uploaded by the user terminal, at this time the user terminal collects the image, uploads the image to the server, so that the server can obtain the image; can also be to obtain the image from the image library, for example, since the server connects multiple user terminals, each user terminal can upload images to the server, at this time in order to reduce the operation pressure of the server, the server can first store the received images in the image library after receiving the images uploaded by each user terminal, and then according to the processing time sequence, the corresponding image is obtained from the image library for identification.

[0053] Step S32: Process the image by an edge detection tool to obtain a plurality of inter-film boundary straight lines.

[0054] Among them, the edge detection tool can be used to process the image, especially the intersection of the two films in the image (including the edge of the film), so as to obtain a plurality of inter-film boundary straight lines, which can be used to define the boundary of the film.

[0055] ​For example, in actual application, the pixel values of two films and the gap between the two films in the image usually have large differences, the pixel values of the same film in the image usually have small differences, and the pixel values of the gap between the two films in the image usually also have small differences, so the edge detection tool can identify the pixel values of each pixel in the image, and identify the approximate boundary between the two films according to the differences between the pixel values, and generate a plurality of film gap boundary straight lines.

[0056] The edge detection tool can be an edge drawing line (Edline) or other edge detection tool with similar functions, so the step S32 can be processing the image by EDLine to obtain a plurality of film gap boundary straight lines.

[0057] Step S33: Selecting an outer straight line from the plurality of film gap boundary straight lines.

[0058] The outer straight line can be a straight line that can most accurately define the edge of one of the films among the film gap boundary straight lines.

[0059] For example, since the film is thin, when collecting the image of the junction of the two films, high magnification is usually required, so that the image clarity is insufficient. Therefore, although the plurality of film gap boundary straight lines obtained in the above step S32 can be used to define the boundary of the film, due to the insufficient image clarity, the boundaries defined by each of the film gap boundary straight lines are not the same, resulting in inaccurate definition of the edge of the film. Therefore, the outer straight line, that is, the straight line that can most accurately define the edge of one of the films, needs to be selected from the film gap boundary straight lines.

[0060] For the specific implementation of the step S33, the parallel rate between each two of the film gap boundary straight lines can be determined first, and then the number of target parallel rates corresponding to each film gap boundary straight line is determined, and then the film gap boundary straight line with the largest number of target parallel rates is determined as the outer straight line. The target parallel rate is a parallel rate with a value belonging to a target interval.

[0061] For example, the inter-film boundary straight lines obtained by the step S32 are five, and the division ratios are T1-T4. At this time, the parallel rates between each two of the inter-film boundary straight lines can be determined first, including the parallel rate of T1 and T2 (referred to as parallel rate 1), the parallel rate of T1 and T3 (referred to as parallel rate 2), the parallel rate of T1 and T4 (referred to as parallel rate 3), the parallel rate of T2 and T3 (referred to as parallel rate 4), the parallel rate of T2 and T4 (referred to as parallel rate 5), and the parallel rate of T3 and T4 (referred to as parallel rate 6). If the parallel rate 1, the parallel rate 2 and the parallel rate 4 belong to the target interval, i.e., the parallel rate 1, the parallel rate 2 and the parallel rate 4 are the target parallel rates.

[0062] Then, the number of target parallel rates corresponding to each of the inter-film boundary straight lines T1-T4 is determined, including the number of target parallel rates in the parallel rate 1, the parallel rate 2 and the parallel rate 3 corresponding to T1, wherein the number of target parallel rates in the parallel rate 1, the parallel rate 2 and the parallel rate 3 corresponding to T1 is 2; the number of target parallel rates in the parallel rate 1, the parallel rate 4 and the parallel rate 5 corresponding to T2, wherein the number of target parallel rates in the parallel rate 1, the parallel rate 4 and the parallel rate 5 corresponding to T2 is 1; the number of target parallel rates in the parallel rate 2, the parallel rate 4 and the parallel rate 5 corresponding to T3, wherein the number of target parallel rates in the parallel rate 2, the parallel rate 4 and the parallel rate 5 corresponding to T3 is 1; and the number of target parallel rates in the parallel rate 3, the parallel rate 5 and the parallel rate 6 corresponding to T4, wherein the number of target parallel rates in the parallel rate 3, the parallel rate 5 and the parallel rate 6 corresponding to T4 is 0.

[0063] Then, the inter-film boundary straight line with the largest number of target parallel rates is determined as the outer straight line. At this time, since the number of target parallel rates in the parallel rate 1, the parallel rate 2 and the parallel rate 3 corresponding to T1 is 2, the number of target parallel rates in the parallel rate 1, the parallel rate 4 and the parallel rate 5 corresponding to T2 is 1, the number of target parallel rates in the parallel rate 2, the parallel rate 4 and the parallel rate 5 corresponding to T3 is 1, and the number of target parallel rates in the parallel rate 3, the parallel rate 5 and the parallel rate 6 corresponding to T4 is 0, the T1 is determined as the outer straight line.

[0064] It needs to be further explained that the parallel rate between each two of the inter-membrane boundary straight lines can be determined in the following manner, including for each two of the inter-membrane boundary straight lines, first generating the vectors corresponding to the two inter-membrane boundary straight lines respectively by using the coordinates of the points on the two inter-membrane boundary straight lines, then calculating the cosine similarity between the vectors corresponding to the two inter-membrane boundary straight lines respectively, and taking the cosine similarity as the parallel rate between the two inter-membrane boundary straight lines. Wherein, in the case that the parallel rate is specifically the cosine similarity, the target interval can be the interval (0, 1), that is, the target parallel rate is specifically the parallel rate with a value belonging to (0, 1).

[0065] For example, for the inter-membrane boundary straight lines T1 and T2, the coordinates (x11, y11) and (x12, y12) of the points on T1 can be used to generate the vector M=(x11-x12, y11-y12) corresponding to T1, wherein the points on T1 can be any point on T1, or the starting point and the ending point, etc. Similarly, the coordinates (x21, y21) and (x22, y22) of the points on T2 can be used to generate the vector N=(x21-x22, y21-y22) corresponding to T2. Then the cosine similarity between vectors M and N is calculated, that is, cos(θ)=M·N / (|M||N|), wherein M·N is the dot product of vector M and vector N, |M| is the modulus of vector M, |N| is the modulus of vector N, and cos(θ) is the calculated cosine similarity, which can be taken as the parallel rate between T1 and T2.

[0066] Step S34: determining the inter-membrane distance of the two membranes by using the distance from the point on the inter-membrane boundary straight line outside the outer straight line to the outer straight line.

[0067] After obtaining the outer straight line through the above-mentioned step S33, the distance from the point on each inter-membrane boundary straight line outside the outer straight line to the outer straight line can be calculated, which can be a perpendicular distance, for example, an arbitrary point on the inter-membrane boundary straight line is selected, and the perpendicular distance from the point to the outer straight line is calculated, of course, the perpendicular distance from the starting point, the ending point, the intermediate point or other points on the inter-membrane boundary straight line to the outer straight line can also be calculated.

[0068] In this way, after the distance from the point on each inter-membrane boundary straight line outside the outer straight line to the outer straight line is calculated respectively, the inter-membrane distance of the two membranes can be determined according to these distances, for example, the maximum distance in these distances can be determined as the inter-membrane distance of the two membranes, or the average of these distances can be further calculated, and the average is taken as the inter-membrane distance.

[0069] The film distance recognition provided in the embodiments of the present application includes: acquiring an image of the intersection of two films, processing the image through an edge detection tool to obtain a plurality of film boundary straight lines, screening an outer straight line from the plurality of film boundary straight lines, and determining the film distance of the two films by using the distance from the points on the film boundary straight lines outside the outer straight line to the outer straight line. Therefore, the method can be used for the recognition of the film distance of the two films.

[0070] It needs to be further explained that, since the film is thin, high magnification is usually required when acquiring the image of the intersection of two films, which makes the image resolution insufficient, and thus the plurality of film boundary straight lines obtained in the step S32 may have noise, which needs to be processed to improve the accuracy of the recognition result. Therefore, before the outer straight line is screened from the film boundary straight lines in the step S33, the method can further include deleting the film boundary straight lines with slopes beyond the preset range from the film boundary straight lines, so as to retain the film boundary straight lines with slopes not beyond the preset range. Thus, for the step S33, the outer straight line can be screened from the film boundary straight lines remaining after the deletion (i.e. the film boundary straight lines with slopes not beyond the preset range). At this time, since the film boundary straight lines with slopes beyond the preset range are deleted, and the outer straight line is screened only from the film boundary straight lines with slopes not beyond the preset range, the accuracy of the outer straight line is higher.

[0071] The preset range can be a target slope ± a maximum error, and the target slope can be preset according to the relative position relationship of the two films and the film boundary in the image, or the average value of the slopes of the film boundary straight lines (i.e. the average slope) can be used as the target slope.

[0072] When the film boundary straight lines with slopes beyond the preset range are deleted from the plurality of film boundary straight lines, the slope of each film boundary straight line can be calculated first, such as calculating the slope of each film boundary straight line by using the coordinates of the points on the film boundary straight line, and then determining whether the slope is beyond the preset range. If the slope is beyond the preset range, it means that the slope is greater than the target slope - the maximum error, or the slope is greater than the target slope + the maximum error, otherwise, it means that the slope is not beyond the preset range. In addition, if the slope is beyond the preset range, the film boundary straight line is deleted, or if the slope is not beyond the preset range, the film boundary straight line is retained.

[0073] For example, for any inter-membrane boundary straight line, coordinates of any two points (which can also be the start point and the end point) on the inter-membrane boundary straight line can be obtained first, and if the coordinates of the two points are (a1, b1) and (a2, b2), the slope of the inter-membrane boundary straight line is calculated as k=(b1-b2) / (a1-a2).

[0074] Based on the same inventive concept as the inter-membrane distance identification method provided in the embodiments of the present application, the embodiments of the present application also provide an inter-membrane distance identification device. For the specific content of the device embodiments, reference can be made to the above-mentioned method embodiments if there is any unclear place. As shown in the figure, the device 50 includes an image acquisition unit 501, an inter-membrane boundary straight line acquisition unit 502, an outer straight line screening unit 503, and an inter-membrane distance determination unit 504, wherein: Figure 5

[0075] The image acquisition unit 501 is configured to acquire an image of the intersection of two membranes.

[0076] The inter-membrane boundary straight line acquisition unit 502 is configured to process the image by an edge detection tool to obtain a plurality of inter-membrane boundary straight lines.

[0077] The outer straight line screening unit 503 is configured to screen an outer straight line from the plurality of inter-membrane boundary straight lines.

[0078] The inter-membrane distance determination unit 504 is configured to determine the inter-membrane distance of the two membranes by using the distance from the point on the inter-membrane boundary straight line outside the outer straight line to the outer straight line.

[0079] By using the device 50 provided in the embodiments of the present application, since the device 50 adopts the same inventive concept as the inter-membrane distance identification method provided in the embodiments of the present application, under the premise that the method can solve the technical problems, the device 50 can also solve the technical problems, which will not be described here.

[0080] In addition, in actual application, the technical effects achieved by combining the device 50 with specific hardware devices are also within the protection scope of the present application, such as arranging different units in the device 50 in different servers in a distributed cluster in a distributed cluster manner, thereby improving the identification efficiency, etc.

[0081] The inter-membrane boundary straight line acquisition unit 502 can specifically include an inter-membrane boundary straight line acquisition sub-unit configured to process the image by EDLine to obtain a plurality of inter-membrane boundary straight lines.

[0082] ​The device 50 can further include a noise processing unit configured to delete, from the plurality of inter-membrane boundary lines, an inter-membrane boundary line having a slope beyond a preset range; and the outer line screening unit 503 can specifically include an outer line screening sub-unit configured to screen an outer line from the inter-membrane boundary lines remaining after the deletion.

[0083] The deleting, from the plurality of inter-membrane boundary lines, an inter-membrane boundary line having a slope beyond a preset range can specifically include: for each of the plurality of inter-membrane boundary lines, calculating a slope of the inter-membrane boundary line by using coordinates of points on the inter-membrane boundary line, and determining whether the slope is beyond the preset range; and in a case where the slope is beyond the preset range, deleting the inter-membrane boundary line; or in a case where the slope is not beyond the preset range, retaining the inter-membrane boundary line.

[0084] The outer line screening unit 503 can further specifically include an outer line screening second sub-unit configured to determine a parallel rate between each two of the inter-membrane boundary lines, determine, for each of the inter-membrane boundary lines, a number of target parallel rates corresponding to the inter-membrane boundary line, wherein the target parallel rate is a parallel rate having a value belonging to a target interval, and determine an inter-membrane boundary line having a maximum number of target parallel rates as an outer line.

[0085] The determining a parallel rate between each two of the inter-membrane boundary lines can specifically include: for each two of the inter-membrane boundary lines, generating vectors corresponding to the two inter-membrane boundary lines by using coordinates of points on the two inter-membrane boundary lines, and calculating a cosine similarity between the vectors corresponding to the two inter-membrane boundary lines, and taking the cosine similarity as the parallel rate between the two inter-membrane boundary lines.

[0086] The inter-membrane distance determining unit 504 can specifically include an inter-membrane distance determining sub-unit 504 configured to calculate, for each of the inter-membrane boundary lines other than the outer line, a distance from a point on the inter-membrane boundary line to the outer line, and determine a maximum distance or an average value of the distances as an inter-membrane distance of two membranes.

[0087] The embodiment of the present application further provides a computer program product stored in a storage medium, which is executed by at least one processor to implement each process of the training method provided by the embodiment of the present application and achieve the same technical effects. To avoid repetition, details are not described herein.

[0088] The embodiment of the present application further provides a non-transitory electronic device readable storage medium, comprising a program which, when running on an electronic device, causes the electronic device to execute all or part of the process of the method in the above embodiment. The storage medium can be a disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory, a Hard Disk Drive (HDD) or a Solid-State Drive (SSD), etc. The storage medium can also comprise a combination of the above-mentioned types of memories.

[0089] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes are intended to fall within the scope of the appended claims.

Claims

1. A film distance recognition method characterized by, The method comprises: acquiring an image of the intersection of two films; processing the image by an edge detection tool to obtain a plurality of inter-film boundary straight lines; selecting an outer straight line from the plurality of inter-film boundary straight lines; determining the inter-film distance of the two films by using the distance from the points on the inter-film boundary straight line outside the outer straight line to the outer straight line; wherein the selecting of the outer straight line from the plurality of inter-film boundary straight lines comprises: determining the parallel rate between each two of the inter-film boundary straight lines; determining the number of target parallel rates corresponding to each inter-film boundary straight line, respectively; wherein the target parallel rate is a parallel rate with a value belonging to a target interval; determining the inter-film boundary straight line with the largest number of target parallel rates as the outer straight line.

2. The method of claim 1, wherein, The processing of the image by the edge detection tool to obtain a plurality of inter-film boundary straight lines comprises processing the image by EDLine to obtain a plurality of inter-film boundary straight lines.

3. The method of claim 1, wherein, Before the selecting of the outer straight line from the plurality of inter-film boundary straight lines, the method further comprises: deleting the inter-film boundary straight line with a slope outside a preset range from the plurality of inter-film boundary straight lines; and the selecting of the outer straight line from the plurality of inter-film boundary straight lines comprises: selecting the outer straight line from the remaining inter-film boundary straight lines after the deletion.

4. The method of claim 3, wherein, The deleting of the inter-film boundary straight line with a slope outside a preset range from the plurality of inter-film boundary straight lines comprises: calculating the slope of each inter-film boundary straight line by using the coordinates of the points on the inter-film boundary straight line, and determining whether the slope is outside the preset range, respectively; wherein, in the case that the slope is outside the preset range, the inter-film boundary straight line is deleted; or, in the case that the slope is not outside the preset range, the inter-film boundary straight line is retained.

5. The method of claim 1, wherein, The determining of the parallel rate between each two of the inter-film boundary straight lines comprises: generating vectors corresponding to two inter-film boundary straight lines by using the coordinates of the points on the two inter-film boundary straight lines, in turn for each two of the inter-film boundary straight lines; calculating the cosine similarity between the vectors corresponding to the two inter-film boundary straight lines, and taking the cosine similarity as the parallel rate between the two inter-film boundary straight lines.

6. The method of claim 1, wherein, The determining of the inter-film distance of the two films by using the distance from the points on the inter-film boundary straight line outside the outer straight line to the outer straight line comprises: calculating the distance from the points on each inter-film boundary straight line outside the outer straight line to the outer straight line, respectively; taking the maximum distance or the average value of the distances as the inter-film distance of the two films.

7. A film distance recognition device characterized by comprising: The method comprises: an image acquisition unit configured to acquire an image of the intersection of two films; an inter-film boundary straight line acquisition unit configured to process the image by an edge detection tool to obtain a plurality of inter-film boundary straight lines; an outer straight line screening unit configured to select an outer straight line from the plurality of inter-film boundary straight lines; an inter-film distance determination unit configured to determine the inter-film distance of the two films by using the distance from the points on the inter-film boundary straight line outside the outer straight line to the outer straight line. The outer straight line screening unit comprises an outer straight line screening second sub-unit, which is specifically used for determining the parallel rate between each two of the inter-membrane boundary straight lines; determining the number of target parallel rates corresponding to each inter-membrane boundary straight line; wherein the target parallel rate is specifically a parallel rate with a value belonging to a target interval; and determining the inter-membrane boundary straight line with the largest number of target parallel rates as the outer straight line.

8. An electronic device, comprising: Comprising: a memory to store a computer program; a processor to execute the method of any one of claims 1 to 6.

9. A readable storage medium, characterized by, Comprising: a program which, when running on an electronic device, enables the electronic device to execute the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Non-contact inner parallel plane distance measuring method for large-sized workpiece

    CN103009194A

  • Gap-measuring device, gap-measuring method, and method of manufacturing roll-like body

    JP2007163436A