Region size determination method, system, device, and storage medium

By utilizing image processing and optical imaging principles, a mapping relationship between two-dimensional images and three-dimensional space is established to calculate the actual dimensions of markers in the photovoltaic power station area. This solves the problem of low efficiency in measuring the dimensions of photovoltaic power station areas and achieves efficient and accurate measurement.

CN116385420BActive Publication Date: 2026-03-27HEFEI SUNGROW RENEWABLE ENERGY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Measuring the size of photovoltaic power plant areas relies on manual surveying, which is inefficient.

Method used

Image processing techniques are used to determine the imaging size and outline of the marker and its positional relationship with the horizon line. Based on the principle of optical imaging, a mapping relationship from two-dimensional image to three-dimensional space is established, and the actual size of the marker is calculated using Euclidean distance and perspective algorithms.

Benefits of technology

This improves the efficiency and accuracy of measuring the area dimensions of photovoltaic power plants, reducing the need for manual measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116385420B_ABST
    Figure CN116385420B_ABST
Patent Text Reader

Abstract

The application discloses a region size determination method, system, device and storage medium, and the method comprises the following steps: determining the imaging size of a labeled object in a to-be-recognized region according to an acquired image; determining the position relationship between the contour of the labeled object and the visual horizon in the image; and determining the actual size of the labeled object based on the position relationship and the imaging size, so as to solve the problem of low photovoltaic power station region size measurement efficiency and improve the measurement efficiency of the photovoltaic power station region size.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of object size measurement, and in particular to a method, system and device for determining the size of a region and a storage medium. BACKGROUND

[0002] A photovoltaic power station refers to a photovoltaic power generation system connected to a power grid and delivering power to the power grid, which utilizes solar energy and adopts special materials such as a crystalline silicon panel and an inverter to form a power generation system. At present, photovoltaic power stations are favored by people due to their low air pollution, and the construction of a photovoltaic power station cannot be implemented without the measurement work in the early stage of power station construction. In related technologies, in the measurement of the size of a power station region, a worker mainly measures the size of the power station region on site, and the surveying efficiency is low. SUMMARY

[0003] Embodiments of the present application provide a method, system and device for determining the size of a region and a storage medium, which aims to improve the measurement efficiency of the size of a power station region.

[0004] The method for determining the size of a region provided by the embodiments of the present application comprises the following steps.

[0005] Determining the imaging size of a marker in a to-be-recognized region according to an acquired image;

[0006] Determining the positional relationship between the contour of the marker and the horizon in the image;

[0007] Determining the actual size of the marker based on the positional relationship and the imaging size.

[0008] Optionally, the step of determining the positional relationship between the contour of the marker and the horizon in the image comprises the following steps.

[0009] Determining the included angle between the contour of the marker and a parallel line of the horizon in the image;

[0010] Determining the positional relationship between the contour of the marker and the horizon according to the included angle.

[0011] Optionally, the step of determining the actual size of the marker based on the positional relationship and the imaging size comprises the following steps.

[0012] Determining the projection angle of a camera for shooting the image relative to the marker according to the positional relationship between the contour of the marker and the horizon;

[0013] Determining the actual size of the marker according to the projection angle and the imaging size of the marker.

[0014] Optionally, the step of determining the projection angle of the camera relative to the marker according to the positional relationship between the contour of the marker and the horizon line comprises:

[0015] determining the pitch angle and the yaw angle of the camera relative to the marker according to the positional relationship between the contour of the marker and the horizon line;

[0016] determining the projection angle according to the pitch angle, the yaw angle and a preset angle relationship, the preset angle relationship being a mapping relationship among the pitch angle, the yaw angle and the projection angle.

[0017] Optionally, the step of determining the actual size of the marker according to the projection angle and the imaging size of the marker comprises:

[0018] determining the spatial coordinate information of the marker according to the projection angle and the imaging size of the marker;

[0019] determining the actual size of the marker according to the spatial coordinate information and a preset proportion coefficient.

[0020] Optionally, the method for determining the region size further comprises:

[0021] determining the imaging size of a reference object in the region to be recognized according to the image;

[0022] obtaining the actual size of the reference object;

[0023] determining the preset proportion coefficient according to the imaging size of the reference object and the actual size of the reference object.

[0024] Optionally, the step of determining the actual size of the marker according to the spatial coordinate information and a preset proportion coefficient comprises:

[0025] determining the Euclidean distance between each spatial coordinate point according to the spatial coordinate information and the preset proportion coefficient;

[0026] determining the actual size of the marker according to the Euclidean distance.

[0027] Optionally, the preset proportion coefficient comprises a first preset proportion coefficient, a second preset proportion coefficient and a third preset proportion coefficient, the spatial coordinate information comprises a horizontal axis coordinate, a vertical axis coordinate and a vertical axis coordinate, and the step of determining the Euclidean distance between each spatial coordinate point according to the spatial coordinate information and the preset proportion coefficient comprises:

[0028] obtaining the horizontal axis coordinate, the vertical axis coordinate and the vertical axis coordinate corresponding to each spatial coordinate point;

[0029] acquire a first preset proportion coefficient corresponding to the horizontal axis coordinate, a second preset proportion coefficient corresponding to the vertical axis coordinate, and a third preset proportion coefficient corresponding to the vertical axis coordinate;

