Intelligent measurement method and system for real estate data
By using mobile terminal camera intrinsic parameter calibration and image processing technology, intelligent measurement of real estate data is achieved, solving the problems of low efficiency and high accuracy affected by human factors in traditional measurement methods, and improving the convenience and accuracy of measurement.
Patent Information
- Application Number
- CN202511141519.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-15
AI Technical Summary
Traditional property surveying relies on specialized tools, which are cumbersome to operate, inefficient, and whose accuracy is greatly affected by human factors, making it difficult to meet the needs of rapid property data collection and intelligent management.
By acquiring the intrinsic parameter calibration data of the mobile terminal camera, image distortion correction and perspective distortion processing are performed, and the conversion relationship between image pixels and actual size is established to realize the automated size measurement of room boundary lines. A dynamic weighted fusion of intrinsic parameter data and pixel size conversion system is adopted.
It enables intelligent and automated measurement of real estate data, improving the convenience and accuracy of measurement, avoiding the inefficiency caused by relying on professional tools and manual annotation, and improving the adaptability and accuracy of measurement results.
Smart Images

Figure CN120726113B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent measurement, in particular to a house property data intelligent measurement method and system. BACKGROUND
[0002] With the development of real estate informatization and intelligent technology, accurate measurement of house property data has become an important basis for efficient operation and service upgrading of the industry. At present, traditional house property measurement mainly relies on professional tools such as laser range finders and tapes, which need to be operated manually on site. There are problems such as complicated process, low efficiency, and large influence of measurement accuracy by human factors, and it is difficult to meet the needs of rapid data collection and intelligent management of house property.
[0003] The existing measurement method ignores the convenience of mobile terminal devices and the intelligent advantage of image processing technology, and only relies on manual operation and experience to measure, which leads to the problem that the efficiency and accuracy of data collection cannot be considered, which not only increases the labor cost and time cost, but also is difficult to meet the requirements of real-time and accuracy of data in the digital transformation of the real estate industry. SUMMARY
[0004] In order to solve the above technical problems, the present application provides a house property data intelligent measurement method and system, which solves the problem of traditional measurement relying on professional tools, complicated operation, low efficiency and large influence of measurement accuracy by human factors, realizes automatic and intelligent measurement based on mobile terminal, and improves the convenience and accuracy of measurement.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] In a first aspect, the embodiments of the present application provide a house property data intelligent measurement method, which comprises:
[0007] obtaining internal parameter calibration data of a camera of a mobile terminal, and receiving original indoor images of a target house property collected by the camera;
[0008] processing the original indoor images based on the internal parameter calibration data to obtain orthographic projection images;
[0009] establishing a conversion relationship between image pixels and actual sizes according to the orthographic projection images, and measuring the sizes of room boundary lines in the orthographic projection images based on the conversion relationship to obtain house property measurement data of the target house property.
[0010] In a second aspect, the embodiments of the present application provide a house property data intelligent measurement system, which comprises:
[0011] a data collection and internal parameter management module, configured to obtain internal parameter calibration data of a camera of a mobile terminal, and receive original indoor images of a target house property collected by the camera;
[0012] An image correction and projection conversion module processes the original indoor image based on the intrinsic parameter calibration data to obtain an orthographic projection image.
[0013] A size conversion and intelligent measurement module is configured to establish a conversion relationship between image pixels and actual sizes according to the orthographic projection image, measure the size of the room boundary line in the orthographic projection image based on the conversion relationship, and obtain the real estate measurement data of the target real estate.
[0014] One or more technical solutions provided in the present application have at least the following technical effects or advantages:
[0015] The present application provides a real estate data intelligent measurement method and system. By obtaining mobile terminal camera intrinsic parameter calibration data and target real estate original indoor image, the image is corrected and perspective deformed based on the intrinsic parameter data to generate an orthographic projection image. Then, the conversion relationship between pixels and actual sizes is established by referring to the object, and the automatic size measurement of the room boundary line is realized. The method optimizes the intrinsic parameter data by fusing the weight of the chessboard calibration and self-calibration, and constructs an image correction model by combining edge detection and perspective transformation algorithm, which avoids the low efficiency problem caused by the dependence of traditional measurement on professional tools and manual annotation. At the same time, the dynamic weight fusion intrinsic parameter calibration mechanism and the pixel size conversion system improve the adaptability of the measurement results to different devices and scenes, effectively solve the problems of manual measurement error accumulation and low data collection efficiency, and provide an efficient solution for intelligent and automatic measurement of real estate data.
[0016] The technical solution of the present application realizes the accurate measurement of the real estate space size by the mobile terminal through the whole process design of camera intrinsic parameter dynamic matching, image geometric correction and size intelligent conversion, avoids the measurement deviation caused by the dependence on static calibration data or manual experience, and improves the convenience and accuracy of real estate data collection. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0018] Figure 1 A flowchart of a real estate data intelligent measurement method provided by an embodiment of the present application is shown in the figure.
[0019] Figure 2 A structure diagram of a real estate data intelligent measurement system provided by an embodiment of the present application is shown in the figure.
[0020] The components represented by the reference signs in the drawings are described as follows:
[0021] The data acquisition and internal reference management module 01, the image correction and projection conversion module 02, and the size conversion and intelligent measurement module 03. DETAILED DESCRIPTION
[0022] The present application provides a house property data intelligent measurement method and system, which is used to solve the technical problems of traditional house property measurement relying on professional tools, complicated manual operation, low measurement efficiency and large influence of human factors on precision in the prior art.
[0023] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0024] In the description of the present application, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.
[0025] In the description of the present application, the term "for example" is used to indicate "as an example, illustration or explanation". Any embodiment described as "for example" in the present application is not necessarily interpreted as more preferred or more advantageous than other embodiments. The following description is given in order to enable any person skilled in the art to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that those skilled in the art can recognize that the present application can be implemented without using these specific details. In other examples, well-known structures and processes will not be described in detail to avoid unnecessary details making the description of the present application obscure. Therefore, the present application is not intended to be limited to the shown embodiments, but is consistent with the broadest scope of principles and features disclosed in the present application.
[0026] Embodiment one, as shown in the accompanying Figure 1 The present application provides a house property data intelligent measurement method, which comprises the following steps:
[0027] S100: acquiring internal parameter calibration data of a camera of a mobile terminal, and receiving original indoor images of a target house property collected by the camera;
[0028] In the embodiment of the present application, in the process of intelligent measurement of real estate data, in order to realize accurate size measurement of the target real estate, the camera of the mobile terminal device needs to be called, and the corresponding camera intrinsic parameter calibration data (including focal length parameter, principal point coordinate parameter and lens distortion parameter) is retrieved from the preset intrinsic parameter database according to the target device model.
[0029] At the same time, the original indoor image of the target real estate is collected in real time. By establishing the mapping relationship between the device model and the intrinsic parameter data, the accuracy of the camera parameters of different mobile terminal devices is ensured, and a standardized data basis is provided for subsequent image correction and size measurement.
[0030] The step S100 in the method provided by the embodiment of the present application comprises:
[0031] Obtaining the target device model of the mobile terminal;
[0032] Based on the target device model, searching in the preset device intrinsic parameter database to obtain the intrinsic parameter calibration data matched with the target device model.
[0033] In the embodiment of the present application, in the process of intelligent measurement of real estate data, in order to realize accurate matching of camera intrinsic parameter data, the target device model needs to be obtained through the system interface of the mobile terminal (such as a mobile phone).
[0034] Specifically, the hardware recognition API of the mobile phone can be called to ensure that the obtained device model information is unique and accurate, and to lay a foundation for subsequent retrieval of matched camera intrinsic parameter calibration data from the preset device intrinsic parameter database.
[0035] By specifying the mobile phone model, the camera intrinsic parameter data (such as focal length, principal point coordinate, lens distortion parameter, etc.) of the corresponding model can be called, which avoids the matching error of intrinsic parameter data caused by unclear device model and improves the accuracy of subsequent image correction and size measurement.
[0036] Further, according to the mobile phone model, the matching retrieval is performed according to the mapping relationship between the mobile phone model and the intrinsic parameter data through the preset device intrinsic parameter database retrieval interface.
[0037] The construction step of the "device intrinsic parameter database" in the method provided by the embodiment of the present application comprises:
[0038] Obtaining a plurality of to-be-measured mobile terminals, each of which has a corresponding device model;
[0039] Extracting a first to-be-measured mobile terminal from the plurality of to-be-measured mobile terminals and obtaining a corresponding first device model;
[0040] The first to-be-tested mobile terminal is calibrated by a chessboard calibration method to obtain first intrinsic calibration data;
[0041] The first to-be-tested mobile terminal is calibrated by a self-calibration method to obtain second intrinsic calibration data;
[0042] The first intrinsic calibration data and the second intrinsic calibration data are fused by configuring a first weight and a second weight according to the first intrinsic calibration data and the second intrinsic calibration data, to generate fusion intrinsic calibration data corresponding to the first device model;
[0043] The remaining to-be-tested mobile terminals are processed to obtain fusion intrinsic calibration data corresponding to each device model, and a mapping relationship between each device model and the corresponding fusion intrinsic calibration data is established and stored in the device intrinsic database.
[0044] In the embodiment of the application, in the intrinsic calibration process of the camera of the mobile terminal, in order to realize accurate acquisition and unified management of calibration parameters between different device models, a standardized device intrinsic database needs to be established.
[0045] The to-be-tested mobile terminal samples include different models of mainstream brands (such as Huawei, Xiaomi, iPhone, etc.), and each device has a unique model identifier (including brand, model, hardware version, etc.). By collecting the calibration data of these devices, a parameter database covering mainstream models in the market can be constructed.
[0046] Further, in the device model identification and calibration sample selection process, first, the hardware identification information of the device is read through the standard API interface provided by the mobile terminal system, including brand identification, specific model code, and hardware version number (such as SN code, production batch number), and these information is combined to generate a standardized first device model.
[0047] Further, a representative first to-be-tested mobile terminal is selected from the set of to-be-tested mobile terminals as a calibration sample.
[0048] Before formal calibration, the first to-be-tested mobile terminal also needs to be comprehensively tested for device state, including camera module integrity detection (confirming no physical damage), system camera parameter detection (confirming factory default settings), and ambient light sensor calibration state verification.
[0049] Further, the first to-be-tested mobile terminal is accurately calibrated according to the existing chessboard calibration technology to obtain the first intrinsic calibration data.
[0050] Specifically, under uniform light, at least 20 photos are taken from multiple angles using the first mobile terminal to be measured, and the chessboard is ensured to present different postures and positions in the picture. After the shooting is completed, the image processing software (such as OpenCV) is used to automatically identify the corner points of the chessboard, and the camera calibration algorithm is used to calculate the focal length, principal point coordinates and distortion coefficient and other data, which are used as the first intrinsic parameter calibration data.
[0051] Further, in combination with the self-calibration mode, the first mobile terminal to be measured is accurately calibrated to obtain the second intrinsic parameter calibration data.
[0052] Specifically, in the actual real estate shooting scene, a professional photographer uses the mobile terminal to shoot multiple groups of real estate photos (each group contains 10-15 indoor and outdoor scene photos from different angles), and focuses on shooting areas containing rich architectural features (such as door and window corners, wall textures, ground paving, etc.). After shooting, a measurement expert performs manual calibration, key feature point positions (such as wall corner lines, door and window edges, etc.) in the photos are marked, and professional photogrammetry software is used for manual feature point matching, and the principle of photogrammetry is used for parameter solving, and finally the focal length, principal point coordinates and distortion coefficient and other data verified by experts are obtained, which are used as the second intrinsic parameter calibration data.
[0053] Further, the first intrinsic parameter calibration data and the second intrinsic parameter calibration data are fused to generate the fusion intrinsic parameter calibration data corresponding to the first device model.
[0054] The method provided in the embodiments of the present application includes the following steps:
[0055] A preset weight configuration is obtained, including a preset first weight and a preset second weight;
[0056] A parameter difference value between the first intrinsic parameter calibration data and the second intrinsic parameter calibration data is calculated;
[0057] When the parameter difference value is less than or equal to a preset difference threshold, the preset first weight and the preset second weight are used as the first weight and the second weight respectively;
[0058] When the parameter difference value is greater than the preset difference threshold, the preset first weight and the preset second weight are corrected and adjusted based on the parameter difference value to generate a corrected first weight and a corrected second weight, which are used as the first weight and the second weight respectively.
[0059] In the embodiments of the present application, in order to fuse the intrinsic parameter data of different calibration modes while considering the accuracy and scene adaptability, a dynamic weight configuration strategy needs to be used.
[0060] Specifically, in the parameter fusion process, first, the preset weight configuration parameters are obtained, including a preset first weight and a preset second weight. For example, the initial weight of the chessboard calibration data is set to 70% as the preset first weight, and the initial weight of the self-calibration data is set to 30% as the preset second weight.
[0061] Further, the focal length, principal point coordinates, distortion coefficients and other parameters in the first intrinsic calibration data and the second intrinsic calibration data are normalized to eliminate the influence of different parameters due to dimensional differences. For example, each parameter difference value is divided by its corresponding maximum possible difference value, and the parameter difference is uniformly mapped to the [0, 1] interval.
[0062] Further, the cosine similarity is used to quantitatively calculate the normalized parameters to comprehensively evaluate the difference between the two sets of data and provide a quantitative basis for subsequent weight adjustment.
[0063] When the calculated parameter difference value is less than or equal to the preset difference threshold (such as 0.1), it indicates that the consistency of the two sets of data is high, and the preset weight is directly used for fusion.
[0064] If the difference value is greater than the threshold, the weight needs to be dynamically corrected. Specifically, the normalized weight adjustment amplitude (weight adjustment amplitude = parameter difference value / maximum possible difference value) is calculated, and the corrected weight is calculated by first weight = preset first weight + weight adjustment amplitude x (1-preset first weight), second weight = 1-first weight, to balance the calibration accuracy and robustness.
[0065] Finally, the two sets of calibration data are fused according to the corrected weight to generate a fusion intrinsic calibration data that takes into account both accuracy and scene adaptability.
[0066] For example, when calibrating the camera intrinsic parameters of a certain type of mobile phone, the data obtained by the chessboard calibration method is focal length fx=280, fy=282, principal point coordinates cx=320, cy=240, distortion coefficients k1=0.01, k2=0.005; the data obtained by the self-calibration method is focal length fx=275, fy=278, principal point coordinates cx=323, cy=242, distortion coefficients k1=0.012, k2=0.006.
[0067] Firstly, the difference of each parameter is normalized, such as the focal length fx difference is 5 (280-275=5), the maximum possible difference is 100, and the normalization is 0.05 (5 / 100=0.05), the fy difference is 4 (282-278=4), the maximum possible difference is 100, and the normalization is 0.04 (4 / 100=0.04), and so on. The principal point cx difference is 3 (323-320=3), the maximum possible difference is 50, and the normalization is 0.06 (3 / 50=0.06); the principal point cy difference is 2 (242-240=2), the maximum possible difference is 50, and the normalized difference is 0.04 (2 / 50=0.04); the distortion k1 difference is 0.002 (0.012-0.01=0.002), the maximum possible difference is 0.1, and the normalized difference is 0.02 (0.002 / 0.1=0.02); the distortion k2 difference is 0.001 (0.006-0.005=0.001), the maximum possible difference is 0.05, and the normalized difference is 0.02 (0.001 / 0.05=0.02).
[0068] Then, the comprehensive difference value is calculated as (0.05+0.04+0.06+0.04+0.02+0.02) / 6=0.0383. Based on the preset first weight 70% (0.7), the weight adjustment amplitude is calculated as 0.0383, and then the first weight is corrected as 0.7+0.0383×(1-0.7)=0.7115, and the second weight is adjusted as 1-0.7115=0.2885. Finally, the two sets of data are fused according to the weight, so that the result better balances the accuracy and scene adaptability.
[0069] Further, the same process as the first to-be-measured mobile terminal is used to sequentially calibrate and fuse the remaining to-be-measured mobile terminals.
[0070] Finally, a unique mapping relationship between each device model and the generated fused intrinsic calibration data is constructed, and the data is batch imported into the device intrinsic database in a standardized data format and is subjected to index optimization processing, so that the matching intrinsic calibration data can be quickly and accurately retrieved by the device model in the future, thereby providing efficient and accurate parameter support for mobile terminals in application scenarios such as real estate data intelligent measurement.
[0071] After the construction of the device intrinsic database is completed, in real estate data intelligent measurement, the matching intrinsic calibration data can be quickly located and extracted based on the obtained target device model using the database index, thereby providing a data basis for subsequent image accurate correction and high-precision measurement of real estate size.
[0072] S200: processing the original indoor image based on the intrinsic calibration data to obtain an orthographic projection image;
[0073] In the embodiments of the present application, after obtaining the original indoor image and the internal parameter calibration data of the corresponding device, the original indoor image is processed into an orthographic projection image through three steps of "distortion correction, boundary extraction, and perspective transformation".
[0074] Specifically, first, the focal length, principal point coordinates, and distortion parameters in the internal parameter data are used to construct a distortion correction model. The lens distortion is classified and processed, the pixel offset is calculated and mapped for correction, and then the focal length and principal point coordinates are combined to optimize the image geometry, eliminate the influence of lens distortion, and obtain a corrected indoor image without distortion.
[0075] Secondly, a semantic segmentation model and an edge detection algorithm are used to identify the structure area from the corrected image, extract the horizontal and vertical boundary lines, and determine the coordinates of the corner points. Through rectangular prior constraints and parameter verification, a standardized room rectangular constraint is constructed.
[0076] Finally, the source corner points and target corner points of the perspective transformation are determined according to the room rectangular constraint, a linear equation set is constructed, and the transformation matrix is solved by the least square method. After correcting the deviation, the image is mapped and interpolated, while maintaining the rectangular shape of the doors and windows, to generate an orthographic projection image, providing accurate data for real estate measurement.
[0077] The step S200 in the method provided by the embodiments of the present application includes:
[0078] According to the internal parameter calibration data, the original indoor image is subjected to distortion correction processing to obtain a corrected indoor image;
[0079] From the corrected indoor image, the boundary line features of the target real estate are extracted, and a room rectangular constraint is established according to the boundary line features;
[0080] According to the room rectangular constraint, the corrected indoor image is subjected to perspective deformation correction to generate an orthographic projection image of the target real estate.
[0081] In the process of processing the original indoor image to obtain real estate size information, in order to eliminate the influence of lens distortion on the image, so as to extract the boundary line features and generate an orthographic projection image, the original indoor image is subjected to distortion correction processing according to the internal parameter calibration data, thereby obtaining a corrected indoor image.
[0082] The step of "according to the internal parameter calibration data, the original indoor image is subjected to distortion correction processing to obtain a corrected indoor image" in the method provided by the embodiments of the present application includes:
[0083] From the internal parameter calibration data, the focal length parameters, principal point coordinate parameters, and lens distortion parameters of the camera are extracted;
[0084] establish a distortion correction model based on the lens distortion parameters, and calculate a distortion offset of each pixel point in the original indoor image;
[0085] correct the position of each pixel point in the original indoor image according to the distortion offset, and obtain an initial corrected indoor image;
[0086] perform geometric transformation on the initial corrected indoor image in combination with the focal length parameter and the principal point coordinate parameter, and generate the corrected indoor image.
[0087] In the embodiments of the present application, after obtaining the intrinsic calibration data, in order to avoid the influence of lens distortion on the geometric shape of the image leading to subsequent size measurement deviation, the original indoor image needs to be corrected for distortion.
[0088] Specifically, first, the focal length parameter, the principal point coordinate parameter, and the lens distortion parameter and other data of the camera are extracted from the intrinsic calibration data.
[0089] Further, a distortion correction model is constructed according to the lens distortion parameter, and the distortion offset of each pixel point in the original indoor image is calculated through the model.
[0090] In the embodiments of the present application, when constructing the distortion correction model, a modular and adaptive strategy is adopted to effectively correct the distortion of the camera of different mobile terminals.
[0091] First, the lens distortion parameters are divided into radial distortion (such as barrel-shaped and pillow-shaped distortion formed by stretching of the image edge) and tangential distortion (pixel misplacement leading to line distortion).
[0092] Among them, the radial distortion mainly manifests as stretching or contraction of the image edge, such as the common barrel-shaped distortion and pillow-shaped distortion; the tangential distortion will cause misplacement of the pixel points in the tangent direction, so that the originally regular lines are distorted.
[0093] For different brands and models of mobile terminal cameras, their optical characteristics are different, leading to different distortion performances. Therefore, a basic distortion correction template that is adapted to the optical characteristics needs to be set first. For example, for wide-angle lenses that emphasize radial distortion parameters, the tangential distortion parameters are optimized for devices with different installation processes.
[0094] In actual application process, the corresponding basic template is matched quickly through the device model first, and then the actual calibration parameters are compared and analyzed with the parameters in the template. Once the deviation is found, the influence weight of each parameter will be automatically adjusted.
[0095] For example, if the radial distortion degree of a certain mobile phone lens is significantly higher than the average level of similar devices, the weight of the radial distortion parameter in the model will be increased, so that it plays a greater role in the correction process.
[0096] Finally, to ensure the accuracy of the correction effect, the corrected image is verified using standard geometric features (such as rectangular boundaries, orthogonal lines, etc.). If the deviation of the geometric features in the image exceeds the set threshold, an automatic fine-tuning mechanism is triggered to optimize the parameters again until the geometric shape of the image meets the measurement accuracy requirements.
[0097] The closed-loop mechanism of "classification adaptation, dynamic adjustment, and error verification" formed based on the above steps can efficiently and accurately correct the distortion characteristics of different cameras, providing a reliable and accurate image basis for subsequent accurate size measurement.
[0098] After the distortion correction model is constructed, a step-by-step processing strategy is adopted when calculating the distortion offset of each pixel point in the original indoor image.
[0099] Specifically, the original image pixel coordinate system is first converted to a normalized coordinate system with the image geometric center as the origin, unifying the coordinate reference and eliminating calculation errors caused by image size differences, providing a standardized data basis for subsequent distortion analysis.
[0100] Further, hierarchical calculation is performed according to the distortion type. In the radial distortion processing link, based on the Euclidean distance of the pixel points to the image center in the normalized coordinate system, combined with the pre-set radial distortion coefficients (k1, k2, k3), the stretching or contraction degree of each pixel point in the radial direction caused by the optical characteristics of the lens is quantified, thereby determining the radial offset.
[0101] Among them, the farther the pixel point is from the image center, the more significant the radial distortion effect is, and the larger the offset calculation result is.
[0102] For tangential distortion, by analyzing the relative position relationship of the pixel points in the normalized coordinate system, combined with the tangential distortion coefficients (p1, p2), the misplacement amount of each pixel point in the tangential direction caused by the lens installation error is calculated, and the tangential offset is obtained. Used to solve the problems of straight line distortion and object shape deformation in the image.
[0103] Finally, the radial offset and the tangential offset are vector superimposed to obtain the total distortion offset of each pixel point.
[0104] Through the above calculation process, the position deviation data of each pixel point in the original image caused by lens distortion can be accurately obtained, providing a core basis for subsequent pixel position correction and restoring the true geometric shape of the image based on the offset, ensuring that the corrected image meets the high-precision requirements of real estate size measurement.
[0105] Further, when correcting the pixel position of the original indoor image according to the obtained distortion offset, a coordinate mapping and interpolation reconstruction strategy is adopted to realize the restoration of the geometric shape without distortion.
[0106] Specifically, first, the coordinate mapping relationship between the original image and the ideal non-distorted image is established. For each pixel point (u, v) in the original image, the total distortion offset (Δx, Δy) calculated is used to map it to the corrected target position (u', v').
[0107] Wherein, u' = u + Δx × fx, v' = v + Δy × fy, fx, fy are the focal length parameters in the intrinsic calibration data.
[0108] Since the corrected coordinates (u', v') are usually floating-point numbers, a bilinear interpolation or nearest neighbor interpolation algorithm is used to reconstruct the pixel value of this position from the original image, thereby obtaining the initial corrected indoor image.
[0109] Further, the focal length parameters and principal point coordinate parameters are combined to perform geometric transformation on the initial corrected image, further optimizing the spatial relationship of the image.
[0110] Specifically, by adjusting the focal length parameters, the scale distortion problem caused by the mismatch between the optical center of the lens and the image sensor can be eliminated, so that the actual size ratio of the objects in the image can be accurately presented. The principal point coordinate parameters are used to correct the center position of the image, ensuring that the geometric center and the physical center of the image coincide, avoiding the image offset caused by the shooting angle or the installation deviation of the device.
[0111] In specific implementation, each pixel point (u', v') in the initial corrected image is converted to the camera coordinate system, the scale is adjusted by the focal length parameters, and then the correct position is translated by the principal point coordinate parameters, finally the corrected indoor image conforming to the real spatial relationship is generated.
[0112] Exemplarily, when a 60cm×80cm rectangular window is shot, after distortion correction, although the window frame edges have been straightened, there may be problems of scale adjustment (such as the window height being compressed) or position deviation (such as the window frame not being centered). By adjusting the focal length parameters, the aspect ratio of the window is restored from 0.92:1 before correction to the true 0.75:1.
[0113] Further, the principal point coordinate parameters are used to translate the center of the window frame from the (630, 350) pixel position of the image to the ideal center (640, 360) pixel position. In the finally generated corrected image, the orthogonal error of the four corner points of the window frame is further reduced from 0.5mm after the initial correction to 0.2mm, fully meeting the accuracy requirement of ±1mm in real estate measurement, and providing a precise and reliable geometric basis for subsequent image-based size measurement.
[0114] Further, the boundary line features of the target property are extracted from the corrected indoor image, and a room rectangle constraint is established according to the boundary line features.
[0115] The step of "extracting the boundary line features of the target property from the corrected indoor image, and establishing a room rectangle constraint according to the boundary line features" in the method provided by the embodiments of the present application includes:
[0116] Edge detection is performed on the corrected indoor image to identify the horizontal boundary line and the vertical boundary line of the target property.
[0117] According to the intersection relationship of the horizontal boundary line and the vertical boundary line, the coordinates of the corner points of the target property are determined.
[0118] Based on the horizontal boundary line, the vertical boundary line and the coordinates of the corner points, the room rectangle constraint is established.
[0119] In the embodiments of the present application, in order to realize accurate extraction and standardized geometric expression of the property boundary features, an intelligent boundary feature extraction and constraint construction strategy is adopted, and a computer vision algorithm is used to replace the traditional manual annotation process.
[0120] Specifically, for the corrected indoor image, a deep learning semantic segmentation algorithm (such as U-Net) is first used to automatically identify wall surfaces, floors, doors and windows and other structural regions. After a large number of property images are trained, the algorithm can accurately distinguish different material boundaries (such as ceramic tile floors and latex paint walls).
[0121] Further, the Canny edge detection algorithm is used to extract the structural boundary contour, and the RANSAC line fitting algorithm is used to segment and fit the continuous edges into straight line segments. Among them, the slope close to 0 is divided into a horizontal boundary line, and the slope close to vertical is divided into a vertical boundary line, so as to ensure that the lines meet the room structure characteristics.
[0122] Further, the corner point detection algorithm is used to extract candidate corner points at the intersection points of the horizontal and vertical boundary lines, and then the geometric verification is performed to screen, that is, to check whether the intersection line angle is close to 90 degrees, whether the corner point is located at the end point of the effective boundary line, and whether it meets the indoor structure logic, so as to finally determine the accurate corner point coordinates.
[0123] Further, according to the obtained horizontal, vertical boundary line and corner point coordinates, a plurality of possible rectangular regions are further generated, and by verifying the rationality of the width-height ratio, optimizing the vertical accuracy of adjacent sides and ensuring that the connection between adjacent rectangles meets the actual room structure, the rectangles that do not meet the conditions are gradually excluded. The finally constructed room rectangle constraint accurately reflects the real space structure, the boundary line angle error is controlled within a very small range, and the size and shape accuracy of the door and window contour can also fully meet the requirements of subsequent perspective correction.
[0124] Exemplarily, for the bedroom scene photographed by the mobile phone, the correction image is corrected. First, the wall surface, the ground and the bay window area are identified by a semantic segmentation model. Then, the horizontal ground boundary line and the vertical wall intersection line are extracted and fitted by using the Canny algorithm and the RANSAC algorithm. The corner points of the wall are captured by using the corner detection algorithm, and the included angle and the position are checked to eliminate the false detection points. For the position of the bay window, the profile is screened according to the 1:3 width-height ratio, and the boundary blocked by the bed body is completed. Finally, the generated room rectangle constraint is that the included angle of the wall intersection line is 88°~92°, and the deviation of the bay window profile from the wall is less than 1.5 pixels. Compared with manual annotation, the efficiency is improved by 80%, and the geometric accuracy meets the requirement of ±1mm in real estate surveying and mapping.
[0125] Further, according to the constructed room rectangle constraint, perspective deformation correction is performed on the corrected indoor image to generate the orthographic projection image of the target real estate.
[0126] The step of "performing perspective deformation correction on the corrected indoor image according to the room rectangle constraint to generate the orthographic projection image of the target real estate" in the method provided by the embodiments of the present application includes:
[0127] determining a source corner point and a target corner point of perspective transformation based on the room rectangle constraint;
[0128] determining a perspective transformation matrix from the source corner point to the target corner point;
[0129] performing perspective correction transformation on the corrected indoor image by using the perspective transformation matrix to generate the orthographic projection image of the target real estate.
[0130] In the embodiments of the present application, after constructing the room rectangle constraint, in order to eliminate the influence of perspective distortion caused by the shooting angle on the geometric conversion of the real estate (such as wall surface inclination and door and window deformation), perspective correction needs to be performed on the image based on the room standard rectangle constraint.
[0131] Specifically, the actual corner point coordinates of the four corners of the room are extracted from the annotated wall intersection line, ground intersection line and door and window profile line as source corner points (for example, the four vertices formed by the intersection line of the wall surface and the ground surface).
[0132] At the same time, according to the preset standardization rule (such as the image width-height ratio of 1:1.2), the ideal positions of these corner points in the orthographic projection are calculated as target corner points. For example, the two end points of the intersection line of the left wall surface and the ground are mapped to the corresponding height positions of the left edge of the image to ensure that the vertical wall remains vertical after projection.
[0133] Further, a perspective transformation matrix from the source corner point to the target corner point is constructed.
[0134] Specifically, by establishing the correspondence between the source corner points and the target corner points, a linear equation set is constructed based on the perspective transformation principle, and the least square method is used to optimize the solution to obtain the best fitting transformation matrix parameters. In view of the possible errors, by setting a reasonable error tolerance, the corner point data that deviates obviously is screened and corrected to ensure the accuracy of the transformation matrix.
[0135] Further, the perspective correction is performed on the corrected indoor image based on the obtained perspective transformation matrix.
[0136] Specifically, by matrix operation, each pixel point in the image is mapped from the distortion coordinate system to the standard orthographic projection coordinate system. For the non-integer coordinate pixel points generated after transformation, the nearest neighbor interpolation method is used to calculate their gray values to ensure smooth transition of the image.
[0137] In the correction process, the geometric constraints are strictly followed to maintain the rectangular shape of the door and window outlines according to the type and proportion information of the doors and windows, so that the corrected image can truly restore the geometric structure of the room and form an orthographic projection image that conforms to the actual spatial relationship.
[0138] The orthographic projection image can accurately present the parallel and vertical relationship of the walls and the regular shape of the doors and windows, and provide high-precision standardized image data basis for subsequent house type surveying, area calculation and other professional applications.
[0139] S300: Establish a conversion relationship between image pixels and actual sizes according to the orthographic projection image, measure the size of the room boundary line in the orthographic projection image based on the conversion relationship, and obtain the house property surveying data of the target house property.
[0140] In the embodiments of the present application, after obtaining the orthographic projection image without perspective distortion, in order to convert the image pixel information into actual size data with physical meaning, a standardized image pixel and actual size conversion system needs to be constructed.
[0141] Specifically, first, a reference object (such as a standard door and window, a ceramic tile, etc.) with a clear actual size is selected in the orthographic projection image, and its real physical size is obtained by measuring or calling the design drawing.
[0142] Further, the image processing algorithm is used to accurately measure the pixel size of the reference object in the orthographic projection image. At the same time, by calculating the ratio of the actual size to the pixel size, the proportion coefficient of the image pixel and the actual size (for example, 100 pixels correspond to 1 meter) is determined.
[0143] Finally, based on the proportion coefficient, a general conversion relationship is generated to convert the pixel length of all room boundary lines in the orthographic projection image into actual physical size.
[0144] By introducing standardized reference objects and establishing precise proportional relationships, the measurement results in different real estate scenarios are ensured to have unified physical units, providing a reliable data foundation for subsequent real estate area calculation, spatial analysis and other applications.
[0145] The step S300 in the method provided by the embodiments of the present application comprises:
[0146] A reference object is determined in the orthographic projection image, and an actual size of the reference object is obtained;
[0147] A pixel size of the reference object in the orthographic projection image is measured;
[0148] A proportional coefficient of image pixels to actual size is determined based on the actual size and the pixel size of the reference object;
[0149] A conversion relationship of the image pixels to the actual size is generated according to the proportional coefficient.
[0150] In the embodiments of the present application, after obtaining the orthographic projection image of the target real estate, in order to realize accurate conversion of pixel information to actual physical size, a reliable conversion relationship system needs to be constructed between the two.
[0151] Specifically, an object with a regular shape, stable size and clear in the image is preferentially selected as a reference (such as a standard size of floor tile, door and window), and its accurate actual size data is obtained by field measurement tools (such as a steel tape) or architectural design drawings.
[0152] At the same time, the contour of the reference object in the orthographic projection image is pixel-level outlined by using an image labeling tool (such as LabelMe, CVAT, etc.), and its pixel size is calculated by combining an image processing algorithm (such as Canny edge detection).
[0153] On this basis, the actual length corresponding to a unit pixel is obtained by division operation (if 100 pixels correspond to 1 meter in actuality, the proportional coefficient is 0.01 meters / pixel), and then a linear conversion relationship of image pixels to actual size is constructed.
[0154] Exemplarily, in the orthographic projection image of a certain target real estate, a standard square ceramic tile with a size of 300mm x 300mm in the bathroom is selected as a reference object. A labeler uses a steel tape to measure the side length of the ceramic tile on site, and confirms that the actual size of the ceramic tile is 300mm.
[0155] Further, by using the LabelMe labeling tool, the pixel-level outline along the edge of the ceramic tile is performed, and the contour of the ceramic tile is completely labeled. The edge of the ceramic tile is further refined by combining the Canny edge detection algorithm, and the pixel coordinates of the contour of the ceramic tile are accurately obtained, and the pixel side length of the ceramic tile in the image is calculated to be 150 pixels.
[0156] By the division operation of the actual size and the pixel size, i.e. 300mm / 150 pixels = 2mm / pixel, the proportional coefficient is 2mm / pixel. Thus, the conversion relationship between the image pixel and the actual size is established, i.e. the pixel length of any line segment in the image is multiplied by 2mm to be converted into the corresponding actual physical length, thereby realizing the accurate measurement of the room boundary line, the door and window size and other real estate data.
[0157] The standardized reference and the accurate measurement means established through the steps can effectively eliminate the measurement error caused by the difference of the shooting equipment and the difference of the image resolution, provide a unified quantitative benchmark for the accurate measurement of the room boundary line length, the real estate area and other data, and ensure that the measurement result meets the engineering application standard.
[0158] Through the specific implementation manners, the embodiments of the present application achieve the following technical effects:
[0159] The embodiments of the present application provide a real estate data intelligent measurement method. First, the intrinsic parameter calibration data of a mobile terminal camera is acquired and an original indoor image is collected to establish a mapping relationship between the equipment model and the intrinsic parameter data, thereby providing a standardized data basis for image correction. Second, the original image is corrected for distortion and perspective transformation based on the intrinsic parameter data, the boundary line features are automatically extracted through an algorithm, and a room rectangle constraint is established to generate a non-distorted orthographic projection image. Finally, a conversion system of the image pixel and the actual size is established based on the standard reference object to realize high-precision measurement of the real estate boundary line. The method establishes an equipment intrinsic parameter database and a standardized labeling process to eliminate the measurement error caused by the equipment difference. The image processing algorithm is used to replace the traditional manual operation to ensure the geometric accuracy of the orthographic projection image. The pixel and size conversion system based on the reference object realizes high-precision conversion from the image to the actual size.
[0160] The method provided by the embodiments of the present application solves the problems of large size error and complex operation caused by lens distortion and perspective deformation in the traditional real estate measurement. The efficiency and precision of the real estate measurement are effectively improved, reliable data support is provided for the application of house type design and area evaluation, and the development of the real estate data collection towards the intelligent and standardized direction is promoted.
[0161] Embodiment two, as shown in the attached Figure 2 Based on the inventive concept of the real estate data intelligent measurement method provided in embodiment one, the present application further provides a real estate data intelligent measurement system, which specifically comprises:
[0162] A data acquisition and intrinsic parameter management module 01 is configured to acquire the intrinsic parameter calibration data of the camera of the mobile terminal and receive the original indoor image of the target real estate collected by the camera;
[0163] The image correction and projection conversion module 02 processes the original indoor image based on the intrinsic calibration data to obtain an orthographic projection image;
[0164] The size conversion and intelligent measurement module 03 is configured to establish a conversion relationship between image pixels and actual sizes according to the orthographic projection image, measure the size of the room boundary line in the orthographic projection image based on the conversion relationship, and obtain the real estate measurement data of the target real estate.
[0165] In one embodiment, the data acquisition and intrinsic parameter management module 01 is further configured to:
[0166] obtain the target device model of the mobile terminal;
[0167] based on the target device model, search in a preset device intrinsic parameter database to obtain intrinsic calibration data matched with the target device model.
[0168] In one embodiment, the image correction and projection conversion module 02 is further configured to:
[0169] correct the distortion of the original indoor image based on the intrinsic calibration data to obtain a corrected indoor image;
[0170] extract the boundary line feature of the target real estate from the corrected indoor image, and establish a room rectangle constraint according to the boundary line feature;
[0171] correct the perspective deformation of the corrected indoor image according to the room rectangle constraint to generate an orthographic projection image of the target real estate.
[0172] In one embodiment, the size conversion and intelligent measurement module 03 is further configured to:
[0173] determine a reference object in the orthographic projection image and obtain the actual size of the reference object;
[0174] measure the pixel size of the reference object in the orthographic projection image;
[0175] determine a proportionality coefficient between image pixels and actual sizes based on the actual size and the pixel size of the reference object;
[0176] generate a conversion relationship between the image pixels and the actual sizes according to the proportionality coefficient.
[0177] It should be noted that the above-mentioned embodiment sequences of the present application are merely for description only, but not for representing the advantages and disadvantages of the embodiments. And the above-mentioned embodiments of the present specification have been described. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0178] The above only describes the preferred embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0179] The specification and drawings are merely exemplary of the present application, and any and all modifications, variations, combinations or equivalents that are within the scope of the present application should be considered covered by the present application. Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalents, the present application is intended to include these modifications and variations.
Claims
1. A method for intelligent measurement of real estate data, characterized in that, The method comprises: Obtaining the intrinsic calibration data of the camera of the mobile terminal, and receiving the original indoor image of the target property collected by the camera, comprising: Obtaining the target device model of the mobile terminal; Based on the target device model, search in the preset device intrinsic parameter database to obtain the intrinsic calibration data matched with the target device model; Wherein, the construction steps of the device intrinsic parameter database comprise: Obtaining a plurality of to-be-tested mobile terminals, each to-be-tested mobile terminal has a corresponding device model; Extract the first to-be-tested mobile terminal from the plurality of to-be-tested mobile terminals, and obtain the corresponding first device model; Calibrate the first to-be-tested mobile terminal by the checkerboard calibration method to obtain the first intrinsic calibration data; Calibrate the first to-be-tested mobile terminal by the self-calibration method to obtain the second intrinsic calibration data; According to the first intrinsic calibration data and the second intrinsic calibration data, configure the first weight and the second weight, fuse the first intrinsic calibration data and the second intrinsic calibration data, and generate the fusion intrinsic calibration data corresponding to the first device model; Process the remaining to-be-tested mobile terminals to obtain the fusion intrinsic calibration data corresponding to each device model, and establish a mapping relationship between each device model and the corresponding fusion intrinsic calibration data, and store it in the device intrinsic parameter database; Based on the intrinsic calibration data, process the original indoor image to obtain an orthographic projection image; According to the orthographic projection image, establish a conversion relationship between image pixels and actual size, and measure the size of the room boundary line in the orthographic projection image based on the conversion relationship to obtain the property measurement data of the target property.
2. The method of claim 1, wherein, According to the first intrinsic calibration data and the second intrinsic calibration data, configure the first weight and the second weight, comprising: Obtain a preset weight configuration, including a preset first weight and a preset second weight; Calculate the parameter difference value between the first intrinsic calibration data and the second intrinsic calibration data; When the parameter difference value is less than or equal to the preset difference threshold, the preset first weight and the preset second weight are respectively taken as the first weight and the second weight; When the parameter difference value is greater than the preset difference threshold, correct and adjust the preset first weight and the preset second weight based on the parameter difference value to generate the corrected first weight and the corrected second weight, which are respectively taken as the first weight and the second weight.
3. The method of claim 1, wherein, Based on the intrinsic calibration data, process the original indoor image to obtain an orthographic projection image, comprising: According to the intrinsic calibration data, perform distortion correction processing on the original indoor image to obtain a corrected indoor image; Extract the boundary line features of the target property from the corrected indoor image, and establish a room rectangle constraint according to the boundary line features; According to the room rectangle constraint, perform perspective deformation correction on the corrected indoor image to generate the orthographic projection image of the target property.
4. The method of claim 3, wherein, According to the intrinsic calibration data, perform distortion correction processing on the original indoor image to obtain a corrected indoor image, comprising: extracting a focal length parameter, a principal point coordinate parameter and a lens distortion parameter of the camera from the intrinsic calibration data; establishing a distortion correction model based on the lens distortion parameter, and calculating a distortion offset of each pixel point in the original indoor image; performing position correction on each pixel point in the original indoor image according to the distortion offset, and obtaining an initial corrected indoor image; performing geometric transformation on the initial corrected indoor image in combination with the focal length parameter and the principal point coordinate parameter, and generating the corrected indoor image.
5. The method of claim 3, wherein, extracting a boundary line feature of the target property from the corrected indoor image, and establishing a room rectangle constraint according to the boundary line feature, including: performing edge detection on the corrected indoor image, and identifying a horizontal boundary line and a vertical boundary line of the target property; determining a corner point coordinate of the target property according to an intersection relationship of the horizontal boundary line and the vertical boundary line; establishing the room rectangle constraint based on the horizontal boundary line, the vertical boundary line and the corner point coordinate.
6. The method of claim 4, wherein, performing perspective deformation correction on the corrected indoor image according to the room rectangle constraint, and generating an orthographic projection image of the target property, including: determining a source corner point and a target corner point of perspective transformation based on the room rectangle constraint; determining a perspective transformation matrix from the source corner point to the target corner point; performing perspective correction transformation on the corrected indoor image by using the perspective transformation matrix, and generating the orthographic projection image of the target property.
7. The method of claim 1, wherein, establishing a conversion relationship between image pixels and actual sizes according to the orthographic projection image, including: determining a reference object in the orthographic projection image, and obtaining an actual size of the reference object; measuring a pixel size of the reference object in the orthographic projection image; determining a proportionality coefficient between image pixels and actual sizes based on the actual size and the pixel size of the reference object; generating the conversion relationship between image pixels and actual sizes according to the proportionality coefficient.
8. A real estate data intelligent measurement system, characterized in that, The system is used to execute the property data intelligent measurement method of any one of claims 1-7, and the system comprises: a data acquisition and intrinsic parameter management module, configured to obtain intrinsic calibration data of a camera of a mobile terminal, and receive an original indoor image of a target property collected by the camera; an image correction and projection conversion module, configured to process the original indoor image based on the intrinsic calibration data, and obtain an orthographic projection image; a size conversion and intelligent measurement module, configured to establish a conversion relationship between image pixels and actual sizes according to the orthographic projection image, measure a room boundary line in the orthographic projection image based on the conversion relationship, and obtain property measurement data of the target property.
Citation Information
Patent Citations
House type chart generation method, device and equipment based on image detection and storage medium
CN110686648A
Vehicle-mounted camera calibration method and device, equipment, storage medium and program product
CN119338920A