Computer vision environment perception method and system

By analyzing visual environment information, generating personalized composition suggestions and using nine grids and weight settings, the limitations of existing visual environment perception methods are solved, and the active generation and optimization layout are achieved, which improves user satisfaction and image processing performance.

CN120451338APending Publication Date: 2025-08-08NANJING FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510616561.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing visual environment perception methods lack the ability to actively generate and optimize layout, and cannot break through the limitations of existing composition, resulting in low user satisfaction with environmental images and it is difficult to fully mobilize users' enthusiasm in image-related operations.

Method used

By collecting visual environment information, analyzing composition elements, generating candidate layouts that conform to the golden segmentation and Fibonacci spiral, and using user historical preference data to generate personalized composition suggestions, using nine-grid division and weight settings, calculating weight ratios and color differences, generating contrast color labels, constructing environmental perception types, and recording them into the image database.

Benefits of technology

It has achieved a leap from passive recognition composition to active generation and optimization layout, ensuring the aesthetic foundation of composition, increasing user satisfaction and participation, solving the problem of local contrast imbalance in traditional color analysis, and improving the performance of environmental perception and image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451338A_ABST
    Figure CN120451338A_ABST
Patent Text Reader

Abstract

The invention discloses a computer vision environment perception method and system, and relates to the technical field of visual perception, and the method comprises the steps: analyzing an environment image and composition elements in personalized composition suggestions, calculating the proportion of different element regions to the environment image, obtaining a weight sudoku, and obtaining a weight sudoku; the method has the advantages that the limitation that only existing composition can be analyzed by a traditional method is solved, the balance of rule constraint and data driving is realized through condition triggering, and the method is high in practicability, high in efficiency and high in reliability. According to the method, the satisfaction degree and the participation degree of a user on an environment image are increased, the problem of local contrast imbalance in traditional color analysis is effectively solved by calculating the total color value and the difference value of adjacent areas, the performance of the method in the aspects of environment perception and image processing is further improved, and a breakthrough of intelligent creation assistance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual perception technology, and in particular to a computer vision environment perception method and system. Background Art

[0002] Visual environment perception is one of the core technologies in the field of computer vision. It aims to analyze the spatial structure, object distribution, and aesthetic characteristics of the physical environment through image or video data, providing scene understanding capabilities for intelligent systems. Its applications cover a wide range of fields, including intelligent photography assistance, autonomous driving, robot navigation, advertising design, and cultural heritage digitization. It is particularly valuable in scenarios that require the combination of aesthetic analysis and functional decision-making, such as automatic composition and AR interaction.

[0003] Common visual environment perception methods lack the ability to actively generate and optimize layouts when used, are unable to break through the limitations of existing compositions to innovate and improve, and are difficult to ensure the aesthetic basis of the composition. Users are not satisfied with environmental images, and are unable to fully mobilize users' enthusiasm in image-related operations. Summary of the Invention

[0004] The purpose of the present invention is to overcome the problems raised in the background technology and provide a computer vision environment perception method and system.

[0005] To achieve the above object, the present invention provides the following technical solution: a computer vision environment perception method, comprising the following steps:

[0006] Collect visual environment information, obtain environmental images in the visual environment information, and analyze composition elements in the visual environment information;

[0007] Generate a layout that conforms to the golden ratio and Fibonacci spiral to obtain candidate layouts. Combine historical user preference data to generate personalized composition suggestions. Analyze the composition elements in the environment image and the personalized composition suggestions. Circle the different composition elements in the environment image to obtain different element areas. Analyze the areas of different element areas and calculate the ratio of different element areas to the environment image to obtain the area ratio.

[0008] Divide the environmental image into a nine-square grid and obtain nine grids in the nine-square grid. Select X grids from the nine grids as special grids. Set different weights for the special grids and the remaining grids. Special grids include special weights and common weights. Establish weight trigger conditions for special grids. When the weight trigger conditions are not met in a special grid, mark the common weight in the corresponding special grid. When the weight trigger conditions are met in a feature grid, mark the special weight in the corresponding special grid to obtain a weighted nine-square grid.

[0009] Calculate the weight ratio in the environment image according to the area ratio and the weighted nine-square grid, sort the weight ratios, and obtain a weight ratio table;

