A method and system for determining the height of a rock mass by shadowing at different angles

By utilizing light source shadow projection and image processing at different angles, the accuracy and efficiency issues of rock height measurement are solved, providing a fast and accurate method for measuring rock height.

CN116379930BActive Publication Date: 2025-11-21CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310147933.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2025-11-21
Estimated Expiration
2043-02-22

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to accurately measure the height of rock blocks in hard-to-reach areas, and existing methods involve large amounts of calculation and have low accuracy.

Method used

By using the shadow projection of the light source at different angles to obtain images of the rock block, correlation calculations are performed to determine the shadow length and angle difference, and the height of the rock block is calculated.

Benefits of technology

It enables rapid and accurate measurement of rock block height, is simple to operate, and has strong applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116379930B_ABST
    Figure CN116379930B_ABST
Patent Text Reader

Abstract

The application discloses a method and system for determining the height of a rock mass through shadows at different angles, wherein the angle difference of the projection of a light source on the ground through the vertex of the rock mass under the irradiation of the light source at multiple different angles is obtained, and the rock mass image obtained by the camera under the irradiation of each light source is obtained, the camera shoots on a plane parallel to the projection plane; based on the rock mass image, a detection contour image is obtained; a plurality of detection rock mass contours and a plurality of detection shadow contours are subjected to correlation operation to obtain a correlation contour; the length of the shadow is obtained based on the correlation contour; and the height of the rock mass is obtained based on the length of the shadow and the angle difference. The height of the rock mass can be directly determined according to the shadow image information at different angles, the operation is simple, the height of the rock mass can be detected conveniently, the detection precision is high, and the height of the rock mass can be detected. The height of the rock mass can be obtained through the above scheme for different scenes, and the actual applicability is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a method and system for determining the height of a rock block by means of shadows at different angles. Background Technology

[0002] In areas inaccessible to the public, it is often impossible to measure the dimensions of objects such as rocks and trees. However, obtaining the physical parameters of these objects is of paramount importance to various fields of daily life and scientific research. For example, remote monitoring can determine the height of rocks, alerting pedestrians and vehicles to their presence. In geological research, estimating the height of rocks can help predict other research parameters. In areas inaccessible to the public, remotely obtaining the dimensions (height) of rocks, trees, and other objects provides invaluable information for studying those areas.

[0003] With the increasing sophistication of remote sensing imagery, drones are commonly used for terrain and environmental reconnaissance. Specifically, drones can capture remote sensing and optical images of these areas, and image processing techniques can then be used to determine the dimensions of objects. As image processing technology advances, it is being applied in various fields, such as estimating object dimensions. This primarily involves detecting the height edges of the object in the image and then calculating its height. However, this method has low accuracy. Another method involves determining the size and height of an object through 3D modeling. However, this method requires a large amount of vector information; sufficiently comprehensive vector information of the object needs to be collected to construct its physical parameters. This method is computationally intensive, labor-intensive, and has low prediction accuracy. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for determining the height of a rock block by means of shadows at different angles, in order to solve the above-mentioned problems existing in the prior art.

[0005] In a first aspect, embodiments of the present invention provide a method for determining the height of a rock block by means of shadows at different angles, the method comprising:

[0006] The system obtains the angular differences between the projections of the rock vertices onto the ground under illumination from multiple different angles, and obtains rock images captured by the camera device on a plane parallel to the projection plane under each illumination from the light source; wherein, the rock images contain the rock and the shadows; multiple rock images are obtained corresponding to illumination from multiple different angles.

[0007] Based on the rock block images, detection contour images are obtained; each rock block image corresponds to one detection contour image, and each detection contour image contains one detected rock block contour and one detected shadow contour; multiple rock block images correspond to multiple detected rock block contours and multiple detected shadow contours.

[0008] Correlation calculations are performed on multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours;

[0009] The shadow length is obtained based on the relevant contour.

[0010] The height of the rock block is obtained based on the shadow length and the angle difference.

