Object size measurement method and device based on object image

By stitching and three-dimensional coordinate conversion of multiple images of objects to be measured in construction projects, the problems of insufficient measurement of long-focus image and insufficient accuracy of short-focus image are solved, which improves measurement accuracy and reduces costs.

CN119228865APending Publication Date: 2024-12-31FUJIAN HUICHUAN DIGITAL TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411283412.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the field of construction engineering, long-focus images are difficult to measure objects of larger sizes. Short-focus images have insufficient pixel accuracy and camera lens distortion problems, resulting in large errors between the measurement results and the actual length, which cannot meet the measurement accuracy requirements, and has increased Cost investment in image acquisition and storage.

Method used

By splicing multiple objects images collected by the object to be measured, the stitched object image is obtained, and the coordinate conversion of the object to be measured selected is performed, and the dimension data is determined based on the multiple three-dimensional spatial coordinates of the object to be measured. Avoid image accuracy loss and measurement errors, and improve measurement accuracy.

Benefits of technology

It improves the accuracy of object size measurement, reduces measurement errors caused by distortion of edges of short focal length images, and saves cost investment in image acquisition and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228865A_ABST
    Figure CN119228865A_ABST
Patent Text Reader

Abstract

The invention provides an object size measurement method and device based on an object image, and the method comprises the steps: obtaining a plurality of object images collected by an image collection device for a to-be-measured object, and splicing the object images, and obtaining a spliced object image of the to-be-measured object; determining a first pixel coordinate of each click position in the spliced object image in response to a plurality of acquired click positions selected for the to-be-detected object; based on a first object image corresponding to the first pixel coordinate in the plurality of object images, determining a second pixel coordinate of the click position in the first object image; and based on the second pixel coordinates, determining target three-dimensional space coordinates corresponding to the clicking positions relative to the to-be-measured object, and based on the target three-dimensional space coordinates corresponding to the plurality of clicking positions, determining size data of the to-be-measured object. Through the method, the measurement precision of the object size is improved, and the cost input of image acquisition and storage is further saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image measurement technology, and in particular to a method and device for measuring object size based on object images. Background Art

[0002] With the development and application of image measurement technology in the field of construction engineering, collecting and recording long-focal-length images of construction sites has become an important means of engineering measurement. However, when measuring larger objects, such as measuring the overall length of steel bars, a single long-focal-length image cannot fully display the entire object to be measured and cannot measure the complete size of the object. In addition, when measuring the size of larger objects by taking short-focal-length images, short-focal-length images have problems such as insufficient pixel accuracy and camera lens distortion, resulting in a large error between the measurement result and the actual length, which cannot meet the measurement accuracy requirements.

[0003] Therefore, long focal length images are limited by the field of view angle, making it difficult to measure larger objects, while short focal length images are limited by imaging quality and pixel accuracy, which reduces the measurement accuracy of object size and increases the cost of image acquisition and storage. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide an object size measurement method and device based on object images, by splicing multiple object images captured by an image acquisition device for an object to be measured, obtaining a spliced ​​object image for measuring large-size objects, and performing coordinate transformation on the selected object to be measured, and determining the size data of the object to be measured based on multiple three-dimensional space coordinates corresponding to the object to be measured, thereby avoiding the problems of image accuracy loss and measurement errors, and reducing the measurement errors caused by edge distortion problems of short-focal-length images, thereby improving the measurement accuracy of object size, and thereby saving the cost investment in image acquisition and storage.

[0005] The present application provides a method for measuring the size of an object based on an object image, the method comprising:

[0006] Acquire a plurality of object images captured by an image acquisition device for the object to be measured, and stitch the plurality of object images together to obtain a stitched object image of the object to be measured;

[0007] In response to acquiring a plurality of selected point positions for the object to be measured, determining, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image;

[0008] Determining a second pixel coordinate of the point selection position in the first object image based on a first object image corresponding to the first pixel coordinate in the plurality of object images;

[0009] Based on the second pixel coordinates, determining the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured;

[0010] Based on the target three-dimensional space coordinates respectively corresponding to the plurality of point selection positions, the size data of the object to be measured is determined.

[0011] Further, the acquiring of a plurality of object images acquired by an image acquisition device for the object to be measured, and splicing the plurality of object images to obtain a spliced ​​object image of the object to be measured includes:

[0012] Based on a first focal length corresponding to the image acquisition device, using the image acquisition device to acquire a plurality of object images for the object to be measured;

[0013] Acquire the plurality of object images and the pan / tilt laser data corresponding to the object images respectively;

[0014] The multiple object images are spliced ​​together to obtain a spliced ​​object image of the object to be measured.

[0015] Further, in response to acquiring a plurality of selected point positions for the object to be measured, determining, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image, includes:

[0016] In response to an interactive action of a user in an image display area for visually displaying an object, determining a plurality of point selection positions of the object to be measured;

[0017] For each of the plurality of click positions, determining a third pixel coordinate of the click position in the image display area;

[0018] Based on the size data respectively corresponding to the image display area and the spliced ​​object image, the first pixel coordinates of the point selection position in the spliced ​​object image are determined.

[0019] Furthermore, the determining, based on a first object image corresponding to the first pixel coordinate in the plurality of object images, a second pixel coordinate of the point selection position in the first object image includes:

[0020] For each object image in the plurality of object images, determining a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image;

[0021] Based on the pixel range, determining a first object image corresponding to the first pixel coordinate in the plurality of object images;

[0022] Based on the rotation and translation mapping relationship of the first object image in the spliced ​​object image, a second pixel coordinate of the point selection position in the first object image is determined.

