Image-based volume measurement method and device, electronic equipment and storage medium
Through the shooting of multiple initial images through camera equipment for three -dimensional reconstruction and point cloud data processing, it solves the problem of low volume measurement efficiency of irregular shape objects in the financial insurance field, and achieves high -efficiency and accurate volume measurement.
Patent Information
- Application Number
- CN202411548568.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-28
AI Technical Summary
In property transportation claims scenarios in the financial insurance field, it is difficult for the prior art to efficiently and accurately measure the volume of irregularly shaped objects, especially without relying on external references and high-cost hardware.
By obtaining multiple initial images taken by camera equipment, three -dimensional reconstruction, split cloud data, coordinate scaling calculation, and finally calculate the volume data of the target object.
In the case of implementing the accuracy and efficiency of the volume measurement of the insured object without external references and high -cost hardware, it simplifies the operation process.
Smart Images

Figure CN119379768A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an image-based volume measurement method and device, an electronic device, and a storage medium. Background Art
[0002] In the property transportation claims scenario in the financial insurance field, the insured object may be damaged during transportation. It is usually necessary to measure the volume of the insured object to obtain the volume information of the insured object before and after transportation, so as to determine whether the insured object is damaged and make corresponding compensation according to the degree of damage.
[0003] In the related art, a laser sensor can be used to measure the side length of the object to be measured, and then the measured size data can be used to calculate the volume of the object to be measured, but this method is only applicable to objects with regular shapes. In the case of irregularly shaped objects, volume measurement can be achieved through computer vision technology. For example, images of a reference object of known size and the object to be measured are collected at multiple angles. After identifying the feature points of the object to be measured, the object to be measured is artificially disassembled into a combination of multiple regular bodies based on these feature points. The volume of each regular body is estimated by using the relative pixel ratio between each regular body and the reference object, and then all regular bodies are summed up to obtain the volume of the object to be measured. However, this method relies on standard reference objects and requires geometric disassembly of the object to be measured, which increases the difficulty of volume measurement.
[0004] Therefore, how to improve the efficiency of volume measurement of insured objects has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the embodiments of the present application is to propose an image-based volume measurement method and device, an electronic device and a storage medium, aiming to improve the efficiency of volume measurement of an insured object.
[0006] To achieve the above object, a first aspect of an embodiment of the present application proposes an image-based volume measurement method, comprising:
[0007] Acquire at least two initial images obtained by photographing a target object with a camera device, obtain a photographing height of the camera device, and obtain photographing height data; wherein any two of the initial images are obtained by photographing at different shooting angles;
[0008] Selecting a reference image from at least two of the initial images, and filtering target height data from the shooting height data according to the reference image;
[0009] Performing three-dimensional reconstruction on at least two of the initial images to obtain candidate point cloud coordinate data in a reference reference system; wherein the reference reference system is a camera coordinate system when the camera device captures the reference image;
[0010] Performing point cloud data segmentation on the candidate point cloud coordinate data to obtain background point cloud coordinate data;
[0011] Perform coordinate scaling calculation according to the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain target point cloud coordinate data;
[0012] Volume calculation is performed according to the target point cloud coordinate data to obtain volume data of the target object.
[0013] In some embodiments, performing coordinate scaling calculation according to the target height data, the background point cloud coordinate data, and the candidate point cloud coordinate data to obtain the target point cloud coordinate data includes:
[0014] Performing point cloud plane fitting on the background point cloud coordinate data to obtain a background plane;
[0015] Calculating the coordinate distance from the origin of the reference reference system to the background plane;
[0016] Performing proportional calculation based on the target height data and the coordinate distance to obtain a size scaling factor;
[0017] Coordinate data calculation is performed according to the size scaling factor and the candidate point cloud coordinate data to obtain the target point cloud coordinate data.
[0018] In some embodiments, the three-dimensional reconstruction of at least two of the initial images to obtain candidate point cloud coordinate data in a reference frame includes:
[0019] Acquire first acquisition angle data of the camera device when capturing the reference image;
[0020] Performing three-dimensional reconstruction on at least two of the initial images to obtain reference point cloud coordinate data in a reference coordinate system; wherein the reference coordinate system is a camera coordinate system of the camera device when taking any of the initial images;
[0021] Coordinate conversion calculation is performed according to the first acquisition angle data and the reference point cloud coordinate data to obtain the candidate point cloud coordinate data.
[0022] In some embodiments, performing coordinate conversion calculation according to the first acquisition angle data and the reference point cloud coordinate data to obtain the candidate point cloud coordinate data includes:
[0023] Constructing a matrix according to the first acquisition angle data to obtain a reference transformation matrix;
[0024] Determine an intermediate image corresponding to the reference coordinate system from the initial image, and obtain a camera extrinsic parameter matrix when the camera device captures the intermediate image;
[0025] Perform matrix operations based on the reference transformation matrix and the camera extrinsic matrix to obtain a target transformation matrix;
[0026] Coordinate calculation is performed according to the target transformation matrix and the reference point cloud coordinate data to obtain the candidate point cloud coordinate data.
[0027] In some embodiments, acquiring at least two initial images obtained by photographing the target object using a camera device includes:
[0028] Acquire video data of a target object captured by a camera device;
[0029] Extract any two adjacent first video frames and second video frames from the video data;
[0030] Extracting feature points from the first video frame to obtain pixel coordinates of first feature points;
[0031] Extracting feature points from the second video frame to obtain pixel coordinates of second feature points;
[0032] Create a video frame according to the first feature point pixel coordinates, the second feature point pixel coordinates, the first pixel color value of the first video frame, and the second pixel color value of the second video frame to obtain an intermediate frame;
[0033] The first video frame, the intermediate frame and the second video frame are used as the initial image.
[0034] In some embodiments, the step of creating a video frame according to the first feature point pixel coordinates, the second feature point pixel coordinates, the first pixel color value of the first video frame, and the second pixel color value of the second video frame to obtain an intermediate frame includes:
[0035] Calculating a coordinate change vector between the first feature point pixel coordinates and the second feature point pixel coordinates;
[0036] Performing color value calculation according to the first pixel color value and the second pixel color value to obtain a candidate pixel color value;
[0037] An intermediate frame is determined according to the first feature point pixel coordinates, the coordinate change vector and the candidate pixel color value.
[0038] In some embodiments, performing volume calculation according to the target point cloud coordinate data to obtain volume data of the target object includes:
[0039] Dividing the target point cloud coordinate data into intervals along a preset axis to obtain point cloud sub-data of at least two intervals;
[0040] For each of the intervals, the projection area of the point cloud sub-data on the preset projection plane is calculated, and the volume of the projection area and the length of the interval are calculated to obtain intermediate volume data; wherein the preset axis is the normal line of the preset projection plane;
[0041] All the intermediate volume data are integrated and calculated to obtain the volume data of the target object.
[0042] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides an image-based volume measurement device, the device comprising:
[0043] An image acquisition module, used to acquire at least two initial images obtained by photographing a target object with a camera device, acquire a photographing height of the camera device, and obtain photographing height data; wherein any two initial images are obtained by photographing at different shooting angles;
[0044] A height data acquisition module, used for selecting a reference image from at least two of the initial images, and filtering out target height data from the photographed height data according to the reference image;
[0045] A three-dimensional reconstruction module, used to perform three-dimensional reconstruction on at least two of the initial images to obtain candidate point cloud coordinate data in a reference reference system; wherein the reference reference system is a camera coordinate system when the camera device captures the reference image;
[0046] A point cloud segmentation module is used to segment the candidate point cloud coordinate data to obtain background point cloud coordinate data;
[0047] A point cloud coordinate calculation module, used to perform coordinate scaling calculation according to the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain target point cloud coordinate data;
[0048] The volume calculation module is used to perform volume calculation according to the target point cloud coordinate data to obtain the volume data of the target object.
[0049] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0050] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0051] The image-based volume measurement method and device, electronic device and storage medium proposed in the present application first obtain at least two initial images obtained by photographing the target object by a camera device, obtain the shooting height of the camera device, and obtain shooting height data. Then, a reference image is selected from the initial image, and the target height data is filtered out from the shooting height data according to the reference image. This embodiment processes images from different perspectives and selects a reference image as a reference, and at the same time determines the target height data, so as to provide necessary reference data for the subsequent size restoration of the candidate point cloud coordinate data. Then, the initial image is three-dimensionally reconstructed to obtain the candidate point cloud coordinate data in the reference reference system, which only relies on conventional camera equipment and does not require additional hardware equipment that can obtain depth information, thereby reducing the cost and complexity of the entire measurement process. Then, the candidate point cloud coordinate data is segmented to obtain background point cloud coordinate data. Subsequently, coordinate scaling calculation is performed based on the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain the target point cloud coordinate data, thereby ensuring that the target point cloud data reflects the actual size of the insured object. Finally, the volume calculation is performed based on the target point cloud coordinate data to obtain the volume data of the target object. Through the method of the embodiment of the present application, no external reference objects and high-cost hardware are required, the operation process is simple, and the accuracy and efficiency of the volume measurement of the insured object in the claims settlement scenario in the financial insurance field are greatly improved, thereby effectively solving the problem of low efficiency of the volume measurement of the insured object in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flow chart of an image-based volume measurement method provided in an embodiment of the present application;
[0053] Figure 2 yes Figure 1 Flow chart of step S101 in FIG.
[0054] Figure 3 yes Figure 2 Flow chart of step S205 in FIG.
[0055] Figure 4 yes Figure 1 Flow chart of step S103 in FIG.
[0056] Figure 5 yes Figure 4 Flow chart of step S403 in FIG.
[0057] Figure 6 yes Figure 1 Flow chart of step S105 in FIG.
[0058] Figure 7 yes Figure 1 Flow chart of step S106 in FIG.
[0059] Figure 8 is a schematic structural diagram of an image-based volume measurement device provided in an embodiment of the present application;
[0060] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0062] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0064] First, some nouns involved in this application are analyzed:
[0065] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0066] Computer Vision (CV): Computer vision is a technology that studies how to enable machines to perceive, understand and interpret the outside world from images or multi-dimensional data. It involves multiple technical fields such as image processing, machine learning, pattern recognition, artificial intelligence, etc. The purpose is to enable machines to automatically perform visual tasks such as image recognition, object detection, scene reconstruction, etc.
[0067] 3D Point Cloud Reconstruction: It is a key technology in the field of computer vision and graphics processing. Its main purpose is to reconstruct the accurate geometric model of objects or scenes in three-dimensional space from point cloud data. Point cloud data consists of a series of points distributed in three-dimensional space, each point contains a position (usually X, Y, Z coordinates), and may also include additional information such as color and laser intensity.
[0068] In the property transportation claims scenario in the financial insurance field, the insured object may be damaged during transportation. It is usually necessary to measure the volume of the insured object to obtain the volume information of the insured object before and after transportation, so as to determine whether the insured object is damaged and make corresponding compensation according to the degree of damage.
[0069] In the related art, a laser sensor can be used to measure the side length of the object to be measured, and then the measured size data can be used to calculate the volume of the object to be measured, but this method is only applicable to objects with regular shapes. In the face of irregular objects, volume measurement can be achieved through computer vision technology. A common method is to use a standard reference object of known size, place the reference object and the object to be measured in the same scene, and take multiple pictures of the object to be measured and the reference object from different perspectives. Using image recognition technology, the key points of the object to be measured in the picture are detected and abstractly decomposed into a combination of multiple regular bodies. Combined with the relative pixel ratio of the reference object and the abstract regular body, the volume of multiple regular bodies is estimated and summed to obtain the volume of the object to be measured. This method needs to rely on reference objects, and it is necessary to geometrically decompose irregular objects to be measured based on manual experience, which increases the difficulty of volume measurement.
[0070] Another common method is to use a depth camera to obtain a depth image while taking a visible light image, and use the image including color information and depth information to reconstruct the object under test in three dimensions. The reconstructed point cloud is the point cloud at the real scale. However, this method introduces additional hardware equipment and requires the calibration of the visible light and depth cameras in advance to align the color image and the depth image, resulting in poor versatility of the method. Therefore, how to improve the efficiency of volume measurement of insured objects has become a technical problem that needs to be solved urgently.
[0071] Based on this, the embodiments of the present application provide an image-based volume measurement method and device, an electronic device, and a storage medium, aiming to improve the efficiency of volume measurement of an insured object.
[0072] The image-based volume measurement method and device, electronic device, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the image-based volume measurement method in the embodiments of the present application is described.
[0073] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0074] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0075] The image-based volume measurement method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The image-based volume measurement method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements an image-based volume measurement method, etc., but is not limited to the above forms.
[0076] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0077] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain sensitive personal information of the user, the user's separate permission or separate consent will be obtained through a pop-up window or jump to a confirmation page, etc. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for enabling the normal operation of the embodiment of the present application is obtained. For example, in the actual measurement scenario of the embodiment of the present application, the user may use a mobile phone to shoot image data, and the image data is stored in the memory inside the mobile phone. When performing the method of the embodiment of the present application, it is necessary to access the mobile phone album, and the user's separate permission or separate consent will be obtained in advance through a pop-up window or jump to a confirmation page, etc. After clearly obtaining the user's separate permission or separate consent, the image data is obtained.
[0078] Figure 1 is an optional flow chart of the image-based volume measurement method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0079] Step S101, obtaining at least two initial images obtained by photographing a target object with a camera device, obtaining a photographing height of the camera device, and obtaining photographing height data.
[0080] Step S102 : selecting a reference image from at least two initial images, and filtering out target height data from the photographed height data according to the reference image.
[0081] Step S103 , performing three-dimensional reconstruction on at least two initial images to obtain candidate point cloud coordinate data in a reference frame.
[0082] Step S104, performing point cloud data segmentation on the candidate point cloud coordinate data to obtain background point cloud coordinate data.
[0083] Step S105 , performing coordinate scaling calculation according to the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain the target point cloud coordinate data.
[0084] Step S106, performing volume calculation based on the target point cloud coordinate data to obtain volume data of the target object.
[0085] In the steps S101 to S106 shown in the embodiment of the present application, at least two initial images obtained by photographing the target object by a camera device are first obtained, the shooting height of the camera device is obtained, and the shooting height data is obtained. Then, a reference image is selected from the initial image, and the target height data is filtered out from the shooting height data according to the reference image. In this embodiment, by processing images from different perspectives and selecting a reference image as a reference, the target height data is determined at the same time, so as to provide necessary reference data for the subsequent size restoration of the candidate point cloud coordinate data. Then, the initial image is three-dimensionally reconstructed to obtain the candidate point cloud coordinate data in the reference reference system, which only relies on conventional camera devices and does not require additional hardware devices that can obtain depth information, thereby reducing the cost and complexity of the entire measurement process. Then, the candidate point cloud coordinate data is segmented to obtain the background point cloud coordinate data. Subsequently, coordinate scaling calculation is performed based on the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain the target point cloud coordinate data, thereby ensuring that the target point cloud data reflects the actual size of the insured object. Finally, the volume calculation is performed based on the target point cloud coordinate data to obtain the volume data of the target object. Through the method of the embodiment of the present application, no external reference objects and high-cost hardware are required, the operation process is simple, and the accuracy and efficiency of the volume measurement of the insured object in the claims settlement scenario in the financial insurance field are greatly improved, thereby effectively solving the problem of low efficiency of the volume measurement of the insured object in the prior art.
[0086] In step S101 of some embodiments, the initial image is an original image taken of the target object by a camera device, wherein any two initial images are taken from different shooting angles. In the embodiment of the present application, the number of initial images can be 30 to 40, but is not limited thereto. The shooting height data is the height of the camera device relative to the ground when the initial image is taken. The target object is an object whose volume needs to be measured. In some transportation claims scenarios, the target object is an insured object.
[0087] The camera device can be any device that captures images. The preferred camera devices in this embodiment are digital cameras and mobile phone cameras. It should be noted that the depth camera can directly obtain the depth information of the image after taking the image. Compared with the three-dimensional reconstruction of images collected by other types of camera devices through software algorithms, it is faster to convert the depth information of the depth image through the camera internal reference to obtain the point cloud coordinate data required later. However, the depth camera needs to be calibrated before use, and a high-precision depth camera will add additional economic costs.
[0088] The initial image can be obtained by directly obtaining the image captured by the camera device, or by intercepting the video data collected by the camera device, but is not limited to this. When the camera device captures the video screen, the moving speed may increase suddenly, resulting in the intercepted part of the initial image failing to capture the details of the target object, thereby affecting the accuracy of subsequent data processing. Please refer to Figure 2 In some embodiments, in step S101, obtaining at least two initial images obtained by photographing the target object by a camera device may include but is not limited to steps S201 to S206:
[0089] Step S201: acquiring video data of a target object shot by a camera device.
[0090] Step S202: extract any two adjacent first video frames and second video frames from the video data.
[0091] Step S203: extract feature points from the first video frame to obtain pixel coordinates of first feature points.
[0092] Step S204: extract feature points from the second video frame to obtain pixel coordinates of second feature points.
[0093] Step S205 , creating a video frame according to the first feature point pixel coordinates, the second feature point pixel coordinates, the first pixel color value of the first video frame, and the second pixel color value of the second video frame to obtain an intermediate frame.
[0094] Step S206: taking the first video frame, the intermediate frame and the second video frame as the initial image.
[0095] In step S201 of some embodiments, the video data includes at least two consecutive video frames, which record changes of the target object in a time series and visual information, such as color, shape, and position in the image.
[0096] In step S202 of some embodiments, the first video frame may be any video frame captured from the video data, the second video frame may be the next video frame or the previous video frame of the first video frame, and the acquisition time interval between the first video frame and the second video frame depends on the frame rate of the video data, where the frame rate may be 24FPS (Frames PerSecond), 30FPS or 60FPS.
[0097] In step S203 of some embodiments, the feature points may be selected from prominent and easy-to-track points in the image, such as corners, edges, and regions with distinct textures of the target object, and the first feature point pixel coordinates are the pixel coordinates of the feature points selected in the first video frame. In some embodiments, the video frame can be displayed on an interactive interface, and the operator can use an input device to manually select pixel points in the video frame as feature points on the display interface.
[0098] In step S204 of some embodiments, the second feature point pixel coordinates are pixel coordinates of the feature point selected in the second video frame.
[0099] In step S205 of some embodiments, the first pixel color value is the pixel RGB value corresponding to the pixel coordinates of the first feature point, the second pixel color value is the pixel RGB value corresponding to the pixel coordinates of the second feature point, and the intermediate frame, i.e., the transitional video frame between the first video frame and the second video frame, is generated by calculating and interpolating the pixel color values and position changes of the two existing frames. For details, please refer to Figure 3 In some embodiments, step S205 may include but is not limited to steps S301 to S303:
[0100] Step S301, calculating a coordinate change vector between the pixel coordinates of a first feature point and the pixel coordinates of a second feature point.
[0101] Step S302 , performing color value calculation according to the first pixel color value and the second pixel color value to obtain a candidate pixel color value.
[0102] Step S303: determining an intermediate frame according to the pixel coordinates of the first feature point, the coordinate change vector and the candidate pixel color value.
[0103] In step S301 of some embodiments, for each feature point in the first video frame, a matching feature point is obtained in the second video frame. For each pair of matching feature points, the coordinate change amount of the first feature point pixel coordinates converted to the second feature point pixel coordinates is calculated, and then the coordinate change amount is divided according to the number of intermediate frames. The final coordinate change amount is the coordinate change vector. In this embodiment, the number of intermediate frames is 1, and half of the coordinate change amount is taken as the coordinate change vector.
[0104] In step S302 of some embodiments, for each pair of matching feature points, the first pixel color value and the second pixel color value are interpolated. The interpolation calculation may be linear interpolation calculation, bilinear interpolation calculation, or spline interpolation calculation, and the RGB value finally calculated is the candidate pixel color value.
[0105] In step S303 of some embodiments, an image having the same size as the first video frame is created, and the coordinate change vector is added to each first feature point coordinate pixel to obtain a new pixel coordinate. The candidate pixel color value corresponding to the first feature point is used to fill the pixel represented by the new pixel coordinate until all feature points are traversed, and the final image is the intermediate frame.
[0106] Steps S301 to S303 shown in the embodiment of the present application can calculate the precise movement of each feature point between frames by accurately matching and motion estimating the feature points in two consecutive video frames, and calculate the pixel color of the intermediate frame by interpolation method to achieve a natural and smooth visual effect of the transition frame, thereby generating an effective intermediate frame.
[0107] In step S206 of some embodiments, the generated intermediate frames, together with the original first video frame and the second video frame, serve as a new set of initial image sequences.
[0108] Steps S201 to S206 shown in the embodiment of the present application enhance the quality of video analysis and processing by acquiring continuous video frames from video data and performing feature point detection and interpolation processing. In particular, in the scenario of capturing the target object while the camera device is moving quickly, this embodiment can increase the practicality and accuracy of the video data by creating intermediate frames.
[0109] In step S102 of some embodiments, a reference image is selected from the initial image, and the target height data is filtered out from the shooting height data according to the reference image. It should be noted that the initial image of the camera device taking a bird's-eye view of the target object is used as the reference image, and the target height data is the distance between the camera device and the plane where the target object is placed when the reference image is taken. In this embodiment, the plane is preferably the ground. In some embodiments, the target object is placed on the ground, and the camera device is used to collect multi-angle images of the target object, and the initial image with a shooting angle horizontal to the ground is used as the reference image, and the target height data is the distance from the camera device to the ground. For the acquisition method of the target height data, in some embodiments, the end of the mechanical arm clamps the camera device, thereby controlling the camera device to move, and the encoder installed on the joint or guide rail can provide the precise position data of the device movement, thereby obtaining the distance from the camera device to the ground when the camera device takes each initial image, and obtaining the shooting height data corresponding to the reference image after determining the reference image, and using the shooting height data as the target height data. In other embodiments, the user keeps the camera device horizontal to the ground and keeps the arm horizontal when taking the reference image. The user can provide his or her own height information. Combined with the average human head-to-body ratio of 7.5, it can be estimated that the distance from the arm to the foot of the human body is approximately 6.375 head lengths, and then it is determined that the distance from the arm to the foot is approximately 85% of the height. This ratio is multiplied by the height information provided by the user to obtain the target height data. The method of this embodiment will greatly reduce the user's usage threshold and is simple to operate, which can further enhance the wide applicability of the method.
[0110] In step S103 of some embodiments, three-dimensional reconstruction is performed on at least two initial images to obtain candidate point cloud coordinate data in a reference reference system, wherein the reference reference system is a camera coordinate system when the camera device captures the reference image, and the candidate point cloud coordinate data is point cloud data of the target object. Figure 4 In some embodiments, step S103 may include but is not limited to steps S401 to S403:
[0111] Step S401: acquiring first acquisition angle data when the camera device captures a reference image.
[0112] Step S402 , performing three-dimensional reconstruction on at least two initial images to obtain reference point cloud coordinate data in a reference coordinate system.
[0113] Step S403: performing coordinate conversion calculation according to the first acquisition angle data and the reference point cloud coordinate data to obtain candidate point cloud coordinate data.
[0114] In step S401 of some embodiments, the first acquisition angle data is the pitch angle, roll angle and yaw angle of the camera device when shooting the reference image. A gyroscope sensor can be set to connect with the camera device, and when the camera device shoots the reference image, the reading of the gyroscope is obtained to obtain the first acquisition angle data.
[0115] In step S402 of some embodiments, the reference coordinate system is the camera coordinate system of the camera device when shooting any initial image. In this embodiment, the camera coordinate system of the camera device shooting the first initial image is selected as the reference coordinate system. It is understandable that the multiple initial images can be three-dimensionally reconstructed by using a motion structure recovery algorithm (Structure from Motion, SFM), a multi-view stereo matching algorithm (Multi-View Stereo, MVS) or a neural network, such as NeRF (Neural Radiance Fields). Exemplarily, an open source three-dimensional reconstruction tool (such as COLMAP) equipped with an SFM algorithm is used to perform three-dimensional reconstruction on multiple initial images to obtain the camera internal and external parameter matrix and point cloud coordinate data corresponding to each initial image, and the point cloud coordinate data of all the initial images are converted to the camera coordinate system of the first initial image to obtain reference point cloud coordinate data.
[0116] In step S403 of some embodiments, please refer to Figure 5 In some embodiments, step S403 may include but is not limited to steps S501 to S504:
[0117] Step S501 , constructing a matrix according to the first acquisition angle data to obtain a reference transformation matrix.
[0118] Step S502, determining an intermediate image corresponding to the reference coordinate system from the initial image, and obtaining a camera extrinsic parameter matrix when the camera device captures the intermediate image.
[0119] Step S503, performing matrix operations according to the reference transformation matrix and the camera extrinsic matrix to obtain a target transformation matrix.
[0120] Step S504, performing coordinate calculation according to the target transformation matrix and the reference point cloud coordinate data to obtain candidate point cloud coordinate data.
[0121] In step S501 of some embodiments, the reference transformation matrix is the camera extrinsic matrix of the camera device when shooting the reference image, which represents the transformation relationship between the camera coordinate system and the world coordinate system when shooting the reference image. The first acquisition angle data includes the pitch angle and the roll angle of the camera device when shooting the reference image. The extrinsic matrix of the camera device at this time is determined based on these two angles. For example, the reference transformation matrix can be expressed as the matrix Represented by, where the pitch angle is represented by α y , the roll angle is denoted as α x .
[0122] In step S502 of some embodiments, if the reference coordinate system is the camera coordinate system of the camera device taking the first initial image, the intermediate image is the first initial image, and the camera extrinsic parameter matrix at this time represents the conversion relationship between the camera coordinate system when taking the intermediate image and the world coordinate system.
[0123] In step S503 of some embodiments, a reference transformation matrix and a camera extrinsic parameter matrix are multiplied to obtain a target transformation matrix, where the target transformation matrix represents a transformation relationship from a reference coordinate system to a reference reference system.
[0124] In step S504 of some embodiments, the reference point cloud coordinate data is multiplied by the target transformation matrix to obtain candidate point cloud coordinate data.
[0125] In steps S501 to S504 shown in the embodiment of the present application, a transformation matrix is established by utilizing the external parameter matrix of the camera device and specific angle data to obtain point cloud data in a reference frame, thereby providing the necessary data basis for subsequent data calculations.
[0126] In steps S401 to S403 shown in the embodiment of the present application, accurate three-dimensional reconstruction is performed on the images captured by the camera device to obtain point cloud data of the target object in a specific coordinate system, thereby providing accurate data for subsequent data calculations.
[0127] In step S104 of some embodiments, the candidate point cloud coordinate data is segmented to obtain background point cloud coordinate data. It is understandable that in the volume measurement scenario of the embodiment of the present application, since the target object is placed on the ground, the image obtained by shooting will inevitably capture the ground, resulting in the candidate point cloud coordinate data including some point cloud data representing the ground, which causes certain interference to the subsequent volume measurement calculation. Therefore, it is necessary to screen the background point cloud in the candidate point cloud coordinate data. In this embodiment, the background point cloud coordinate data represents the ground. It is understandable that a point cloud segmentation algorithm based on deep learning, such as Swin Transformer 3D and point cloud network (PointNet), etc., can be used to perform point cloud segmentation on the candidate point cloud coordinate data to separate the background point cloud coordinate data representing the ground and the foreground point cloud coordinate data representing the target object.
[0128] In step S105 of some embodiments, it should be noted that the point cloud data obtained according to the 3D reconstruction algorithm can only reflect the relative position relationship between each point cloud data. For example, the three point cloud coordinate data A (1, 0, 0), B (2, 0, 0) and C (4, 0, 0) can only indicate that the X coordinate difference between AB is half of the X coordinate difference between BC. Their coordinate data do not represent the actual size. Therefore, it is necessary to obtain the relationship between these point cloud data and the actual size data, so as to restore the size of the candidate point cloud coordinate data.
[0129] Specifically, see Figure 6 In some embodiments, step S105 includes but is not limited to steps S601 to S604:
[0130] Step S601, performing point cloud plane fitting on the background point cloud coordinate data to obtain a background plane.
[0131] Step S602, calculating the coordinate distance from the origin of the reference reference system to the background plane.
[0132] Step S603, performing a ratio calculation based on the target height data and the coordinate distance to obtain a size scaling factor.
[0133] Step S604 , calculating coordinate data according to the size scaling factor and the candidate point cloud coordinate data to obtain target point cloud coordinate data.
[0134] In step S601 of some embodiments, it can be understood that point cloud plane fitting is a process of finding the plane equation that best fits the point cloud data through mathematical methods. Commonly used plane fitting algorithms include least squares method, principal component analysis (PCA) and RANSAC (Random Sample Consensus).
[0135] In this embodiment, the background plane is the ground, which can be expressed by the general plane geometry equation (1):
[0136] ax+by+cz+d=0 (1),
[0137] Among them, (a, b, c) is the normal vector of the ground, and d is a constant related to the position relationship of the plane.
[0138] In step S602 of some embodiments, the origin of the reference reference system actually represents the optical center of the camera device. According to analytical formula (1), the coordinates of the perpendicular point from the origin to the background plane are calculated. The Z-axis coordinates of the perpendicular point coordinates are the coordinate distance from the origin of the reference reference system to the background plane.
[0139] In step S603 of some embodiments, since the target height data is the actual height from the photographic device to the ground in real space, the target height data is divided by the above coordinate distance to obtain a scale factor, which is the size scaling factor.
[0140] In step S604 of some embodiments, the size scaling factor is multiplied by the candidate point cloud coordinate data, and the obtained coordinate data is the target point cloud coordinate data, which can reflect the actual size of the target object.
[0141] Steps S601 to S604 shown in the embodiment of the present application enable the original point cloud data collected from the camera device to be converted into a three-dimensional model reflecting the real-world size through precise geometric calculation and proportional adjustment.
[0142] See also Figure 7 In some embodiments, step S106 may include but is not limited to steps S701 to S703:
[0143] Step S701, dividing the target point cloud coordinate data into intervals along a preset axis to obtain point cloud sub-data of at least two intervals.
[0144] Step S702: for each interval, the projection area of the point cloud sub-data on the preset projection plane is calculated, and the projection area and the length of the interval are used to perform volume calculation to obtain intermediate volume data.
[0145] Step S703: All the intermediate volume data are integrated and calculated to obtain the volume data of the target object.
[0146] In step S701 of some embodiments, it should be noted that when calculating the volume of the target object, the background point cloud in the target point cloud coordinate data needs to be eliminated, and only the foreground point cloud representing the target object is calculated. The preset axis can be an X-axis, a Y-axis, or a Z-axis, etc., but is not limited thereto. In this embodiment, the preset axis is taken as an example of the X-axis, and the foreground point cloud is divided into 100 parts along the X-axis direction, and each part of the point cloud data is the point cloud sub-data. The minimum X-axis coordinate to the maximum X-axis coordinate in each point cloud sub-data is the length of an interval.
[0147] In step S702 of some embodiments, the preset axis is the normal of the preset projection plane. If the preset axis is the X axis, the preset projection plane is the YOZ plane. The projection area is the minimum envelope area of the point cloud sub-data in the preset projection plane. It can be calculated by the convex hull algorithm for the point cloud sub-data. The volume occupied by the point cloud sub-data in space can be obtained by multiplying the projection area by the length of the interval, that is, the intermediate volume data.
[0148] In some embodiments, the intermediate volume data can be calculated according to the following analytical formula (2):
[0149] Vi=Si*(Nf(xmax)-Nf(xmin)) / n (2),
[0150] Among them, the sequence of point cloud sub-data is represented as i, the intermediate volume data of the current point cloud sub-data is represented as Vi, the projection area of the current point cloud sub-data is represented as Si, the maximum X-axis coordinate value in the foreground point cloud is represented as Nf(xmax), the minimum X-axis coordinate value in the foreground point cloud is represented as Nf(xmin), and the number of intervals is represented as n. In this embodiment, n is equal to 100.
[0151] In step S703 of some embodiments, the intermediate volume data corresponding to all the point cloud sub-data are aggregated to obtain the volume data of the final target object.
[0152] Steps S701 to S703 shown in the embodiment of the present application divide the entire point cloud into multiple intervals along a preset axis direction, so that the volume of each part can be analyzed and calculated more carefully, thereby improving the accuracy and efficiency of the overall measurement.
[0153] See also Figure 8 The embodiment of the present application further provides an image-based volume measurement device, which can implement the above-mentioned image-based volume measurement method, and the device includes:
[0154] An image acquisition module is used to acquire at least two initial images obtained by photographing a target object with a camera device, acquire a photographing height of the camera device, and obtain photographing height data; wherein any two initial images are obtained by photographing at different shooting angles;
[0155] A height data acquisition module, used to select a reference image from at least two initial images, and filter out target height data from the captured height data according to the reference image;
[0156] A three-dimensional reconstruction module, used to perform three-dimensional reconstruction on at least two initial images to obtain candidate point cloud coordinate data in a reference reference system; wherein the reference reference system is a camera coordinate system when a camera device captures the reference image;
[0157] The point cloud segmentation module is used to segment the candidate point cloud coordinate data to obtain background point cloud coordinate data;
[0158] The point cloud coordinate calculation module is used to perform coordinate scaling calculation based on the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain the target point cloud coordinate data;
[0159] The volume calculation module is used to perform volume calculation based on the target point cloud coordinate data to obtain the volume data of the target object.
[0160] The specific implementation of the image-based volume measurement device is substantially the same as the specific implementation of the above-mentioned image-based volume measurement method, and will not be described in detail herein.
[0161] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned image-based volume measurement method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0162] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0163] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0164] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the image-based volume measurement method of the embodiment of this application;
[0165] Input / output interface 903, used to implement information input and output;
[0166] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0167] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0168] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0169] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned image-based volume measurement method is implemented.
[0170] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0171] The image-based volume measurement method, image-based volume measurement device, electronic device and storage medium provided by the embodiment of the present application first obtain at least two initial images obtained by photographing the target object by a camera device, obtain the shooting height of the camera device, and obtain shooting height data. Then, a reference image is selected from the initial image, and the target height data is filtered out from the shooting height data according to the reference image. This embodiment processes images from different perspectives and selects a reference image as a reference, and at the same time determines the target height data, so as to provide necessary reference data for the subsequent size restoration of the candidate point cloud coordinate data. Then, the initial image is three-dimensionally reconstructed to obtain the candidate point cloud coordinate data in the reference reference system, which only relies on conventional camera equipment and does not require additional hardware equipment that can obtain depth information, thereby reducing the cost and complexity of the entire measurement process. Then, the candidate point cloud coordinate data is segmented to obtain background point cloud coordinate data. Subsequently, coordinate scaling calculation is performed based on the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain the target point cloud coordinate data, thereby ensuring that the target point cloud data reflects the actual size of the insured object. Finally, the volume calculation is performed based on the target point cloud coordinate data to obtain the volume data of the target object. Through the method of the embodiment of the present application, no external reference objects and high-cost hardware are required, the operation process is simple, and the accuracy and efficiency of the volume measurement of the insured object in the claims settlement scenario in the financial insurance field are greatly improved, thereby effectively solving the problem of low efficiency of the volume measurement of the insured object in the prior art.
[0172] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0173] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0174] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0176] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0177] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0178] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0179] The units described above 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.
[0180] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0182] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. An image-based volume measurement method, characterized in that: The method comprises: Acquire at least two initial images obtained by photographing a target object with a camera device, obtain a photographing height of the camera device, and obtain photographing height data; wherein any two of the initial images are obtained by photographing at different shooting angles; Selecting a reference image from at least two of the initial images, and filtering target height data from the shooting height data according to the reference image; Performing three-dimensional reconstruction on at least two of the initial images to obtain candidate point cloud coordinate data in a reference reference system; wherein the reference reference system is a camera coordinate system when the camera device captures the reference image; Performing point cloud data segmentation on the candidate point cloud coordinate data to obtain background point cloud coordinate data; Perform coordinate scaling calculation according to the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain target point cloud coordinate data; Volume calculation is performed according to the target point cloud coordinate data to obtain volume data of the target object.
2. The method according to claim 1, characterized in that: The step of performing coordinate scaling calculation according to the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain the target point cloud coordinate data includes: Performing point cloud plane fitting on the background point cloud coordinate data to obtain a background plane; Calculating the coordinate distance from the origin of the reference reference system to the background plane; Performing proportional calculation based on the target height data and the coordinate distance to obtain a size scaling factor; Coordinate data calculation is performed according to the size scaling factor and the candidate point cloud coordinate data to obtain the target point cloud coordinate data.
3. The method according to claim 1, characterized in that The three-dimensional reconstruction of at least two of the initial images to obtain candidate point cloud coordinate data in a reference frame includes: Acquire first acquisition angle data of the camera device when capturing the reference image; Performing three-dimensional reconstruction on at least two of the initial images to obtain reference point cloud coordinate data in a reference coordinate system; wherein the reference coordinate system is a camera coordinate system of the camera device when taking any of the initial images; Coordinate conversion calculation is performed according to the first acquisition angle data and the reference point cloud coordinate data to obtain the candidate point cloud coordinate data.
4. The method according to claim 3, characterized in that The performing coordinate conversion calculation according to the first acquisition angle data and the reference point cloud coordinate data to obtain the candidate point cloud coordinate data includes: Constructing a matrix according to the first acquisition angle data to obtain a reference transformation matrix; Determine an intermediate image corresponding to the reference coordinate system from the initial image, and obtain a camera extrinsic parameter matrix when the camera device captures the intermediate image; Perform matrix operations based on the reference transformation matrix and the camera extrinsic matrix to obtain a target transformation matrix; Coordinate calculation is performed according to the target transformation matrix and the reference point cloud coordinate data to obtain the candidate point cloud coordinate data.
5. The method according to any one of claims 1 to 4, characterized in that: The step of acquiring at least two initial images obtained by photographing the target object using a camera device includes: Acquire video data of a target object captured by a camera device; Extract any two adjacent first video frames and second video frames from the video data; Extracting feature points from the first video frame to obtain pixel coordinates of first feature points; Extracting feature points from the second video frame to obtain pixel coordinates of second feature points; Create a video frame according to the first feature point pixel coordinates, the second feature point pixel coordinates, the first pixel color value of the first video frame, and the second pixel color value of the second video frame to obtain an intermediate frame; The first video frame, the intermediate frame and the second video frame are used as the initial image.
6. The method according to claim 5, characterized in that The step of creating a video frame according to the first feature point pixel coordinates, the second feature point pixel coordinates, the first pixel color value of the first video frame, and the second pixel color value of the second video frame to obtain an intermediate frame includes: Calculating a coordinate change vector between the first feature point pixel coordinates and the second feature point pixel coordinates; Performing color value calculation according to the first pixel color value and the second pixel color value to obtain a candidate pixel color value; An intermediate frame is determined according to the first feature point pixel coordinates, the coordinate change vector and the candidate pixel color value.
7. The method according to any one of claims 1 to 4, characterized in that: The step of performing volume calculation according to the target point cloud coordinate data to obtain volume data of the target object includes: Dividing the target point cloud coordinate data into intervals along a preset axis to obtain point cloud sub-data of at least two intervals; For each of the intervals, the projection area of the point cloud sub-data on the preset projection plane is calculated, and the volume of the projection area and the length of the interval are calculated to obtain intermediate volume data; wherein the preset axis is the normal line of the preset projection plane; All the intermediate volume data are integrated and calculated to obtain the volume data of the target object.
8. An image-based volume measurement device, characterized in that: The device comprises: An image acquisition module, used to acquire at least two initial images obtained by photographing a target object with a camera device, acquire a photographing height of the camera device, and obtain photographing height data; wherein any two initial images are obtained by photographing at different shooting angles; A height data acquisition module, used for selecting a reference image from at least two of the initial images, and filtering out target height data from the photographed height data according to the reference image; A three-dimensional reconstruction module, used to perform three-dimensional reconstruction on at least two of the initial images to obtain candidate point cloud coordinate data in a reference reference system; wherein the reference reference system is a camera coordinate system when the camera device captures the reference image; A point cloud segmentation module is used to segment the candidate point cloud coordinate data to obtain background point cloud coordinate data; A point cloud coordinate calculation module, used to perform coordinate scaling calculation according to the target height data, the background point cloud coordinate data and the candidate point cloud coordinate data to obtain target point cloud coordinate data; The volume calculation module is used to perform volume calculation according to the target point cloud coordinate data to obtain the volume data of the target object.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.