A real tree interactive modeling method based on sparse images
Through user interactive calibration and sparse representation of visual mapping coefficients, the parameters of multiple real tree images are unified and spliced, solving the problems of insufficient efficiency and accuracy in building three-dimensional tree models in the existing technology, and improving the efficiency of building three-dimensional models. and accuracy.
Patent Information
- Application Number
- CN202310825611.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-07-07
AI Technical Summary
Existing interactive modeling methods are insufficient in efficiency and accuracy in interactive editing and parameter unification of multiple real tree images, making it difficult to build efficient and accurate three-dimensional tree models.
Calibrate the same point group through user interactive calibration instructions, and combine it with the sparse representation of the real tree image to determine the visual mapping coefficient, achieve parameter unification and efficient splicing of multiple real tree images, and build an accurate three-dimensional model.
The efficiency and accuracy of 3D model construction are improved, and efficient and accurate 3D tree reconstruction is achieved.
Smart Images

Figure CN116797739B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of modeling, and in particular to a real tree interactive modeling method based on sparse images. Background Art
[0002] At present, the modeling of real trees has wide application value in many fields. In the fields of virtual reality, landscape design, 3D animation and games, the introduction of 3D models of real trees can greatly enhance the realism and immersion of the scene. However, due to the complexity of the geometric structure and the diversity of the morphology of the tree, the 3D reconstruction of trees in the real environment has always been a challenging problem in computer graphics and virtual plant research. One of the effective modeling methods in the prior art is the interactive modeling method, which is to interactively edit and build a 3D model of the tree by interactive control instructions input by the user. Compared with the rule-based modeling method or the laser scanning point cloud modeling method, this method improves the quality of the built 3D model.
[0003] However, the existing interactive modeling methods do not take into account the interactive editing of multiple real tree images, as well as the parameter unification and efficient and accurate splicing of multiple real tree images. Therefore, the efficiency and accuracy of building tree models based on interactive modeling methods need to be further improved.
[0004] Therefore, the present invention proposes a real tree interactive modeling method based on sparse images. Summary of the invention
[0005] The present invention provides a real tree interactive modeling method based on sparse images, which is used to determine the visual mapping coefficients between multiple real tree images by using the same point group calibrated by the user's interactive calibration instructions and combining with the sparse representation of the real tree image, thereby achieving parameter unification and efficient and accurate splicing of the multiple real tree images, not only realizing the three-dimensional reconstruction of the tree at a general precision level, but also improving the construction efficiency and accuracy of the three-dimensional model.
[0006] The present invention provides a real tree interactive modeling method based on sparse images, comprising:
[0007] S1: Obtain multiple real tree images and determine the sparse representation of each real tree image;
[0008] S2: Based on the interactive calibration command, mark the same point groups between different real tree images;
[0009] S3: Establishing visual mapping coefficients between corresponding real tree images based on the same point groups;
[0010] S4: screening out a standard real tree image from multiple real tree images, and determining a unified sparse representation of each real tree image based on the standard real tree image and the visual mapping coefficient;
[0011] S5: Based on the unified sparse representation of all real tree images, a 3D model of the real tree is constructed.
[0012] Preferably, the real tree interactive modeling method based on sparse images, S1: obtaining multiple real tree images and determining a sparse representation of each real tree image, comprises:
[0013] S101: Determine a circular curve path with the actual center of the real tree as the center of the circle and the preset distance as the radius;
[0014] S102: based on an acquisition interval angle that does not exceed an interval angle threshold and preset image acquisition parameters, rotating on a circular curve path to acquire a plurality of real tree images;
[0015] S103: Determine a sparse representation of each real tree image.
[0016] Preferably, in the real tree interactive modeling method based on sparse images, the number of points in the same point group contained in each real tree image is not less than the same point number threshold.
[0017] Preferably, the real tree interactive modeling method based on sparse images, S2: based on interactive calibration instructions, marking the same point groups between different real tree images, comprises:
[0018] S201: parsing an interactive calibration instruction input by a user, and determining a first calibration operation of the user in a first real tree image and a second calibration operation in a second real tree image;
[0019] S202: determining a first calibration point based on the first calibration operation, and determining a second calibration point based on the second calibration operation;
[0020] S203: Combine each first calibration point with the corresponding second calibration point to obtain a corresponding identical point group.
[0021] Preferably, the real tree interactive modeling method based on sparse images, S3: establishing visual mapping coefficients between corresponding real tree images based on the same point groups, comprises:
[0022] Determine a first pixel value and a first coordinate value of a first calibration point in the same point group in the first real tree image and a second pixel value and a second coordinate value of a second calibration point in the second real tree image;
[0023] Determining a coordinate difference between a first coordinate value and a second coordinate value and a pixel difference between a first pixel value and a second pixel value;
[0024] Based on the coordinate differences and pixel differences of all identical point groups included in the first real tree image and the second real tree image, a visual mapping coefficient between corresponding real tree images is determined.
[0025] Preferably, the real tree interactive modeling method based on sparse images, S4: screening out a standard real tree image from a plurality of real tree images, and determining a unified sparse representation of each real tree image based on the standard real tree image and the visual mapping coefficient, comprises:
[0026] Screening out a standard real tree image from multiple real tree images;
[0027] Based on the visual mapping coefficient between the real tree image and the standard real tree image, the sparse representation corresponding to the real tree image is visually unified to obtain a unified sparse representation corresponding to the real tree image;
[0028] Based on the unified sparse representation, the sparse representations corresponding to the remaining real tree images except the standard real tree image and the real tree image corresponding to the unified sparse representation are successively and progressively unified to obtain a unified sparse representation of each real tree image.
[0029] Preferably, the real tree interactive modeling method based on sparse images, screening out a standard real tree image from a plurality of real tree images, comprises:
[0030] Calibrate the reference line of the real tree image to obtain the reference line in the real tree image;
[0031] The matching degree between the reference line and the standard reference line is calculated, and the real tree image to which the reference line corresponding to the maximum matching degree belongs is taken as the standard real tree image.
[0032] Preferably, the real tree interactive modeling method based on sparse images, S5: building a three-dimensional model of the real tree based on a unified sparse representation of all real tree images, comprising:
[0033] The unified real tree images corresponding to the unified sparse representation are stitched together to obtain a panoramic image of the real tree;
[0034] Build a 3D model of a real tree based on panoramic images.
[0035] Preferably, the real tree interactive modeling method based on sparse images, splicing unified real tree images corresponding to unified sparse representations to obtain a panoramic image of the real tree, includes:
[0036] Pixel reconstruction is performed based on unified sparse representation to obtain a unified real tree image;
[0037] Determine the two-dimensional coordinates of the corresponding points in the unified real tree image based on the difference between the unified sparse representation and the corresponding sparse representation and the coordinates of each point in the same point group in the real tree image corresponding to the corresponding sparse representation;
[0038] Based on the two-dimensional coordinates, the corresponding points are marked on the corresponding unified real tree image to obtain a marked image;
[0039] The labeled image corresponding to the standard real tree image is used as the starting stitching image;
[0040] Taking the point marked in the starting stitched image as the center, dividing the first screening area of the corresponding point in the starting stitched image according to a preset method, and determining the first distribution information of all the first screening areas in the starting stitched image;
[0041] Determine the total number of points in each of the remaining marked images except the starting stitched image, which are the same point group as the points in the starting stitched image, and use the marked image corresponding to the maximum total number of points as the image to be stitched;
[0042] Taking the points in the image to be stitched that are the same point group as the points in the starting stitched image as the center, dividing the second screening area of the corresponding points in the image to be stitched according to a preset method, and determining the second distribution information of all the second screening areas in the image to be stitched;
[0043] Based on the first distribution information and the second distribution information, determining a first to-be-stitched region in the starting stitched image and a second to-be-stitched region in the to-be-stitched image;
[0044] Based on the first area to be stitched and the second area to be stitched, the starting stitching image and the image to be stitched are overlapped and stitched to obtain a new starting stitching image. Based on the new starting stitching image, overlapping stitching is continued until all marked images are stitched together to obtain a panoramic image of the real tree.
[0045] Preferably, the real tree interactive modeling method based on sparse images, based on the first distribution information and the second distribution information, determines the first to-be-stitched area in the starting stitching image and the second to-be-stitched area in the to-be-stitched image, including:
[0046] Determine the coordinates of a first center point corresponding to the first screening area based on the first distribution information, and determine the coordinates of a second center point corresponding to the second screening area based on the second distribution information;
[0047] Associating the first screening area and the second screening area corresponding to the points in the same point group to obtain an area association result;
[0048] Based on the area association result, the first center point coordinates corresponding to the first screening area are associated with the second center point coordinates corresponding to the second screening area to obtain a point coordinate association result;
[0049] Determine the coordinate conversion coefficients of the first screening area and the second screening area based on the difference between the first center point coordinates and the second center point coordinates included in the point coordinate association result;
[0050] Determine the combination of associated points in the first screening area and the second screening area based on the coordinate conversion coefficient;
[0051] When a representation difference between a first visual representation value of a first pixel point included in the associated point combination in the first screening area and a second visual representation value of a second pixel point in the second screening area is less than a representation difference threshold, the first pixel point and the second pixel point included in the corresponding associated point combination are determined to be overlappable pixel points;
[0052] Determine a first area based on all overlappable pixels included in the first screening area, and determine a second area based on all overlappable pixels included in the second screening area;
[0053] The first region and the second region are subjected to synchronous smooth denoising to obtain a first region to be stitched in the initial stitching image and a second region to be stitched in the image to be stitched.
[0054] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0055] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0057] Figure 1 A flow chart of a real tree interactive modeling method based on sparse images in an embodiment of the present invention;
[0058] Figure 2 A flow chart of another method for interactive modeling of a real tree based on sparse images in an embodiment of the present invention;
[0059] Figure 3 This is a flow chart of another method for interactive modeling of a real tree based on sparse images in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0061] Embodiment 1:
[0062] The present invention provides a real tree interactive modeling method based on sparse images, referring to Figure 1 ,include:
[0063] S1: Obtain multiple real tree images and determine the sparse representation of each real tree image;
[0064] S2: Based on the interactive calibration command, mark the same point groups between different real tree images;
[0065] S3: Establishing visual mapping coefficients between corresponding real tree images based on the same point groups;
[0066] S4: screening out a standard real tree image from multiple real tree images, and determining a unified sparse representation of each real tree image based on the standard real tree image and the visual mapping coefficient;
[0067] S5: Based on the unified sparse representation of all real tree images, a 3D model of the real tree is constructed.
[0068] In this embodiment, the real tree image is an image containing the physical shape of a real tree.
[0069] In this embodiment, sparse representation is to select representative atoms from an existing dictionary to represent the input image. The dictionary is usually an over-complete dictionary, so when encoding the image, the vector usually has only a few elements that are not zero, and the rest are all zero, so such a coding vector is called sparse coding.
[0070] In this embodiment, the interactive calibration instruction is an instruction input by the user for marking the same point groups between different real tree images.
[0071] In this embodiment, the same point group is a combination of pixel points at the same point position on the real tree in different real tree images.
[0072] In this embodiment, the visual mapping coefficient is a matrix representing the mapping of the coordinate points and visual values (chromaticity value or brightness value or contrast value) of the same point position on the real tree in different real tree images.
[0073] In this embodiment, the standard real tree image is a real tree image with image parameters most suitable for modeling selected from multiple real fuzzy images, and is also a standard for unifying the sparse representations of other real tree images.
[0074] In this embodiment, the unified sparse representation is a sparse representation that unifies the sparse representations of the remaining real tree images except the standard real tree image based on the sparse representation of the standard real tree image and the visual mapping coefficient.
[0075] In this embodiment, the three-dimensional model is a three-dimensional model of a real tree constructed based on a unified sparse representation of all real tree images.
[0076] The beneficial effects of the above technology are: through the user's interactive calibration instructions to calibrate the same point group, combined with the sparse representation of the real tree image, the visual mapping coefficient between multiple real tree images is determined, and then the parameter unification and efficient and accurate stitching of multiple real tree images are achieved, which not only realizes the three-dimensional reconstruction of trees at a general precision level, but also improves the efficiency and accuracy of building three-dimensional models.
[0077] Embodiment 2:
[0078] Based on Example 1, the real tree interactive modeling method based on sparse images, S1: obtaining multiple real tree images and determining a sparse representation of each real tree image, referring to Figure 2 ,include:
[0079] S101: Determine a circular curve path with the actual center of the real tree as the center of the circle and the preset distance as the radius;
[0080] S102: based on an acquisition interval angle that does not exceed an interval angle threshold and preset image acquisition parameters, rotating on a circular curve path to acquire a plurality of real tree images;
[0081] S103: Determine a sparse representation of each real tree image.
[0082] In this embodiment, the actual center is the point corresponding to the average coordinate value of the coordinate values of all intersection points of the real tree and the ground.
[0083] In this embodiment, the preset distance is a preset distance for acquiring the real tree image. If the real tree image is acquired by video recording, the preset distance is the video recording distance.
[0084] In this embodiment, the radius of the circular curve is a path of a circular curve shape determined by taking the actual center of the real tree as the center of the circle and the preset distance as the radius, and is also an acquisition path for acquiring the real tree image.
[0085] In this embodiment, the interval angle threshold is a preset maximum interval angle between a first connecting line between the acquisition position and the center of the circle each time a real tree image is acquired on the circular curve path and a second connecting line between the acquisition position and the center of the circle when the real tree image is acquired next time.
[0086] In this embodiment, the acquisition interval angle is the interval angle between the first connecting line between the acquisition position and the center of the circle each time the real tree image is acquired and the second connecting line between the acquisition position and the center of the circle when the real tree image is acquired next time in the actual process of acquiring the real tree image.
[0087] In this embodiment, the pre-set image acquisition parameters are pre-set parameters for acquiring real tree images. For example, if the real tree image is acquired by video, the pre-set image acquisition parameters are photographic parameters, such as camera focal length, camera magnification, etc.
[0088] The beneficial effects of the above technology are: based on the actual center of the real tree, the circular curve path determined by the preset distance, the constraints on the acquisition interval angle, and the preset image acquisition parameters, the validity of the acquired real tree image is guaranteed, and the validity of the sparse representation of each real tree image obtained for the real tree modeling process is also guaranteed.
[0089] Embodiment 3:
[0090] On the basis of Example 1, in the real tree interactive modeling method based on sparse images, the number of points in the same point group contained in each real tree image is not less than the same point number threshold.
[0091] In this embodiment, the same point number threshold is a preset minimum number of points in the same point group contained in each real tree image.
[0092] The beneficial effect of the above technology is that by constraining the number of points in the same point group contained in the real tree image, the accuracy of subsequent splicing of the real tree image is guaranteed.
[0093] Embodiment 4:
[0094] Based on Example 1, the real tree interactive modeling method based on sparse images, S2: based on the interactive calibration instruction, marking the same point groups between different real tree images, reference Figure 3 ,include:
[0095] S201: parsing an interactive calibration instruction input by a user, and determining a first calibration operation of the user in a first real tree image and a second calibration operation in a second real tree image;
[0096] S202: determining a first calibration point based on the first calibration operation, and determining a second calibration point based on the second calibration operation;
[0097] S203: Combine each first calibration point with the corresponding second calibration point to obtain a corresponding identical point group.
[0098] In this embodiment, the first calibration operation is an operation for calibrating the first point in the same point group in the real tree image.
[0099] In this embodiment, the first real tree image is the real tree image to which the first point included in the same point group belongs.
[0100] In this embodiment, the second real tree image is the real tree image to which the second point included in the same point group belongs.
[0101] In this embodiment, the second calibration operation is an operation for calibrating a second point in the same point group in the real tree image.
[0102] In this embodiment, the first calibration point is the first point included in the same point group calibrated in the first real tree image based on the first calibration operation.
[0103] In this embodiment, the second calibration point is the second point included in the same point group calibrated in the second true-time image based on the second calibration operation.
[0104] In this embodiment, the same point group is a point combination obtained by combining each first calibration point with the corresponding second calibration point.
[0105] The beneficial effects of the above technology are: based on the interactive calibration instructions input by the user, the points contained in the same point group calibrated in different real tree images are calibrated based on the user interaction technology, and the pixel points corresponding to the same point position in the real tree in different real tree images are calibrated, thereby ensuring the accuracy of the same point calibration results and the subsequent splicing results of the real tree images.
[0106] Embodiment 5:
[0107] On the basis of Example 4, the real tree interactive modeling method based on sparse images, S3: establishing visual mapping coefficients between corresponding real tree images based on the same point groups, comprises:
[0108] Determine a first pixel value and a first coordinate value of a first calibration point in the same point group in the first real tree image and a second pixel value and a second coordinate value of a second calibration point in the second real tree image;
[0109] Determining a coordinate difference between a first coordinate value and a second coordinate value and a pixel difference between a first pixel value and a second pixel value;
[0110] Based on the coordinate differences and pixel differences of all identical point groups included in the first real tree image and the second real tree image, a visual mapping coefficient between corresponding real tree images is determined.
[0111] In this embodiment, the first pixel value is the pixel value corresponding to the first calibration point in the first real tree image.
[0112] In this embodiment, the first coordinate value is the coordinate value corresponding to the first calibration point in the coordinate system corresponding to the first real tree image.
[0113] In this embodiment, the second pixel value is the pixel value corresponding to the second calibration point in the second real tree image.
[0114] In this embodiment, the second coordinate value is the coordinate value corresponding to the second calibration point in the coordinate system corresponding to the second real tree image.
[0115] In this embodiment, the coordinate difference is the difference between the first coordinate value and the second coordinate value.
[0116] In this embodiment, the pixel difference is the difference between the first pixel value and the second pixel value.
[0117] In this embodiment, based on the coordinate differences and pixel differences of all identical point groups included in the first real tree image and the second real tree image, the visual mapping coefficients between the corresponding real tree images are determined, including:
[0118] The visual mapping coefficients include coordinate mapping coefficients and pixel mapping coefficients;
[0119] The coordinate difference is divided by the corresponding first coordinate value to determine the sub-coordinate mapping coefficient of the corresponding point, and the average value of all the sub-coordinate mapping coefficients is used as the coordinate mapping coefficient between the corresponding real tree images;
[0120] The pixel difference is divided by the corresponding first pixel value to determine the corresponding sub-pixel mapping coefficient, and the average value of all sub-pixel mapping coefficients is used as the pixel mapping coefficient between the corresponding real tree images.
[0121] The beneficial effect of the above technology is: based on the coordinate values and pixel values of the points in the same point group, the absorption of the coordinate mapping relationship and pixel mapping relationship between different real tree images is determined, thereby providing a basis for the subsequent realization of coordinate unification between different real tree images.
[0122] Embodiment 6:
[0123] Based on Example 1, the real tree interactive modeling method based on sparse images, S4: screening out a standard real tree image from multiple real tree images, and determining a unified sparse representation of each real tree image based on the standard real tree image and the visual mapping coefficient, comprising:
[0124] Screening out a standard real tree image from multiple real tree images;
[0125] Based on the visual mapping coefficient between the real tree image and the standard real tree image, the sparse representation corresponding to the real tree image is visually unified to obtain a unified sparse representation corresponding to the real tree image;
[0126] Based on the unified sparse representation, the sparse representations corresponding to the remaining real tree images except the standard real tree image and the real tree image corresponding to the unified sparse representation are successively and progressively unified to obtain a unified sparse representation of each real tree image.
[0127] In this embodiment, based on the visual mapping coefficient between the standard real tree image and the sparse representation corresponding to the real tree image, visual unification is performed to obtain a unified sparse representation of the real tree image, which is:
[0128] The sparse representation corresponding to the standard real tree image is multiplied by the visual mapping coefficient to obtain a unified sparse representation corresponding to the real tree image.
[0129] In this embodiment, based on the unified sparse representation, the sparse representations corresponding to the remaining real tree images except the standard real tree image and the real tree image corresponding to the unified sparse representation are successively and progressively unified to obtain a unified sparse representation of each real tree image, which is:
[0130] Among the remaining real tree images except the standard real tree image and the real tree image corresponding to the unified sparse representation, determine the real tree image corresponding to the visual mapping coefficient between the known real tree image and the real tree image corresponding to the unified sparse representation, multiply the known unified sparse representation by the visual mapping coefficient to obtain the unified sparse representation corresponding to the real tree image.
[0131] The beneficial effects of the above technology are: based on the sparse representation corresponding to the visual mapping coefficient and the standard real tree image, the remaining real tree images are successively and progressively unified, and then the sparse representation of the remaining real tree images except the standard real tree are unified according to the standard real tree image, which provides a basis for the subsequent splicing between real tree images.
[0132] Embodiment 7:
[0133] On the basis of Example 6, the real tree interactive modeling method based on sparse images, screening out a standard real tree image from multiple real tree images, includes:
[0134] Calibrate the reference line of the real tree image to obtain the reference line in the real tree image;
[0135] The matching degree between the reference line and the standard reference line is calculated, and the real tree image to which the reference line corresponding to the maximum matching degree belongs is taken as the standard real tree image.
[0136] In this embodiment, the reference line calibration is performed on the real tree image to obtain the reference line in the real tree image, that is:
[0137] The reference line of the real tree image is calibrated based on a preset reference line calibration method (for example, a line between the highest point of the real tree in the real tree image and a center point determined based on the average value of the coordinates of all intersection points in contact with the ground is used as a reference line) to obtain a reference line in the real tree image.
[0138] In this embodiment, the standard reference line is a pre-prepared standard reference line (corresponding to the reference line calibration method, for example: the reference line calibration method is: the line between the highest point of the real tree in the real tree image and the center point determined based on the average value of the coordinates of all intersection points in contact with the ground is used as the reference line, and the standard reference line is a straight line located in the middle of the real tree image screen and parallel to the ordinate axis of the coordinate system corresponding to the real tree image as the standard reference line)
[0139] In this embodiment, calculating the matching degree between the reference line and the standard reference line includes:
[0140]
[0141] Where p is the matching degree between the reference line and the standard reference line, i is the i-th point in the reference line, n is the total number of points in the reference line, j is the j-th point in the standard reference line, m is the total number of points in the standard reference line, and x is i is the horizontal coordinate of the i-th point in the reference line, y i is the ordinate of the i-th point in the reference line, x j is the horizontal coordinate of the jth point in the standard reference line, y j is the ordinate of the jth point in the standard reference line;
[0142] For example, the reference line contains three points with coordinates (1,1), (2,1), and (3,1) in sequence; the standard reference line contains three points with coordinates (0,1), (1,1), and (2,1) in sequence;
[0143] Then p is 0.52.
[0144] In this embodiment, the standard real tree image is the real tree image to which the reference line corresponding to the maximum matching degree belongs.
[0145] The beneficial effect of the above technology is that based on the calculated matching degree between the reference line calibrated in the real tree image and the standard reference line, the real tree image with the most suitable image parameters for modeling can be screened out.
[0146] Embodiment 8:
[0147] Based on Example 6, the real tree interactive modeling method based on sparse images, S5: building a three-dimensional model of the real tree based on a unified sparse representation of all real tree images, including:
[0148] The unified real tree images corresponding to the unified sparse representation are stitched together to obtain a panoramic image of the real tree;
[0149] Build a 3D model of a real tree based on panoramic images.
[0150] In this embodiment, the panoramic image is an image obtained by stitching unified real tree images corresponding to the unified sparse representation.
[0151] In this embodiment, the unified true tree image is the image corresponding to the unified sparse representation.
[0152] The beneficial effect of the above technology is that an accurate and complete three-dimensional model of a real tree can be constructed based on a panoramic image of a real tree obtained by splicing unified real tree images corresponding to the unified sparse representation.
[0153] Embodiment 9:
[0154] On the basis of Example 8, the real tree interactive modeling method based on sparse images, splicing unified real tree images corresponding to unified sparse representations to obtain a panoramic image of the real tree, includes:
[0155] Pixel reconstruction is performed based on unified sparse representation to obtain a unified real tree image;
[0156] Determine the two-dimensional coordinates of the corresponding points in the unified real tree image based on the difference between the unified sparse representation and the corresponding sparse representation and the coordinates of each point in the same point group in the real tree image corresponding to the corresponding sparse representation;
[0157] Based on the two-dimensional coordinates, the corresponding points are marked on the corresponding unified real tree image to obtain a marked image;
[0158] The labeled image corresponding to the standard real tree image is used as the starting stitching image;
[0159] Taking the point marked in the starting stitched image as the center, dividing the first screening area of the corresponding point in the starting stitched image according to a preset method, and determining the first distribution information of all the first screening areas in the starting stitched image;
[0160] Determine the total number of points in each of the remaining marked images except the starting stitched image, which are the same point group as the points in the starting stitched image, and use the marked image corresponding to the maximum total number of points as the image to be stitched;
[0161] Taking the points in the image to be stitched that are the same point group as the points in the starting stitched image as the center, dividing the second screening area of the corresponding points in the image to be stitched according to a preset method, and determining the second distribution information of all the second screening areas in the image to be stitched;
[0162] Based on the first distribution information and the second distribution information, determining a first to-be-stitched region in the starting stitched image and a second to-be-stitched region in the to-be-stitched image;
[0163] Based on the first area to be stitched and the second area to be stitched, the starting stitching image and the image to be stitched are overlapped and stitched to obtain a new starting stitching image. Based on the new starting stitching image, overlapping stitching is continued until all marked images are stitched together to obtain a panoramic image of the real tree.
[0164] In this embodiment, the unified real tree image is an image obtained after pixel reconstruction based on the unified sparse representation.
[0165] In this embodiment, pixel reconstruction is to determine the pixel values of the pixels in the image based on the unified sparse representation, and then obtain a new image.
[0166] In this embodiment, based on the difference between the unified sparse representation (i.e., the sparse representation after the corresponding real tree image is unified) and the corresponding sparse representation (i.e., the initial sparse representation before the corresponding real tree image is unified) and the coordinates of each point in the same point group in the real tree image corresponding to the corresponding sparse representation, the two-dimensional coordinates of the corresponding point in the unified real tree image are determined, including:
[0167] The coordinate difference of the corresponding point is determined based on the difference between the unified sparse representation and the corresponding sparse representation, and the sum of the coordinate of the corresponding point in the real tree image corresponding to the corresponding sparse representation and the corresponding coordinate difference is regarded as the two-dimensional coordinate of the corresponding point in the unified real tree image.
[0168] In this embodiment, the two-dimensional coordinates are the coordinate values of each point in the same point group in the corresponding unified real tree image.
[0169] In this embodiment, the marked image is an image obtained by marking corresponding points on the corresponding unified real tree image based on two-dimensional coordinates.
[0170] In this embodiment, the initial spliced image is the marked image corresponding to the standard real tree image.
[0171] In this embodiment, the preset method is, for example, to use a circular area determined with the center as the center and the preset radius as the radius as the screening area.
[0172] In this embodiment, the first screening area is an area of corresponding points divided in the starting stitched image in a preset manner with the point marked in the starting stitched image as the center.
[0173] In this embodiment, the first distribution information is information including the coordinate value of each point in the first screening area in the corresponding starting stitched image.
[0174] In this embodiment, the image to be stitched is the marked image corresponding to the maximum total number of points in the remaining marked images except the initial stitched image.
[0175] In this embodiment, the total number of points is the total number of points in each of the remaining marked images except the initial stitched image that are the same point group as the points in the initial stitched image.
[0176] In this embodiment, the second screening area is an area of corresponding points in the image to be stitched divided in a preset manner with points in the image to be stitched that are the same point group as the points in the starting image to be stitched as the center.
[0177] In this embodiment, the second distribution information is information including the coordinate value of each point in the second screening area in the corresponding image to be stitched.
[0178] In this embodiment, the first area to be stitched is an area determined in the initial stitching image based on the first distribution information and the second distribution information to be overlapped and stitched with the corresponding image to be stitched.
[0179] In this embodiment, the second area to be stitched is an area determined in the image to be stitched based on the first distribution information and the second distribution information and overlapped with the corresponding starting stitching image.
[0180] In this embodiment, the new starting stitching image is an image obtained by overlapping and stitching the first to-be-stitched region in the starting stitching image and the second to-be-stitched region in the to-be-stitched image.
[0181] The beneficial effects of the above technology are as follows: based on the difference between the sparse representation after unification and the sparse representation before unification, the points included in the original same point group are marked in the unified real tree image corresponding to the unified coefficient representation, and then the image to be stitched is screened out based on the total number of points that are in the same point group as the points in the starting stitched image, and the screening area is determined based on the points of the same point group included in the starting stitched image and the image to be stitched, and the area to be stitched in the starting stitched image and the image to be stitched is determined based on the screening area and the corresponding area distribution information, thereby achieving accurate stitching between the real tree images and obtaining a complete and accurate panoramic image of the real tree.
[0182] Embodiment 10:
[0183] On the basis of Example 9, the real tree interactive modeling method based on sparse images, based on the first distribution information and the second distribution information, determines the first to-be-stitched area in the starting stitching image and the second to-be-stitched area in the to-be-stitched image, including:
[0184] Determine the coordinates of a first center point corresponding to the first screening area based on the first distribution information, and determine the coordinates of a second center point corresponding to the second screening area based on the second distribution information;
[0185] Associating the first screening area and the second screening area corresponding to the points in the same point group to obtain an area association result;
[0186] Based on the area association result, the first center point coordinates corresponding to the first screening area are associated with the second center point coordinates corresponding to the second screening area to obtain a point coordinate association result;
[0187] Determine the coordinate conversion coefficients of the first screening area and the second screening area based on the difference between the first center point coordinates and the second center point coordinates included in the point coordinate association result;
[0188] Determine the combination of associated points in the first screening area and the second screening area based on the coordinate conversion coefficient;
[0189] When a representation difference between a first visual representation value of a first pixel point included in the associated point combination in the first screening area and a second visual representation value of a second pixel point in the second screening area is less than a representation difference threshold, the first pixel point and the second pixel point included in the corresponding associated point combination are determined to be overlappable pixel points;
[0190] Determine a first area based on all overlappable pixels included in the first screening area, and determine a second area based on all overlappable pixels included in the second screening area;
[0191] The first region and the second region are subjected to synchronous smooth denoising to obtain a first region to be stitched in the initial stitching image and a second region to be stitched in the image to be stitched.
[0192] In this embodiment, the first center point coordinates are coordinate values determined based on the average value of coordinate values of all points in the first screening area included in the first distribution information.
[0193] In this embodiment, the coordinates of the second center point are coordinate values determined based on the average value of the coordinate values of all points in the second screening area contained in the second distribution information.
[0194] In this embodiment, the region association result is a result obtained by associating the first screening region and the second screening region corresponding to points belonging to the same point group.
[0195] In this embodiment, the coordinate association result is a result obtained by associating the first center point coordinates corresponding to the first screening area with the second center point coordinates corresponding to the second screening area.
[0196] In this embodiment, the coordinate conversion coefficient (including the abscissa conversion coefficient and the ordinate conversion coefficient) is the ratio of the difference between the first center point coordinate and the second center point coordinate contained in the point coordinate association result and the corresponding first center point coordinate, that is:
[0197]
[0198] In the formula, α1 is the horizontal coordinate conversion coefficient, α2 is the vertical coordinate conversion coefficient, ΔX is the difference between the horizontal coordinate value of the first center point coordinate and the horizontal coordinate value of the second center point coordinate, X1 is the horizontal coordinate value of the first center point coordinate, ΔY is the difference between the vertical coordinate value of the first center point coordinate and the vertical coordinate value of the second center point coordinate, and Y1 is the vertical coordinate value of the first center point coordinate.
[0199] In this embodiment, the combination of associated points in the first screening area and the second screening area is determined based on the coordinate conversion coefficient, that is:
[0200] A point whose coordinate value is a ratio of a coordinate value of a corresponding point in the first screening area to a coordinate conversion coefficient is determined in the second screening area, and the point is combined with the corresponding point in the first screening area as an associated point.
[0201] In this embodiment, the associated point combination is a combination of associated points in the first screening area and the second screening area determined based on the coordinate conversion coefficient.
[0202] In this embodiment, the first visual representation value is a parameter of the first pixel in the first screening area, for example, a pixel value, a chromaticity value, a brightness value, etc. of the first pixel.
[0203] In this embodiment, the first pixel point is a point in the first screening area.
[0204] In this embodiment, the second pixel point is a point in the second screening area.
[0205] In this embodiment, the second visual representation value is a parameter of the second pixel in the second screening area, for example, a pixel value, a chromaticity value, a brightness value, etc. of the second pixel.
[0206] In this embodiment, the representation difference is the difference between the first visual representation value and the second visual representation value.
[0207] In this embodiment, the representation difference threshold is the maximum representation difference corresponding to when the first pixel point and the second pixel point included in the associated point combination are determined to be overlappable pixel points.
[0208] In this embodiment, the overlapping pixel points are the first pixel point and the second pixel point corresponding to the associated point combination when the representation difference between the first visual representation value of the first pixel point in the first screening area and the second visual representation value of the second pixel point in the second screening area is less than the representation difference threshold.
[0209] In this embodiment, the first area is an area determined based on all overlappable pixels contained in the first screening area.
[0210] In this embodiment, the second area is an area determined based on all punchable pixels contained in the second screening area.
[0211] In this embodiment, the first area and the second area are subjected to synchronous smooth denoising, that is:
[0212] Perform smooth denoising on the first area, and delete points in the second area that are overlapping pixels with the points deleted in the smooth denoising process;
[0213] At the same time, smooth denoising is performed on the second area, and points in the first area that are overlapping pixels with the points deleted in the smooth denoising process are deleted.
[0214] In this embodiment, the first area to be stitched is an area in the initial stitched image obtained after synchronous smoothing and denoising the first area and the second area, which can be overlapped and stitched with the image to be stitched.
[0215] In this embodiment, the second area to be stitched is an area in the image to be stitched obtained after synchronous smoothing and denoising the first area and the second area, which can be overlapped and stitched with the initial stitching image.
[0216] The beneficial effects of the above technology are as follows: based on the first distribution information of the first screening area and the second distribution information of the second screening area, the association between the first screening area and the second screening area is realized; based on the area association result and the first center point coordinates of the first screening area and the second center coordinates of the second screening area, the point combination between the first screening area and the associated second screening area is realized; and then by judging the difference in visual representation values between the points contained in the associated point combination, overlapping associated point combinations are screened out from all associated point combinations; and then synchronous smooth denoising is performed on the areas determined by the overlapping associated point combinations, thereby accurately determining the starting stitching image and the area to be stitched in the image to be stitched.
[0217] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A real tree interactive modeling method based on sparse images, characterized in that: include: S1: Obtain multiple real tree images and determine the sparse representation of each real tree image; S2: Based on the interactive calibration instructions, mark the same point groups between different real tree images, including: S201: parsing an interactive calibration instruction input by a user, and determining a first calibration operation of the user in a first real tree image and a second calibration operation in a second real tree image; S202: determining a first calibration point based on the first calibration operation, and determining a second calibration point based on the second calibration operation; S203: combining each first calibration point with the corresponding second calibration point to obtain a corresponding same point group; S3: Establishing visual mapping coefficients between corresponding real tree images based on the same point groups, including: Determine a first pixel value and a first coordinate value of a first calibration point in the same point group in the first real tree image and a second pixel value and a second coordinate value of a second calibration point in the second real tree image; Determining a coordinate difference between a first coordinate value and a second coordinate value and a pixel difference between a first pixel value and a second pixel value; Determining visual mapping coefficients between corresponding real tree images based on coordinate differences and pixel differences of all identical point groups included in the first real tree image and the second real tree image; S4: screening out a standard real tree image from multiple real tree images, and determining a unified sparse representation of each real tree image based on the standard real tree image and the visual mapping coefficient; S5: Based on the unified sparse representation of all real tree images, a 3D model of the real tree is constructed.
2. The real tree interactive modeling method based on sparse images according to claim 1, characterized in that: S1: Obtain multiple real tree images and determine the sparse representation of each real tree image, including: S101: Determine a circular curve path with the actual center of the real tree as the center of the circle and the preset distance as the radius; S102: based on an acquisition interval angle that does not exceed an interval angle threshold and preset image acquisition parameters, rotating on a circular curve path to acquire a plurality of real tree images; S103: Determine a sparse representation of each real tree image.
3. The real tree interactive modeling method based on sparse images according to claim 1, characterized in that: The number of points in the same point group contained in each real tree image is not less than the same point number threshold.
4. The method for interactive modeling of real trees based on sparse images according to claim 1, characterized in that: S4: Screening out a standard real tree image from multiple real tree images, and determining a unified sparse representation of each real tree image based on the standard real tree image and the visual mapping coefficient, including: Screening out a standard real tree image from multiple real tree images; Based on the visual mapping coefficient between the real tree image and the standard real tree image, the sparse representation corresponding to the real tree image is visually unified to obtain a unified sparse representation corresponding to the real tree image; Based on the unified sparse representation, the sparse representations corresponding to the remaining real tree images except the standard real tree image and the real tree image corresponding to the unified sparse representation are successively and progressively unified to obtain a unified sparse representation of each real tree image.
5. The method for interactive modeling of real trees based on sparse images according to claim 4, characterized in that: Screen out standard real tree images from multiple real tree images, including: Calibrate the reference line of the real tree image to obtain the reference line in the real tree image; The matching degree between the reference line and the standard reference line is calculated, and the real tree image to which the reference line corresponding to the maximum matching degree belongs is taken as the standard real tree image.
6. The method for interactively modeling a real tree based on sparse images according to claim 4, characterized in that: S5: Based on the unified sparse representation of all real tree images, a 3D model of the real tree is constructed, including: The unified real tree images corresponding to the unified sparse representation are stitched together to obtain a panoramic image of the real tree; Build a 3D model of a real tree based on panoramic images.
7. The method for interactively modeling a real tree based on sparse images according to claim 6, characterized in that: The unified real tree images corresponding to the unified sparse representation are stitched together to obtain a panoramic image of the real tree, including: Obtaining a labeled image based on a unified real tree image corresponding to the unified sparse representation and the corresponding sparse representation, taking the labeled image corresponding to the standard real tree image as a starting stitching image, determining first distribution information of a first screening area in the starting stitching image, screening an image to be stitched from the remaining labeled images except the starting stitching image, and determining second distribution information of a second screening area in the image to be stitched; Based on the first distribution information and the second distribution information, a first area to be stitched in the starting stitched image and a second area to be stitched in the image to be stitched are determined; based on the first area to be stitched and the second area to be stitched, the starting stitched image and the image to be stitched are overlapped and stitched to obtain a new starting stitched image; and overlapping and stitching are continued based on the new starting stitched image until a panoramic image of the real tree is obtained.
8. The method for interactively modeling a real tree based on sparse images according to claim 7, characterized in that: Determining a first to-be-stitched region in the starting stitched image and a second to-be-stitched region in the to-be-stitched image based on the first distribution information and the second distribution information includes: Associating the first center point coordinates determined based on the first distribution information with the second center point coordinates determined based on the second distribution information to obtain a point coordinate association result; Determine the associated point combinations in the first screening area and the second screening area based on the point coordinate association result, and select the overlappable pixel points from all associated point combinations based on the first visual representation value of the first pixel point and the second visual representation value of the second pixel point included in the associated point combinations; Synchronous smooth denoising is performed on a first area determined based on the overlappable pixels contained in the first screening area and a second area determined based on the overlappable pixels contained in the second screening area to obtain a first area to be stitched in the starting stitched image and a second area to be stitched in the image to be stitched.