[0010] Analyze the main colors in different element areas, calculate the total color value and color difference between adjacent element areas, establish a generation threshold, and when the color difference After the threshold is generated, the contrast color label is generated based on the adjacent main colors;

[0011] The composition elements corresponding to different weight ratios in the weight ratio table are analyzed, and corresponding element labels are generated according to the composition elements. The element labels and contrast color labels will constitute the environmental perception type and mark it in the corresponding environmental image.

[0012] As a further solution of the present invention: after obtaining different element areas, the composition elements corresponding to the different element areas are extracted and converted into retrieval elements, and then the image with the same retrieval elements is retrieved from the image database to obtain the case image, the composition rules of the case image are analyzed, and applied to the environmental image, and then the main prominent elements in the environmental image are analyzed to obtain the rule label.

[0013] As a further solution of the present invention: when the area ratio is obtained, GIMP is used to analyze the area of different element regions, and the values of different area ratios are set as , let the area of different element regions be , let the area of the environment image be : ;

[0014] The ratio values of different areas are calculated using the above formula.

[0015] As a further solution of the present invention: when setting the weight of a special grid, the average weight of the remaining grids is calculated, and then the average weight is used as the weight of the special grid. The weight values of the different grids except the special grid are set as , let the average weight value be : ;

[0016] The average weight is calculated using the above formula.

[0017] As a further solution of the present invention: when setting the weights of the remaining palace grids except the special palace grid, a weight editing unit is established, and the user has the authority to edit the weights of the palace grids and special palace grids through the weight editing unit, wherein the user's permission to edit the special palace grid is higher than the permission to use the average weight.

[0018] As a further solution of the present invention: when calculating the weight ratio, the different weight values used in the weighted nine-square grid are , set the weight ratio to : ;

[0019] The weight ratio is calculated using the above formula.

[0020] As a further solution of the present invention: after different weight ratios are calculated, a sorting threshold is established, and the sorting threshold is a value obtained by dividing the area of the environment image by one tenth of the area of the environment image. When the sorting threshold is reached, it will be recorded in the weight ratio table. When the threshold is sorted, it is removed.

[0021] As a further solution of the present invention: after the weight ratio table is obtained, the Mth and M+1th weight ratios are extracted from the weight ratio table respectively, and adjacent ratios are calculated. Let the Mth weight ratio be , let the Nth weight ratio be , let the adjacent ratio be : ;

[0022] Calculate the adjacent ratio through the above formula and set the priority multiple. When the priority multiple is set, the weight ratio whose sorting times in the weight ratio table is lower than M will be deleted. When the priority multiplier is set, the weight ratios whose sorting times in the weight ratio table are lower than M will not be deleted.

[0023] As a further solution of the present invention: when calculating the color difference, an element area is selected as the central area, and then the color difference between the central area and R adjacent areas is calculated, where the user has the authority to edit R.

[0024] A second aspect of the present invention provides a computer vision environment perception system, comprising:

[0025] Environmental information acquisition module, used to collect visual environmental information, obtain environmental images in the visual environmental information, and analyze composition elements in the visual environmental information;

[0026] The region ratio module is used to generate layouts that conform to the golden ratio and Fibonacci spiral, obtain candidate layouts, combine user historical preference data to generate personalized composition suggestions, analyze the composition elements in the environment image and the personalized composition suggestions, circle different composition elements in the environment image to obtain different element regions, analyze the area of different element regions, calculate the ratio of different element regions to the environment image, and obtain the region ratio;

[0027] The weighted nine-square module is used to divide the environmental image into nine squares and obtain nine squares in the nine-square grid. X squares are selected from the nine squares as special squares, and different weights are set for the special squares and the remaining squares. Special squares include special weights and ordinary weights. Weight trigger conditions are established for special squares. When the weight trigger conditions are not met in a special square, the ordinary weight is marked in the corresponding special square. When the weight trigger conditions are met in a feature square, the special weight is marked in the corresponding special square to obtain a weighted nine-square grid.

[0028] The weight ratio table module is used to calculate the weight ratio in the environment image according to the area ratio and the weighted nine-square grid, sort the weight ratios, and obtain a weight ratio table;

[0029] The contrast color label module is used to analyze the main colors in different element areas, calculate the total color value and color difference between adjacent element areas, establish a generation threshold, and After the threshold is generated, the contrast color label is generated based on the adjacent main colors;