[0030] determine the Euclidean distance between each of the spatial coordinate points according to the horizontal axis coordinate, the vertical axis coordinate, the vertical axis coordinate, the first preset proportion coefficient, the second preset proportion coefficient, and the third preset proportion coefficient corresponding to each of the spatial coordinate points.

[0031] Optionally, the step of determining the actual size of the marked object based on the position relationship and the imaging size comprises:

[0032] determining the actual size of the marked object based on the perspective algorithm, the position relationship, and the imaging size.

[0033] Optionally, the step of determining the imaging size of the marked object in the to-be-identified region according to the acquired image comprises:

[0034] performing target detection processing and edge detection processing on the acquired image to obtain contour information of the marked object;

[0035] determining the imaging size of the marked object in the to-be-identified region according to the contour information.

[0036] In addition, to achieve the above object, the present application further provides a region size determination system, which comprises:

[0037] an imaging size determination module, configured to determine the imaging size of the marked object in the to-be-identified region according to an acquired image;

[0038] a position relationship determination module, configured to determine the position relationship between the contour of the marked object and the visual horizon in the image;

[0039] an actual size determination module, configured to determine the actual size of the marked object based on the position relationship and the imaging size.

[0040] In addition, to achieve the above object, the present application further provides a region size determination device, which comprises a memory, a processor, and a region size determination program stored in the memory and executable on the processor, and the region size determination program implements the steps of the above-mentioned region size determination method when executed by the processor.

[0041] In addition, to achieve the above object, the present application further provides a computer readable storage medium, which stores a region size determination program, and the region size determination program implements the steps of the above-mentioned region size determination method when executed by a processor.

[0042] The technical scheme of the region size determination method, system, device and storage medium provided in the embodiments of the present application can determine the imaging size of the labeled object in the to-be-identified region according to the collected image, and then determine the position relationship between the contour of the labeled object and the horizon in the image, and determine the actual size of the labeled object based on the position relationship and the imaging size. Compared with the manual measurement of the size of the labeled object in the to-be-identified region in the related art, the present application can obtain the actual size information of the labeled object in the to-be-identified region by performing size analysis on the collected image, thereby improving the measurement efficiency of the size of the labeled object in the to-be-identified region. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 The flowchart of the first embodiment of the region size determination method of the present application is shown in the figure.

[0044] Figure 2 The flowchart of the second embodiment of the region size determination method of the present application is shown in the figure.

[0045] Figure 3 The schematic diagram of the Gaussian imaging of the convex lens of the present application is shown in the figure.

[0046] Figure 4 The schematic diagram of the rectangular imaging on the plane of the present application is shown in the figure.

[0047] Figure 5 The schematic diagram of the Euclidean distance ranging of the present application is shown in the figure.

[0048] Figure 6 The schematic diagram of the perspective principle of the present application is shown in the figure.

[0049] Figure 7 The functional module diagram of the region size determination system of the present application is shown in the figure.

[0050] Figure 8 The structural schematic diagram of the region size determination device of the present application is shown in the figure.

[0051] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. The above-mentioned drawings are only one embodiment diagram, and not the whole of the invention. DETAILED DESCRIPTION

[0052] At present, the construction of photovoltaic power station cannot be separated from the survey work in the early stage of power station construction. In the measurement process of the size of the photovoltaic power station area, the size of the power station area is mainly measured by manual on-site measurement, and the survey efficiency is low. In order to solve the problem of low survey efficiency of the size of the power station area, the present application provides a method for determining the size of the area. Since the imaging size of the marker in the to-be-recognized area can be determined according to the collected image, and then the positional relationship between the contour of the marker and the horizon in the image is determined, the actual size of the marker is determined based on the positional relationship and the imaging size. Compared with the manual measurement of the size of the marker in the to-be-recognized area in the related art, the present application can analyze the size of the collected image to obtain the actual size information of the marker in the to-be-recognized area, thereby improving the measurement efficiency of the size of the marker in the to-be-recognized area.

[0053] In order to better understand the above technical solutions, the exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0054] First embodiment.

[0055] As Figure 1 shown, in the first embodiment of the present application, the method for determining the size of the area of the present application comprises the following steps:

[0056] Step S110, determining the imaging size of the marker in the to-be-recognized area according to the collected image.

[0057] Optionally, the image can be collected by a UAV, and the UAV can be controlled to collect images from different shooting angles. The to-be-recognized area includes but is not limited to the to-be-installed area of the photovoltaic power station, and can also be other areas. The present application takes the to-be-installed area of the photovoltaic power station as an example. The present application mainly identifies the collected image to obtain the actual size of the marker in the to-be-recognized area. There can be one or more markers in the to-be-recognized area, and the marker can be a water tower, a telegraph pole, etc.

[0058] Optionally, after acquiring the image collected by the unmanned aerial vehicle, target detection processing and edge detection processing are performed on the image to obtain contour information of the marker, and then the imaging size of the marker in the to-be-identified region is determined according to the contour information. Specifically, the target detection technology and the edge extraction technology are used to perform geometric abstraction and characterization on the contour of the two-dimensional image. The target detection technology is used to extract the position and other parameter information of a specific target in an image or video, facilitating regional processing of the image or specific target tracking. The core of the target detection technology is how to express the features of the target. There are usually two ways, traditional manual labeling or using machine learning combined with neural networks to do intelligent classifiers. Usually, the histogram of oriented gradients (HOG) is combined with the support vector machine (SVM) classifier. The gradient formula of the HOG core is as follows:

[0059]

[0060] Where gradf(x, y, z) represents the gradient of the three-element function f. For a two-dimensional image, each element in the gradient matrix represents the image gradient information at the corresponding position to express the feature parameters of the image.

[0061] The edge extraction technology is used to identify points with obvious brightness changes in the image. The edge detection technology usually relies on the rate of change of some variables, such as: discontinuity in depth, discontinuity in surface direction, discontinuity in brightness, etc. After edge extraction, the contour information of the image can be obtained, which is used for subsequent boundary tracking and other operations. The edge extraction technology is mainly used to obtain the contour information of the marker in the to-be-identified region of the image, such as the geometric contour information of the roof building and the obstacle in the household power station.

[0062] After combining the target detection technology and the edge extraction technology, the geometric features of some markers in the image can be recognized and the contour can be simplified to obtain the contour information of the marker, so as to achieve efficient and accurate target position tracking.

[0063] Optionally, in order to improve the measurement accuracy of the imaging size, the images collected by the unmanned aerial vehicle from different shooting angles can be spliced, and the imaging size of the marker in the to-be-identified region is determined according to the spliced image. Optionally, the imaging size of the marker in the to-be-identified region can be determined according to the spliced image, which can be: performing target detection processing and edge detection processing on the spliced image to obtain contour information of the marker, and determining the imaging size of the marker in the to-be-identified region according to the contour information.

[0064] Optionally, since the resolution of the stitched image is high, the stitched image can be segmented into multiple sub-images, and the imaging size of the marker in the to-be-identified region is determined according to each sub-image. Optionally, the imaging size of the marker in the to-be-identified region can be determined according to each sub-image, that is, the same target detection processing and edge detection processing are performed on each sub-image to obtain the imaging size of the marker in the corresponding to-be-identified region in each sub-image, and the imaging sizes of the markers in the to-be-identified regions in each sub-image are fused to obtain the final imaging size of the marker in the to-be-identified region. Since the stitched image can be segmented for post-processing, the resolution of the sub-image formed after segmentation is reduced, which not only reduces the performance requirement of the processor, but also improves the measurement accuracy of the imaging size.

[0065] Optionally, the image can be collected by a UAV, can be photographed by a terminal device such as a mobile phone, or can be collected historically and stored in a database. The image can also be obtained by sharing after being collected by other devices. The image can be obtained in real time during measurement or can be obtained at a fixed time. The image can be one or even multiple images. For example, when the image is multiple images, the imaging size of the marker in the to-be-identified region can be determined after the images are processed and compared respectively, so that the measured imaging size of the marker is more accurate. Through the diversification of the image acquisition approach, convenience is provided for the determination of the imaging size.

[0066] Optionally, the imaging size is composed of multiple imaging position points, each imaging position point has a corresponding two-dimensional coordinate, the Euclidean distance of each imaging position point can be calculated according to the two-dimensional coordinate, and then the imaging size of the marker in the to-be-identified region is determined according to the Euclidean distance.

[0067] In step S120, a positional relationship between the contour of the marker and the horizon in the image is determined.

[0068] Optionally, the horizon is the line of sight, which refers to the line of sight of a person watching the image or the line of sight of the camera of the UAV. When the shooting angle or the shooting height of the UAV changes, the corresponding horizon position also changes, and the positional relationship between the contour of the marker and the horizon also changes.

[0069] In step S130, the actual size of the marker is determined based on the positional relationship and the imaging size.

[0070] Optionally, after the positional relationship and the imaging size are determined, the actual size of the marker can be determined based on a mapping relationship from a two-dimensional image to a three-dimensional space, and the mapping relationship is shown in formula (6) in the second embodiment, which will not be described herein again.

[0071] Optionally, the imaging size of the marker in the to-be-identified region is determined according to the collected image, and a positional relationship between the contour of the marker and the horizon in the image is determined. After the positional relationship is determined, a projection angle of the camera for shooting the image relative to the marker is determined according to the positional relationship, and the actual size of the marker is determined according to the projection angle, the imaging size of the marker, and a mapping relationship from a two-dimensional image to a three-dimensional space.

[0072] According to the technical solution, the imaging size of the marker in the to-be-identified region is determined according to the collected image, and then the positional relationship between the contour of the marker and the horizon in the image is determined. The actual size of the marker is determined based on the positional relationship and the imaging size. Compared with the manual measurement of the size of the marker in the to-be-identified region in the related art, the actual size information of the marker in the to-be-identified region is obtained by analyzing the size of the image, and the measurement efficiency of the size of the marker in the to-be-identified region is improved.

[0073] The second embodiment.

[0074] Reference Figure 2 based on the first embodiment. In the second embodiment of the present application, the method for determining the size of the region includes the following steps:

[0075] In step S110, the imaging size of the marker in the to-be-identified region is determined according to the collected image.

[0076] In step S121, an included angle between the contour of the marker and a parallel line of the horizon in the image is determined.

[0077] In step S122, the positional relationship between the contour of the marker and the horizon is determined according to the included angle.

