Street building color analysis method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202410289430.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-03-14
AI Technical Summary
[0004]本发明的目的在于提供一种街道建筑色彩分析方法、装置、电子设备及存储介质,以提升图源获取效率,保证图源色彩准确性,解决街道建筑色彩的协调性难以量化的问题
[0015] The street building color analysis method, apparatus, electronic device, and storage medium provided in this invention, when performing street building color analysis, first acquire street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from an open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC dominant color data and geographical location information of multiple target building images; then, based on the street view image data and object card color matching data, correction data is determined; and then, based on the correction data, each image in the street view image data is processed. Color correction is performed to obtain the corrected image. Then, for each corrected image, the dominant color tone of each building unit, divided by a preset length, is extracted and the color space is transformed to obtain the HVC dominant color tone data of each building unit. For each street image composed of various building units of the same street, the coordination value corresponding to each building unit in the street image is calculated based on the HVC dominant color tone data of each building unit and the preset street color coordination value algorithm, so as to obtain the building coordination value curve of the street image. Among them, the street color coordination value algorithm is derived from the relationship between color area, brightness and chroma in the Munsell color system. This approach directly utilizes open maps when acquiring street view image data, improving the efficiency of current urban image source acquisition methods that primarily rely on survey photography, thus enhancing image source acquisition efficiency. By using object-based colorimetric data as a standard, color correction is performed on each image in the street view image data, resolving the issue of factors such as lighting and shooting time affecting the color quality of street view images and ensuring the accuracy of image source colors. Furthermore, by deriving a street color coordination value algorithm based on the relationship between color area, brightness, and chroma in the Munsell color system, the building coordination value curve of street images is calculated, solving the problem of the difficulty in quantifying the coordination of street building colors.
Smart Images

