Distance measurement method and distance measurement apparatus
Patent Information
- Application Number
- GB2024017525
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2025-01-15
AI Technical Summary
In the array substrate production line, the existing distance measurement method has low efficiency and accuracy, requires manual use of a microscope for measurement, requires a large amount of calculation, and is insufficiently accurate in identifying the reference area and the area to be detected.
By obtaining the image to be detected, the reference area and the area of the object to be detected are obtained based on image processing technology, the reference line and the positioning line are used to calculate the distance between the two, and the neural network algorithm is used for precise segmentation and positioning, automating the measurement process and improving efficiency. and accuracy.
Automatic distance measurement is realized, measurement efficiency and accuracy are improved, calculation amount is reduced, and the recognition accuracy of the reference area and the object area to be detected is enhanced.
Abstract
Description
Distance measurement method and distance measurement device Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a distance measurement method and a distance measurement device. Background Art
[0002] Among the multiple processes in an array substrate production line, one process involves measuring distances between multiple inspection objects.
[0003] Summary of the Invention
[0004] In one aspect, a distance measurement method is provided, comprising: first, acquiring an image to be detected; the image to be detected including at least one object to be detected; second, acquiring a reference area and an area of the object to be detected based on the image to be detected; third, acquiring a reference line based on the reference area, the reference line being used to locate the reference area; third, acquiring a positioning line based on the area of the object to be detected, the positioning line being used to locate the area of the object to be detected; and finally, acquiring a distance between the area of the object to be detected and the reference area based on the reference line and the positioning line.
[0005] In some embodiments, the reference line is parallel to the first direction, and obtaining the reference line based on the reference area includes: first, selecting multiple first positioning points in the reference area. Then, obtaining the reference line based on the coordinate values of the multiple first positioning points in the second direction; the second direction is perpendicular to the first direction, and the coordinate value of the reference line in the second direction is the average of the coordinate values of the multiple first positioning points in the second direction.
[0006] In some embodiments, selecting multiple first positioning points in the reference region includes: first, selecting multiple first calibration points within the outline of the reference region; the multiple first calibration points are located at the top, bottom, and at least one intermediate position between the top and bottom of the outline of the reference region. Then, based on each first calibration point, a first straight line parallel to the second direction is obtained. Finally, based on a line segment of the first straight line within the reference region, a first positioning point is obtained; the first positioning point is the midpoint of the line segment of the first straight line within the reference region.
[0007] In some embodiments, the region of the object to be detected includes at least two sub-regions.
[0008] In some embodiments, the positioning line is parallel to the first direction, the area of the object to be detected includes a first sub-area and a second sub-area, and the positioning line includes a first sub-positioning line and a second sub-positioning line, the first sub-positioning line is used to locate the first sub-area, and the second sub-positioning line is used to locate the second sub-area. Acquiring a positioning line based on the area of the object to be detected includes: first, selecting multiple first sub-positioning points in the first sub-area. Secondly, based on the coordinate values of the multiple first sub-positioning points in the second direction, acquiring a first sub-positioning line; the coordinate value of the first sub-positioning line in the second direction is the average value of the coordinate values of the multiple first sub-positioning points in the second direction. Then, selecting multiple second sub-positioning points in the second sub-area. Finally, based on the coordinate values of the multiple second sub-positioning points in the second direction, acquiring a second sub-positioning line; the coordinate value of the second sub-positioning line in the second direction is the average value of the coordinate values of the multiple second sub-positioning points in the second direction.
[0009] In some embodiments, obtaining the distance between the area to be inspected and the reference area based on the baseline and the positioning line includes: first, obtaining the distance between the first sub-positioning line and the baseline based on the first sub-positioning line and the baseline. Then, obtaining the distance between the second sub-positioning line and the baseline based on the second sub-positioning line and the baseline. Finally, calculating the distance between the area of the object to be inspected and the reference area based on the distance between the first sub-positioning line and the baseline and the distance between the second sub-positioning line and the baseline.
[0010] In some embodiments, the positioning line is parallel to the first direction, and obtaining the positioning line based on the region of the object to be detected includes: first, selecting multiple second positioning points in the region of the object to be detected. Then, obtaining the positioning line based on the coordinate values of the multiple second positioning points in the second direction. The second direction is perpendicular to the first direction, and the coordinate value of the positioning line in the second direction is the average of the coordinate values of the multiple second positioning points in the second direction.
[0011] In some embodiments, obtaining the reference area based on the image to be detected includes: performing binarization processing on the image to be detected to obtain the reference area.
[0012] In some embodiments, obtaining the area of the object to be detected based on the image to be detected includes: obtaining the area of the object to be detected based on the image to be detected and a neural network algorithm.
[0013] In some embodiments, the region of at least one object to be detected is located on the same side of the reference region.
[0014] In another aspect, a distance measurement device is provided, comprising: an image acquisition device and an image processing device. The image acquisition device is coupled to the image processing device and configured to: acquire an image to be detected; the image to be detected includes at least one object to be detected. The image processing device is configured to: acquire a reference area and an area of the object to be detected based on the image to be detected; acquire a reference line based on the reference area, the reference line being used to locate the reference area; acquire a positioning line based on the area of the object to be detected, the positioning line being used to locate the area of the object to be detected; and acquire a distance between the area of the object to be detected and the reference area based on the reference line and the positioning line.
[0015] In some embodiments, the reference line is parallel to the first direction, and the image processing device is configured to: first, select multiple first positioning points in the reference area. Then, based on the coordinate values of the multiple first positioning points in the second direction, obtain the reference line; the second direction is perpendicular to the first direction, and the coordinate value of the reference line in the second direction is the average of the coordinate values of the multiple first positioning points in the second direction.
[0016] In some embodiments, the image processing device is configured to: first, select a plurality of first calibration points within the outline of the reference region; the plurality of first calibration points are located at the top, bottom, and at least one intermediate position between the top and bottom of the outline of the reference region. Then, based on each first calibration point, obtain a first straight line parallel to the second direction. Finally, based on the line segment of the first straight line within the reference region, obtain a first positioning point; the first positioning point is the midpoint of the line segment of the first straight line within the reference region.
[0017] In some embodiments, the region of the object to be detected includes at least two sub-regions.
[0018] In some embodiments, the positioning line is parallel to the first direction, the area of the object to be detected includes a first sub-area and a second sub-area, the positioning line includes a first sub-positioning line and a second sub-positioning line, the first sub-positioning line is used to locate the first sub-area, and the second sub-positioning line is used to locate the second sub-area; the image processing device is configured to: first, select multiple first sub-positioning points in the first sub-area. Secondly, based on the coordinate values of the multiple first sub-positioning points in the second direction, obtain the first sub-positioning line; the coordinate value of the first sub-positioning line in the second direction is the average of the coordinate values of the multiple first sub-positioning points in the second direction. Then, select multiple second sub-positioning points in the second sub-area. Finally, based on the coordinate values of the multiple second sub-positioning points in the second direction, obtain the second sub-positioning line; the coordinate value of the second sub-positioning line in the second direction is the average of the coordinate values of the multiple second sub-positioning points in the second direction.
[0019] In some embodiments, the image processing device is configured to: first, based on the first sub-positioning line and the baseline, obtain a distance between the first sub-positioning line and the baseline. Then, based on the second sub-positioning line and the baseline, obtain a distance between the second sub-positioning line and the baseline. Finally, based on the distance between the first sub-positioning line and the baseline and the distance between the second sub-positioning line and the baseline, calculate a distance between the region of the object to be detected and the baseline region.
[0020] In some embodiments, the positioning line is parallel to the first direction, and the image processing device is configured to: first, select multiple second positioning points in the region of the object to be detected. Then, based on the coordinate values of the multiple second positioning points in the second direction, obtain the positioning line. The second direction is perpendicular to the first direction, and the coordinate value of the positioning line in the second direction is the average of the coordinate values of the multiple second positioning points in the second direction.
[0021] In some embodiments, the image processing device is configured to: perform binarization processing on the image to be detected to obtain the reference area.
[0022] In some embodiments, the image processing device is configured to: obtain the area of the object to be detected based on the image to be detected and the neural network algorithm.
[0023] In some embodiments, the region of at least one object to be detected is located on the same side of the reference region.
[0024] In another aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer program instructions, which, when executed on a computer (eg, a distance measurement device), causes the computer to execute the distance measurement method described in any of the above embodiments.
[0025] In another aspect, a computer program product is provided, which includes computer program instructions, and when the computer program instructions are executed on a computer (eg, a distance measurement device), the computer program instructions cause the computer to perform the distance measurement method according to any one of the above embodiments.
[0026] In another aspect, a computer program is provided. When the computer program is executed on a computer (eg, a distance measurement device), the computer program causes the computer to execute the distance measurement method as described in any one of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] To more clearly illustrate the technical solutions of the present disclosure, the following briefly introduces the drawings required for use in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure, and those skilled in the art can also derive other drawings based on these drawings. Furthermore, the drawings described below are schematic diagrams and are not intended to limit the actual dimensions of the products, actual processes of the methods, actual timing of signals, and the like involved in the embodiments of the present disclosure.
[0028] FIG1 is a flow chart of a distance measurement method according to some embodiments;
[0029] FIG2 is a schematic diagram of an image to be detected according to some embodiments;
[0030] FIG3 is a flow chart of another distance measurement method according to some embodiments;
[0031] FIG4 is a schematic diagram of a reference area, a first calibration point, a first positioning point, and a reference line according to some embodiments;
[0032] FIG5 is a flowchart of another distance measurement method according to some embodiments;
[0033] FIG6A is a schematic diagram of an area to be detected and sub-areas of the area to be detected according to some embodiments;
[0034] FIG6B is a schematic diagram of another area to be detected and sub-areas of the area to be detected according to some embodiments;
[0035] FIG6C is a schematic diagram of another area to be detected and sub-areas of the area to be detected according to some embodiments;
[0036] FIG7 is a flowchart of yet another distance measurement method according to some embodiments;
[0037] FIG8A is a schematic diagram of a first sub-area, a first sub-positioning line, and a first sub-positioning point according to some embodiments;
[0038] FIG8B is a schematic diagram of yet another first sub-area, a first sub-positioning line, a first sub-positioning point, and a first sub-calibration point according to some embodiments;
[0039] 9 is a schematic diagram of a second sub-area, a second sub-positioning line, and a distance between the second sub-area and a reference area according to some embodiments;
[0040] 10 is a schematic diagram of a third sub-region, a third sub-positioning line, and a distance between the third sub-region and a reference region according to some embodiments;
[0041] 11 is a schematic diagram of a fourth sub-area, a fourth sub-positioning line, and a distance between the fourth sub-area and a reference area according to some embodiments;
[0042] 12 is a schematic diagram of a fifth sub-area, a fifth sub-positioning line, and a distance between the fifth sub-area and the reference area according to some embodiments;
[0043] FIG13 is a flow chart of yet another distance measurement method according to some embodiments;
[0044] FIG14 is a structural diagram of a distance measurement device according to some embodiments. DETAILED DESCRIPTION
[0045] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the embodiments described are only some embodiments of the present disclosure, not all embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present disclosure.
[0046] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and its other forms, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as open and inclusive, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" are intended to indicate that the particular features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the particular features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.
[0047] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0048] When describing some embodiments, the expressions "coupled" and "connected" and their derivatives may be used. For example, when describing some embodiments, the term "connected" may be used to indicate that two or more components are in direct physical or electrical contact with each other. For another example, when describing some embodiments, the term "coupled" may be used to indicate that two or more components are in direct physical or electrical contact. However, the term "coupled" or "communicatively coupled" may also refer to two or more components that are not in direct contact with each other, but still cooperate or interact with each other. The embodiments disclosed herein are not necessarily limited to the contents of this document.
[0049] The use of "adapted to" or "configured to" herein is intended to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.
[0050] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values may, in practice, be based on additional conditions or values beyond those stated.
[0051] As used herein, "parallel", "perpendicular", and "equal" include the situations described and situations similar to the situations described, and the range of the similar situations is within an acceptable deviation range, wherein the acceptable deviation range is as determined by a person of ordinary skill in the art taking into account the measurement in question and the errors associated with the measurement of the specific quantity (i.e., the limitations of the measurement system). For example, "parallel" includes absolute parallelism and approximate parallelism, wherein the acceptable deviation range of approximate parallelism can be, for example, a deviation within 5°; "perpendicular" includes absolute perpendicularity and approximate perpendicularity, wherein the acceptable deviation range of approximate perpendicularity can also be, for example, a deviation within 5°. "Equal" includes absolute equality and approximate equality, wherein the acceptable deviation range of approximate equality can be, for example, that the difference between the two equals is less than or equal to 5% of either one.
[0052] Exemplary embodiments are described herein with reference to cross-sectional and / or plan views that are idealized exemplary drawings. In the drawings, the thicknesses of layers and regions are exaggerated for clarity. Therefore, variations in shape relative to the drawings due to, for example, manufacturing techniques and / or tolerances are contemplated. Therefore, the exemplary embodiments should not be construed as limited to the shapes of the regions shown herein, but rather include deviations in shape due to, for example, manufacturing. For example, an etched region shown as a rectangle will typically have curved features. Therefore, the regions shown in the drawings are schematic in nature, and their shapes are not intended to illustrate the actual shape of regions of the device and are not intended to limit the scope of the exemplary embodiments.
[0053] Typically, in a production line of an array substrate, the process of measuring the distances of multiple inspection objects requires using a microscope to magnify the inspection objects and performing the measurements manually, resulting in low measurement efficiency and accuracy.
[0054] To this end, some embodiments of the present disclosure provide a distance measurement method, as shown in FIG1 , which includes steps 101 to 105 .
[0055] Step 101: Acquire an image to be detected.
[0056] The image to be detected includes at least one object to be detected. For example, the object to be detected can be glue on the array substrate. The present disclosure does not limit the number of objects to be detected included in the image to be detected. For example, as shown in Figure 2, the image to be detected P1 includes three objects to be detected, namely, object to be detected TO1, object to be detected TO2, and object to be detected TO3. It is understandable that since the actual sizes of objects to be detected TO1, object to be detected TO2, and object to be detected TO3 are relatively small, it is usually necessary to use a microscope to magnify the objects to be detected. Therefore, the image to be detected P1 can be an enlarged image. That is, the sizes of objects to be detected TO1, object to be detected TO2, and object to be detected TO3 in the image to be detected P1 are multiples of their actual sizes. The specific value of this multiple is related to the parameters of the device that obtains the image to be detected P1. For example, taking the device that obtains the image to be detected P1 as a camera, the specific value of this multiple can be related to the focal length of the camera. The present disclosure does not limit the specific value of this multiple.
[0057] Step 102: Acquire a reference area and an area of the object to be detected based on the image to be detected.
[0058] Exemplarily, as shown in FIG2 , the image to be detected P1 may further include a reference area RL, and the area of the object to be detected may be any one or more areas among the area of the object to be detected TO1, the area of the object to be detected TO2, and the area of the object to be detected TO3. Exemplarily, the reference area RL, the area of the object to be detected TO1, the area of the object to be detected TO2, and the area of the object to be detected TO3 are almost parallel to each other. It is understandable that, taking the glue on the array substrate as an example of the object to be detected, the reference area RL may be a structure on the array substrate that is almost parallel to the glue and has a clear outline and color. For example, the reference area RL may be the area of a conductive line on the array substrate, and the color of the conductive line is different from the color of the glue on the array substrate.
[0059] For example, the reference region RL can serve as a reference for distance measurement. To measure the distance from the region of the object to be detected to the reference region RL, it is first necessary to identify the reference region RL, the region of the object to be detected TO1, the region of the object to be detected TO2, and the region of the object to be detected TO3 in the image to be detected P1.
[0060] In some embodiments, the regions of multiple objects to be detected in the image to be detected P1 may be located on the same side of the reference region RL. For example, as shown in FIG2 , in the image to be detected P1, the regions of the objects to be detected TO1, TO2, and TO3 are all located to the left of the reference region RL. The following embodiments are illustrative examples in which the regions of the objects to be detected TO1, TO2, and TO3 are all located to the left of the reference region RL.
[0061] For example, taking the case where the reference region is located on the right side of the image to be detected P1 and the region of the object to be detected is located on the left side of the image to be detected P1, as shown in FIG2, the image to be detected P1 can be divided into a left side region and a right side region. The reference region RL is obtained based on the right side of the image to be detected P1. The regions of the objects to be detected TO1, TO2, and TO3 are obtained based on the left side of the reference region RL to reduce the amount of computation.
[0062] In some embodiments, the method for obtaining a reference area based on an image to be detected includes: performing binarization processing on the image to be detected to obtain the reference area. Taking the reference area RL as an example, the area of a conductive line on the array substrate, because the color of the conductive line is different from the color of the glue on the array substrate, and the contour of the conductive line is clear. Therefore, in the image to be detected P1, the grayscale value of the color of the reference area RL is significantly different from the grayscale value of the color of the object to be detected. Through the binarization method, the reference area RL can be identified in the image to be detected P1 more quickly and simply, and a high degree of recognition accuracy can be ensured with a small amount of calculation.
[0063] Exemplarily, the method for obtaining the reference region based on the image to be detected may also include: obtaining the reference region based on the image to be detected or a neural network algorithm. The present disclosure does not limit the specific method for obtaining the reference region. Using a binarization method can more simply and quickly obtain the reference region and can reduce the amount of calculation.
[0064] In some embodiments, the method for obtaining the region of the object to be detected based on the image to be detected includes: obtaining the region of the object to be detected based on the image to be detected and a neural network algorithm. For example, the neural network algorithm may include a semantic segmentation method, which accurately segments the image by determining the category of each pixel in the image. For example, taking the object to be detected as glue on an array substrate as an example, the texture background of the glue in the image to be detected is relatively complex. Using the semantic segmentation method, the region of the object to be detected can be more accurately identified.
[0065] Exemplarily, the area of the object to be detected can be obtained using the method of the U-Net network. The U-Net network includes a contracting path and an expanding path, and the two paths are symmetrical to each other. The overall structure is similar to the capital English letter U, hence the name U-Net. The U-Net network can also be referred to as an encoder-decoder structure. Exemplarily, the contracting path in the U-Net network is used to obtain context information (context), which adopts the typical architecture of a convolutional network, including four downsampling layers, each layer performs two consecutive 3x3 convolutions on the feature map of the previous layer input and uses a linear rectifier function (Rectified Linear Unit, ReLU) for activation, 2x2 maximum pooling for downsampling, and the number of channels gradually increases. The expansion path in the U-Net architecture is used for precise localization and consists of four upsampling layers. Each layer uses deconvolution to upsample the feature map of the previous layer by a factor of two to restore the compressed features. Channels are merged through skip connections with the feature map of the encoder's symmetrical path. The merged feature map undergoes two 3x3 convolutions and a ReLU activation function before being fed into the next layer. In the final layer, a 1x1 convolution layer is used to map the feature vector to the required number of categories.
[0066] Step 103: Acquire a baseline based on the baseline area.
[0067] For example, the reference line is used to locate the reference region. Since the reference region RL is magnified in the image to be detected P1, the reference region RL is a region with a contour in the image to be detected P1. When distance measurement is required, the reference line can be used to indicate the position of the reference region RL.
[0068] In some embodiments, the reference line is parallel to the first direction. As shown in Figures 2 and 4 , a two-dimensional coordinate system is established with the upper left vertex of the image to be detected P1 as the origin, the upper right edge of the image to be detected P1 as the positive direction of the X-axis, and the left side of the image to be detected P1 as the positive direction of the Y-axis. For example, if the direction of the Y-axis is the first direction, the reference area RL is substantially parallel to the Y-axis. Therefore, a straight line parallel to the first direction, i.e., the reference line T1 parallel to the Y-axis, can be used to locate the reference area RL.
[0069] Exemplarily, as shown in FIG3 , the implementation method of step 103 may include steps 201 to 202 .
[0070] Step 201: Select a plurality of first positioning points in a reference area.
[0071] It is understood that selecting multiple first positioning points can make the positioning of the reference region RL more accurate. The present disclosure does not limit the number of first positioning points selected in the reference region RL. The following embodiment uses the selection of five first positioning points in the reference region RL as an example for illustrative description. For example, as shown in FIG4 , five first positioning points (e.g., AP1, AP2, AP3, AP4, and AP5) are selected in the reference region RL. These five first positioning points are respectively located at the top, 1 / 4, 1 / 2, 3 / 4, and bottom of the reference region RL along the Y axis.
[0072] In some embodiments, as shown in FIG. 5 , the implementation method of step 201 may include steps 301 to 303 .
[0073] Step 301: Select a plurality of first calibration points on the outline of the reference area.
[0074] The plurality of first calibration points are respectively located at the top, bottom, and at least one intermediate position between the top and bottom of the outline of the reference region. For example, as shown in FIG4 , five first calibration points (e.g., CP1, CP2, CP3, CP4, and CP5) are selected from the outline of the reference region RL. The five first calibration points are respectively located at the top, 1 / 4, 1 / 2, 3 / 4, and bottom of the outline of the reference region RL along the Y axis.
[0075] Step 302: Acquire a first straight line parallel to the second direction based on each first calibration point.
[0076] Exemplarily, as shown in Figure 4, the second direction is perpendicular to the first direction. Taking the direction of the X-axis as the second direction as an example, a first straight line (such as L1, L2, L3, L4 and L5) parallel to the second direction is obtained based on each first calibration point.
[0077] Step 303: Acquire a first positioning point based on the line segment of the first straight line within the reference area.
[0078] 4 , the first positioning point is the midpoint of the line segment of the first straight line within the reference region. For example, taking the first positioning point as first positioning point AP1 and the first straight line as first straight line L1 as an example, the first positioning point AP1 is the midpoint of the line segment of the first straight line L1 within the reference region RL.
[0079] Through steps 301 to 303, different calibration points are selected at different positions along the first direction (Y-axis) on the reference area RL, so that different positioning points are selected at different positions along the first direction (Y-axis) on the reference area RL, and the midpoint of the line segment of the first straight line in the reference area is selected as the first positioning point, so that the position of the selected first positioning point in the second direction (X-axis) is also different. Therefore, the reference line T1 can more accurately position the reference area RL.
[0080] Step 202: Acquire a baseline based on the coordinate values of the plurality of first positioning points in the second direction.
[0081] The coordinate value of the reference line in the second direction is an average value of the coordinate values of the plurality of first positioning points in the second direction.
[0082] For example, in the image P1 to be detected, the coordinate values of each point in the reference area RL in the second direction (X-axis) may be different. By taking the average value of the coordinate values of multiple points in the reference area RL in the second direction (X-axis), the reference line can more accurately locate the reference area RL.
[0083] Exemplarily, as shown in FIG4 , the coordinate value of the baseline T1 in the second direction is the coordinate value of the intersection point TA1 of the baseline T1 and the X-axis on the X-axis, and the coordinate value of the intersection point TA1 of the baseline T1 and the X-axis on the X-axis is the average value of the coordinate values of the five first positioning points (AP1, AP2, AP3, AP4, and AP5) on the X-axis.
[0084] Step 104: Acquire a positioning line based on the area of the object to be detected.
[0085] Exemplarily, the positioning line is used to locate the area of the object to be detected. Since in the image to be detected P1, the objects to be detected TO1, TO2 and TO3 are magnified, the area of the object to be detected in the image to be detected P1 is an area with a contour. When distance measurement is required, the positioning line can be used to indicate the position of the area of the object to be detected. In some embodiments, the positioning line is parallel to the first direction; the implementation method of step 104 may include: first, selecting multiple second positioning points in the area of the object to be detected. Then, based on the coordinate values of the multiple second positioning points in the second direction, the positioning line is obtained. The second direction is perpendicular to the first direction, and the coordinate value of the positioning line in the second direction is the average value of the coordinate values of the multiple second positioning points in the second direction. This method is similar to the method for obtaining the baseline described in steps 201 to 202, and will not be repeated here.
[0086] In some embodiments, the area of the object to be detected includes at least two sub-areas. Exemplarily, the area of the object to be detected includes a first sub-area and a second sub-area, the positioning line includes a first sub-positioning line and a second sub-positioning line, the first sub-positioning line is used to position the first sub-area, and the second sub-positioning line is used to position the second sub-area. It is understandable that the area of the object to be detected may also include a third sub-area, a fourth sub-area and a fifth sub-area. Exemplarily, taking the glue on the array substrate as an example of the object to be detected, in the image P1 to be detected, for example, the area of the object to be detected may also be divided into multiple sub-areas based on the identified outline of the object to be detected, and the distance between the glue and the reference area is obtained based on the distance between the multiple sub-areas and the reference area, so that the distance measurement result is more accurate. The present disclosure does not limit the number of sub-areas included in the area of the object to be detected and the method of obtaining each sub-area.
[0087] Exemplarily, as shown in FIG6A , taking the object to be detected as a single detection object TO1 as an example, based on the identified outline of the object to be detected TO1, five boundaries parallel to the X-axis (such as S1, S2, S3, S4, and S5) are selected at the top, 1 / 4, 1 / 2, 3 / 4, and bottom of the outline of the object to be detected TO1 along the Y-axis. It can be understood that when the boundary S1 is the top boundary, the boundary S5 is the bottom boundary. When the boundary S5 is the top boundary, the boundary S1 is the bottom boundary. The present disclosure does not limit the top and bottom of the object to be detected TO1. The following embodiments are illustrative examples using the boundary S1 as the top boundary and the boundary S5 as the bottom boundary. The first sub-area TO11 is selected from a region ΔH in height downward from the top boundary S1. The second sub-area TO12 is selected from regions ΔH in height upward and downward from the 1 / 4 boundary S2. The third sub-area TO13 is selected from regions ΔH in height upward and downward from the 1 / 2 boundary S3. The fourth sub-area TO14 is selected from regions ΔH in height upward and downward from the 3 / 4 boundary S4. The fifth sub-area TO15 is selected from regions ΔH in height upward from the top boundary S1. For example, as shown in FIG6B , the Y-axis component of the distance between the top boundary S1 and the top of the contour of the object to be detected TO1 can be ΔH, and the first sub-area TO11 is selected from regions ΔH in height upward and downward from the top boundary S1. The Y-axis component of the distance between the bottom boundary S5 and the bottom of the contour of the object to be detected TO1 can be ΔH, and the fifth sub-area TO15 is selected from regions ΔH in height upward and downward from the top boundary S5. The present disclosure does not limit the specific value and measurement unit of ΔH. The specific value of ΔH can be adjusted according to the actual application. For example, the measurement unit of ΔH can be a length unit (for example, ΔH can be 1 mm) or a pixel unit (for example, ΔH can be 20 pixels).
[0088] Exemplarily, M boundaries parallel to the first direction (X-axis) can also be selected in the area of the object to be detected TO1, where M is an integer greater than or equal to 3. The M boundaries divide the area of the object to be detected TO1 into M-1 sub-areas, and the M-1 sub-areas are distributed at different positions in the direction of the Y-axis, so as to obtain the distance between the area of the object to be detected TO1 and the reference area at different positions on the Y-axis. The present disclosure does not limit the position of the M boundaries on the Y-axis. For example, the M boundaries can divide the area of the object to be detected TO1 into M-1 sub-areas along the Y-axis, and the heights of the M-1 sub-areas along the Y-axis are roughly the same. For another example, the heights of the M-1 sub-areas divided by the M boundaries along the Y-axis are different.
[0089] For example, as shown in FIG6C , taking the area of the object to be detected as the area of the object to be detected TO1 as an example, and taking the value of M as 6 as an example, six boundaries (e.g., S1, S2, S3, S4, S5, and S6) are selected in the area of the object to be detected TO1. These six boundaries divide the area of the object to be detected TO1 into five sub-areas. For example, the area where the object to be detected TO1 is located between boundaries S1 and S2 is a first sub-area TO11, the area where the object to be detected TO1 is located between boundaries S2 and S3 is a second sub-area TO12, the area where the object to be detected TO1 is located between boundaries S3 and S4 is a third sub-area TO13, the area where the object to be detected TO1 is located between boundaries S4 and S5 is a fourth sub-area TO14, and the area where the object to be detected TO1 is located between boundaries S5 and S6 is a fifth sub-area TO15.
[0090] As shown in FIG2 , the region of the object to be detected TO1 is almost parallel to the Y axis. Similar to the principle of using the reference line T1 to locate the reference region RL, the region of the object to be detected TO1 can be located using a straight line parallel to the first direction.
[0091] As shown in FIG. 7 , the implementation method of step 104 may include steps 401 to 404 .
[0092] Step 401: Select multiple first sub-location points in a first sub-area.
[0093] For example, as shown in FIG6B and FIG8A , three positioning points (e.g., AP11, AP12, and AP13) can be selected in the first sub-area TO11. The first sub-positioning point AP11 is the midpoint of the line segment of the boundary S11 in the first sub-area TO11, and the boundary S11 is the top boundary of the first sub-area TO11. The first sub-positioning point AP12 is the midpoint of the line segment of the boundary S1 in the first sub-area TO11. The first sub-positioning point AP13 is the midpoint of the line segment of the boundary S12 in the first sub-area TO11, and the boundary S12 is the bottom boundary of the first sub-area TO11.
[0094] For example, as shown in Figures 6C and 8B, five first sub-positioning points (such as AP11, AP12, AP13, AP14 and AP15) can also be selected in the first sub-area TO11. The five first sub-positioning points are respectively located at the top, 1 / 4, 1 / 2, 3 / 4 and bottom of the first sub-area TO11 along the Y-axis.
[0095] In some embodiments, as shown in FIG. 4 and FIG. 8B , the implementation method of step 401 may be the same as the method of steps 301 to 303 .
[0096] First, multiple second calibration points are selected from the contour of the first sub-region. For example, as shown in FIG8B , the contour of the first sub-region TO11 is the contour of the region of the object to be detected TO1 located between the boundaries S1 and S2. Five second calibration points (e.g., CP11, CP12, CP13, CP14, and CP15) are selected from the contour of the first sub-region TO11. These five second calibration points are located at the top, 1 / 4, 1 / 2, 3 / 4, and bottom of the contour of the first sub-region TO11 along the Y-axis, respectively.
[0097] Then, a second straight line parallel to the second direction is obtained based on each second calibration point. For example, as shown in FIG8B , a second straight line parallel to the second direction (such as L11, L12, L13, L14, and L15) is obtained based on each second calibration point.
[0098] Finally, based on the line segment of the second line within the first sub-region, a first sub-locating point is obtained. For example, as shown in FIG8B , the first sub-locating point is the midpoint of the line segment of the second line within the first sub-region. For example, taking the first sub-locating point as the first sub-locating point AP11 and the second line as the second line L11, the first sub-locating point AP11 is the midpoint of the line segment of the second line L11 within the first sub-region TO11.
[0099] Step 402: Acquire a first sub-positioning line based on the coordinate values of the plurality of first sub-positioning points in the second direction.
[0100] The coordinate value of the first sub-positioning line in the second direction is the average of the coordinate values of the multiple first sub-positioning points in the second direction. For example, in the image to be detected P1, the coordinate values of the various points in the first sub-region TO11 in the second direction (X-axis) may vary. By taking the average of the coordinate values of the multiple points in the first sub-region TO11 in the second direction (X-axis), the first sub-positioning line T11 can more accurately locate the first sub-region TO11.
[0101] Exemplarily, as shown in FIG8A , the coordinate value of the first sub-positioning line T11 in the second direction, that is, the coordinate value of the intersection point TA11 of the first sub-positioning line T11 and the X-axis on the X-axis, is the average value of the coordinate values of the three first sub-positioning points (AP11, AP12, and AP13) on the X-axis.
[0102] Exemplarily, as shown in FIG8B , the coordinate value of the first sub-positioning line T11 in the second direction, that is, the coordinate value of the intersection point TA11 of the first sub-positioning line T11 and the X-axis on the X-axis, is the average value of the coordinate values of the five first sub-positioning points (AP11, AP12, AP13, AP14 and AP15) on the X-axis.
[0103] Step 403: Select multiple second sub-location points in the second sub-area.
[0104] It can be understood that the process of step 403 is similar to that of step 401 and will not be repeated here.
[0105] Step 404: Acquire a second sub-positioning line based on the coordinate values of the plurality of second sub-positioning points in the second direction.
[0106] As can be understood, the process of step 404 is similar to that of step 402 and will not be further described here. As shown in FIG9 , through steps 403 and 404, the second sub-positioning line T12 and the coordinate value of the second sub-positioning line T12 in the second direction are obtained, that is, the coordinate value of the intersection point TA12 of the second sub-positioning line T12 and the X-axis on the X-axis.
[0107] Exemplarily, as shown in Figure 10, in the third sub-area TO13, steps 401 and 402 or steps 403 to 404 are repeated to obtain the third sub-positioning line T13, and the coordinate value of the third sub-positioning line T13 in the second direction, that is, the coordinate value of the intersection of the third sub-positioning line T13 and the X-axis TA13 on the X-axis.
[0108] Exemplarily, as shown in Figure 11, in the fourth sub-area TO14, steps 401 and 402 or steps 403 to 404 are repeated to obtain the fourth sub-positioning line T14, the coordinate value of the fourth sub-positioning line T14 in the second direction, that is, the coordinate value of the intersection of the fourth sub-positioning line T14 and the X-axis TA14 on the X-axis.
[0109] Exemplarily, as shown in Figure 12, in the fifth sub-area TO15, steps 401 and 402 or steps 403 to 404 are repeated to obtain the fifth sub-positioning line T15, and the coordinate value of the fifth sub-positioning line T15 in the second direction, that is, the coordinate value of the intersection of the fifth sub-positioning line T15 and the X-axis TA13 on the X-axis.
[0110] Step 105 : Based on the reference line and the positioning line, obtain the distance between the area of the object to be detected and the reference area.
[0111] It can be understood that the reference line is used to represent the position of the reference area RL, and the positioning line is used to represent the position of the area of the object to be detected. Then the distance between the reference line and the positioning line can represent the distance between the reference area RL and the area of the object to be detected.
[0112] The distance between the reference region RL and the region of the object to be detected refers to the distance between the reference region RL and the region of a particular object to be detected. For example, as shown in FIG2 , the distance between the reference region RL and the region of the object to be detected can refer to the distance between the reference region RL and the region of the object to be detected TO1; or the distance between the reference region RL and the region of the object to be detected TO2; or the distance between the reference region RL and the region of the object to be detected TO3.
[0113] In some embodiments, as shown in FIG13 , the implementation method of step 105 may include steps 501 to 503 .
[0114] Step 501: Based on a first sub-positioning line and a reference line, obtain a distance between the first sub-positioning line and the reference line.
[0115] For example, as shown in Figures 4 and 8B, taking the coordinate value of the intersection point TA11 of the first sub-positioning line T11 and the X-axis on the X-axis as x1, and the coordinate value of the intersection point TA1 of the baseline T1 and the X-axis on the X-axis as x0, the distance D11 between the first sub-positioning line T11 and the baseline T1 can be calculated by the formula D11 = |x0-x1|.
[0116] Step 502: Based on the second sub-positioning line and the baseline, obtain the distance between the second sub-positioning line and the baseline.
[0117] For example, as shown in Figures 4 and 9, taking the coordinate value of the intersection point TA12 of the second sub-positioning line T12 and the X-axis on the X-axis as x2, and the coordinate value of the intersection point TA1 of the baseline T1 and the X-axis on the X-axis as x0, the distance D12 between the second sub-positioning line T12 and the baseline T1 can be calculated by the formula D12 = |x0-x2|.
[0118] It can be understood that, as shown in FIG6C , the area of the object to be inspected TO1 also includes a third sub-area TO13, a fourth sub-area TO14, and a fifth sub-area TO15. As shown in FIG10 to FIG12 , by repeating steps 501 or 502, the distance D13 between the third sub-positioning line T13 and the baseline T1, the distance D14 between the fourth sub-positioning line T14 and the baseline T1, and the distance D15 between the fifth sub-positioning line T15 and the baseline T1 can be obtained.
[0119] Step 503: Calculate the distance between the area of the object to be detected and the reference area based on the distance between the first sub-positioning line and the reference line and the distance between the second sub-positioning line and the reference line.
[0120] For example, as shown in FIG6C and FIG9 to FIG12 , taking the distance D1 between the area of the object to be detected TO1 and the reference area RL as an example, the calculation formula of D1 can be:
[0121] It can be understood that the area of the object to be detected may include N sub-areas, where N is an integer greater than or equal to 1. Taking the distance DN between the area of the object to be detected and the reference area as an example, the calculation formula of DN can be: Where D1i is the distance between the i-th sub-region and the reference region, and i is an integer between 1 and N.
[0122] The method provided in the above embodiment divides the area of the object to be detected into multiple sub-areas along a first direction (Y-axis), obtains the distance between each sub-area and the reference area, and then averages the obtained distances between each sub-area and the reference area, with this average value being the distance between the area of the object to be detected and the reference area. This method can reduce the impact of the bias that exists when using a neural network method to obtain the area of the object to be detected. Furthermore, using the above method, the sub-positioning line can more accurately locate the sub-area of the object to be detected, thereby increasing the accuracy of the distance between the area of the object to be detected and the reference area. In addition, this method can achieve automatic measurement, improve measurement efficiency, and thus improve generation efficiency.
[0123] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer (e.g., a distance measuring device), the computer executes the distance measurement method described in any of the above embodiments.
[0124] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes, etc.), optical disks (e.g., CDs (Compact Disks), DVDs (Digital Versatile Disks), etc.), smart cards, and flash memory devices (e.g., EPROMs (Erasable Programmable Read-Only Memory), cards, sticks, or key drives, etc.). The various computer-readable storage media described in the present disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0125] Some embodiments of the present disclosure further provide a computer program product, for example, stored on a non-transitory computer-readable storage medium. The computer program product includes computer program instructions that, when executed on a computer (e.g., a distance measurement device), cause the computer to perform the distance measurement method described in the above embodiments.
[0126] Some embodiments of the present disclosure further provide a computer program. When the computer program is executed on a computer (eg, a distance measurement device), the computer program enables the computer to perform the distance measurement method described in the above embodiments.
[0127] The beneficial effects of the above-mentioned computer-readable storage medium, computer program product, and computer program are the same as the beneficial effects of the distance measurement method described in some of the above-mentioned embodiments, and are not repeated here.
[0128] Some embodiments of the present disclosure further provide a distance measurement device. As shown in FIG14 , distance measurement device 1000 includes an image acquisition device 1001 and an image processing device 1002. Image acquisition device 1001 is coupled to image processing device 1002 and is configured to acquire an image to be detected; the image to be detected includes at least one object to be detected. For example, image acquisition device 1001 may be a camera.
[0129] In some embodiments, at least one area of the object to be detected is located on the same side of the reference area. For example, as shown in FIG2 , the objects to be detected TO1 , TO2 , and TO3 are located on the left side of the reference area RL.
[0130] The image processing device 1002 is configured to: obtain a reference area and an area of the object to be detected based on the image to be detected; obtain a reference line based on the reference area, the reference line being used to locate the reference area; obtain a positioning line based on the area of the object to be detected, the positioning line being used to locate the area of the object to be detected; and obtain a distance between the area of the object to be detected and the reference area based on the reference line and the positioning line.
[0131] In some embodiments, the image processing device 1002 is configured to perform binarization processing on the image to be detected to obtain a reference area.
[0132] In some embodiments, the image processing device 1002 is configured to obtain a region of the object to be detected based on the image to be detected and a neural network algorithm.
[0133] In some embodiments, the reference line is parallel to the first direction, and the image processing device 1002 is configured to: first, select multiple first positioning points in the reference area. Then, based on the coordinate values of the multiple first positioning points in the second direction, obtain the reference line; the second direction is perpendicular to the first direction, and the coordinate value of the reference line in the second direction is the average of the coordinate values of the multiple first positioning points in the second direction.
[0134] In some embodiments, the image processing device 1002 is configured to: first, select multiple first calibration points within the outline of the reference region; the multiple first calibration points are located at the top, bottom, and at least one intermediate position between the top and bottom of the outline of the reference region. Then, based on each first calibration point, obtain a first straight line parallel to the second direction. Finally, based on the line segment of the first straight line within the reference region, obtain a first positioning point; the first positioning point is the midpoint of the line segment of the first straight line within the reference region.
[0135] In some embodiments, the positioning line is parallel to the first direction, the area of the object to be detected includes a first sub-area and a second sub-area, and the positioning line includes a first sub-positioning line and a second sub-positioning line, the first sub-positioning line is used to locate the first sub-area, and the second sub-positioning line is used to locate the second sub-area; the image processing device 1002 is configured to: first, select multiple first sub-positioning points in the first sub-area. Secondly, based on the coordinate values of the multiple first sub-positioning points in the second direction, obtain a first sub-positioning line; the coordinate value of the first sub-positioning line in the second direction is the average of the coordinate values of the multiple first sub-positioning points in the second direction. Then, select multiple second sub-positioning points in the second sub-area. Finally, based on the coordinate values of the multiple second sub-positioning points in the second direction, obtain a second sub-positioning line; the coordinate value of the second sub-positioning line in the second direction is the average of the coordinate values of the multiple second sub-positioning points in the second direction.
[0136] In some embodiments, the image processing device 1002 is configured to: first, based on the first sub-positioning line and the baseline, obtain the distance between the first sub-positioning line and the baseline. Then, based on the second sub-positioning line and the baseline, obtain the distance between the second sub-positioning line and the baseline. Finally, based on the distance between the first sub-positioning line and the baseline and the distance between the second sub-positioning line and the baseline, calculate the distance between the region of the object to be detected and the baseline region.
[0137] The foregoing description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any modifications or substitutions conceived by a person skilled in the art within the technical scope disclosed herein are intended to be covered by the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.
Claims
1. A distance measurement method, comprising: Acquire an image to be detected; the image to be detected includes at least one object to be detected; Acquire a reference area and an area of the object to be detected based on the image to be detected; Acquire a reference line based on the reference area, wherein the reference line is used to locate the reference area; Acquire a positioning line based on the area of the object to be detected, wherein the positioning line is used to locate the area of the object to be detected; Based on the reference line and the positioning line, a distance between the area of the object to be detected and the reference area is obtained.
2. The distance measurement method according to claim 1, wherein: The reference line is parallel to the first direction; and obtaining the reference line based on the reference area includes: Selecting a plurality of first positioning points in the reference area; The reference line is obtained based on the coordinate values of the multiple first positioning points in the second direction; the second direction is perpendicular to the first direction, and the coordinate value of the reference line in the second direction is the average value of the coordinate values of the multiple first positioning points in the second direction.
3. The distance measurement method according to claim 2, wherein: The selecting a plurality of first positioning points in the reference area includes: Selecting a plurality of first calibration points on the outline of the reference area; the plurality of first calibration points are respectively located at the top end, the bottom end, and at least one intermediate position between the top end and the bottom end of the outline of the reference area; Acquire a first straight line parallel to the second direction based on each of the first calibration points; The first positioning point is acquired based on a line segment of the first straight line within the reference area; the first positioning point is a midpoint of the line segment of the first straight line within the reference area.
4. The distance measurement method according to any one of claims 1 to 3, wherein: The area of the object to be detected includes at least two sub-areas.
5. The distance measurement method according to any one of claims 1 to 4, wherein: The positioning line is parallel to the first direction, the area of the object to be detected includes a first sub-area and a second sub-area, the positioning line includes a first sub-positioning line and a second sub-positioning line, the first sub-positioning line is used to position the first sub-area, and the second sub-positioning line is used to position the second sub-area; The acquiring of a positioning line based on the area of the object to be detected includes: Selecting a plurality of first sub-location points in the first sub-area; acquiring a first sub-positioning line based on the coordinate values of the plurality of first sub-positioning points in the second direction; wherein the coordinate value of the first sub-positioning line in the second direction is an average value of the coordinate values of the plurality of first sub-positioning points in the second direction; Selecting a plurality of second sub-locating points in the second sub-area; A second sub-positioning line is acquired based on the coordinate values of the plurality of second sub-positioning points in the second direction; the coordinate value of the second sub-positioning line in the second direction is an average value of the coordinate values of the plurality of second sub-positioning points in the second direction.
6. The distance measurement method according to claim 5, wherein: The acquiring the distance between the area to be detected and the reference area based on the reference line and the positioning line includes: Based on the first sub-positioning line and the reference line, obtaining a distance between the first sub-positioning line and the reference line; Based on the second sub-positioning line and the baseline, obtaining a distance between the second sub-positioning line and the baseline; The distance between the area of the object to be detected and the reference area is calculated based on the distance between the first sub-positioning line and the reference line and the distance between the second sub-positioning line and the reference line.
7. The distance measurement method according to any one of claims 1 to 3, wherein: The positioning line is parallel to the first direction; The acquiring of a positioning line based on the area of the object to be detected includes: Selecting a plurality of second positioning points in the area of the object to be detected; The positioning line is obtained based on the coordinate values of the multiple second positioning points in the second direction; the second direction is perpendicular to the first direction, and the coordinate value of the positioning line in the second direction is the average value of the coordinate values of the multiple second positioning points in the second direction.
8. The distance measurement method according to any one of claims 1 to 7, wherein: The obtaining of a reference area based on the image to be detected includes: Binarization is performed on the image to be detected to obtain the reference area.
9. The distance measurement method according to any one of claims 1 to 8, wherein: Acquiring an area of the object to be detected based on the image to be detected includes: Based on the image to be detected and the neural network algorithm, the area of the object to be detected is obtained.
10. The distance measurement method according to any one of claims 1 to 9, wherein: The area of the at least one object to be detected is located on the same side of the reference area.
11. A distance measuring device, comprising: The image acquisition device is configured to: acquire an image to be detected; The image to be detected includes at least one object to be detected; and An image processing device, coupled to the image acquisition device, and configured to: acquire a reference area and an area of the object to be detected based on the image to be detected; acquire a reference line based on the reference area, the reference line being used to locate the reference area; Acquire a positioning line based on the area of the object to be detected, wherein the positioning line is used to locate the area of the object to be detected; Based on the reference line and the positioning line, a distance between the area of the object to be detected and the reference area is obtained.
12. The distance measuring device according to claim 11, wherein: The reference line is parallel to the first direction, and the image processing device is configured to: Selecting a plurality of first positioning points in the reference area; The reference line is obtained based on the coordinate values of the multiple first positioning points in the second direction; the second direction is perpendicular to the first direction, and the coordinate value of the reference line in the second direction is the average value of the coordinate values of the multiple first positioning points in the second direction.
13. The distance measuring device according to claim 12, wherein: The image processing device is configured to: Selecting a plurality of first calibration points on the outline of the reference area; the plurality of first calibration points are respectively located at the top end, the bottom end, and at least one intermediate position between the top end and the bottom end of the outline of the reference area; Acquire a first straight line parallel to the second direction based on each of the first calibration points; Acquire the first positioning point based on a line segment of the first straight line within the reference area; The first positioning point is the midpoint of the line segment of the first straight line within the reference area.
14. The distance measuring device according to any one of claims 11 to 13, wherein: The area of the object to be detected includes at least two sub-areas.
15. The distance measuring device according to any one of claims 11 to 14, wherein: The positioning line is parallel to the first direction, the area of the object to be detected includes a first sub-area and a second sub-area, the positioning line includes a first sub-positioning line and a second sub-positioning line, the first sub-positioning line is used to position the first sub-area, and the second sub-positioning line is used to position the second sub-area; the image processing device is configured to: Selecting a plurality of first sub-location points in the first sub-area; Based on the coordinate values of the multiple first sub-positioning points in the second direction, a first sub-positioning line is obtained; the coordinate value of the first sub-positioning line in the second direction is the average value of the coordinate values of the multiple first sub-positioning points in the second direction; and multiple second sub-positioning points are selected in the second sub-area; A second sub-positioning line is acquired based on the coordinate values of the plurality of second sub-positioning points in the second direction; the coordinate value of the second sub-positioning line in the second direction is an average value of the coordinate values of the plurality of second sub-positioning points in the second direction.
16. The distance measuring device according to claim 15, wherein: The image processing device is configured to: Based on the first sub-positioning line and the reference line, obtaining a distance between the first sub-positioning line and the reference line; Based on the distance between the first sub-positioning line and the reference line, the distance between the area of the object to be detected and the reference area is calculated.
17. The distance measuring device according to any one of claims 11 to 13, wherein: The positioning line is parallel to the first direction, and the image processing device is configured to: Selecting a plurality of second positioning points in the area of the object to be detected; The positioning line is obtained based on the coordinate values of the multiple second positioning points in the second direction; the second direction is perpendicular to the first direction, and the coordinate value of the positioning line in the second direction is the average value of the coordinate values of the multiple first positioning points in the second direction.
18. The distance measuring device according to any one of claims 11 to 17, wherein: The image processing device is configured to: Performing binarization processing on the image to be detected to obtain the reference area; Based on the image to be detected and the neural network algorithm, the area of the object to be detected is obtained.
19. A non-transitory readable storage medium having computer program instructions stored thereon, wherein when the computer program instructions are executed on a computer, the computer is caused to execute the distance measurement method according to any one of claims 1 to 10.
20. A computer program product, comprising computer program instructions, wherein when the computer program instructions are executed on a computer, the computer program instructions cause the computer to perform the distance measurement method according to any one of claims 1 to 10.