[0030] The labeling module is used to analyze the composition elements corresponding to different weight ratios in the weight ratio table, and generate corresponding element labels based on the composition elements. The element labels and contrast color labels constitute the environmental perception types and are marked in the corresponding environmental images.

[0031] By adopting the above technical solution, compared with the prior art, the beneficial effects of the present invention are:

[0032] 1. This invention achieves a leap from passive composition recognition to active generation of optimized layouts, overcoming the limitation of traditional methods that can only analyze existing compositions. Through conditional triggering, it achieves a balance between rule constraints and data-driven, which can not only ensure the aesthetic foundation of composition but also adapt to complex scenes, increasing user satisfaction and engagement with environmental images. By calculating the total color value and difference of adjacent areas, it effectively solves the problem of local contrast imbalance in traditional color analysis, helps to build a rich image information database, and further improves the performance of this method in environmental perception and image processing. Through the deep integration of generative AI and traditional rules, it achieves a breakthrough in intelligent creation assistance.

[0033] 2. By utilizing a large amount of data, this invention helps improve the composition quality of environmental images, making the current environmental image composition more aesthetically pleasing and expressive. It can more scientifically assess the importance and influence of each compositional element in the environmental image, ensure the relative stability of the weight relationship between a particular grid and other grids, and facilitate more accurate subsequent weight ratio calculations and image analysis based on the weighted nine-grid system.

[0034] 3. The present invention increases the flexibility and personalization of weight setting through the editing authority of the palace grid and special palace grid weights, improves the weight of relevant special palace grids, realizes precise control of image focus, makes the image more in line with the creative intention, and can more accurately judge the key features and categories of the image based on the weight ratio, quickly screen out important weight ratios, enable the system to concentrate resources to analyze key elements, improve the overall processing speed and effect, further optimize the weight ratio table, and improve the accuracy and efficiency of retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 Schematic diagram of the system flow in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The specific embodiments of the present invention will be further described below in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0037] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0038] Please see the attached Figure 1 The present invention provides a computer vision environment perception method, which includes the following steps:

[0039] S100, collecting visual environment information and an image database, obtaining an environmental image in the visual environment information, and analyzing composition elements in the visual environment information;

[0040] The image database consists of numerous labeled environment images;

[0041] S200: Generate a layout that conforms to the golden ratio and the Fibonacci spiral to obtain a candidate layout, generate personalized composition suggestions based on the user's historical preference data, analyze the composition elements in the environment image and the personalized composition suggestions, circle different composition elements in the environment image to obtain different element regions, analyze the areas of the different element regions, calculate the ratio of the different element regions to the environment image, and obtain the region ratio;

[0042] Among them, Prompt-guided Inpainting is used to generate the golden section and Fibonacci spiral;

[0043] Use Photoshop Touch to circle different composition elements in the environmental image;

[0044] S300, dividing the environmental image into a nine-square grid and obtaining nine grids in the nine-square grid, selecting X grids from the nine grids as special grids, setting different weights for the special grids and the remaining grids, wherein the special grids include special weights and ordinary weights, establishing weight trigger conditions for the special grids, and when the weight trigger conditions are not met in the special grid, marking the ordinary weight in the corresponding special grid. When the weight trigger conditions are met in the feature grid, marking the special weight in the corresponding special grid, thereby obtaining a weighted nine-square grid;

[0045] S400, calculating the weight ratios in the environment image according to the area ratios and the weighted nine-square grid, sorting the weight ratios, and obtaining a weight ratio table;

[0046] S500, analyzing the main colors in different element areas, calculating the total color value and the color difference between adjacent element areas, establishing a generation threshold, and After the threshold is generated, contrast color labels are generated based on the adjacent main colors;

[0047] S600. Extract the weight ratio table, analyze the composition elements corresponding to different weight ratios in the weight ratio table, and generate corresponding element labels based on the composition elements. The element labels and contrast color labels will constitute the environmental perception type, and mark it to the corresponding environmental image and record it in the image database.

[0048] In one embodiment of the present invention: in S200, after different element areas are obtained, the composition elements corresponding to the different element areas are extracted and converted into retrieval elements, and then the image with the same retrieval element is retrieved from the image database to obtain the case image, the composition law of the case image is analyzed, and it is applied to the environmental image, and then the main prominent elements in the environmental image are analyzed to obtain the law label.