[0078] Optionally, the included angle between the contour of the marker and the parallel line of the horizon in the image is determined, and the positional relationship between the contour of the marker and the horizon is determined according to the included angle. The included angle is α1 and α2 in the second embodiment, and the included angle can be directly identified from the image.

[0079] In step S131, the projection angle of the camera for shooting the image relative to the marker is determined according to the positional relationship between the contour of the marker and the horizon.

[0080] Optionally, the mapping relationship from a two-dimensional image to a three-dimensional image of the marker is established based on the principle of optical imaging. Then, after the positional relationship between the contour of the marker and the horizon and the imaging size are determined, the actual size of the marker is determined based on the mapping relationship. The process of determining the actual size of the marker uses the Gaussian imaging principle. The Gaussian imaging principle is introduced as follows:

[0081] Referring to Figure 3 , Figure 3 The left side of the real object projection refers to the projection of the real object in the direction of the camera lens pointing direction, that is, the real object projection. The real object projection size is obtained by Figure 3 The following similarity relationship is obtained:

[0082]

[0083] There is a linear mapping relationship between the real object projection size and the real object size, that is, the actual size of the marker in the present application. If the angle between the inclined direction of the real object and the normal plane of the camera lens pointing direction is the projection angle w, the following mapping relationship is obtained:

[0084] Real object size cos(w) = real object projection size (2)

[0085] Combining formulas (1) and (2), the relationship between the real object size and the imaging size is obtained:

[0086]

[0087] After obtaining the projection angle w and the imaging size, the real object size, that is, the actual size of the marker, can be obtained based on formula (3). The imaging size can be obtained by two-dimensional image recognition. Since the projection angle w of any object cannot be directly obtained in actual situations, the key is to solve the projection angle, and after obtaining the projection angle, the actual size of the marker can be obtained.

[0088] Since the to-be-recognized area of the photovoltaic power station (such as a household roof), a rectangle is more common than a circle, a square, a diamond, etc., and has a relatively high usage rate. In addition, a rectangle has very good full coverage extension for a network, and is more general than a square. Therefore, the to-be-recognized area of the photovoltaic power station is simulated as a rectangle in the present application, and the actual size of the marker in the present application is solved by using the rectangular imaging principle. Referring to Figure 4 , Figure 4 is a schematic diagram of rectangular imaging on the plane of the present application. In the imaging, that is, the two-dimensional image, the positional relationship between the contour of the marker and the horizon can be determined by the included angle between the contour of the marker and the parallel line of the horizon, that is, α1 and α2. Figure 4 In the present application, the included angle between the contour of the marker and the parallel line of the horizon, that is, α1 and α2, can be identified in the two-dimensional image.

[0089] Referring to Figure 4, angle β is the angle between the left side close to the lens and the horizon L in the actual space, the length of the left side close to the lens is D1, the length of the right side is D2, and θ is the pitch angle of the shooting line of sight P. In imaging, a parallel line of the horizon is drawn through point C (the top point of the rectangle closest to the lens), and the other top points of the left and right adjacent sides of point C are recorded as A and E respectively. Vertical lines are drawn from A and E to the parallel line of the horizon, and the foot points are B and D respectively. Define angle β as angle α1 after imaging, that is, the angle between AC and BC, and similarly, define the angle between CD and CE as α2. According to spatial analytic geometry, it is known that:

[0090]

[0091] To obtain D1 and D2, it is crucial to first determine the projection angles ω1 and ω2.

[0092] Optionally, the pitch angle and the deflection angle of the camera relative to the marker are determined according to the included angle; and the projection angle is determined according to the pitch angle, the deflection angle and a preset angle relationship, the preset angle relationship being a mapping relationship between the pitch angle, the deflection angle and the projection angle. Specifically, the following method is adopted:

[0093] (1) Since tan α1 = AB / BC and tan α2 = DE / CD, in actual application, α1, α2 > 0, d >> max(D1, D2), and |D1-D2| / min(D1, D2) < ε, ε being a threshold constant. That is, it is ensured that the object distance is much larger than the size of the rectangle, and the difference between the lengths of the two sides of the rectangle is not too large, so that:

[0094]

[0095] Because the included angles α1 and α2 can be directly measured in imaging, formula (4) provides a method for solving the pitch angle θ and the deflection angle β. According to formula (4) and the included angles α1 and α2, the pitch angle θ and the deflection angle β of the camera of the unmanned aerial vehicle relative to the marker can be determined.

[0096] (2) After the pitch angle θ and the deflection angle β are determined according to the above formula (4), the projection angle is determined according to the pitch angle, the deflection angle and a preset angle relationship, the preset angle relationship being a mapping relationship between the pitch angle, the deflection angle and the projection angle. The preset angle relationship is shown in the following formula (5):

[0097]

[0098] Step S132, determining the actual size of the marker according to the projection angle and the imaging size of the marker.

[0099] Optionally, the following formula (6) is used to obtain the mapping relationship of the two-dimensional image to the three-dimensional space:

[0100]

[0101] wherein ω1 and ω2 are the projection angles of the corresponding edges of D1 and D2 respectively, AC and CE represent the imaging size, and D1 and D2 are the actual size of the marker.