[0011] Optionally, correlation calculations are performed on multiple detected rock block contours and multiple detected shadow contours to obtain related contours, including:

[0012] For the first detected contour image, perform a Boolean operation between any other detected contour image that is different from the first detected contour image and the first detected contour image to obtain a related image;

[0013] The relevant image contains three relevant contours, which include a relevant rock block contour, a relevant first shadow contour, and a relevant second shadow contour. The relevant rock block contour corresponds to the detected rock block contour in the first detection contour image, the relevant first shadow contour corresponds to the detected shadow contour in the first detection contour image, and the relevant second shadow contour corresponds to the detected shadow contour in the detection contour image after performing a Boolean operation with the first detection contour image.

[0014] Optionally, obtaining the shadow length based on the relevant contour includes:

[0015] Corner detection is performed on the relevant contours in the relevant image to obtain the first vertex and the second vertex. The first vertex represents a vertex of the relevant first shadow contour, and the second vertex represents a vertex of the relevant second shadow contour.

[0016] The distance between the first vertex and the second vertex in the relevant image is used as the shadow length.

[0017] Optionally, obtaining the rock height based on the shadow length and the angle difference specifically involves:

[0018]

[0019] Where X represents the height of the rock block, β represents the first angle, α represents the angle difference between the first angle and the second angle, and l represents the length of the shadow.

[0020] Optionally, before obtaining the detection contour image based on the rock block image, the method further includes:

[0021] The rock block image is preprocessed.

[0022] Optionally, the preprocessing of the rock block image includes:

[0023] The rock block image is smoothed.

[0024] The smoothed rock block image is then converted to grayscale.

[0025] Optionally, obtaining the detection contour image based on the rock block image includes:

[0026] Edge detection is performed on the rock block image using the Sobel detection algorithm to obtain a detection contour image. The detection contour image contains two contours. The outer contour is identified as the detection shadow contour, and the inner contour contained in the outer contour is identified as the detection rock block contour.

[0027] Optionally, the illumination height of the light source has at least two points.

[0028] Secondly, embodiments of the present invention also provide a system for determining the height of a rock block by means of shadows at different angles, the system comprising:

[0029] The module is used to obtain the angle difference between the projection of the rock vertices onto the ground under illumination from multiple different angles, and to obtain the rock image captured by the camera device on a plane parallel to the projection plane under each illumination from the light source; wherein, the rock image contains the rock and the shadow; multiple rock images are obtained corresponding to illumination from multiple different angles.

[0030] The detection module is used to obtain detection contour images based on the rock block images; each rock block image corresponds to one detection contour image, and each detection contour image contains a detected rock block contour and a detected shadow contour; multiple rock block images correspond to multiple detected rock block contours and multiple detected shadow contours; correlation calculation is performed on the multiple detected rock block contours and multiple detected shadow contours to obtain related contours; the shadow length is obtained based on the related contours; and the rock block height is obtained based on the shadow length and the angle difference.

[0031] Compared with the prior art, the embodiments of the present invention achieve the following beneficial effects:

[0032] This invention provides a method and system for determining the height of a rock block by using shadows at different angles. The method involves obtaining the angular differences between the projections of the rock block's apex onto the ground under illumination from multiple different angles, and obtaining rock block images captured by a camera on a plane parallel to the projection plane under each light source illumination. Each rock block image contains both the rock block and its shadow. Multiple rock block images are obtained corresponding to illumination from multiple different angles. Based on these rock block images, detection contour images are obtained. Each rock block image corresponds to a detection contour image, and each detection contour image contains a detected rock block contour and a detected shadow contour. Multiple rock block images correspond to multiple detected rock block contours and multiple detected shadow contours. Correlation calculations are performed on the multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours. The shadow length is obtained based on the correlated contours. The rock block height is obtained based on the shadow length and the angular differences.

[0033] By adopting the above method, the height of the rock block can be directly determined based on the shadow image information from different angles. The operation is simple and convenient, and the detection accuracy is high. Furthermore, the height of the object to be measured (rock block) can be obtained using this method in various scenarios, demonstrating strong practical applicability. Attached Figure Description