Figure CN118334134B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban color planning technology, and in particular to a method, apparatus, electronic device and storage medium for analyzing street building colors. Background Technology
[0002] Algorithms based on artificial intelligence to identify street view images are widely used in fields such as urban autonomous driving, street space measurement, and urban greening identification. They are an important technical means for big data-driven urban spatial governance and smart city construction, enabling large-scale measurement of relevant indicators of urban streets.
[0003] Currently, the collection of street building colors mainly relies on individual surveys and measurements using colorimetric cards and spectrophotometers, which is inefficient. Furthermore, the color accuracy of existing street view images stored in databases is insufficient. In addition, the evaluation of the harmony of street building colors is highly subjective and difficult to quantify. Summary of the Invention
[0004] The purpose of this invention is to provide a method, device, electronic device, and storage medium for analyzing the colors of street buildings, so as to improve the efficiency of image source acquisition, ensure the accuracy of image source colors, and solve the problem of difficulty in quantifying the coordination of street building colors.
[0005] In a first aspect, embodiments of the present invention provide a method for analyzing the color of street buildings, including: Acquire street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from an open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC dominant color data and geographical location information of multiple target building images; Based on the street view image data and the object card colorimetric data, the correction data is determined; Based on the correction data, color correction is performed on each image in the street view image data to obtain the corrected image; For each corrected image, the dominant color tone of each building unit is extracted and the color space is converted by dividing it into segments of a preset length, so as to obtain the HVC dominant color tone data of each building unit. For each street image composed of various building units of the same street, the coordination value corresponding to each building unit in the street image is calculated based on the HVC primary color data of each building unit and a preset street color coordination value algorithm, so as to obtain the building coordination value curve of the street image; wherein, the street color coordination value algorithm is derived based on the relationship between color area, brightness and chroma in the Munsell color system.
[0006] Furthermore, the correction data includes target correction coefficients at multiple spectral angles; determining the correction data based on the street view image data and the object card colorimetric data includes: Based on the attribute information, multiple target images corresponding to the object card colorimetric data are selected from the street view image data; wherein, the target images contain at least one of the target buildings; For each target image, the dominant color tone of the target building is extracted and the color space is transformed to obtain the HVC dominant color tone data of the target building in each target image; wherein, the HVC dominant color tone data of the target building includes at least one hue value, lightness value and chroma value at a spectral angle; The initial correction coefficients for each target building at the corresponding spectral angle are obtained by comparing the colorimetric data of the object card and the HVC primary color data of the target image. Based on the initial correction coefficients of each target building at the same spectral angle, the target correction coefficients at each spectral angle are determined.
[0007] Furthermore, the shooting parameter information includes camera tilt angle information and camera orientation information; the step of filtering multiple target images corresponding to the object card colorimetric data from the street view image data based on the attribute information includes: Based on the geographical location information, camera elevation angle information, and camera orientation information of each image in the street view image data, and the geographical location information of each target building image in the object card colorimetric data, building matching is performed between the images in the street view image data and the target building images in the object card colorimetric data. The images that are successfully matched in the street view image data are identified as the target images; The step of extracting the dominant color tone of the target building and performing color space conversion on each of the target images to obtain the HVC dominant color tone data of the target building in each target image includes: Each of the target images is preprocessed to obtain a preprocessed image; wherein, the preprocessing includes cropping and white balance adjustment; Semantic segmentation is performed on each of the preprocessed images to obtain the target region where the target building is located in the preprocessed image; Based on a preset clustering algorithm, the RGB main color data of the corresponding target building are extracted from the target region of each preprocessed image; The RGB primary color data of the target building in the preprocessed image corresponding to each target image are converted from the RGB color system to the Munsell color system to obtain the HVC primary color data of the target building in each target image.
[0008] Further, the shooting parameter information includes shooting time information; the correction data includes target correction coefficients for multiple seasons, multiple time periods, and multiple spectral angles; the step of comparing the colorimetric data of the object card and the HVC dominant color data of the target image for each target building to obtain the initial correction coefficient for each target building at the corresponding spectral angle includes: Based on the shooting time information of each target image, the target images are classified according to season and time period to obtain multiple image sets; The initial correction coefficients for each target building at the corresponding spectral angle are obtained by comparing the colorimetric data of the object card and the HVC dominant color data of each image set for each target building in the corresponding season and time period of the image set. The step of determining the target correction coefficient at each spectral angle based on the initial correction coefficient of each target building at the same spectral angle includes: The median of the initial correction coefficients of each target building at the same spectral angle under the same season and time period is determined as the target correction coefficient under the corresponding season, time period, and spectral angle.
[0009] Furthermore, the street view image data also includes multiple captured images and attribute information for each captured image, wherein the quality of the captured images is higher than that of the street view images; the target correction coefficient includes a first type of correction coefficient corresponding to the street view images and a second type of correction coefficient corresponding to the captured images.
[0010] Further, the algorithm for calculating the coordination value corresponding to each building unit in the street image based on the HVC dominant color data of each building unit and a preset street color coordination value includes: Calculate building units using the following formula. Corresponding coordination value : in, For building units The number of colors, For building units No. The brightness value of a color. For building units No. The chroma value of a color, For building units No. The area occupied by each color.
[0011] Furthermore, after performing color correction on each image in the street view image data based on the corrected data to obtain the corrected image, the street building color analysis method further includes: The corrected image is subjected to main color extraction and color space conversion of the buildings to obtain the individual building color charts of the corresponding buildings; wherein, the individual building color charts include HVC main color data corresponding to the main color and HVC main color data corresponding to at least one auxiliary color; Extract the main color tone of the buildings from each street image to obtain the main color of the street image; For each block consisting of multiple streets, the color spectrum of the block is determined based on the proportion of the street facade area of each street in the block and the main color of the corresponding street image. Based on the color spectrum of each of the aforementioned blocks, a city color map is drawn, wherein the area corresponding to each of the aforementioned blocks in the city color map is filled with the main color of the corresponding color spectrum.
[0012] Secondly, embodiments of the present invention also provide a street building color analysis device, comprising: The data acquisition module is used to acquire street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from an open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC dominant color data and geographical location information of multiple target building images; The correction determination module is used to determine correction data based on the street view image data and the object card colorimetric data; A color correction module is used to perform color correction on each image in the street view image data based on the correction data to obtain a corrected image; The extraction and conversion module is used to extract the main color tone and convert the color space of each building unit obtained by dividing each corrected image into a preset length, so as to obtain the HVC main color tone data of each building unit. The coordination calculation module is used to calculate the coordination value corresponding to each building unit in the street image based on the HVC main color data of each building unit and a preset street color coordination value algorithm for each street image composed of various building units of the same street, so as to obtain the building coordination value curve of the street image; wherein, the street color coordination value algorithm is derived based on the relationship between color area, brightness and chroma in the Munsell color system.
[0013] Thirdly, embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the street building color analysis method described in the first aspect.
[0014] Fourthly, embodiments of the present invention also provide a storage medium storing a computer program, which, when executed by a processor, performs the street building color analysis method described in the first aspect.
[0015] The street building color analysis method, apparatus, electronic device, and storage medium provided in this invention, when performing street building color analysis, first acquire street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from an open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC dominant color data and geographical location information of multiple target building images; then, based on the street view image data and object card color matching data, correction data is determined; and then, based on the correction data, each image in the street view image data is processed. Color correction is performed to obtain the corrected image. Then, for each corrected image, the dominant color tone of each building unit, divided by a preset length, is extracted and the color space is transformed to obtain the HVC dominant color tone data of each building unit. For each street image composed of various building units of the same street, the coordination value corresponding to each building unit in the street image is calculated based on the HVC dominant color tone data of each building unit and the preset street color coordination value algorithm, so as to obtain the building coordination value curve of the street image. Among them, the street color coordination value algorithm is derived from the relationship between color area, brightness and chroma in the Munsell color system. This approach directly utilizes open maps when acquiring street view image data, improving the efficiency of current urban image source acquisition methods that primarily rely on survey photography, thus enhancing image source acquisition efficiency. By using object-based colorimetric data as a standard, color correction is performed on each image in the street view image data, resolving the issue of factors such as lighting and shooting time affecting the color quality of street view images and ensuring the accuracy of image source colors. Furthermore, by deriving a street color coordination value algorithm based on the relationship between color area, brightness, and chroma in the Munsell color system, the building coordination value curve of street images is calculated, solving the problem of the difficulty in quantifying the coordination of street building colors. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a street building color analysis method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating another street building color analysis method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the overall process of a street building color analysis method provided in an embodiment of the present invention; Figure 4 A schematic diagram illustrating the segmentation of a single building and the overall segmentation of a street, provided as an embodiment of the present invention; Figure 5 A schematic diagram illustrating a color space conversion according to an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the acquisition of correction data according to an embodiment of the present invention; Figure 7 A schematic diagram of a street color spectrum provided in an embodiment of the present invention; Figure 8 A schematic diagram of a building harmony value curve for a street image provided in an embodiment of the present invention; Figure 9 A schematic diagram of a single building color chart provided in an embodiment of the present invention; Figure 10 A schematic diagram of a street color spectrum provided in an embodiment of the present invention; Figure 11 A schematic diagram of a city color map provided in an embodiment of the present invention; Figure 12 This is a schematic diagram of the structure of a street building color analysis device provided in an embodiment of the present invention; Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Street measurement using street view images can involve the following steps: training an artificial intelligence algorithm using an open street view dataset; segmenting the street view image using a segmentation algorithm; extracting information such as sky, buildings, trees, grass, fences, traffic lights, people, and vehicles from the image; evaluating a street characteristic (such as green view rate, street height-to-width ratio, etc.) based on the proportion of each element; and forming stable measurement indicators for large-scale measurement.
[0020] Currently, street colors are difficult to extract on a large scale, street scene images have inaccurate colors, and color coordination is difficult to evaluate objectively. Based on this, the present invention provides a street building color analysis method, device, electronic device, and storage medium that can solve the above problems.
[0021] To facilitate understanding of this embodiment, a street building color analysis method disclosed in this embodiment of the invention will first be described in detail.
[0022] This invention provides a method for analyzing the color of street buildings, which can be executed by an electronic device with image processing capabilities. See also... Figure 1 The diagram shows a flowchart of a street building color analysis method, which mainly includes the following steps S102 to S110.
[0023] Step S102: Obtain street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from the open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC main color tone data and geographical location information of multiple target building images.
[0024] Street view images can be selected from real-time imagery big data of existing open maps, choosing street view images of relatively uniform quality, after removing road sections with significant color deviations. Street view images are 360-degree panoramic images (or fisheye images) of the same size. Preferably, panoramic images are taken during specific times in winter, when trees obscure buildings less, and lighting conditions are better during specific times such as 9:00-11:00 and 15:00-17:00, resulting in relatively uniform image quality. The attribute information for each street view image includes geographic location information such as street name, street address, and latitude and longitude, and shooting parameter information such as shooting time, camera elevation angle, and camera orientation.
[0025] Object-card colorimetric data is obtained by performing object-card colorimetry on a target building, and the image corresponding to the target building is the target building image. Object-card colorimetry is a method of acquiring color. The target building can be multiple landmark buildings (such as historical buildings) on a street. The target building needs to cover multiple preset spectral angles in the color space. The preset spectral angles can be the spectral angles corresponding to regular buildings. For example, the preset spectral angles include R (corresponding to true red), YR (corresponding to reddish-yellow), and Y (corresponding to yellow), etc. The HVC primary color data of the target building image can include the HVC primary color data corresponding to the main color of the target building and / or the HVC primary color data corresponding to at least one auxiliary color of the target building. HVC refers to the Munsell color system, which conforms to human visual perception and represents the color space through three core indicators: hue, value, and chroma. This color system is more conducive to representing the various indicators of color recognition by the human eye compared to the computer's RGB pixel color rendering method. Hue is called Hue (H), value is called value (V), and chroma is called chroma (C). Therefore, HVC primary color data includes hue, value, and chroma values. The geographical location information of the target building image can include the building name and address.
[0026] In addition, street view imagery data can include multiple images of specific city streets, and these images are of higher quality than street view images. These images are taken under specific conditions, such as winter, 9:00-11:00 AM, and sunny days. Therefore, compared to street view images, these images have less interference and are of higher quality.
[0027] Step S104: Determine the correction data based on street view image data and object card colorimetric data.
[0028] Under the Munsell color system, the introduction of correction data can improve the accuracy of big data analysis and establish conversion relationships between different types of data. For example, by comparing street view image data and object card colorimetric data of sampling points, and using the object card colorimetric data as a benchmark, correction data for street view image data can be obtained, so that street view images and / or captured images can be converted into images with more accurate colors.
[0029] In some possible embodiments, the above-mentioned correction data includes target correction coefficients at multiple spectral angles, and step S104 can be implemented by the following sub-steps 1 to 4: Sub-step 1: Based on the above attribute information, select multiple target images from the street view image data that correspond to the object card colorimetric data; wherein, the target images contain at least one target building.
[0030] First, target images containing the target buildings are selected from the street view image data. The target buildings are the buildings corresponding to the object-card colorimetric data. Optionally, building matching can be performed between the images in the street view image data and the target building images in the object-card colorimetric data based on the geographical location information, camera elevation angle information, and camera orientation information of each image in the street view image data, and the geographical location information of each target building image in the object-card colorimetric data; the images in the street view image data that successfully match are determined as the target images.
[0031] Sub-step 2 involves extracting the dominant color tone of the target building and performing color space conversion on each target image to obtain the HVC dominant color tone data of the target building in each target image; wherein, the HVC dominant color tone data of the target building includes hue value, lightness value and chroma value at at least one spectral angle.
[0032] In one possible implementation, each target image can be preprocessed to obtain a preprocessed image. This preprocessing includes cropping and white balance adjustment. Then, semantic segmentation is performed on each preprocessed image to obtain the target region where the target building is located. Next, based on a preset clustering algorithm, the RGB dominant color data of the corresponding target building is extracted from the target region of each preprocessed image. Finally, the RGB dominant color data of the target building in the preprocessed image corresponding to each target image is converted from the RGB color system to the Munsell color system to obtain the HVC dominant color data of the target building in each target image. Cropping refers to cutting out the desired portion from the image according to a selected direction and angle range, such as cropping a local image within a 105-degree range to the right from a target image. White balance adjustment can be automatic white balance fine-tuning. The clustering algorithm can be, but is not limited to, K-means clustering.
[0033] Sub-step 3 involves comparing the colorimetric data of the object card and the HVC primary color data of the target image for each target building to obtain the initial correction coefficient for each target building at the corresponding spectral angle.
[0034] Optionally, the aforementioned shooting parameter information includes shooting time information, and the correction data includes target correction coefficients under multiple seasons, multiple time periods, and multiple spectral angles. The season can be spring, winter, etc., the time period can be morning, afternoon, etc., and the spectral angle can be R, YR, Y, etc. Based on this, each target image can be classified according to the season and time period based on the shooting time information of each target image to obtain multiple image sets. The initial correction coefficients of each target building under the corresponding season and time period and the corresponding spectral angle are obtained by comparing the colorimetric data of the object card and the HVC main color data of each image set for each target building.
[0035] Sub-step 4: Based on the initial correction coefficients of each target building at the same spectral angle, determine the target correction coefficients at each spectral angle.
[0036] Optionally, the median of the initial correction coefficients of each target building at the same spectral angle under the same season and time period can be determined as the target correction coefficient under the corresponding season, time period, and spectral angle.
[0037] Optionally, the street view image data also includes multiple captured images and attribute information for each captured image, with the quality of the captured images being higher than that of the street view images; the target correction coefficient includes a first type of correction coefficient corresponding to the street view images and a second type of correction coefficient corresponding to the captured images.
[0038] Step S106: Based on the correction data, perform color correction on each image in the street view image data to obtain the corrected image.
[0039] Based on the season, time of day, and spectral angle of each image in the street view imagery data, a corresponding target correction coefficient can be determined, and this coefficient can be used to correct the image's color. For example, if a street view image was taken in winter, in the morning, and its spectral angle is YR, then the first-type correction coefficient for winter, morning, and YR can be selected to correct the image's color. The corrected image's color matches the colorimetric data from the object card, thus resulting in more accurate color correction.
[0040] Step S108: Extract the main color tone and convert the color space of each building unit obtained by dividing each corrected image into a preset length, and obtain the HVC main color tone data of each building unit.
[0041] First, each corrected image can be divided into units of a preset length to obtain multiple building units. Then, the dominant color tone of each building unit is extracted and its color space is converted to obtain the HVC dominant color tone data for each building unit. Here, the preset length refers to the actual length of the image, which can be set according to actual needs, for example, a preset length of 10 meters. The specific process of dominant color tone extraction and color space conversion can be referred to the corresponding content on dominant color tone extraction and color space conversion of the target image mentioned above, and will not be repeated here.
[0042] Step S110: For each street image composed of various building units of the same street, the coordination value corresponding to each building unit in the street image is calculated based on the HVC main color data of each building unit and the preset street color coordination value algorithm, so as to obtain the building coordination value curve of the street image; wherein, the street color coordination value algorithm is derived based on the relationship between color area, brightness and chroma in the Munsell color system.
[0043] When stitching street images, for each street, candidate images corresponding to that street can be selected from the corrected images corresponding to the street view image data based on the selected target season and target time period. The candidate images were taken during the target season and target time period. Then, building units are stitched together based on the candidate images corresponding to that street to obtain the street image. Each candidate image is divided into multiple building units. For multiple building units corresponding to the same building unit area in the street, the building units corresponding to the captured images are preferred during stitching.
[0044] In some possible embodiments, building units can be calculated using the following formula. Corresponding coordination value : in, For building units The number of colors, For building units No. The brightness value of a color. For building units No. The chroma value of a color, For building units No. The area occupied by each color.
[0045] The street building color analysis method provided in this invention first acquires street view image data and object card colorimetric data during street building color analysis. The street view image data includes multiple street view images from an open map and attribute information for each image, including geographic location information and shooting parameter information. The object card colorimetric data includes HVC dominant color data and geographic location information for multiple target building images. Then, based on the street view image data and object card colorimetric data, correction data is determined. Next, based on the correction data, color correction is performed on each image in the street view image data to obtain a corrected image. Then, for each corrected image, the dominant color of each building unit (divided by a preset length) is extracted and its color space is converted to obtain the HVC dominant color data for each building unit. For each street image composed of various building units from the same street, based on the HVC dominant color data of each building unit and a preset street color coordination value algorithm, the coordination value corresponding to each building unit in the street image is calculated to obtain the building coordination value curve of the street image. The street color coordination value algorithm is derived based on the relationship between color area, brightness, and chroma in the Munsell color system. This approach directly utilizes open maps when acquiring street view image data, improving the efficiency of current urban image source acquisition methods that primarily rely on survey photography, thus enhancing image source acquisition efficiency. By using object-based colorimetric data as a standard, color correction is performed on each image in the street view image data, resolving the issue of factors such as lighting and shooting time affecting the color quality of street view images and ensuring the accuracy of image source colors. Furthermore, by deriving a street color coordination value algorithm based on the relationship between color area, brightness, and chroma in the Munsell color system, the building coordination value curve of street images is calculated, solving the problem of the difficulty in quantifying the coordination of street building colors.
[0046] Furthermore, the street building color analysis method provided in this embodiment of the invention can also establish color cards for individual buildings, color spectrum of blocks, and city color maps. Specifically, the main color tone of buildings is extracted and color space is converted in the corrected image to obtain the corresponding individual building color card; wherein, the individual building color card includes HVC main color tone data corresponding to the main color and HVC main color tone data corresponding to at least one auxiliary color; the main color tone of buildings is extracted for each street image to obtain the main color of the street image; for each block composed of multiple streets, the color spectrum of the block is determined based on the proportion of street facade area of each street in the block and the main color of the corresponding street image; based on the color spectrum of each block, a city color map is drawn, and the area corresponding to each block in the city color map is filled with the main color in the corresponding color spectrum. The extraction of the main color tone and the determination of the color spectrum of blocks can both be achieved through clustering. This can be applied to areas such as 250m... All streets within a 250m block are aggregated to obtain the block's theme color (i.e., the main color of the block), which in turn yields the city's main color card (i.e., the city's color map).
[0047] For ease of understanding, please refer to the following: Figure 2 The methods for analyzing the color of buildings along the streets mentioned above are introduced. For example... Figure 2 As shown, the street building color analysis method mainly includes three parts: color recognition, color analysis, and output results (i.e., output color analysis conclusions). The basic data and explanations for the color recognition part are as follows: First, a basic color database is established, which includes street view images (i.e., street view pictures), photographed images (i.e., photographed pictures), color value data obtained through object card color matching (i.e., HVC primary color data), and geographical attributes (i.e., geographical location information). The color data analysis model for the color analysis part is as follows: Cluster analysis is performed on the street view images and photographed images respectively, and then the color values of the sample points are compared with the color value data from object card color matching to obtain correction coefficients. After color correction of the street view images and photographed images in the basic color database, cluster analysis is performed on individual buildings, street interfaces, and urban blocks respectively to obtain cluster analysis results. These cluster analysis results include the main color and auxiliary color of individual buildings, the main color and coordination value of street interfaces, and the main color of urban blocks. Based on the color card spectrum (i.e., Munsell color card spectrum) in the existing database, the cluster analysis results are color-converted to obtain the block color spectrum, street interface coordination degree, and individual building color cards. The output results section can output the color spectrum of the street area, the harmony of the street interface, and the color card of individual buildings.
[0048] The following reference Figure 3 This section introduces the overall process of street building color analysis methods. For example... Figure 3 As shown, ① basic color extraction for urban design, including self-photography, urban street view and object card color comparison; ② urban color correction and database construction, including obtaining corresponding correction coefficients through color comparison between photographed data and object cards, and color correction of photographed data and street view data based on the obtained correction coefficients to obtain a basic color library; ③ evaluation of color harmony in urban design, calculating harmony values through hue, brightness and chroma of HVC to obtain harmony curves.
[0049] This invention provides a method for large-scale urban street color extraction and harmony evaluation, addressing the current problems of difficulty in large-scale street color extraction, inaccurate street view image colors, and difficulty in objectively evaluating color harmony. For ease of understanding, the following refers to... Figures 4 to 11 This paper provides a detailed introduction to the color analysis methods used for the buildings on this street.
[0050] ① Large-scale street view image acquisition. Acquire real-time imagery big data from existing open maps, select street view images with relatively uniform image quality, remove road sections with large color deviations, and establish a basic color database. This database may also include captured images and object card colorimetric data.
[0051] ② Street scene semantic segmentation. The PSPNet (Pyramid Scene Parseing Network) pre-trained model is used. Based on the content classification in the Cityscapes dataset, each pixel in the target image is labeled with a different color corresponding to the classification, and the output labeled color image of the same size as the target image is used as the semantic segmentation result.
[0052] The Cityscapes dataset provides manually labeled street view images, with different feature categories in the images labeled with different colors. To improve the model's accuracy, a PSPNet pre-trained model was first trained on the Cityscapes dataset. Then, the trained model was used to perform semantic segmentation on some sample images in the color-based database. Based on the segmentation results, the labels of the street view images in the Cityscapes dataset were modified, and the model was trained again until a model with satisfactory accuracy was obtained.
[0053] Street color extraction is performed using a PSPNet pre-trained model, specifically extracting street colors based on spatial location. The process is as follows: 1. Preprocessing is performed on each panoramic image in the color database. This preprocessing includes cropping the panoramic image to obtain a cropped image within a specific angle range in a specific direction, followed by white balance adjustment to obtain a preprocessed image in a white-balanced state. For example... Figure 4 As shown, the original data is cropped to obtain a perspective view within a 105-degree range to the right, and then white balance is fine-tuned to obtain a preprocessed image. 2. The preprocessed image is input into the trained PSPNet pre-trained model to obtain the semantic segmentation result corresponding to the preprocessed image. This semantic segmentation result includes the feature category to which each pixel in the preprocessed image belongs. Feature categories include buildings, sky, trees, grass, fences, traffic lights, people, vehicles, etc. In this embodiment, only buildings are considered. This allows us to determine the location of the building portion.
[0054] ③ Street color extraction. Utilize the K-means clustering algorithm to quickly and extensively extract color features from images, i.e., perform batch color processing of the images, such as... Figure 4 As shown, the building sections of the preprocessed image are clustered once (to 15), resulting in color bars corresponding to one main color and multiple auxiliary colors (up to 15 colors). The area of each color bar corresponds to the area ratio of the corresponding color, thus achieving individual building segmentation, and thereby obtaining... Figure 9The individual building color chart shown Figure 9 The individual building color charts for three buildings are shown. Each building's individual building color chart includes HVC primary color data corresponding to one main color and HVC primary color data corresponding to three secondary colors.
[0055] ④ Color Space Conversion. The traditional RGB color system is converted into the Munsell three-dimensional color system that is recognized by the human eye, and the color space is represented by three core indicators: hue, lightness, and chroma.
[0056] The conversion between the Munsell color space and the RGB color space is a non-linear process, and an accurate mathematical model cannot be directly established between them. For example... Figure 5 As shown, CIE Yxy and CIE XYZ can be used as transitions during the conversion process, and the following mathematical model can be established based on this relationship to realize the conversion between the two color spaces.
[0057] ⑤ Architectural color correction. Under the Munsell color system, a correction coefficient method is introduced to improve the accuracy of big data analysis, establish the conversion relationship between different data, compare the street view data, shooting data and object card colorimetric data of the sampling points, and obtain the correction coefficient to make the three interchangeable.
[0058] Street view image color correction can restore the colors of streets captured in street view photos to their original colors. For example... Figure 6 As shown, the top left corner displays the colorimetric data of the object card corresponding to the Beijing Hotel. This was achieved through street view data vs. object card colorimetry, and photographic data vs. object card colorimetry (i.e., hue contrast, brightness contrast, and chroma contrast). Figure 6 (The chroma comparison results are not shown), and the correction coefficients corresponding to the street view data and the shooting data can be obtained.
[0059] Detailed calibration examples: Hue: The street view data is basically consistent with the colorimetric data of the object card, but the overall shooting data is biased towards yellow (Y). When performing white balance, the hue value (H) is increased by 2.5% according to the Munsell color system (the value is reflected as an increase of 9 degrees).
[0060] Brightness: Compared with the colorimetric card, the brightness of the image data clustering color is generally 1-3 higher; when there are multiple data, the brightness can be reduced by 1 value after averaging, and when there is a single data, the brightness can be reduced by 2 values.
[0061] Chroma: Compared with the colorimetric card, the chroma of low-brightness chromatic systems is 1-2 lower, the chroma of high-brightness chromatic systems is 2-4 higher, and the chroma of achromatic systems is 1-2 higher.
[0062] After building color correction, the image colors are then subjected to secondary clustering to extract the dominant color tone, resulting in a dominant color tone chart (RGB color chart) for each part of the street, with a unit length of 10 meters. Figure 4 As shown, a secondary clustering (clustered to 5) is performed on each building unit in the corrected image, resulting in a color bar with one main color and multiple auxiliary colors corresponding to each building unit (each building unit corresponds to a color bar of at most 5 colors), thus achieving overall street segmentation, and thereby obtaining the following... Figure 7 The image shown is a secondary clustering result corresponding to a street image. Figure 7 The upper and lower parts correspond to both sides of a street.
[0063] ⑥ Color harmony evaluation. Based on Munsell's color theory, the harmony values of individual buildings and groups can be calculated by superimposing area, brightness, and chroma, and the harmony values of street buildings can be drawn.
[0064] Street color harmony calculation refers to calculating the harmony curve of a street. Munsell's color theory summarizes the relationship between area, value, and chroma as (…). Lightness of color Chroma) / ( Lightness of color Chroma) = Color area / Color area, i.e.: in, , Indicates two colors, , They represent color, The brightness of the color, , They represent color, The saturation of the color, , express color, The area of color.
[0065] Based on the aforementioned relationship between area, brightness, and chroma, the coordination value of each building unit in the street image is calculated using the following formula, and then plotted as follows: Figure 8 The building harmony value curve shown in the street image: in, For building units The number of colors, For building units No. The brightness value of a color. For building units No. The chroma value of a color, For building units No. The area occupied by each color.
[0066] ⑦ Street color spectrum drawing. Divide the city into 250-meter sections. A 250-meter street block unit is used. Based on the proportion of street facade area and the main color of the corresponding street image, the main color tone of the street block is extracted to obtain the street color spectrum, such as... Figure 10 As shown.
[0067] ⑧ City Color Palette Construction. First, extract the color with the largest proportion of all streets within a block unit as the theme color of that block, thus obtaining the city color palette; then, acquire city color palette images from different geographical locations, correlate them with the spatial location on an open map, and obtain a city-scale color representation image, as shown below. Figure 11 The city color map shown.
[0068] This invention enables the acquisition of urban streetscapes on a large scale. By utilizing an open-source urban image dataset and the PSPNet pre-trained AI model, it segments and extracts building color sources, improving the efficiency of current urban image acquisition methods primarily based on survey photography. Furthermore, it processes the source data using Munsell color conversion, transforming building RGB images into hue, brightness, and chroma indices that conform to human visual perception. Correction values are derived by using measured colorimetric values of landmark buildings and streetscape segmentation values, addressing the impact of factors such as lighting and shooting time on streetscape image color quality. Further, by understanding the relationship between Munsell color area, brightness, and chroma, a street color coordination value algorithm is derived, calculating street color coordination value curves to address the difficulty in quantifying urban street color coordination. The application of large-scale quantified urban color coordination effectively supports the shift in urban color planning from intentional control to quantitative indicator supervision, effectively integrating urban color management into the regulatory detailed planning management system and resolving the lack of effective alignment between top-down urban decision-making and bottom-up urban construction in terms of color.
[0069] Corresponding to the street building color analysis method described above, this invention also provides a street building color analysis device, see [link to relevant documentation]. Figure 12 The diagram shows a structural schematic of a street building color analysis device, which includes: The data acquisition module 1201 is used to acquire street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from the open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC dominant color data and geographical location information of multiple target building images; The correction determination module 1202 is used to determine correction data based on street view image data and object card colorimetric data; The color correction module 1203 is used to perform color correction on each image in the street view image data based on the correction data to obtain the corrected image; The extraction and conversion module 1204 is used to extract the main color tone and convert the color space of each building unit obtained by dividing each corrected image into a preset length, so as to obtain the HVC main color tone data of each building unit. The coordination calculation module 1205 is used to calculate the coordination value of each building unit in the street image based on the HVC main color data of each building unit and the preset street color coordination value algorithm for each street image composed of various building units of the same street, and to obtain the building coordination value curve of the street image; wherein, the street color coordination value algorithm is derived based on the relationship between color area, brightness and chroma in the Munsell color system.
[0070] Furthermore, the aforementioned correction data includes target correction coefficients at multiple spectral angles; the aforementioned correction determination module 1202 is specifically used for: based on attribute information, selecting multiple target images corresponding to the object card colorimetric data from the street view image data; wherein, each target image contains at least one target building; extracting the main color tone of the target building and performing color space conversion on each target image to obtain the HVC main color tone data of the target building in each target image; wherein, the HVC main color tone data of the target building includes hue value, lightness value, and chroma value at at least one spectral angle; comparing the HVC main color tone data of each target building corresponding to the object card colorimetric data and the target image respectively to obtain the initial correction coefficient of each target building at the corresponding spectral angle; and determining the target correction coefficient at each spectral angle based on the initial correction coefficient of each target building at the same spectral angle.
[0071] Furthermore, the aforementioned shooting parameter information includes camera elevation angle information and camera orientation information; the aforementioned correction and determination module 1202 is also used to: perform building matching between the images in the street view image data and the target building images in the object card colorimetric data based on the geographical location information, camera elevation angle information, and camera orientation information of each image in the street view image data, and the geographical location information of each target building image in the object card colorimetric data; determine the successfully matched images in the street view image data as target images; preprocess each target image to obtain a preprocessed image; wherein, the preprocessing includes cropping and white balance adjustment; perform semantic segmentation on each preprocessed image to obtain the target area where the target building is located in the preprocessed image; extract the RGB main color data of the corresponding target building from the target area of each preprocessed image based on a preset clustering algorithm; convert the RGB main color data of the target building in the preprocessed image corresponding to each target image from the RGB color system to the Munsell color system to obtain the HVC main color data of the target building in each target image.
[0072] Furthermore, the aforementioned shooting parameter information includes shooting time information; the correction data includes target correction coefficients under multiple seasons, multiple time periods, and multiple spectral angles; the aforementioned correction determination module 1202 is also used to: classify each target image according to season and time period based on the shooting time information of each target image to obtain multiple image sets; compare the colorimetric data of each target building corresponding to the object card and the HVC dominant color data of each image set to obtain the initial correction coefficient of each target building under the corresponding season and time period at the corresponding spectral angle; and determine the median of the initial correction coefficients of each target building under the same spectral angle in the same season and time period as the target correction coefficient under the corresponding season, time period, and spectral angle.
[0073] Furthermore, the aforementioned street view image data also includes multiple captured images and attribute information for each captured image, with the quality of the captured images being higher than that of the street view images; the target correction coefficients include a first type of correction coefficient corresponding to the street view images and a second type of correction coefficient corresponding to the captured images.
[0074] Furthermore, the aforementioned coordination calculation module 1205 is specifically used to: calculate building units using the following formula. Corresponding coordination value : in, For building units The number of colors, For building units No. The brightness value of a color. For building units No. The chroma value of a color, For building units No. The area occupied by each color.
[0075] Furthermore, the aforementioned street building color analysis device also includes: The first determining module is used to extract the main color tone of the building and convert the color space of the corrected image to obtain the individual building color card of the corresponding building; wherein, the individual building color card includes the HVC main color tone data corresponding to the main color and the HVC main color tone data corresponding to at least one auxiliary color; The second determining module is used to extract the main color of buildings in each street image to obtain the main color of the street image; for each block consisting of multiple streets, the color spectrum of the block is determined based on the proportion of street facade area of each street in the block and the main color of the corresponding street image. The third determining module is used to draw a city color map based on the color spectrum of each block. The area corresponding to each block in the city color map is filled with the main color in the corresponding color spectrum.
[0076] The street building color analysis device provided in this embodiment has the same implementation principle and technical effect as the aforementioned street building color analysis method embodiment. For the sake of brevity, any parts not mentioned in the street building color analysis device embodiment can be referred to the corresponding content in the aforementioned street building color analysis method embodiment.
[0077] like Figure 13 As shown, an electronic device 1300 provided in this embodiment of the invention includes: a processor 1301, a memory 1302 and a bus. The memory 1302 stores a computer program that can run on the processor 1301. When the electronic device 1300 is running, the processor 1301 and the memory 1302 communicate through the bus. The processor 1301 executes the computer program to implement the above-mentioned street building color analysis method.
[0078] Specifically, the memory 1302 and processor 1301 mentioned above can be general-purpose memory and processor, without any specific limitations here.
[0079] This invention also provides a storage medium storing a computer program, which, when executed by a processor, performs the street building color analysis method described in the preceding method embodiments. The storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), RAM, magnetic disk, or optical disk.
[0080] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.
[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0082] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0084] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for analyzing the color of street buildings, characterized in that, include: Acquire street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from an open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC dominant color data and geographical location information of multiple target building images; Based on the street view image data and the object card colorimetric data, the correction data is determined; Based on the correction data, color correction is performed on each image in the street view image data to obtain the corrected image; For each corrected image, the dominant color tone of each building unit is extracted and the color space is converted by dividing it into segments of a preset length, so as to obtain the HVC dominant color tone data of each building unit. For each street image composed of various building units of the same street, based on the HVC primary color data of each building unit and a preset street color coordination value algorithm, the coordination value corresponding to each building unit in the street image is calculated to obtain the building coordination value curve of the street image; wherein, the street color coordination value algorithm is derived based on the relationship between color area, brightness and chroma in the Munsell color system; The algorithm, based on the HVC dominant color data of each building unit and a preset street color coordination value, calculates the coordination value corresponding to each building unit in the street image, including: Calculate building units using the following formula. a Corresponding coordination value H a : in, T a For building units a The number of colors, L i a For building units a No. i The brightness value of a color. C i a For building units a No. i The chroma value of a color. S i a For building units a No. i The area occupied by each color.
2. The street building color analysis method according to claim 1, characterized in that, The correction data includes target correction coefficients at multiple spectral angles; The step of determining correction data based on the street view image data and the object card colorimetric data includes: Based on the attribute information, multiple target images corresponding to the object card colorimetric data are selected from the street view image data; wherein, the target images contain at least one of the target buildings; For each target image, the dominant color tone of the target building is extracted and the color space is transformed to obtain the HVC dominant color tone data of the target building in each target image; wherein, the HVC dominant color tone data of the target building includes at least one hue value, lightness value and chroma value at a spectral angle; The initial correction coefficients for each target building at the corresponding spectral angle are obtained by comparing the colorimetric data of the object card and the HVC primary color data of the target image. Based on the initial correction coefficients of each target building at the same spectral angle, the target correction coefficients at each spectral angle are determined.
3. The street building color analysis method according to claim 2, characterized in that, The shooting parameter information includes camera tilt angle information and camera orientation information; the step of filtering multiple target images corresponding to the object card colorimetric data from the street view image data based on the attribute information includes: Based on the geographical location information, camera elevation angle information, and camera orientation information of each image in the street view image data, and the geographical location information of each target building image in the object card colorimetric data, building matching is performed between the images in the street view image data and the target building images in the object card colorimetric data. The images that are successfully matched in the street view image data are identified as the target images; The step of extracting the dominant color tone of the target building and performing color space conversion on each of the target images to obtain the HVC dominant color tone data of the target building in each target image includes: Each of the target images is preprocessed to obtain a preprocessed image; wherein, the preprocessing includes cropping and white balance adjustment; Semantic segmentation is performed on each of the preprocessed images to obtain the target region where the target building is located in the preprocessed image; Based on a preset clustering algorithm, the RGB main color data of the corresponding target building are extracted from the target region of each preprocessed image; The RGB primary color data of the target building in the preprocessed image corresponding to each target image are converted from the RGB color system to the Munsell color system to obtain the HVC primary color data of the target building in each target image.
4. The street building color analysis method according to claim 2, characterized in that, The shooting parameter information includes shooting time information; the correction data includes target correction coefficients for multiple seasons, multiple time periods, and multiple spectral angles; the comparison of each target building with the colorimetric data of the object card and the HVC dominant color data of the target image to obtain the initial correction coefficient of each target building at the corresponding spectral angle includes: Based on the shooting time information of each target image, the target images are classified according to season and time period to obtain multiple image sets; The initial correction coefficients for each target building at the corresponding spectral angle are obtained by comparing the colorimetric data of the object card and the HVC dominant color data of each image set for each target building in the corresponding season and time period of the image set. The step of determining the target correction coefficient at each spectral angle based on the initial correction coefficient of each target building at the same spectral angle includes: The median of the initial correction coefficients of each target building at the same spectral angle under the same season and time period is determined as the target correction coefficient under the corresponding season, time period, and spectral angle.
5. The street building color analysis method according to claim 2, characterized in that, The street view image data also includes multiple captured images and attribute information for each captured image, wherein the quality of the captured images is higher than that of the street view images; the target correction coefficient includes a first type of correction coefficient corresponding to the street view images and a second type of correction coefficient corresponding to the captured images.
6. The street building color analysis method according to claim 1, characterized in that, After performing color correction on each image in the street view image data based on the corrected data to obtain the corrected image, the street building color analysis method further includes: The corrected image is subjected to main color extraction and color space conversion of the buildings to obtain the individual building color charts of the corresponding buildings; wherein, the individual building color charts include HVC main color data corresponding to the main color and HVC main color data corresponding to at least one auxiliary color; Extract the main color tone of the buildings from each street image to obtain the main color of the street image; For each block consisting of multiple streets, the color spectrum of the block is determined based on the proportion of the street facade area of each street in the block and the main color of the corresponding street image. Based on the color spectrum of each of the aforementioned blocks, a city color map is drawn, wherein the area corresponding to each of the aforementioned blocks in the city color map is filled with the main color of the corresponding color spectrum.
7. A street building color analysis device, characterized in that, include: The data acquisition module is used to acquire street view image data and object card color matching data; wherein, the street view image data includes multiple street view images from an open map and attribute information of each street view image, the attribute information including geographical location information and shooting parameter information; the object card color matching data includes HVC dominant color data and geographical location information of multiple target building images; The correction determination module is used to determine correction data based on the street view image data and the object card colorimetric data; A color correction module is used to perform color correction on each image in the street view image data based on the correction data to obtain a corrected image; The extraction and conversion module is used to extract the main color tone and convert the color space of each building unit obtained by dividing each corrected image into a preset length, so as to obtain the HVC main color tone data of each building unit. The coordination calculation module is used to calculate the coordination value corresponding to each building unit in the street image based on the HVC main color data of each building unit and a preset street color coordination value algorithm for each street image composed of various building units of the same street, so as to obtain the building coordination value curve of the street image; wherein, the street color coordination value algorithm is derived based on the relationship between color area, brightness and chroma in the Munsell color system; The coordination calculation module is specifically used to: calculate building units using the following formula. a Corresponding coordination value H a : in, T a For building units a The number of colors, L i a For building units a No. i The brightness value of a color. C i a For building units a No. i The chroma value of a color. S i a For building units a No. i The area occupied by each color.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the street building color analysis method according to any one of claims 1-6.
9. A storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the street building color analysis method according to any one of claims 1-6.
Citation Information
Patent Citations
Intelligent analysis and evaluation method for city hue
CN109993803A
Urban water body pollution degree online characterization method
CN111693522A