[0023] Furthermore, for each object image in the plurality of object images, determining a rotation and translation mapping relationship and a pixel range of each object image in the spliced ​​object image includes:

[0024] Determining a collection order corresponding to the plurality of object images based on collection times corresponding to the plurality of object images;

[0025] For each of the multiple object images, based on the acquisition order, matching the feature points of each object image with respect to the spliced ​​object image to determine a plurality of feature points of each object image;

[0026] Compare the inter-point distance values ​​corresponding to the plurality of feature points with a preset value, and according to the comparison result, remove the feature points whose inter-point distance values ​​are greater than the preset value, so as to obtain a plurality of target feature points;

[0027] Based on the multiple target feature points, a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image are determined.

[0028] Furthermore, determining, based on the pixel range, a first object image corresponding to the first pixel coordinate in the plurality of object images includes:

[0029] Based on the pixel range, determining the pixel center point coordinates of each object image in the plurality of object images in the stitched object image;

[0030] Determine, based on the first pixel coordinates and the pixel center point coordinates, a point image distance value corresponding to the first pixel coordinates and each object image;

[0031] The plurality of point image distance values ​​are sorted in ascending numerical order, and the object image corresponding to the point image distance value that is ranked first in the ascending numerical order is determined as the first object image corresponding to the first pixel coordinate.

[0032] Furthermore, determining, based on the second pixel coordinates, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured includes:

[0033] Selecting a plurality of second object images with the first object image as the center from the plurality of object images, and constructing a three-dimensional space coordinate system relative to the object to be measured with the image acquisition device as the origin;

[0034] Determine a plurality of three-dimensional space coordinates corresponding to the first object image and the second object image in the three-dimensional space coordinate system based on the pan / tilt laser data corresponding to the first object image and the second object image respectively;

[0035] Based on the multiple three-dimensional space coordinates, establishing plane equations corresponding to the first object image and the second object image;

[0036] Determine the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system based on the second pixel coordinates, the plane equation, the pan / tilt laser data, and device parameters corresponding to the image acquisition device;

[0037] The embodiment of the present application further provides an object size measurement device based on an object image, the device comprising:

[0038] An image acquisition and stitching module, used to acquire a plurality of object images acquired by an image acquisition device for an object to be measured, and stitch the plurality of object images to obtain a stitched object image of the object to be measured;

[0039] A first coordinate determination module, configured to, in response to obtaining a plurality of selected point positions for the object to be measured, determine, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image;

[0040] A second coordinate determination module, configured to determine a second pixel coordinate of the point selection position in the first object image based on a first object image corresponding to the first pixel coordinate in the plurality of object images;

[0041] A third coordinate determination module, for determining, based on the second pixel coordinates, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured;

[0042] The object size determination module is used to determine the size data of the object to be measured based on the target three-dimensional space coordinates corresponding to the multiple point selection positions.

[0043] Furthermore, when the image acquisition and stitching module is used to acquire multiple object images acquired by the image acquisition device for the object to be measured and stitch the multiple object images to obtain a stitched object image of the object to be measured, the image acquisition and stitching module is used to:

[0044] Based on a first focal length corresponding to the image acquisition device, using the image acquisition device to acquire a plurality of object images for the object to be measured;

[0045] Acquire the plurality of object images and the pan / tilt laser data corresponding to the object images respectively;

[0046] The multiple object images are spliced ​​together to obtain a spliced ​​object image of the object to be measured.

[0047] Further, when the first coordinate determination module is used to determine, in response to obtaining a plurality of selected point positions for the object to be measured, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image, the first coordinate determination module is used to:

[0048] In response to an interactive action of a user in an image display area for visually displaying an object, determining a plurality of point selection positions of the object to be measured;

[0049] For each of the plurality of click positions, determining a third pixel coordinate of the click position in the image display area;

[0050] Based on the size data respectively corresponding to the image display area and the spliced ​​object image, the first pixel coordinates of the point selection position in the spliced ​​object image are determined.

[0051] Further, when the second coordinate determination module is used to determine the second pixel coordinate of the point selection position in the first object image based on the first object image corresponding to the first pixel coordinate in the plurality of object images, the second coordinate determination module is used to:

[0052] For each object image in the plurality of object images, determining a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image;

[0053] Based on the pixel range, determining a first object image corresponding to the first pixel coordinate in the plurality of object images;

[0054] Based on the rotation and translation mapping relationship of the first object image in the spliced ​​object image, a second pixel coordinate of the point selection position in the first object image is determined.

[0055] Further, when the second coordinate determination module is used to determine the rotation and translation mapping relationship and pixel range of each object image in the stitched object image for each object image in the plurality of object images, the second coordinate determination module is used to:

[0056] Determining a collection order corresponding to the plurality of object images based on collection times corresponding to the plurality of object images;

[0057] For each of the multiple object images, based on the acquisition order, matching the feature points of each object image with respect to the spliced ​​object image to determine a plurality of feature points of each object image;

[0058] Compare the inter-point distance values ​​corresponding to the plurality of feature points with a preset value, and according to the comparison result, remove the feature points whose inter-point distance values ​​are greater than the preset value, so as to obtain a plurality of target feature points;

[0059] Based on the multiple target feature points, a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image are determined.

[0060] Furthermore, when the second coordinate determination module is used to determine the first object image corresponding to the first pixel coordinate in the plurality of object images based on the pixel range, the second coordinate determination module is used to:

[0061] Based on the pixel range, determining the pixel center point coordinates of each object image in the plurality of object images in the stitched object image;

[0062] Determine, based on the first pixel coordinates and the pixel center point coordinates, a point image distance value corresponding to the first pixel coordinates and each object image;