[0049] In one embodiment of the present invention, when the area ratio in S200 is obtained, GIMP is used to analyze the area of different element regions, and the values of the different area ratios are set as , let the area of different element regions be , let the area of the environment image be : ;

[0050] The ratio values of different areas are calculated using the above formula.

[0051] In one embodiment of the present invention: In S300, when setting the weight of a special grid, the average weight of the remaining grids is calculated, and then the average weight is used as the weight of the special grid. The weight values of the different grids except the special grid are set as , let the average weight value be : ;

[0052] The average weight is calculated using the above formula.

[0053] In one embodiment of the present invention: In S300, when setting weights for the remaining uterus grids except the special grid, a weight editing unit is established, and the user has the authority to edit the weights of the uterus grids and the special grids through the weight editing unit, wherein the user's authority to edit the special grids is higher than the authority to edit the average weight.

[0054] In one embodiment of the present invention: In S400, when calculating the weight ratio, the different weight values used in the weighted nine-square grid are set as , set the weight ratio to : ;

[0055] The weight ratio is calculated using the above formula.

[0056] In one embodiment of the present invention: in S400, after different weight ratios are calculated, a sorting threshold is established, and the sorting threshold is a value obtained by dividing the area of the environment image by one tenth of the area of the environment image. When the sorting threshold is reached, it will be recorded in the weight ratio table. When the threshold is sorted, it is removed.

[0057] In one embodiment of the present invention: in S400, after the weight ratio table is obtained, the Mth and M+1th weight ratios are extracted from the weight ratio table respectively, and adjacent ratios are calculated. Let the Mth weight ratio be , let the Nth weight ratio be , let the adjacent ratio be : ;

[0058] Calculate the adjacent ratio through the above formula and set the priority multiple. When the priority multiple is set, the weight ratio whose sorting times in the weight ratio table is lower than M will be deleted. When the priority multiplier is set, the weight ratios whose sorting times in the weight ratio table are lower than M will not be deleted.

[0059] In one embodiment of the present invention: in S500 , when calculating the color difference, an element region is selected as the central region, and then the color differences between the central region and R adjacent regions are calculated, where the user has permission to edit R.

[0060] If there are 5 element areas above, below, left and right of the central area, the color differences between the central area and the 1st element area, 2nd element area, 3rd element area, ..., Rth element area above, below, left and right will be calculated.

[0061] Example 1, please refer to the attached Figure 1 , collect visual environment information and image database, and obtain the environmental image in the visual environment information, analyze the composition elements in the visual environment information, generate personalized composition suggestions, circle different composition elements in the environmental image, analyze the area of different element areas, calculate the ratio of different element areas to the environmental image, divide the environmental image into nine grids, select X grids from the nine grids as special grids, set different weights for the special grids and the remaining grids, establish weight trigger conditions for the special grids, when the weight trigger conditions are not met in the special grid, the ordinary weight will be marked in the corresponding special grid, when the weight trigger conditions are met in the feature grid, the special weight will be marked in the corresponding special grid, calculate the weight ratio in the environmental image, sort the weight ratio, calculate the total color value between adjacent element areas and the color difference between adjacent element areas, when the color difference After the threshold is generated, contrast color labels are generated based on adjacent main colors. The composition elements corresponding to different weight ratios in the weight ratio table are analyzed, and corresponding element labels are generated based on the composition elements. The element labels and contrast color labels constitute the environmental perception type and are marked in the corresponding environmental image.

[0062] Example 2, please refer to the attached Figure 1, collect visual environment information and image database, and obtain environmental images in visual environment information, analyze composition elements in visual environment information, generate personalized composition suggestions, circle different composition elements in environmental images, analyze the areas of different element regions, calculate the ratio of different element regions to environmental images, extract composition elements corresponding to different element regions, and convert them into retrieval elements, then retrieve images with the same retrieval elements from the image database, obtain case images, analyze the composition rules of case images, and apply them to environmental images, then analyze the main prominent elements in environmental images, use GIMP to analyze the areas of different element regions, and analyze the environmental The environment image is divided into nine grids, X grids are selected from the nine grids as special grids, different weights are set for the special grids and the remaining grids, and weight trigger conditions are established for the special grids. When the weight trigger conditions are not met in the special grid, the ordinary weight will be marked in the corresponding special grid. When the weight trigger conditions are met in the feature grid, the special weight will be marked in the corresponding special grid. The average weight of the remaining grids is calculated, and then the average weight is used as the weight of the special grid. The user has the authority to edit the weights of the grids and special grids through the weight editing unit, and the user's authority to edit the special grids is higher than the authority to use the average weight.