[0102] Optionally, the spatial coordinate information of the marker is determined according to the projection angle and the imaging size of the marker, and the actual size of the marker is determined according to the spatial coordinate information and a preset scale factor. The spatial coordinate information is used to determine the actual size of the marker. In a two-dimensional image, if the actual size of any object in the image cannot be obtained or estimated, the scale of the pixel distance on the two-dimensional image to the actual distance in the three-dimensional space cannot be determined, that is, the actual size of the marker in the to-be-identified region cannot be obtained. Generally, the camera can obtain the preset scale factor through multi-view image shooting or multi-view vision lens, but when only one planar image can be referred to, a reference standard designed in advance can be used, or the original information of the image can be used to find a standard reference object and give the actual size of the reference object.

[0103] Optionally, the imaging size of the reference object in the to-be-identified region is determined according to the image, the actual size of the reference object is obtained, and the preset scale factor is determined according to the imaging size of the reference object and the actual size of the reference object. The actual size of the marker is determined based on the determined preset scale factor, projection angle and imaging size of the marker. The actual size of the reference object can be directly obtained, and the imaging size of the reference object can be obtained through image recognition. Optionally, the ratio of the imaging size of the reference object to the actual size of the reference object is determined as the preset scale factor, and the ratio is used to determine the scale relationship of the two-dimensional image to the three-dimensional space, so that the calculated actual size is more accurate. For example, the diameter of the water tower on the roof to be identified is usually 0.8m, 0.85m, 0.98m, 1.05m, 1.1m, 1.23m, 1.36m, 1.7m, etc. After the standard reference object is obtained, the actual size of each position point corresponding to the grid on the network can be obtained through the actual size of the standard reference object combined with the perspective projection transformation, that is, the scale factor is confirmed.

[0104] Optionally, the Euclidean distance between each spatial coordinate point can be determined according to the spatial coordinate information and a preset scale factor, and the actual size of the labeled object can be determined according to the Euclidean distance. The spatial coordinate information includes a plurality of spatial coordinate points, and each spatial coordinate point includes a horizontal axis coordinate, a vertical axis coordinate, and a vertical axis coordinate. The horizontal axis coordinate, the vertical axis coordinate, and the vertical axis coordinate each have a corresponding preset scale factor. The preset scale factor of the horizontal axis coordinate is defined as a first preset scale factor, the preset scale factor of the vertical axis coordinate is defined as a second preset scale factor, and the preset scale factor of the vertical axis coordinate is defined as a third preset scale factor. The Euclidean distance between each spatial coordinate point is determined according to the horizontal axis coordinate, the vertical axis coordinate, the vertical axis coordinate, the first preset scale factor, the second preset scale factor, and the third preset scale factor corresponding to each spatial coordinate point. For example, assuming that there are two coordinate points A11(x1, y1, z1) and B11(x2, y2, z2), then the Euclidean distance between A11 and B11 is calculated according to A11(x1, y1, z1) and B11(x2, y2, z2) as follows:

[0105]

[0106] wherein k1 is the first preset scale factor, k2 is the second preset scale factor, and k3 is the third preset scale factor. Δx represents the coordinate difference between the horizontal axis coordinate of A11 and the horizontal axis coordinate of B11, Δy represents the coordinate difference between the vertical axis coordinate of A11 and the vertical axis coordinate of B11, and Δz represents the coordinate difference between the vertical axis coordinate of A11 and the vertical axis coordinate of B11. k1, k2, and k3 are the scale multiples of the distance L in three dimensions relative to the length of a single grid edge, which can be read from the network of points constructed from the two-dimensional image.

[0107] Similarly, two-dimensional coordinate information of the labeled object can be obtained, and the imaging size of the labeled object can be determined according to the Euclidean distance between each two-dimensional coordinate point. The two-dimensional coordinate information includes a plurality of two-dimensional coordinate points. For example, referring to Figure 5 , assuming that there are two-dimensional coordinate points A1(x1, y1) and B1(x2, y2). Then the Euclidean distance between A1 and B1 is calculated according to two-dimensional coordinate points A1(x1, y1) and B1(x2, y2) as follows:

[0108]

[0109] wherein k1 is the first preset scale factor, k2 is the second preset scale factor, Δx represents the coordinate difference between the horizontal axis coordinate of A1 and the horizontal axis coordinate of B1, and Δy represents the coordinate difference between the vertical axis coordinate of A1 and the vertical axis coordinate of B1.

[0110] Compared with the actual size of the marking object measured by manual measurement in the related art, the embodiment according to the technical solution, first establishes a mapping relationship of the marking object from a two-dimensional image to a three-dimensional space based on an optical imaging principle, then selects a standard reference object to determine a scale factor of direct image mapping to an actual space, and uses a Euclidean distance formula to calculate the size of the marking object. In subsequent use, the actual size of the marking object can be quickly and accurately determined based on the mapping relationship and the scale factor, and the measurement efficiency and accuracy of the marking object in the to-be-identified region are improved.

[0111] Third embodiment.

[0112] Based on the first embodiment and the second embodiment, in the third embodiment of the present application, in the process of establishing the mapping relationship of the two-dimensional image to the three-dimensional space, the actual size of the marking object is determined based on the perspective algorithm, the position relationship and the imaging size. The perspective principle is introduced to solve the influence of the object distance d and the image distance v as unknown vectors on the calculation, and the accuracy of the two-dimensional image to three-dimensional mapping is improved.