[0063] The plurality of point image distance values ​​are sorted in ascending numerical order, and the object image corresponding to the point image distance value that is ranked first in the ascending numerical order is determined as the first object image corresponding to the first pixel coordinate.

[0064] Further, when the third coordinate determination module is used to determine the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured based on the second pixel coordinates, the third coordinate determination module is used to:

[0065] Selecting a plurality of second object images with the first object image as the center from the plurality of object images, and constructing a three-dimensional space coordinate system relative to the object to be measured with the image acquisition device as the origin;

[0066] Determine a plurality of three-dimensional space coordinates corresponding to the first object image and the second object image in the three-dimensional space coordinate system based on the pan / tilt laser data corresponding to the first object image and the second object image respectively;

[0067] Based on the multiple three-dimensional space coordinates, establishing plane equations corresponding to the first object image and the second object image;

[0068] Based on the second pixel coordinates, the plane equation, the pan-tilt laser data and the device parameters corresponding to the image acquisition device, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system are determined.

[0069] An embodiment of the present application also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the object size measurement method based on object images as described above are performed.

[0070] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the object size measurement method based on the object image are executed.

[0071] The object size measurement method and device based on object images provided in the embodiments of the present application obtain multiple object images collected by an image acquisition device for the object to be measured, and stitch the multiple object images to obtain a stitched object image of the object to be measured; in response to obtaining multiple point selection positions selected for the object to be measured, for each point selection position in the multiple point selection positions, determine the first pixel coordinates of the point selection position in the stitched object image; based on the first object image corresponding to the first pixel coordinate in the multiple object images, determine the second pixel coordinates of the point selection position in the first object image; based on the second pixel coordinates, determine the target three-dimensional space coordinates corresponding to the first point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured; based on the target three-dimensional space coordinates corresponding to the multiple point selection positions, determine the size data of the object to be measured.

[0072] Compared with the method of collecting and recording long-focal-length images and measuring the size of larger objects by shooting short-focal-length images in the prior art, a plurality of object images collected by an image acquisition device for the object to be measured are spliced ​​to obtain a spliced ​​object image for measuring large-size objects, and the coordinates of the selected object to be measured are transformed. Based on the plurality of three-dimensional spatial coordinates corresponding to the object to be measured, the size data of the object to be measured is determined, thereby avoiding the problems of image accuracy loss and measurement error, and reducing the measurement error caused by the edge distortion problem of the short-focal-length image, thereby improving the measurement accuracy of the object size, and thus saving the cost investment in image acquisition and storage.

[0073] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0075] Figure 1 A flowchart of an object size measurement method based on an object image provided in an embodiment of the present application;

[0076] Figure 2 A schematic diagram of the structure of an object size measurement device based on an object image provided in an embodiment of the present application;

[0077] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0079] Research has found that with the development and application of image measurement technology in the field of construction engineering, collecting and recording long-focal-length images of construction sites has become an important means of engineering measurement. However, when measuring larger objects, for example, measuring the overall length of steel bars, a single long-focal-length image cannot fully display the entire object to be measured and cannot measure the complete size of the object. In addition, when measuring the size of larger objects by taking short-focal-length images, short-focal-length images have problems such as insufficient pixel accuracy and camera lens distortion, which results in a large error between the measurement result and the actual length and cannot meet the measurement accuracy requirements.

[0080] Based on the above problems, it can be understood that long-focal-length images are limited by the field of view angle, making it difficult to measure larger objects, while short-focal-length images are limited by imaging quality and pixel accuracy, which reduces the measurement accuracy of object size and increases the cost of image acquisition and storage.

[0081] Based on this, an embodiment of the present application provides an object size measurement method based on object images, which obtains a spliced ​​object image for measuring large-size objects by splicing multiple object images captured by an image acquisition device for the object to be measured, and performs coordinate transformation on the selected object to be measured. Based on multiple three-dimensional space coordinates corresponding to the object to be measured, the size data of the object to be measured is determined, thereby avoiding the problems of image accuracy loss and measurement errors, and reducing the measurement errors caused by edge distortion problems of short-focal-length images, thereby improving the measurement accuracy of object size and saving the cost investment in image acquisition and storage.

[0082] See also Figure 1 , Figure 1 The following is a flow chart of a method for measuring the size of an object based on an object image provided in an embodiment of the present application. Figure 1 As shown in , the object size measurement method based on object image provided by the embodiment of the present application includes:

[0083] S101 , acquiring a plurality of object images captured by an image acquisition device for an object to be measured, and splicing the plurality of object images to obtain a spliced ​​object image of the object to be measured.

[0084] In an embodiment of the present application, the image acquisition device includes: a camera, a two-axis electric pan-tilt head and a laser rangefinder; wherein the laser rangefinder and the camera are installed in parallel on a two-axis electric pan-tilt head that can rotate vertically and horizontally, and the laser emission direction of the laser rangefinder is parallel to the optical axis of the camera.

[0085] The object to be detected may include at least one object in the object cluster.

[0086] In this step, during the specific implementation, first, based on the first focal length corresponding to the image acquisition device, a plurality of object images are acquired for the object to be measured using the image acquisition device; then, the plurality of object images and the pan / tilt laser data corresponding to the object images are acquired; finally, the plurality of object images are stitched together using a preset stitching tool to obtain a stitched object image of the object to be measured.

[0087] In one implementation of the present application, during specific implementation, step S101 may include:

[0088] S1011. Based on a first focal length corresponding to an image acquisition device, use the image acquisition device to acquire a plurality of object images for the object to be measured.