[0063] Example 3, please refer to the attached Figure 1 , calculate the weight ratio in the environment image, sort the weight ratio, establish a sorting threshold, and the sorting threshold is the value obtained by dividing the area of the environment image by one tenth of the environment image area. When the sorting threshold is reached, it will be recorded in the weight ratio table. When the sorting threshold is reached, it will be deleted, and the Mth and M+1th weight ratios will be extracted from the weight ratio table respectively, and the adjacent ratios will be calculated and the priority multiples will be set. When the priority multiple is set, the weight ratio whose sorting times in the weight ratio table is lower than M will be deleted. When the priority multiple is set, the weight ratio of the weight ratio table with a sorting time lower than M will not be deleted. The total color value and the color difference between adjacent element areas are calculated. When the color difference is After the threshold is generated, a contrast color label is generated based on the adjacent main colors. An element area is selected as the central area, and then the color difference between the central area and the R adjacent areas is calculated.

[0064] Specifically, event cameras are deployed to capture asynchronous optical flow changes in dynamic scenes, combined with traditional RGB images to construct visual representations with stronger spatiotemporal continuity, implicit 3D scene reconstruction of environmental images, and multi-perspective composition analysis reference surfaces are generated through voxel rendering to assist in identifying potential composition elements in occluded areas. Visual-language models such as CLIP are used to establish an embedded space mapping between image elements and semantic descriptions, giving interpretable semantic labels to composition elements.

[0065] Specifically, Prompt-guided Inpainting is a prompt-guided image restoration technology that aims to repair or generate new content in a specified area of an image based on a given text prompt so that it matches the prompt and the overall context of the image.

[0066] The Fibonacci spiral, also known as the golden spiral, is a geometric pattern that appears widely in nature and art.

[0067] Specifically, Photoshop Touch: This is a mobile image processing software with powerful functions and restores some of the features of PC Photoshop. When using it, you can first use the Quick Selection tool to roughly select the composition elements, then pinch to zoom in and out of the photo, choose the appropriate brush size, increase and decrease the selection, and try to select the selection as accurately as possible. You can also use the Adjust Edge tool to refine and optimize the edges of the selection. The software will automatically optimize the selection area based on the edge information of the image.

[0068] Working principle:

[0069] First, the visual environment information and image database are collected, and the environmental image in the visual environment information is obtained. The composition elements in the visual environment information are analyzed, and personalized composition suggestions are generated. Different composition elements in the environmental image are circled, the areas of different element regions are analyzed, the ratios of different element regions to the environmental image are calculated, and the composition elements corresponding to different element regions are extracted and converted into retrieval elements. Then, images with the same retrieval elements are retrieved from the image database to obtain case images. The composition rules of the case images are analyzed and applied to the environmental image. Then, the main prominent elements in the environmental image are analyzed, the areas of different element regions are analyzed using GIMP, the environmental image is divided into nine grids, and X grids are selected from the nine grids as special grids for special images. Different weights are set for the special grid and the other uterine grids, and weight trigger conditions are established for the special grid. When the weight trigger conditions are not met in the special grid, the ordinary weight will be marked in the corresponding special grid. When the weight trigger conditions are met in the feature grid, the special weight will be marked in the corresponding special grid. The average weight of the remaining uterine grids is calculated, and then the average weight is used as the weight of the special grid. The user has the authority to edit the weights of the uterine grid and the special grid through the weight editing unit, and the user's authority to edit the special grid is higher than the authority to use the average weight. The weight ratio in the environmental image is calculated, the weight ratio is sorted, and a sorting threshold is established. The sorting threshold is the value obtained by dividing the area of the environmental image by one tenth of the area of the environmental image. When the weight ratio When the sorting threshold is reached, it will be recorded in the weight ratio table. When the sorting threshold is reached, it will be deleted, and the Mth and M+1th weight ratios will be extracted from the weight ratio table respectively, and the adjacent ratios will be calculated and the priority multiples will be set. When the priority multiple is set, the weight ratio whose sorting times in the weight ratio table is lower than M will be deleted. When the priority multiple is set, the weight ratio of the weight ratio table with a sorting time lower than M will not be deleted. The total color value and the color difference between adjacent element areas are calculated. When the color difference is After the threshold is generated, a contrast color label is generated based on the adjacent main colors. An element area is selected as the central area, and then the color difference between the central area and the R adjacent areas is calculated. The composition elements corresponding to different weight ratios in the weight ratio table are analyzed, and the corresponding element labels are generated according to the composition elements. The element labels and contrast color labels will constitute the environmental perception type and be marked in the corresponding environmental image. At this point, the entire workflow ends.