[0034] Figure 1 This is a flowchart of a method for determining the height of a rock block by using shadows at different angles, provided by an embodiment of the present invention.

[0035] Figure 2 A diagram showing the relative positions of the camera device, the rock, and the shadow is presented.

[0036] Figure 3 Images of rocks taken by a light source at different angles are shown. (a) is an image of a rock taken when the angle between the light source and the ground is α, and (b) is an image of a rock taken when the angle between the light source and the ground is β.

[0037] Figure 4 for Figure 3 The contour images obtained by detecting rock block images are shown in the figures. (a) is the detected contour image corresponding to the rock block image captured when the angle between the light source and the ground is a, and (b) is the detected contour image corresponding to the rock block image captured when the angle between the light source and the ground is b.

[0038] Figure 5 (a) in the image is the relevant image.

[0039] Figure 5 (b) is the denoised image.

[0040] Figure 6The results of corner detection and distance detection are shown in the figure.

[0041] Figure 7 This is a block structure diagram of an electronic device provided in an embodiment of the present invention.

[0042] The diagram shows: Bus 500; Receiver 501; Processor 502; Transmitter 503; Memory 504; Bus Interface 505. Detailed Implementation

[0043] Nowadays, shadows are often regarded as a disadvantage in identifying and extracting features from images, and are often removed. However, the technical solution provided by this invention uses this "disadvantage" to measure the height of a rock block, which can quickly, accurately and conveniently obtain the height of the rock block.

[0044] The present invention will now be described in detail with reference to the accompanying drawings.

[0045] Example 1

[0046] This invention provides a method for determining the height of a rock block by using shadows at different angles, such as... Figure 1 As shown, it includes:

[0047] S101: Obtain the angular differences between the projections of the rock apex onto the ground under illumination from multiple different angles, and obtain the rock image captured by the camera device on a plane parallel to the projection plane under each light source illumination. Please combine this with... Figure 2 , Figure 2 The diagram illustrates the relative positional relationship between the camera device, the rock mass, and the shadow. The camera device can be a camera, which may include a lens, either a color lens or a monochrome lens. In this embodiment of the invention, the rock mass image includes both the rock mass and the shadow. Multiple rock mass images are obtained corresponding to illumination from multiple different angles of the light source.

[0048] Optionally, the illumination height of the light source can be at least two.

[0049] When detecting the height of a rock block, the light source is first placed at a first angle to the projection plane (the ground). After the rock block casts a shadow under the light, a camera positioned at a point on a plane parallel to the projection plane takes an image of the rock block, obtaining the image corresponding to the first angle. Then, the angle between the light source and the projection plane (the second angle) is changed, and the difference between the second and first angles is obtained. Figure 3 For example, please combine Figure 3 ,exist Figure 3 Image (a) in the image shows a rock block image taken when the angle between the light source and the ground is α. Figure 3 (b) in the image is an image of a rock block taken when the angle between the light source and the ground is b.

[0050] Optionally, after obtaining the original image, preprocessing is often required to highlight the desired image features, facilitating further processing. That is, before performing the following steps, the method also includes preprocessing the captured image. Specific preprocessing operations include image smoothing, image grayscale conversion, opening / closing operations, etc.

[0051] ① Image smoothing: Images are inevitably contaminated by noise during acquisition, processing, and transmission, hindering image understanding and analysis. From a signal processing perspective, image smoothing removes high-frequency information (noise) and retains low-frequency information to smooth the image.

[0052] Mean filtering: This is done using a normalized convolutional box, replacing the center pixel with the average value of all pixels within the area covered by the convolutional box. Let s xy Let m represent the coordinates of a matrix sub-image window centered at (x, y) and of size m*n. The mean filter can be represented as:

[0053]

[0054] g(x,y) represents the pixel value of the center point (x,y) after mean filtering, and g(s,t) represents the pixel value of the pixel point (s,t).