[0089] In the embodiment of the present application, the first focal length corresponding to the image acquisition device may be the maximum focal length of the camera.

[0090] In this step, the focal length parameter of the camera in the image acquisition device is adjusted to the maximum focal length, that is, the focal length parameter of the camera is adjusted to the first focal length; then, the image acquisition device including the camera is used to acquire multiple object images for the object to be measured.

[0091] S1012, obtaining the plurality of object images and the pan / tilt laser data corresponding to the object images respectively.

[0092] In an embodiment of the present application, the gimbal laser data corresponding to each object image in the multiple object images includes: a dual-axis gimbal angle value and a laser distance value corresponding to each object image.

[0093] In this step, while obtaining that the image acquisition device acquires multiple object images for the object to be measured, the dual-axis pan-tilt angle value and laser distance value corresponding to each object image are acquired and recorded.

[0094] S1013: stitching the multiple object images to obtain a stitched object image of the object to be measured.

[0095] In an embodiment of the present application, a preset stitching tool is used to stitch multiple object images; the preset stitching tool includes but is not limited to at least one of a computer vision processing library (OPENCV) and an image stitching software (PTGUI).

[0096] S102: In response to acquiring a plurality of selected point positions for the object to be measured, determining, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image.

[0097] It should be noted that the user will select the object to be tested through the image display area that displays the spliced ​​object image, and the user selects the object to be tested through an interactive action of clicking in the image display area; wherein, the multiple positions clicked by the user in the image display area are the multiple click positions, and the objects corresponding to the multiple click positions are the selected objects to be tested.

[0098] Among them, the image display area may include but is not limited to the image area presented and displayed by devices such as display devices, monitoring devices and virtual scene devices.

[0099] In this step, during specific implementation, first, in response to the user's interactive actions in the image display area for visually displaying the object, multiple point selection positions of the object to be measured are determined; then, for each of the multiple point selection positions, the third pixel coordinates of the point selection position in the image display area are determined; finally, based on the size data corresponding to the image display area and the spliced ​​object image respectively, the first pixel coordinates of the point selection position in the spliced ​​object image are determined.

[0100] In one implementation of the present application, during specific implementation, step S102 may include:

[0101] S1021. In response to a user's interactive action in an image display area for visually displaying an object, determine a plurality of point selection positions of the object to be measured.

[0102] In this step, after the user selects the object to be measured through an interactive action such as clicking in the image display area, multiple selected positions of the object to be measured in the image display area are determined.

[0103] Here, since determining one-dimensional size data of an object requires at least two point selection positions, and determining two-dimensional size data of an object requires at least two point selection positions, measuring the size data of the object to be measured requires the user to interactively obtain multiple point selection positions for the object to be measured.

[0104] S1022. For each of the multiple click positions, determine a third pixel coordinate of the click position in the image display area.

[0105] In this step, a first plane coordinate system is established with the upper left corner edge of the image display area as the origin; then, based on each point selection position of the target object to be measured in the image display area, the third pixel coordinate of the point selection position in the first plane coordinate system (image display area) is determined.

[0106] S1023: Determine a first pixel coordinate of the point selection position in the spliced ​​object image based on size data corresponding to the image display area and the spliced ​​object image respectively.

[0107] In this step, during the specific implementation, first, the width value and height value included in the size data corresponding to the image display area and the spliced ​​object image are determined respectively; then, the width value and height value corresponding to the image display area and the spliced ​​object image are input into a preset coordinate conversion formula to obtain a conversion result; finally, based on the conversion result, the first pixel coordinate of the selected position in the spliced ​​object image is determined.

[0108] Here, the first pixel coordinate of the selected position in the stitched object image refers to the first pixel coordinate of the selected position in the second plane coordinate system (stitched object image) established with the upper left corner edge of the stitched object image as the origin.

[0109] Specifically, the expression using the preset coordinate conversion formula is as follows.

[0110]

[0111] Among them, (x 1,y 1 ) is the third pixel coordinate of the click position in the image display area; (x 2 ,y 2 ) is the first pixel coordinate of the selected position in the stitched object image; iw and ih are the width and height of the stitched object image respectively; uw and uh are the width and height of the image display area respectively.

[0112] S103: Determine a second pixel coordinate of the point selection position in the first object image based on a first object image corresponding to the first pixel coordinate in the plurality of object images.

[0113] In this step, during the specific implementation, first, for each object image in the multiple object images, the rotation and translation mapping relationship and pixel range of each object image in the spliced ​​object image are determined; then, based on the pixel range, the first object image corresponding to the first pixel coordinate in the multiple object images is determined; finally, based on the rotation and translation mapping relationship of the first object image in the spliced ​​object image, the second pixel coordinate of the selected position in the first object image is determined.

[0114] Here, the second pixel coordinates of the selected position in the first object image refer to the second pixel coordinates of the selected position in the third plane coordinate system (first object image) established with the upper left corner edge of the first object image as the origin.

[0115] In the embodiment of the present application, the rotation and translation mapping relationship refers to the change in position, direction or shape of each object image relative to the stitched object image; the pixel range refers to the interval value of the range occupied by the pixels of all the pixels of each object image mapped to the stitched object image according to the rotation and translation mapping relationship; the pixel range can be represented by a contour polygon surrounding the pixels.

[0116] In one implementation of the present application, during specific implementation, step S103 may include:

[0117] S1031. For each object image in the plurality of object images, determine a rotation and translation mapping relationship and a pixel range of each object image in the spliced ​​object image.