[0070] Embodiment 4: This embodiment provides a computer vision environment perception system, including:

[0071] Environmental information acquisition module, used to collect visual environmental information, obtain environmental images in the visual environmental information, and analyze composition elements in the visual environmental information;

[0072] The region ratio module is used to generate layouts that conform to the golden ratio and Fibonacci spiral, obtain candidate layouts, combine user historical preference data to generate personalized composition suggestions, analyze the composition elements in the environment image and the personalized composition suggestions, circle different composition elements in the environment image to obtain different element regions, analyze the area of different element regions, calculate the ratio of different element regions to the environment image, and obtain the region ratio;

[0073] The weighted nine-square module is used to divide the environmental image into nine squares and obtain nine squares in the nine-square grid. X squares are selected from the nine squares as special squares, and different weights are set for the special squares and the remaining squares. Special squares include special weights and ordinary weights. Weight trigger conditions are established for special squares. When the weight trigger conditions are not met in a special square, the ordinary weight is marked in the corresponding special square. When the weight trigger conditions are met in a feature square, the special weight is marked in the corresponding special square to obtain a weighted nine-square grid.

[0074] The weight ratio table module is used to calculate the weight ratio in the environment image according to the area ratio and the weighted nine-square grid, sort the weight ratios, and obtain a weight ratio table;

[0075] The contrast color label module is used to analyze the main colors in different element areas, calculate the total color value and color difference between adjacent element areas, establish a generation threshold, and After the threshold is generated, the contrast color label is generated based on the adjacent main colors;

[0076] The labeling module is used to analyze the composition elements corresponding to different weight ratios in the weight ratio table, and generate corresponding element labels based on the composition elements. The element labels and contrast color labels constitute the environmental perception types and are marked in the corresponding environmental images.

[0077] Although the present invention is disclosed above with reference to preferred embodiments, this is not intended to limit the present invention. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent variations, and modifications made to the above embodiments in accordance with the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection defined by the claims of the present invention.

Claims

1. A computer vision environment perception method, characterized in that: The following steps are involved: Collect visual environment information, obtain environmental images in the visual environment information, and analyze composition elements in the visual environment information; Generate a layout that conforms to the golden ratio and Fibonacci spiral to obtain candidate layouts. Combine historical user preference data to generate personalized composition suggestions. Analyze the composition elements in the environment image and the personalized composition suggestions. Circle the different composition elements in the environment image to obtain different element areas. Analyze the areas of different element areas and calculate the ratio of different element areas to the environment image to obtain the area ratio. Divide the environmental image into a nine-square grid and obtain nine grids in the nine-square grid. Select X grids from the nine grids as special grids. Set different weights for the special grids and the remaining grids. The special grids include special weights and common weights. Establish weight trigger conditions for the special grids. When the weight trigger conditions are not met in the special grid, mark the common weight in the corresponding special grid. When the weight trigger conditions are met in the feature grid, mark the special weight in the corresponding special grid to obtain a weighted nine-square grid. Calculate the weight ratio in the environment image according to the area ratio and the weighted nine-square grid, sort the weight ratios, and obtain a weight ratio table; Analyze the main colors in different element areas, calculate the total color value and color difference between adjacent element areas, establish a generation threshold, and when the color difference After the threshold is generated, the contrast color label is generated based on the adjacent main colors; The composition elements corresponding to different weight ratios in the weight ratio table are analyzed, and corresponding element labels are generated according to the composition elements. The element labels and contrast color labels constitute the environmental perception types and are marked in the corresponding environmental images.