[0055] For example, a 3x3 normalized averaging filter is shown below:

[0056]

[0057] The advantage of mean filtering is that the algorithm is simple and the calculation speed is fast. The disadvantage is that while removing noise, it also removes many details, making the image blurry.

[0058] The code for performing edge mean filtering using computer software is as follows:

[0059] API: cv2.blur(src, ksize, anchor, borderType).

[0060] src: Input image.

[0061] ksize: The size of the convolution kernel.

[0062] anchor: Default value (-1, -1), indicating the core center.

[0063] bounderType: Boundary type.

[0064] ② Image Grayscale Conversion: Grayscale images contain only brightness information, not color information. Their brightness changes continuously from dark to light. Grayscale is a series of levels that divide white and black according to a logarithmic relationship, with a total of 256 levels. Compared to the original color image, grayscale images do not contain color information. Therefore, the amount of information contained in the grayscale image is greatly reduced, and the computational load of image processing is correspondingly reduced, facilitating subsequent calculations.

[0065] The code for converting an image to grayscale using computer software is as follows:

[0066] API: cv2.IMREAD_GRAYSCALE

[0067] ③ At this point, the next step is often to address the still rough edges around the image. Opening and closing operations should be performed to obtain a smoother target, followed by binarization, and finally, image contour extraction. However, this paper primarily needs to extract the shadow vertices of the rock blocks and the positional distances of image vertices at different angles. Performing opening and closing operations and image binarization would introduce systematic errors. Therefore, after smoothing and grayscale conversion, we proceed directly to the next step of image contour extraction.

[0068] Optionally, before obtaining the detection contour image based on the rock block image, the method further includes:

[0069] The rock block image is preprocessed.

[0070] Optionally, the rock image is preprocessed, including: smoothing the rock image; and converting the smoothed rock image to grayscale.

[0071] S102: Obtain detection contour images based on rock block images. In this embodiment of the invention, each rock block image corresponds to one detection contour image, and each detection contour image includes a detected rock block contour and a detected shadow contour. Multiple rock block images correspond to multiple detection contour images, and multiple rock block images correspond to multiple detected rock block contours and multiple detected shadow contours. Figure 4 As shown, Figure 4 In the image (a), the detected contour image is the rock block image captured when the angle between the light source and the ground is α. Figure 4 In the image, (b) represents the detected contour image corresponding to the rock block image captured when the angle between the light source and the ground is b. Generally, the detected shadow contour is the outer contour among the detected contours, and the detected rock block contour is the inner contour.

[0072] In this embodiment of the invention, obtaining a detection contour image based on the rock block image includes:

[0073] Edge detection is performed on rock block images using the Sobel detection algorithm to obtain the detection contour image.

[0074] Under normal circumstances, under illumination by a light source, a detection contour image contains two contours; the outer contour is defined as the detection shadow contour, and the inner contour contained in the outer contour is defined as the detection rock block contour.

[0075] In this embodiment of the invention, obtaining a detection contour image based on the rock block image includes edge detection and edge extraction operations. Wherein:

[0076] Edge detection and extraction: Edge detection is a fundamental problem in image processing and computer vision. The purpose of edge detection is to identify points in a digital image where there are significant changes in brightness. Significant changes in image attributes often reflect important events and changes in those attributes.

[0077] Sobel operator: Since Canny edge detection has weak anti-interference ability, this paper adopts the Sobel operator, which is more efficient and more widely used in practical applications. The Sobel operator is a combination of Gaussian smoothing and differential operation, so it has strong anti-noise ability and many uses.

[0078] Principle: Boundaries are detected by finding the maximum value in the first derivative of the image. The local orientation of the edge is then estimated using the calculation results, usually the direction of the gradient. The maximum value of the local gradient magnitude is then found using this method.

[0079] For discontinuous functions, the first derivative can be written as:

[0080] f′(x)=f(x)-f(x-1)

[0081] or

[0082] f′(x)=f(x+1)-f)x)

[0083] Therefore:

[0084]