[0113] In order to avoid the influence of the object distance d and the image distance v as unknown vectors on the calculation in formula (6), the perspective principle is introduced to better extend the transformation of a rectangular block given by formula (6) to the whole plane network. The perspective principle reveals the direct dependence of the rectangular block on the view parallel on the plane. From the perspective principle, the mapping relationship of the two-dimensional image to the three-dimensional space can be obtained. Figure 6 It can be found that when there is a reference rectangle, two pairs of parallel edges of the rectangle are respectively extended. If the two pairs of edges have non-zero projection angles during imaging, they will converge to a point on the imaging image, which is called the vanishing point D Loss of the field of view. The straight line connecting the vanishing point of the field of view is called the view parallel L. This process is reversible. If the vanishing point of the field of view is known, a straight line is drawn from the vanishing point of the field of view to the straight line connecting another vanishing point of the field of view, and we can construct an extended rectangular plane as in the brown area of Figure 6 .

[0114] According to the generality of the rectangle in formula (5), the reference rectangle can be set as the rectangle in formula (5), that is, the left edge length of the reference rectangle is D1 and the right edge length is D2. The sequence of the left edge length is denoted as {L n}={L0,L1,...}, and the sequence of the right edge length is denoted as {R n}={R0,R1,...}, as shown in Figure 6 . In this way, we only need to study the recursive relationship of the two sequences or series, that is, we can find the corresponding position of each rectangular grid on the image through the reference rectangle, so as to complete the network construction. Combined with Figure 4 , Figure 6 and formula (3), we can obtain:

[0115]

[0116] Formula (7) uses the relationship between the shooting height h and d: dsinθ=h

[0117] β Ln ,β Rn ,θ Ln ,θ Rn respectively represent the deflection angle and the pitch angle corresponding to L n and R n , and β L0 =β R0 , θ L0 =θ R0 , the recursive relationship of {Ln} and {Rn} can be obtained from the formula:

[0118]

[0119] The recursive formula of the extension of the entire plane network is given by the combination of formula (4) and formula (8), and it can be proved that the sequence {Ln} and {Rn} converges to 0 after a finite number of iterations, that is, Therefore, the influence of the object distance d and the image distance v as unknown quantities on engineering implementation can be successfully avoided.

[0120] The embodiment of the application provides an embodiment of a region size determination method, and it should be noted that although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that shown.

[0121] As shown in Figure 7 , the application provides a region size determination system, which comprises an imaging size determination module 10, a position relationship determination module 20 and an actual size determination module 30.

[0122] The imaging size determination module 10 is used to determine the imaging size of a marker in a to-be-recognized region according to an acquired image.

[0123] Optionally, the imaging size determination module 10 is further used for target detection processing and edge detection processing on the image to obtain contour information of the marker; and the imaging size of the marker in the to-be-recognized region is determined according to the contour information.

[0124] The position relationship determination module 20 is used to determine the position relationship between the contour of the marker and the visual horizon in the image.

[0125] Optionally, the position relationship determination module 20 is further used to determine the included angle between the contour of the marker and the parallel line of the visual horizon in the image; and the position relationship between the contour of the marker and the visual horizon is determined according to the included angle.

[0126] The actual size determining module 30 is configured to determine an actual size of the marker based on the position relationship and the imaging size.

[0127] Optionally, the actual size determining module 30 is further configured to determine a projection angle of a camera relative to the marker according to the position relationship between the contour of the marker and the horizon; and determine the actual size of the marker according to the projection angle and the imaging size of the marker.

[0128] Optionally, the actual size determining module 30 is further configured to determine a pitch angle and a yaw angle of the camera relative to the marker according to the position relationship between the contour of the marker and the horizon; and determine the projection angle according to the pitch angle, the yaw angle and a preset angle relationship, the preset angle relationship being a mapping relationship among the pitch angle, the yaw angle and the projection angle.

[0129] Optionally, the actual size determining module 30 is further configured to determine spatial coordinate information of the marker according to the projection angle and the imaging size of the marker; and determine the actual size of the marker according to the spatial coordinate information and a preset proportion coefficient.

[0130] Optionally, the actual size determining module 30 is further configured to determine an imaging size of a reference object in the to-be-recognized region according to the image; obtain an actual size of the reference object; and determine the preset proportion coefficient according to the imaging size of the reference object and the actual size of the reference object.

[0131] Optionally, the actual size determining module 30 is further configured to determine a Euclidean distance between each of the spatial coordinate points according to the spatial coordinate information and the preset proportion coefficient; and determine the actual size of the marker according to the Euclidean distance.

[0132] Optionally, the preset proportion coefficient includes a first preset proportion coefficient, a second preset proportion coefficient and a third preset proportion coefficient, the spatial coordinate information includes a horizontal axis coordinate, a vertical axis coordinate and a vertical axis coordinate, and the actual size determining module 30 is further configured to obtain the horizontal axis coordinate, the vertical axis coordinate and the vertical axis coordinate corresponding to each of the spatial coordinate points; obtain the first preset proportion coefficient corresponding to the horizontal axis coordinate, the second preset proportion coefficient corresponding to the vertical axis coordinate and the third preset proportion coefficient corresponding to the vertical axis coordinate; and determine the Euclidean distance between each of the spatial coordinate points according to the horizontal axis coordinate, the vertical axis coordinate, the vertical axis coordinate, the first preset proportion coefficient, the second preset proportion coefficient and the third preset proportion coefficient corresponding to each of the spatial coordinate points.