[0118] In this step, during specific implementation, first, based on the acquisition times corresponding to the multiple object images, the acquisition order corresponding to the multiple object images is determined; then, based on the acquisition order, feature point matching is performed on each object image in the multiple object images relative to the stitched object image to determine multiple feature points of each object image; finally, the point distance values ​​corresponding to the multiple feature points are compared with a preset value, and feature points with point distance values ​​greater than the preset value are removed to obtain multiple target feature points, and a preset homography matrix tool is used to determine the rotation and translation mapping relationship and pixel range of each object image in the stitched object image.

[0119] In one implementation of the present application, during specific implementation, step S1031 may include:

[0120] S10311. Determine a collection order corresponding to the multiple object images based on the collection times corresponding to the multiple object images.

[0121] In this step, before the image acquisition device acquires multiple object images, a path planning for image acquisition is performed on the object to be measured. Based on the acquisition time corresponding to the multiple object images corresponding to the path planning, the acquisition order corresponding to the multiple object images is determined according to the sequence of the acquisition time.

[0122] Here, the path planning for image acquisition of the object to be measured includes but is not limited to autonomous planning of the image acquisition device or external planning instructions for the object to be measured.

[0123] S10312. For each object image in the plurality of object images, based on the acquisition order, perform feature point matching on each object image relative to the spliced ​​object image to determine a plurality of feature points of each object image.

[0124] In the embodiment of the present application, before matching the feature points of each object image with respect to the spliced ​​object image, feature point detection may be performed on the spliced ​​object image and each object image respectively.

[0125] Among them, feature point detection may include scale-invariant feature transform detection (SIFT, Scale-Invariant Feature Transform), which is used to detect and describe local feature points of images in computer vision, and can extract stable feature points under different scales, rotations and illumination changes.

[0126] Furthermore, a feature point matching algorithm is used to match the feature points of the spliced ​​object image with the feature points of each object image to obtain multiple feature points similar to the spliced ​​object image and each object image, as well as the degree of similarity of the feature points; wherein the degree of similarity of the feature points can be represented by the distance value between the feature points.

[0127] In this step, based on the acquisition order, each object image is processed through feature point matching to perform scale space extreme value detection, key point positioning, direction determination, and key point description steps; then, the feature points and their descriptors of each object image relative to the stitched object image are output.

[0128] Among them, feature points are usually significant and stable points such as corner points and edge points in the image; descriptors are high-dimensional vectors that describe the local image information around the feature points, making the feature points unique and distinguishable.

[0129] S10313. Compare the inter-point distance values ​​corresponding to the plurality of feature points with a preset value, and according to the comparison result, remove the feature points whose inter-point distance values ​​are greater than the preset value to obtain a plurality of target feature points.

[0130] In this step, during the specific implementation, first, the point distance values ​​corresponding to multiple feature points are calculated; then, the obtained multiple point distance values ​​are compared with preset values ​​respectively to obtain comparison results; finally, based on the comparison results, the feature points whose point distance values ​​are greater than the preset values ​​are removed to obtain multiple target feature points.

[0131] S10314. Based on the multiple target feature points, determine the rotation and translation mapping relationship and pixel range of each object image in the stitched object image.

[0132] In the embodiment of the present application, a preset homography matrix tool is used to determine the rotation and translation mapping relationship and pixel range of each object image in the stitched object image.

[0133] Among them, the preset homography matrix tool may include the homography matrix tool (FindHomography) in the preset computer vision open source library OPENCV; the homography matrix tool is used to calculate the homography matrix between each object image and the spliced ​​object image using multiple feature points; wherein the homography matrix describes the rotation and translation mapping relationship between each object image and the spliced ​​object image.

[0134] Here, the homography matrix is ​​used to perform rotation and translation calculations on the rectangular area of ​​each object image, so as to obtain the pixel range of each object image represented by a quadrilateral in the stitched object image.

[0135] S1032: Determine, based on the pixel range, a first object image corresponding to the first pixel coordinate in the plurality of object images.

[0136] In this step, during specific implementation, first, based on the pixel range, the pixel center point coordinates of each object image in the stitched object image are determined; then, based on the first pixel coordinates and the pixel center point coordinates, the point image distance value corresponding to the first pixel coordinate and each object image is determined; finally, the object image corresponding to the minimum value in the point image distance value is determined as the first object image corresponding to the first pixel coordinate.

[0137] In one implementation of the present application, during specific implementation, step S1032 may include:

[0138] S10321. Determine, based on the pixel range, pixel center point coordinates of each object image in the plurality of object images in the stitched object image.

[0139] In this step, the diagonal intersection points of the pixel range represented by the quadrilateral of each object image are calculated to obtain the intersection pixel coordinates, and the pixel center point coordinates of each object image in the second plane coordinate system established by the spliced ​​object images are determined based on the intersection pixel coordinates.

[0140] S10322. Determine, based on the first pixel coordinates and the pixel center point coordinates, a point image distance value corresponding to the first pixel coordinates and each of the object images.

[0141] In this step, multiple pixel distances between the first pixel coordinates and the pixel center point coordinates of each object image are calculated, and the pixel distances are determined as point image distance values ​​corresponding to the first pixel coordinates and each object image.

[0142] S10323. Sort the multiple point image distance values ​​in ascending numerical order, and determine the object image corresponding to the point image distance value that is ranked first in the ascending numerical order as the first object image corresponding to the first pixel coordinate.

[0143] In this step, the dot image distance values ​​of multiple object images relative to the first pixel coordinate are numerically sorted from small to large, and based on the numerical sorting, the dot image distance value with the first numerical sorting value is determined as the object image corresponding to the first pixel coordinate. That is, the object image corresponding to the smallest dot image distance value is determined as the first object image corresponding to the first pixel coordinate.