[0085] Suppose the image to be processed is S, take the derivative in both directions:

[0086] Horizontal direction: Convolve the image S with a template of odd size, resulting in Gx. For example, when the template size is 3, Gx is:

[0087]

[0088] Vertical direction: Convolve the image S with a template of odd size, resulting in Gy. For example, when the template size is 3, Gy is:

[0089]

[0090] For each point on the image, combine the two results above to obtain:

[0091]

[0092] The location of the statistical maximum is the edge of the image.

[0093] The code for edge detection calculation using computer software is as follows:

[0094] API: cv2.Sobel(src, depth, dx, dy, dst, ksize, scale, borderType)

[0095] src: Input image;

[0096] depth: the depth of the image;

[0097] dx and dy: refer to the order of differentiation, 0 indicates that there is no differentiation in this direction, and the values ​​are 0 and 1;

[0098] ksize: is the size of the Sobel operator, i.e. the size of the convolution kernel. It must be an odd number, such as 1, 3, 5, or 7, with the default being 3.

[0099] scale: The scaling constant for scaling the derivative; the default is no scaling factor.

[0100] borderType: The mode of the image boundary, the default value is cv2.BORDER_DEFAULT;

[0101] Note: The Sobel operator is calculated in two directions, and you still need to combine them using the cv2.addWeighted() function at the end.

[0102] Scale_abs=cv2.convertScaleAbs(x);

[0103] result=cv2.addWeighted(src1, alpha, src2, beta).

[0104] The final output is as follows Figure 4 The results are shown.

[0105] S103: Perform correlation calculations on multiple detected rock block contours and multiple detected shadow contours to obtain related contours.

[0106] In this embodiment of the invention, correlation calculations are performed on multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours, including:

[0107] For the first detected contour image, a Boolean operation is performed between any other detected contour image (distinct from the first detected contour image) and the first detected contour image to obtain a related image. For example, if the multiple detected contour images include detected contour image A, detected contour image B, and detected contour image C, and the operation of selecting any one of the detected contour images selects detected contour image A, then detected contour image A is used as the first detected contour image. Then, a Boolean operation is performed between detected contour image A and either detected contour image B or detected contour image C to obtain a related image.

[0108] The relevant image contains three relevant contours: a relevant rock block contour, a relevant first shadow contour, and a relevant second shadow contour. Specifically, the relevant rock block contour corresponds to the detected rock block contour in the first detection contour image, the relevant first shadow contour corresponds to the detected shadow contour in the first detection contour image, and the relevant second shadow contour corresponds to the detected shadow contour in the detection contour image after a Boolean operation with the first detection contour image. Figure 5 As shown. Figure 5 In the image (a), the relevant image is shown. Optionally, after obtaining the relevant image, a denoising operation is performed on it to obtain the image shown below. Figure 5 The denoised correlation image in (b). The following steps can be performed based on the correlation image before denoising or on the correlation image after denoising.

[0109] For Boolean operations: After obtaining relatively clear outlines from different angles through the above steps, we use relevant Boolean operation algorithms to remove the main rock mass and shadow overlap. It is worth noting that some white noise is clearly visible in the images obtained in the above steps, which can also be directly removed using Boolean operations.

[0110] The code for performing correlation calculations using computer software is as follows:

[0111] API: cv2.add(img1,img2)

[0112] API: cv2.subtract(img1, img2)

[0113] The final output is as follows Figure 5 Images (a) and (b) are shown in the image.

[0114] S104: Obtain the shadow length based on the relevant contour.

[0115] In this embodiment of the invention, obtaining the shadow length based on the relevant contour includes:

[0116] First, corner detection is performed on the relevant contours in the relevant image to obtain the first vertex and the second vertex. The first vertex represents the vertex of the relevant first shadow contour, and the second vertex represents the vertex of the relevant second shadow contour.

[0117] Then, the distance between the first vertex and the second vertex in the relevant image is used as the shadow length.

[0118] Optionally, corner detection can detect Harris corners of the contour.