[0133] Optionally, the actual size determining module 30 is further configured to determine the actual size of the mark object based on a perspective algorithm, the position relationship and the imaging size.

[0134] The embodiment of the region size determining system is basically the same as the above-mentioned region size determining method, and will not be repeated here.

[0135] As shown in Figure 8 , Figure 8 is a structural schematic diagram of a hardware running environment of the region size determining device. The region size determining device includes a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 can also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 can include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0136] Those skilled in the art can understand that Figure 8 the structure of the region size determining device shown in the above-mentioned embodiment does not constitute a limitation on the region size determining device, and can include more or fewer components than those shown, or combine certain components, or different component arrangements.

[0137] As shown in Figure 8 , the memory 1005 as a computer readable storage medium can include an operating system, a network communication module, a user interface module, and a region size determining program. The operating system is a program that manages and controls the hardware and software resources of the region size determining device, and the region size determining program and the running of other software or programs.

[0138] In the region size determining device shown in Figure 8 , the user interface 1003 is mainly used to connect a terminal and communicate data with the terminal; the network interface 1004 is mainly used for a background server and communicates data with the background server; and the processor 1001 can be used to call the region size determining program stored in the memory 1005.

[0139] In the embodiment, the region size determining device comprises a memory 1005, a processor 1001 and a region size determining program stored in the memory and executable in the processor, wherein:

[0140] When the processor 1001 invokes the region size determining program stored in the memory 1005, the following operations are performed:

[0141] determining an imaging size of the marker in the to-be-identified region according to the acquired image;

[0142] determining a positional relationship between the contour of the marker and the horizon in the image;

[0143] determining an actual size of the marker based on the positional relationship and the imaging size.

[0144] When the processor 1001 invokes the region size determining program stored in the memory 1005, the following operations are performed:

[0145] The positional relationship comprises an included angle between the contour of the marker and a parallel line of the horizon;

[0146] determining a projection angle of a camera relative to the marker for shooting the image according to the included angle;

[0147] determining an actual size of the marker according to the projection angle and the imaging size of the marker.

[0148] When the processor 1001 invokes the region size determining program stored in the memory 1005, the following operations are performed:

[0149] determining a pitch angle and a yaw angle of the camera relative to the marker according to the included angle;

[0150] determining the projection angle according to the pitch angle, the yaw angle and a preset angle relationship, the preset angle relationship being a mapping relationship among the pitch angle, the yaw angle and the projection angle.

[0151] When the processor 1001 invokes the region size determining program stored in the memory 1005, the following operations are performed:

[0152] determining spatial coordinate information of the marker according to the projection angle and the imaging size of the marker;

[0153] determining an actual size of the marker according to the spatial coordinate information and a preset proportion coefficient.

[0154] When the processor 1001 invokes the region size determining program stored in the memory 1005, the following operations are performed:

[0155] determine an imaging size of a reference object in the region to be recognized according to the image;

[0156] obtain an actual size of the reference object;

[0157] determine the preset proportion coefficient according to the imaging size of the reference object and the actual size of the reference object.

[0158] When the processor 1001 invokes the program for determining the region size stored in the memory 1005, the following operations are performed:

[0159] determine the Euclidean distance between each spatial coordinate point according to the spatial coordinate information and the preset proportion coefficient;

[0160] determine the actual size of the labeled object according to the Euclidean distance.

[0161] When the processor 1001 invokes the program for determining the region size stored in the memory 1005, the following operations are performed:

[0162] The preset proportion coefficient includes a first preset proportion coefficient, a second preset proportion coefficient, and a third preset proportion coefficient, and the spatial coordinate information includes a horizontal axis coordinate, a vertical axis coordinate, and a vertical axis coordinate;

[0163] obtain the horizontal axis coordinate, the vertical axis coordinate, and the vertical axis coordinate corresponding to each spatial coordinate point;

[0164] obtain the first preset proportion coefficient corresponding to the horizontal axis coordinate, the second preset proportion coefficient corresponding to the vertical axis coordinate, and the third preset proportion coefficient corresponding to the vertical axis coordinate;

[0165] determine the Euclidean distance between each spatial coordinate point according to the horizontal axis coordinate, the vertical axis coordinate, the vertical axis coordinate, the first preset proportion coefficient, the second preset proportion coefficient, and the third preset proportion coefficient corresponding to each spatial coordinate point.

[0166] When the processor 1001 invokes the program for determining the region size stored in the memory 1005, the following operations are performed:

[0167] determine the actual size of the labeled object based on the perspective algorithm, the positional relationship, and the imaging size.

[0168] When the processor 1001 invokes the program for determining the region size stored in the memory 1005, the following operations are performed:

[0169] perform target detection processing and edge detection processing on the image to obtain contour information of the labeled object;

[0170] Determine an imaging size of the labeled object in the to-be-identified region according to the contour information.

[0171] Based on the same inventive concept, the embodiment of the present application also provides a computer readable storage medium, which stores a region size determination program, the region size determination program is executed by a processor to realize each step of the region size determination method, and the same technical effects can be achieved. To avoid repetition, it will not be described here.