2. A computer vision environment perception method according to claim 1, characterized in that: After obtaining different element areas, the composition elements corresponding to the different element areas are extracted and converted into retrieval elements. Then, images with the same retrieval elements are retrieved from the image database to obtain case images. The composition rules of the case images are analyzed and applied to the environmental images. Then, the main prominent elements in the environmental images are analyzed to obtain regularity labels.

3. The computer vision environment perception method according to claim 2, characterized in that: When the area ratio is obtained, GIMP is used to analyze the area of different element regions, and the values of different area ratios are set as , let the area of different element regions be , let the area of the environment image be : ; The ratio values of different areas are calculated using the above formula.

4. The computer vision environment perception method according to claim 1, characterized in that: When setting the weight of a special grid, calculate the average weight of the remaining grids, and then use the average weight as the weight of the special grid. Let the weight values of the different grids except the special grid be , let the average weight value be : ; The average weight is calculated using the above formula.

5. The computer vision environment perception method according to claim 4, characterized in that: When setting weights for the remaining uterus grids except the special grid, a weight editing unit is established. Through the weight editing unit, the user has the authority to edit the weights of the uterus grids and special grids, where the user's authority to edit the special grids is higher than the authority to edit the average weight.

6. The computer vision environment perception method according to claim 3, characterized in that: When calculating the weight ratio, assume that the different weight values used in the weighted grid are , set the weight ratio to : ; The weight ratio is calculated using the above formula.

7. The computer vision environment perception method according to claim 6, characterized in that: After the different weight ratios are calculated, a sorting threshold is established, and the sorting threshold is the value obtained by dividing the area of the environment image by one tenth of the environment image area. When sorting thresholds, record them in the weight ratio table. When sorting thresholds, they are deleted.

8. The computer vision environment perception method according to claim 7, characterized in that: After the weight ratio table is obtained, the Mth and M+1th weight ratios are extracted from the weight ratio table respectively, and the adjacent ratios are calculated. Let the Mth weight ratio be , let the Nth weight ratio be , let the adjacent ratio be : ; Calculate the adjacent ratio through the above formula and set the priority multiple. When the priority multiple is set, delete the weight ratio table whose sorting times are lower than M. When the adjacent ratio When prioritizing multiples, weight proportions whose sorting times in the weight proportion table are lower than M will not be deleted.

9. The computer vision environment perception method according to claim 1, characterized in that: When calculating the color difference, an element area is selected as the central area, and then the color difference between the central area and R adjacent areas is calculated, where the user has the permission to edit R.

10. A computer vision environment perception system, characterized in that: include: Environmental information acquisition module, used to collect visual environmental information, obtain environmental images in the visual environmental information, and analyze composition elements in the visual environmental information; The region ratio module is used to generate layouts that conform to the golden ratio and Fibonacci spiral, obtain candidate layouts, combine user historical preference data to generate personalized composition suggestions, analyze the composition elements in the environment image and the personalized composition suggestions, circle different composition elements in the environment image to obtain different element regions, analyze the area of different element regions, calculate the ratio of different element regions to the environment image, and obtain the region ratio; The weighted nine-square module is used to divide the environmental image into nine squares and obtain nine squares in the nine-square grid. X squares are selected from the nine squares as special squares, and different weights are set for the special squares and the remaining squares. Special squares include special weights and ordinary weights. Weight trigger conditions are established for special squares. When the weight trigger conditions are not met in a special square, the ordinary weight is marked in the corresponding special square. When the weight trigger conditions are met in a feature square, the special weight is marked in the corresponding special square to obtain a weighted nine-square grid. The weight ratio table module is used to calculate the weight ratio in the environment image according to the area ratio and the weighted nine-square grid, sort the weight ratios, and obtain a weight ratio table; The contrast color label module is used to analyze the main colors in different element areas, calculate the total color value and color difference between adjacent element areas, establish a generation threshold, and After generating the threshold, the contrast color label is generated based on the adjacent main colors; The labeling module is used to analyze the composition elements corresponding to different weight ratios in the weight ratio table, and generate corresponding element labels based on the composition elements. The element labels and contrast color labels constitute the environmental perception types and are marked in the corresponding environmental images.