[0119] In this embodiment of the invention, the upper Figure 5 The image yields a clear outline of the rock mass and its shadows at different angles. The Harris algorithm is then used to detect corner points and determine the vertex positions of the rock blocks within the image.

[0120] Harris corner detection works by observing a small window within a local area of ​​the image. The characteristic of corners is that moving the window in any direction will cause a significant change in the image's grayscale.

[0121] From a mathematical perspective, this can be understood as moving a local window (u, v) in all directions and calculating the sum of all grayscale differences, as shown in the following expression:

[0122] E(u,v)=∑w(x,y)[I(x+u,y+v)-I(x+y)] 2

[0123] Where I(x+y) is the gray level of the local window, I(x+u,y+v) is the gray level of the translated image, and w(x,y) is the window function, which can be a rectangular window or a Gaussian window that assigns different weights to each pixel.

[0124] To maximize the value of E(u,v) in corner detection, the above equation can be derived using a first-order Taylor expansion:

[0125]

[0126] The M matrix determines the value of E(u,v). M is a quadratic function of Ix and Iy, which can be represented as an ellipse. The major and minor semi-axes of the ellipse are determined by the eigenvalues ​​λ1 and λ2 of M, and the direction is determined by the eigenvector.

[0127] The relationships between the eigenvalues ​​of elliptic functions and the corners, lines (edges), and planes in an image can be divided into three cases:

[0128] ① Straight lines in the graph. One eigenvalue is large, the other is small, λ1 >> λ2 or λ1 << λ2. Elliptic function values ​​are large in one direction and small in others.

[0129] ② Planes in the image. Both eigenvalues ​​are small and approximately equal; the values ​​of elliptic functions are small in all directions.

[0130] ③ Corner points in the image. Both eigenvalues ​​are large and approximately equal; the elliptic function increases in all directions.

[0131] Harris's corner calculation method does not require calculating specific feature values; instead, it calculates a corner response value R to determine the corner. The formula for calculating R is:

[0132]

[0133] In the formula, detM is the determinant of matrix M; traceM is the locus of matrix M; α is a constant, ranging from 0.04 to 0.06. In fact, the features are implicit in detM and traceM because:

[0134]

[0135] traceM=λ1+λ2

[0136] Finally, if R is a large positive number, it represents a corner point. If R is a large negative number, it represents a boundary. If R is a small number, it represents a flat region.

[0137] The code for edge and corner detection using computer software is as follows:

[0138] API: cv2.cornerHarris(src, blockSize, ksize, k)

[0139] src: Input image of data type float32

[0140] blockSize: The size of the neighborhood to be considered in corner detection.

[0141] ksize: The kernel size used in Sobel differentiation.

[0142] k: A free parameter in the corner detection equation, with a value range of [0.04, 0.06].

[0143] The final output is as follows Figure 6 The detection results are shown in (a) and (b) in the figure.

[0144] exist Figure 6 In (b), the shadow length is the Euclidean distance between vertex A and vertex B.

[0145] exist Figure 6In (b), point B is caused by a large light source angle and the vertex not being the highest point in the top view of the rock block. In this case, the accuracy of the detected shadow length is low. Therefore, to improve accuracy, the shadow length is obtained based on the relevant contour, including:

[0146] First, corner detection is performed on the relevant contours in the relevant image to obtain the first vertex and the second vertex.

[0147] Then, obtain the distance between the first vertex and the second vertex in the relevant image, and based on this:

[0148] If the pixel length and resolution of the image are known parameters, the distance between the first vertex and the second vertex in the relevant image is used as the shadow length.

[0149] If the pixel length of the image is a known parameter and the resolution is an unknown parameter, then a standard-sized reference object (such as a water glass, bucket, bowl, or other objects with fixed and definite dimensions) can be selected as a reference. The shadow length is calculated by the distance between pixels. That is, the actual shadow length of the standard-sized reference object is known. Based on this, while keeping the light source at the first and second angles mentioned above, the length of the shadow of the standard-sized reference object in the image is obtained by the method described in steps S101 to S104 above, with the light source at the first and second angles respectively. Then, the shadow length (shadow length of the rock block) is obtained by obtaining the relevant contour in the following way:

[0150]

[0151] Where d′ represents the shadow length of the rock block, d is the distance between the first and second vertices in the relevant image, C represents the shadow length of the detected standard-size reference object, and C′ represents the actual shadow length of the standard-size reference object.

[0152] S105: Obtain the height of the rock block based on the shadow length and angle difference.

[0153] Optionally, the height of the rock block is obtained based on the shadow length and the angle difference, specifically as follows:

[0154]

[0155] Where X represents the height of the rock block, β represents the first angle, α represents the angle difference between the first angle and the second angle, and l represents the length of the shadow.

[0156] According to the above scheme, if the obtained rock block height is the height of the rock block in image coordinates, the height of the rock block in image coordinates can be converted into the height of the rock block in world coordinates according to the correspondence between image coordinates and world coordinates. The conversion relationship between image coordinates and world coordinates is known, and will not be elaborated upon in this embodiment of the invention.

[0157] By adopting the above method, the height of the rock block can be directly determined based on the shadow image information from different angles. The operation is simple and convenient, and the detection accuracy is high. Furthermore, the height of the object to be measured (rock block) can be obtained using this method in various scenarios, demonstrating strong practical applicability.

[0158] Based on the above-described method for determining the height of a rock block by using shadows at different angles, this embodiment of the invention also provides an execution subject for performing the above method. The execution subject is a system for determining the height of a rock block by using shadows at different angles. The system includes:

[0159] The acquisition module is used to acquire the angular differences between the projections of the rock vertices onto the ground under illumination from multiple different angles, and to acquire rock images captured by the camera device on a plane parallel to the projection plane under each light source illumination. Each rock image includes the rock itself and its shadow; multiple rock images are acquired corresponding to illumination from multiple different angles.

[0160] The detection module is configured to: obtain detection contour images based on the rock block images. Each rock block image corresponds to one detection contour image, and each detection contour image contains a detected rock block contour and a detected shadow contour. Multiple rock block images correspond to multiple detected rock block contours and multiple detected shadow contours. Correlation calculations are performed on the multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours. The shadow length is obtained based on the correlated contours; the rock block height is obtained based on the shadow length and the angle difference.

[0161] The specific manner in which each module performs its operations in the system described in the above embodiments has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0162] This invention also provides an electronic device, such as... Figure 7 As shown, it includes a memory 504, a processor 502, and a computer program stored in the memory 504 and executable on the processor 502. When the processor 502 executes the program, it implements the steps of any of the methods described above for determining the height of a rock block by means of shadows at different angles.

[0163] Among them, Figure 7In this document, a bus architecture (represented by bus 500) is used. Bus 500 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 502 and memory represented by memory 504. Bus 500 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 505 provides an interface between bus 500 and receiver 501 and transmitter 503. Receiver 501 and transmitter 503 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 502 is responsible for managing bus 500 and general processing, while memory 504 can be used to store data used by processor 502 during operation.

[0164] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described above for determining the height of a rock block by shadow at different angles, as well as the data mentioned above.

[0165] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0166] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0167] Similarly, it should be understood that, in order to simplify this disclosure and aid in understanding one or more of the various aspects of the invention, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0168] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0169] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0170] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0171] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

Claims