[0172] Since the storage medium provided by the embodiment of the present application is a storage medium used to implement the method of the embodiment of the present application, based on the method introduced in the embodiment of the present application, the specific structure and modification of the storage medium can be understood by those skilled in the art, so here will not be described. Any storage medium used by the method of the present application belongs to the scope of the present application.

[0173] It should be noted that in this paper, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the sentence "includes a" does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0174] The above embodiment number of the present application is only for description, not representing the advantages and disadvantages of the embodiments.

[0175] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment method can be realized by software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, television or network device, etc.) execute the method described in each embodiment of the present application.

[0176] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the present application specification and drawings, or directly or indirectly applied to other related technical fields, is also included in the patent protection scope of the present application.

Claims

1. A method for determining the size of a region, characterized in that, The method for determining the size of the region includes: Determine the imaging size of the labeled objects within the area to be identified based on the acquired images; Determine the positional relationship between the outline of the marker and the horizon line in the image; Based on the positional relationship between the outline of the marker and the horizon line, determine the projection angle of the camera used to capture the image relative to the marker; The actual size of the marker is determined based on the projection angle and the imaging size of the marker.

2. The method for determining the region size as described in claim 1, characterized in that, The step of determining the positional relationship between the outline of the marker and the horizon line in the image includes: Determine the angle between the outline of the marker and the line parallel to the horizon in the image; Based on the included angle, determine the positional relationship between the outline of the marked object and the horizon line.

3. The method for determining the region size as described in claim 1, characterized in that, The step of determining the projection angle of the camera used to capture the image relative to the marker based on the positional relationship between the outline of the marker and the horizon line includes: Based on the positional relationship between the outline of the marker and the horizon line, determine the pitch angle and yaw angle of the camera relative to the marker; The projection angle is determined based on the pitch angle, the yaw angle, and the preset angle relationship, where the preset angle relationship is a mapping relationship between the pitch angle, the yaw angle, and the projection angle.

4. The method for determining the region size as described in claim 1, characterized in that, The step of determining the actual size of the marker based on the projection angle and the imaging size of the marker includes: The spatial coordinate information of the marker is determined based on the projection angle and the imaging size of the marker. The actual size of the marked object is determined based on the spatial coordinate information and the preset scaling factor.

5. The method for determining the region size as described in claim 4, characterized in that, The method for determining the size of the region further includes: Determine the imaging size of the reference object within the region to be identified based on the image; Obtain the actual dimensions of the reference object; The preset scaling factor is determined based on the imaging size of the reference object and the actual size of the reference object.

6. The method for determining the region size as described in claim 4, characterized in that, The step of determining the actual size of the marker based on the spatial coordinate information and a preset scaling factor includes: The Euclidean distance between each spatial coordinate point is determined based on the spatial coordinate information and the preset scaling factor. The actual size of the marker is determined based on the Euclidean distance.

7. The method for determining the region size as described in claim 6, characterized in that, The preset scaling factor includes a first preset scaling factor, a second preset scaling factor, and a third preset scaling factor; the spatial coordinate information includes horizontal axis coordinates, vertical axis coordinates, and vertical axis coordinates; the step of determining the Euclidean distance between each spatial coordinate point based on the spatial coordinate information and the preset scaling factor includes: Obtain the horizontal axis coordinates, vertical axis coordinates, and vertical axis coordinates corresponding to each of the aforementioned spatial coordinate points; Obtain the first preset scaling factor corresponding to the horizontal axis coordinate, the second preset scaling factor corresponding to the vertical axis coordinate, and the third preset scaling factor corresponding to the vertical axis coordinate; The Euclidean distance between each spatial coordinate point is determined based on the horizontal axis coordinate, the vertical axis coordinate, the first preset scaling factor, the second preset scaling factor, and the third preset scaling factor corresponding to each spatial coordinate point.

8. The method for determining the region size as described in claim 1, characterized in that, After determining the positional relationship between the outline of the marker and the horizon line in the image, the method further includes: The actual size of the marker is determined based on the perspective algorithm, the positional relationship, and the imaging size.

9. The method for determining the region size as described in claim 1, characterized in that, The step of determining the imaging size of the labeled object within the area to be identified based on the acquired image includes: The acquired image is subjected to target detection and edge detection processing to obtain the contour information of the labeled object; The imaging size of the marked object within the area to be identified is determined based on the contour information.

10. A system for determining the size of a region, characterized in that, The system for determining the size of the region includes: The imaging size determination module is used to determine the imaging size of the markers within the area to be identified based on the acquired image. A positional relationship determination module is used to determine the positional relationship between the outline of the marker and the horizon line in the image; The actual size determination module is used to determine the projection angle of the camera used to capture the image relative to the marker based on the positional relationship between the outline of the marker and the horizon line; and to determine the actual size of the marker based on the projection angle and the imaging size of the marker.

11. A device for determining the size of an area, characterized in that, The device for determining the region size includes: a memory, a processor, and a region size determination program stored in the memory and executable on the processor, wherein when the region size determination program is executed by the processor, it implements the steps of the region size determination method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for determining the region size, which, when executed by a processor, implements the steps of the method for determining the region size according to any one of claims 1-9.

Citation Information

Patent Citations

  • Mobile terminal and object measurement method thereof

    CN103604371A

  • Structural crack detection method, equipment and system

    CN113252700A