[0144] S1033: Determine a second pixel coordinate of the point selection position in the first object image based on a rotation and translation mapping relationship of the first object image in the stitched object image.

[0145] In this step, the rotation and translation mapping relationship between the first pixel coordinates and the first object image in the stitched object image is input into a preset perspective transformation tool to obtain the output result of the perspective transformation tool; and based on the output result, the second pixel coordinates of the point selection position in the first object image are determined.

[0146] In an embodiment of the present application, the preset perspective transformation tool may include a preset perspective transformation tool (Perspective Transform) in the computer vision open source library OPENCV; the perspective transformation tool applies a perspective transformation to the first pixel coordinate based on the homography matrix, and outputs the transformed second pixel coordinate.

[0147] S104: Based on the second pixel coordinates, determine the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured.

[0148] In one implementation of the present application, during specific implementation, step S104 may include:

[0149] S1041. Select a plurality of second object images from the plurality of object images with the first object image as the center, and construct a three-dimensional space coordinate system relative to the object to be measured with the image acquisition device as the origin.

[0150] In this step, taking the first object image as the center, object images close to the edge area of ​​the first object image and close to the corresponding plane of the object to be measured are selected from the multiple object images to select at least two second object images.

[0151] Furthermore, through a preset polar coordinate conversion tool, with the image acquisition device as the origin, the horizontal rotation axis of the dual-axis gimbal as the Z axis, and the direction of the laser beam emitted by the laser rangefinder when the angle values ​​of the dual-axis gimbal are all zero degrees as the positive direction of the X axis, a right-handed rectangular coordinate system is constructed as the three-dimensional space coordinate system corresponding to the object to be measured.

[0152] S1042. Determine a plurality of three-dimensional space coordinates corresponding to the first object image and the second object image in the three-dimensional space coordinate system based on the pan / tilt laser data corresponding to the first object image and the second object image respectively.

[0153] In this step, a plurality of three-dimensional space coordinates corresponding to the first object image and the second object image in the three-dimensional space coordinate system are determined based on the pan / tilt laser data of the first object image and the second object image through a preset polar coordinate conversion tool.

[0154] S1043: Establish plane equations corresponding to the first object image and the second object image based on the multiple three-dimensional space coordinates.

[0155] In the embodiment of the present application, since a plane in three-dimensional space can be determined by three non-collinear points on the plane, using multiple three-dimensional space coordinates to fit the plane equation can reduce the determination error of the three-dimensional space coordinates, thereby reducing the measurement error of the target object to be measured.

[0156] In this step, based on multiple three-dimensional space coordinates, a plane equation fitting algorithm is used to establish a plane equation corresponding to the first object image and the second object image.

[0157] S1044. Determine the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system based on the second pixel coordinates, the plane equation, the gimbal laser data, and the device parameters corresponding to the image acquisition device.

[0158] In an embodiment of the present application, a preset calculation method is used to convert the second pixel coordinates, plane equations, gimbal laser data, and device parameters corresponding to the image acquisition device into target three-dimensional space coordinates corresponding to each point selection position in the three-dimensional space coordinate system.

[0159] Specifically, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system are calculated through the following steps: first, based on the camera imaging principle, according to the second pixel coordinate and the camera focal length internal parameter of the camera in the device parameters, the equation of the straight line connecting the origin of the camera imaging coordinate system and the spatial point corresponding to the second pixel coordinate is calculated; then, the horizontal rotation angle and the vertical rotation angle in the gimbal laser data are used to calculate the rotation and translation matrix from the camera imaging coordinate system to the three-dimensional space coordinate system corresponding to the object to be measured; the rotation and translation matrix is ​​used to perform a rotation and translation transformation on the straight line equation, and the straight line equation is mapped to the three-dimensional space coordinate system corresponding to the object to be measured, and determined as the transformed straight line equation; finally, the intersection of the transformed straight line equation and the plane equation is calculated, and determined as the target three-dimensional space coordinates corresponding to the point selection position corresponding to the second pixel coordinate in the three-dimensional space coordinate system.

[0160] Furthermore, the user may perform multiple interactions in the image display area, that is, for each of the multiple point selection positions, multiple second pixel coordinates are obtained, and then multiple target three-dimensional space coordinates are obtained by calculation respectively.

[0161] S105 , determining the size data of the object to be measured based on the target three-dimensional space coordinates corresponding to the plurality of point selection positions.

[0162] In this step, the target three-dimensional space coordinates corresponding to the multiple selected positions are input into a preset three-dimensional space size calculation tool to determine the size data of the object to be measured.

[0163] Here, by calculating the three-dimensional space distance, the length value, width value, height value, thickness value and other data included in the distance value of the size data of the object to be measured can be calculated. Furthermore, the area value of a certain surface in the object to be measured and the overall or local volume value of the object to be measured can be calculated based on the distance value.

[0164] The object size measurement method based on object image provided in the embodiment of the present application obtains a stitched object image for measuring large-size objects by stitching multiple object images acquired by an image acquisition device for the object to be measured, and performs coordinate transformation on the selected object to be measured, and determines the size data of the object to be measured based on multiple three-dimensional space coordinates corresponding to the object to be measured, thereby avoiding the problems of image accuracy loss and measurement error, and reducing the measurement error caused by the edge distortion problem of short focal length images, thereby improving the measurement accuracy of the object size, and thus saving the cost investment in image acquisition and storage.

[0165] At the same time, the present application selects multiple second object images near the first object image and calculates the plane equations respectively, so that the three-dimensional spatial coordinates of multiple targets may not be on the same plane, thereby solving the limitation problem that the multiple coordinate points of the object to be measured must be mapped on the same focusing plane for measurement in the existing method of measuring the measurement value of the measured object.