1. A method for determining the height of a rock block by using shadows at different angles, characterized in that, include: The system obtains the angular differences between the projections of the rock vertices onto the ground under illumination from multiple different angles, and obtains rock images captured by the camera device on a plane parallel to the projection plane under each illumination from the light source; wherein, the rock images contain the rock and the shadows; multiple rock images are obtained corresponding to illumination from multiple different angles. Based on the rock block images, detection contour images are obtained; each rock block image corresponds to one detection contour image, and each detection contour image contains one detected rock block contour and one detected shadow contour; multiple rock block images correspond to multiple detected rock block contours and multiple detected shadow contours. Correlation calculations are performed on multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours; The shadow length is obtained based on the relevant contour. The height of the rock block is obtained based on the shadow length and the angle difference; Correlation calculations are performed on multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours, including: For the first detected contour image, perform a Boolean operation between any other detected contour image that is different from the first detected contour image and the first detected contour image to obtain a related image; The relevant image contains three relevant contours, which include a relevant rock block contour, a relevant first shadow contour, and a relevant second shadow contour. The relevant rock block contour corresponds to the detected rock block contour in the first detection contour image, the relevant first shadow contour corresponds to the detected shadow contour in the first detection contour image, and the relevant second shadow contour corresponds to the detected shadow contour in the detection contour image after performing a Boolean operation with the first detection contour image.

2. The method for determining the height of a rock block by shadow at different angles according to claim 1, characterized in that, The process of obtaining the shadow length based on the relevant contour includes: Corner detection is performed on the relevant contours in the relevant image to obtain the first vertex and the second vertex; where the first vertex represents the vertex of the relevant first shadow contour and the second vertex represents the vertex of the relevant second shadow contour. The distance between the first vertex and the second vertex in the relevant image is used as the shadow length.

3. The method for determining the height of a rock block by shadow at different angles according to claim 2, characterized in that, The method for obtaining the rock height based on the shadow length and the angle difference is as follows: Where X represents the height of the rock block, β represents the first angle, α represents the angle difference between the first angle and the second angle, and l represents the length of the shadow.

4. The method for determining the height of a rock block by shadow at different angles according to claim 1, characterized in that, Before obtaining the detection contour image based on the rock block image, the method further includes: The rock block image is preprocessed.

5. The method for determining the height of a rock block by shadow at different angles according to claim 4, characterized in that, The preprocessing of the rock block image includes: The rock block image is smoothed. The smoothed rock block image is then converted to grayscale.

6. The method for determining the height of a rock block by shadow at different angles according to claim 1, characterized in that, The process of obtaining a detection contour image based on the rock block image includes: Edge detection is performed on the rock block image using the Sobel detection algorithm to obtain a detection contour image. The detection contour image contains two contours. The outer contour is identified as the detection shadow contour, and the inner contour contained in the outer contour is identified as the detection rock block contour.

7. The method for determining the height of a rock block by shadow at different angles according to claim 1, characterized in that, The illumination height of the light source is at least two.

8. A system for determining the height of a rock block by shadow at different angles, characterized in that, The system includes: The module is used to obtain the angle difference between the projection of the rock vertices onto the ground under illumination from multiple different angles, and to obtain the rock image captured by the camera device on a plane parallel to the projection plane under each illumination from the light source; wherein, the rock image contains the rock and the shadow; multiple rock images are obtained corresponding to illumination from multiple different angles. The detection module is used to obtain detection contour images based on the rock block images; each rock block image corresponds to one detection contour image, and each detection contour image contains a detected rock block contour and a detected shadow contour; multiple rock block images correspond to multiple detected rock block contours and multiple detected shadow contours; correlation calculations are performed on the multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours; the shadow length is obtained based on the correlated contours; and the rock block height is obtained based on the shadow length and the angle difference. Correlation calculations are performed on multiple detected rock block contours and multiple detected shadow contours to obtain correlated contours, including: The relevant image contains three relevant contours, which include a relevant rock block contour, a relevant first shadow contour, and a relevant second shadow contour. Among them, the relevant rock block contour corresponds to the detected rock block contour in the first detected contour image, the relevant first shadow contour corresponds to the detected shadow contour in the first detected contour image, and the relevant second shadow contour corresponds to the detected shadow contour in the detected contour image after performing a Boolean operation with the first detected contour image.

Citation Information

Patent Citations

  • Morphological gradient-combined double-threshold blasting muckpile rock lumpiness image segmentation method

    CN113313727A

  • A digital image color gradient-based rock lumpiness and / or distribution rule acquisition method and system, a terminal and a readable storage medium

    CN113838011A