[0166] See also Figure 2 , Figure 2 This is a schematic diagram of the structure of an object size measurement device based on an object image provided by an embodiment of the present application. Figure 2 As shown in , the measuring device 200 comprises:

[0167] An image acquisition and stitching module 210 is used to acquire a plurality of object images acquired by an image acquisition device for an object to be measured, and stitch the plurality of object images to obtain a stitched object image of the object to be measured;

[0168] A first coordinate determination module 220 is used for, in response to obtaining a plurality of selected point positions for the object to be measured, determining, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image;

[0169] A second coordinate determination module 230, configured to determine a second pixel coordinate of the point selection position in the first object image based on a first object image corresponding to the first pixel coordinate in the plurality of object images;

[0170] A third coordinate determination module, for determining, based on the second pixel coordinates, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured;

[0171] The object size determination module 240 is used to determine the size data of the object to be measured based on the target three-dimensional space coordinates corresponding to the multiple point selection positions.

[0172] Furthermore, when the image acquisition and stitching module 210 is used to acquire multiple object images acquired by the image acquisition device for the object to be measured and stitch the multiple object images to obtain a stitched object image of the object to be measured, the image acquisition and stitching module 210 is used to:

[0173] Based on a first focal length corresponding to the image acquisition device, using the image acquisition device to acquire a plurality of object images for the object to be measured;

[0174] Acquire the plurality of object images and the pan / tilt laser data corresponding to the object images respectively;

[0175] The multiple object images are spliced ​​together to obtain a spliced ​​object image of the object to be measured.

[0176] Further, in response to obtaining a plurality of selected point positions selected for the object to be measured, the first coordinate determination module 220 is used to determine, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image, the first coordinate determination module 220 is used to:

[0177] In response to an interactive action of a user in an image display area for visually displaying an object, determining a plurality of point selection positions of the object to be measured;

[0178] For each of the plurality of click positions, determining a third pixel coordinate of the click position in the image display area;

[0179] Based on the size data respectively corresponding to the image display area and the spliced ​​object image, the first pixel coordinates of the point selection position in the spliced ​​object image are determined.

[0180] Further, when the second coordinate determination module 230 is used to determine the second pixel coordinate of the point selection position in the first object image based on the first object image corresponding to the first pixel coordinate in the plurality of object images, the second coordinate determination module 230 is used to:

[0181] For each object image in the plurality of object images, determining a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image;

[0182] Based on the pixel range, determining a first object image corresponding to the first pixel coordinate in the plurality of object images;

[0183] Based on the rotation and translation mapping relationship of the first object image in the spliced ​​object image, a second pixel coordinate of the point selection position in the first object image is determined.

[0184] Further, when the second coordinate determination module 230 is used to determine the rotation and translation mapping relationship and pixel range of each object image in the spliced ​​object image for each object image in the plurality of object images, the second coordinate determination module 230 is used to:

[0185] Determining a collection order corresponding to the plurality of object images based on collection times corresponding to the plurality of object images;

[0186] For each of the multiple object images, based on the acquisition order, matching the feature points of each object image with respect to the spliced ​​object image to determine a plurality of feature points of each object image;

[0187] Compare the inter-point distance values ​​corresponding to the plurality of feature points with a preset value, and according to the comparison result, remove the feature points whose inter-point distance values ​​are greater than the preset value, so as to obtain a plurality of target feature points;

[0188] Based on the multiple target feature points, a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image are determined.

[0189] Further, when the second coordinate determination module 230 is used to determine the first object image corresponding to the first pixel coordinate in the plurality of object images based on the pixel range, the second coordinate determination module 230 is used to:

[0190] Based on the pixel range, determining the pixel center point coordinates of each object image in the plurality of object images in the stitched object image;

[0191] Determine, based on the first pixel coordinates and the pixel center point coordinates, a point image distance value corresponding to the first pixel coordinates and each object image;

[0192] The plurality of point image distance values ​​are sorted in ascending numerical order, and the object image corresponding to the point image distance value that is ranked first in the ascending numerical order is determined as the first object image corresponding to the first pixel coordinate.

[0193] Further, when the third coordinate determination module 240 is used to determine the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured based on the second pixel coordinates, the third coordinate determination module 240 is used to:

[0194] Selecting a plurality of second object images with the first object image as the center from the plurality of object images, and constructing a three-dimensional space coordinate system relative to the object to be measured with the image acquisition device as the origin;

[0195] Determine a plurality of three-dimensional space coordinates corresponding to the first object image and the second object image in the three-dimensional space coordinate system based on the pan / tilt laser data corresponding to the first object image and the second object image respectively;

[0196] Based on the multiple three-dimensional space coordinates, establishing plane equations corresponding to the first object image and the second object image;

[0197] Based on the second pixel coordinates, the plane equation, the pan-tilt laser data and the device parameters corresponding to the image acquisition device, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system are determined.

[0198] The object size measuring device based on object image provided in the embodiment of the present application obtains a spliced ​​object image for measuring large-size objects by splicing multiple object images captured by an image acquisition device for the object to be measured, and performs coordinate conversion on the selected object to be measured, and determines the size data of the object to be measured based on multiple three-dimensional space coordinates corresponding to the object to be measured, thereby avoiding the problems of image accuracy loss and measurement error, and reducing the measurement error caused by the edge distortion problem of short-focal-length images, thereby improving the measurement accuracy of the object size, and thus saving the cost investment in image acquisition and storage.

[0199] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown in , the electronic device 300 includes a processor 310 , a memory 320 and a bus 330 .

[0200] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 communicates with the memory 320 via the bus 330. When the machine-readable instructions are executed by the processor 310, the above-mentioned Figure 1 The specific implementation of the steps of the object size measurement method based on the object image in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0201] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1The specific implementation of the steps of the object size measurement method based on the object image in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0203] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0206] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0207] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for measuring object size based on object image, characterized in that: The method comprises: Acquire a plurality of object images captured by an image acquisition device for the object to be measured, and stitch the plurality of object images together to obtain a stitched object image of the object to be measured; In response to acquiring a plurality of selected point positions for the object to be measured, determining, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image; Determining a second pixel coordinate of the point selection position in the first object image based on a first object image corresponding to the first pixel coordinate in the plurality of object images; Based on the second pixel coordinates, determining the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured; Based on the target three-dimensional space coordinates respectively corresponding to the plurality of point selection positions, the size data of the object to be measured is determined.

2. The method according to claim 1, characterized in that The step of acquiring a plurality of object images acquired by an image acquisition device for the object to be measured, and splicing the plurality of object images to obtain a spliced ​​object image of the object to be measured includes: Based on a first focal length corresponding to the image acquisition device, using the image acquisition device to acquire a plurality of object images for the object to be measured; Acquire the plurality of object images and the pan / tilt laser data corresponding to the object images respectively; The multiple object images are spliced ​​together to obtain a spliced ​​object image of the object to be measured.

3. The method according to claim 1, characterized in that: In response to acquiring a plurality of selected point positions for the object to be measured, determining, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image, includes: In response to an interactive action of a user in an image display area for visually displaying an object, determining a plurality of point selection positions of the object to be measured; For each of the plurality of click positions, determining a third pixel coordinate of the click position in the image display area; Based on the size data respectively corresponding to the image display area and the spliced ​​object image, the first pixel coordinates of the point selection position in the spliced ​​object image are determined.

4. The method according to claim 1, characterized in that The determining, based on a first object image corresponding to the first pixel coordinate in the plurality of object images, a second pixel coordinate of the point selection position in the first object image includes: For each object image in the plurality of object images, determining a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image; Based on the pixel range, determining a first object image corresponding to the first pixel coordinate in the plurality of object images; Based on the rotation and translation mapping relationship of the first object image in the spliced ​​object image, a second pixel coordinate of the point selection position in the first object image is determined.

5. The method according to claim 4, characterized in that The step of determining, for each object image in the plurality of object images, a rotational translational mapping relationship and a pixel range of each object image in the spliced ​​object image includes: Determining a collection order corresponding to the plurality of object images based on collection times corresponding to the plurality of object images; For each of the multiple object images, based on the acquisition order, matching the feature points of each object image with respect to the spliced ​​object image to determine a plurality of feature points of each object image; Compare the inter-point distance values ​​corresponding to the plurality of feature points with a preset value, and according to the comparison result, remove the feature points whose inter-point distance values ​​are greater than the preset value, so as to obtain a plurality of target feature points; Based on the multiple target feature points, a rotation and translation mapping relationship and a pixel range of each object image in the stitched object image are determined.

6. The method according to claim 4, characterized in that The determining, based on the pixel range, a first object image corresponding to the first pixel coordinate in the plurality of object images includes: Based on the pixel range, determining the pixel center point coordinates of each object image in the plurality of object images in the stitched object image; Determine, based on the first pixel coordinates and the pixel center point coordinates, a point image distance value corresponding to the first pixel coordinates and each object image; The plurality of point image distance values ​​are sorted in ascending numerical order, and the object image corresponding to the point image distance value that is ranked first in the ascending numerical order is determined as the first object image corresponding to the first pixel coordinate.

7. The method according to claim 2, characterized in that The step of determining, based on the second pixel coordinates, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured comprises: Selecting a plurality of second object images with the first object image as the center from the plurality of object images, and constructing a three-dimensional space coordinate system relative to the object to be measured with the image acquisition device as the origin; Determine a plurality of three-dimensional space coordinates corresponding to the first object image and the second object image in the three-dimensional space coordinate system based on the pan / tilt laser data corresponding to the first object image and the second object image respectively; Based on the multiple three-dimensional space coordinates, establishing plane equations corresponding to the first object image and the second object image; Based on the second pixel coordinates, the plane equation, the pan-tilt laser data and the device parameters corresponding to the image acquisition device, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system are determined.

8. An object size measuring device based on object image, characterized in that: The device comprises: An image acquisition and stitching module, used to acquire a plurality of object images acquired by an image acquisition device for an object to be measured, and stitch the plurality of object images to obtain a stitched object image of the object to be measured; A first coordinate determination module, configured to, in response to obtaining a plurality of selected point positions for the object to be measured, determine, for each of the plurality of selected point positions, a first pixel coordinate of the selected point position in the spliced ​​object image; A second coordinate determination module, configured to determine a second pixel coordinate of the point selection position in the first object image based on a first object image corresponding to the first pixel coordinate in the plurality of object images; A third coordinate determination module, for determining, based on the second pixel coordinates, the target three-dimensional space coordinates corresponding to the point selection position in the three-dimensional space coordinate system constructed by the image acquisition device relative to the object to be measured; The object size determination module is used to determine the size data of the object to be measured based on the target three-dimensional space coordinates corresponding to the multiple point selection positions.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are run by the processor, the steps of the object size measurement method based on object images as described in any one of claims 1 to 7 are executed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the object size measurement method based on object images according to any one of claims 1 to 7 are executed.

Citation Information

Cited By

  • Ranging method, device, equipment and medium

    CN121346740A