Garden scenic spot image visual information extraction method and device, electronic equipment and storage medium

By performing scenic spot identification, photographic distance classification and landscape element identification on garden photography images, combined with camera parameters and garden plane information, the landscape viewing rate and viewing distance of each scenic spot in the garden are determined, solving the problem of low viewing accuracy in the existing technology. Efficient visual analysis of multi-scale garden scenes is achieved.

CN118736394APending Publication Date: 2024-10-01INT CENT FOR BAMBOO & RATTAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410724712.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing technology fails to effectively consider the difference in viewing distance when analyzing garden photography images, resulting in the application of the same segmentation model on images of gardens of different sizes and different photographic distances, resulting in low viewing accuracy and inability to effectively extract the visual features of garden attractions.

Method used

By acquiring multiple photographic images of the same garden, we carry out scenic spot identification, photographic distance classification and landscape element identification. We combine camera parameters and garden plane information to determine the landscape viewing rate and viewing distance of each scenic spot in the garden, using a model based on residual networks. Training is performed to achieve landscape feature recognition at different scales.

Benefits of technology

It improves the accuracy of garden visual analysis, reduces random errors, improves the efficiency and quality of garden analysis, and avoids the disadvantages of applying the same set of segmentation models to images of gardens of different sizes and different photographic distances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736394A_ABST
    Figure CN118736394A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and provides a garden scenic spot image visual information extraction method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining at least two photographed images of the same garden, and corresponding camera parameters and garden plane information; carrying out shooting scenic spot identification and shooting distance classification on each shot image to obtain garden scenic spot information and shooting distance classification information corresponding to each shot image; carrying out landscape element identification on the photographic images under each photographic distance classification to obtain landscape element information corresponding to each photographic image; the landscape element information comprises landscape element types and landscape element areas; and determining a landscape visual rate and a sight distance under the photographing distance classification of each landscape spot in the garden based on the landscape spot information, the photographing distance classification information, the landscape element information, the camera parameters and the garden plane information of each photographed image. The garden analysis efficiency and quality can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, electronic device and storage medium for extracting visual information from garden scenic spot images. Background Art

[0002] Garden images are two-dimensional expressions that directly present the composition and form of gardens. Existing techniques for studying classical gardens usually use historical documents, paintings, and engravings to verify the historical appearance of classical gardens, which is called "image-based history". The birth of modern photography technology has introduced new image materials to image research - photographic images. Since photographic imaging is consistent with the principle of human visual system processing images, photographic images can be used as a visual medium to study the composition of garden elements and the visual characteristics of landscapes.

[0003] Photographic images are real, instant, portable and massive. When faced with a large amount of view data of garden scenes of different scales, it is urgent to establish a view information extraction method for garden attractions to improve the efficiency and quality of information extraction. The main means of analyzing garden photographic images at present is to combine other pictures and texts, field surveying and mapping information for human eye recognition, or to extract landscape view information with the help of street view maps. The above methods do not include view distance in the scope of information extraction. The same set of segmentation models is applied to images of gardens of different scales and different photographic distances, ignoring the scale differences of target elements, and the segmentation defects are magnified, resulting in low view accuracy. The scale difference of street views is much smaller than that of garden landscapes. For the visual feature analysis of gardens of different scales, such as large-scale natural landscape gardens, medium-scale artificial landscape gardens, and small-scale courtyard gardens, it is urgent to propose a visual information extraction method for garden scenic spot images based on photographic distance classification. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for extracting visual information of a garden scenic spot image, so as to solve the problems of low quality and efficiency in current garden analysis.

[0005] In a first aspect, an embodiment of the present application provides a method for extracting visual information from a garden scenic spot image, comprising: Acquire at least two photographic images of the same garden, as well as corresponding camera parameters and garden plane information; Identify the scenic spots where each of the photographic images was taken, and obtain the garden scenic spot information corresponding to each of the photographic images; classify the photographic distances of each of the photographic images, and obtain the photographic distance classification information corresponding to each of the photographic images; identify the landscape elements of the photographic images classified under the photographic distances, and obtain the landscape element information corresponding to each of the photographic images; the landscape element information includes the landscape element type and the landscape element area; Based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each photographic image, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification are determined.

[0006] In one embodiment, the determining of the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each photographic image includes: Based on the garden scenic spot information, the photographic distance classification information and the landscape element information of each photographic image, the landscape element information of each garden scenic spot in the garden is classified to obtain the landscape element information of each garden scenic spot in the garden under each photographic distance classification; according to the landscape element information of each garden scenic spot in the garden under each photographic distance classification, the landscape viewing rate of each garden scenic spot in the garden under each photographic distance classification is determined; Based on the garden scenic spot information of each photographic image, the photographic distance classification information, the camera parameters and the garden plane information, the viewing distance of each garden scenic spot in the garden under each photographic distance classification is determined.

[0007] In one embodiment, when determining the landscape view rate of each garden scenic spot in the garden under each photography distance classification according to the landscape element information of each garden scenic spot in the garden under each photography distance classification, the following steps are performed respectively for the landscape element information of each garden scenic spot in the garden under each photography distance classification: Determining the view rate of at least one landscape element of the corresponding target photographic image in each of the photographic images according to the information of each landscape element of the current garden scenic spot in the garden classified under the current photographic distance; An average value of the views of the same landscape element in each of the target photographic images is determined, and the average value of the views is determined as the view of the at least one landscape element of the current garden attraction in the garden under the current photography distance classification.

[0008] In one embodiment, the identifying of the scenic spots where each of the photographic images is taken to obtain the garden scenic spot information corresponding to each of the photographic images includes: Each of the photographic images is input into a scenic spot recognition model to obtain the garden scenic spot information corresponding to each of the photographic images output by the scenic spot recognition model; the scenic spot recognition model is obtained by training a first preset model based on sample photographic images and their garden scenic spot annotation information.

[0009] In one embodiment, the photographic distance classification of each photographic image to obtain photographic distance classification information corresponding to each photographic image includes: Each of the photographic images is input into a photographic distance classification model to obtain photographic distance classification information corresponding to each of the photographic images output by the photographic distance classification model; wherein the photographic distance classification model is obtained by training a second preset model based on sample photographic images and their photographic distance classification annotation information.

[0010] In one embodiment, the first preset model and the second preset model are both residual network models.

[0011] In one embodiment, the performing of landscape element recognition on the photographic images classified under the photographic distances to obtain landscape element information corresponding to each of the photographic images includes: The photographic images under each of the photography distance classifications are respectively input into the landscape element recognition models corresponding to the photography distance classifications to obtain the landscape element information corresponding to each of the photographic images output by the landscape element recognition models; wherein the landscape element recognition model is obtained by training a third preset model based on sample photographic images under the corresponding photography distance classifications and their landscape element label information and landscape element area information.

[0012] In one embodiment, the third preset model is an image segmentation model.

[0013] In a second aspect, the embodiment of the present application provides a method and device for extracting visual information of a garden scenic spot image, comprising: an acquisition module, used to acquire at least two photographic images of the same garden, and corresponding camera parameters and garden plane information; a first recognition module, used to identify the scenic spot where each of the photographic images was taken, and obtain the garden scenic spot information corresponding to each of the photographic images; A classification module, used to classify the photographic distances of the photographic images to obtain the photographic distance classification information corresponding to the photographic images; The second recognition module is used to identify the landscape elements of the photographic images under each of the photography distance classifications to obtain the landscape element information corresponding to each of the photographic images; the landscape element information includes the landscape element type and the landscape element area; the determination module is used to determine the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each of the photographic images.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory storing a computer program, wherein when the processor executes the program, the method for extracting visual information from garden scenic spot images described in the first aspect is implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a storage medium, which is a computer-readable storage medium and includes a computer program. When the computer program is executed by a processor, the method for extracting visual information from garden scenic spot images described in the first aspect is implemented.

[0016] The method, device, electronic device and storage medium for extracting visual information of garden scenic spot images provided in the embodiments of the present application quickly and accurately obtain the garden scenic spot information and photography distance classification information corresponding to each photographic image by performing scenic spot identification, photography distance classification and landscape element identification on multiple photographic images of the same garden. After obtaining the landscape element information by performing landscape element identification of different scales according to the photography distance classification, since the landscape element information may include the landscape element type and the landscape element area, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under each photography distance classification can be further accurately determined according to each garden scenic spot information, each photography distance classification information, each landscape element information, each camera parameter and garden plane information. The landscape viewing rate and viewing distance together quickly and accurately calibrate the visual features of the corresponding garden scenic spot, avoid the disadvantages brought by applying the same set of segmentation models to extract information on gardens of different scales and images of different photography distances, improve the accuracy of garden visual analysis for multi-scale garden scene segmentation algorithms, reduce the random error of garden scenic spot viewing rate analysis, and improve the efficiency and quality of garden analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a flow chart of the method for extracting visual information from garden scenic spot images provided in an embodiment of the present application.

[0019] Figure 2 It is a schematic diagram of photographic scene width recognition of the method for extracting visual information of garden scenic spot images provided in an embodiment of the present application.

[0020] Figure 3 It is a scene schematic diagram of the method for extracting visual information from garden scenic spot images provided in an embodiment of the present application.

[0021] Figure 4 It is a functional module diagram of an embodiment of a device for extracting garden view information of the present application.

[0022] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The following describes in detail the method, device, electronic device and storage medium for extracting visual information from garden scenic spot images provided by the present application in conjunction with the embodiments.

[0025] Figure 1 This is a flow chart of a method for extracting visual information from a garden scenic spot image provided in an embodiment of the present application. Figure 1 The present application embodiment provides a method for extracting visual information from a garden scenic spot image, which may include: Step 100, obtaining at least two photographic images of the same garden, as well as corresponding camera parameters and garden plane information; it should be noted that the execution subject of the garden scenic spot image visual information extraction method provided in the embodiment of the present application can be a server, a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (Ultra-mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc. The server or computer device of the present application can be provided with or connected to a garden scenic spot image visual information extraction method device, and the garden scenic spot image visual information extraction method of the present application can be completed by controlling the garden scenic spot image visual information extraction method device.

[0026] In this application, at least two photographic images taken of the same garden, as well as corresponding camera parameters and garden plane information can be obtained. The photographic images can be obtained by photographing the garden with a photographic device, the camera parameters correspond to the focal length of the camera lens and the diagonal size of the sensor, and the garden plane information includes the garden plane and scale.

[0027] Therefore, the present application can specifically obtain multiple photographic images of the same garden from a photographic device.

[0028] It should be noted that the multiple photographic images in the present application may be taken at different garden scenic spots according to the shooting location, and may be taken at shooting distances different from the image focal distance.

[0029] That is, the present application can shoot at different shooting distances for each garden scenic spot, and multiple photographic images can be shot at each shooting distance.

[0030] Each photographic image includes at least one landscape element, wherein the types of landscape elements may include but are not limited to structures, rockery, earthen hills, ground, water bodies, plants, and the sky.

[0031] Among them, structures can include buildings, bridges, walls, pavilions, corridors and archways.

[0032] Rockery can include rockery and stone placement, etc.

[0033] Earth hills can include slopes and valleys.

[0034] The ground may include ground without grass and paved ground.

[0035] Water bodies may include ponds, swamps, streams, waterfalls and springs.

[0036] Plants can include trees, shrubs, herbs and aquatic plants.

[0037] Step 200, identifying the scenic spots where each photographic image was taken, and obtaining the garden scenic spot information corresponding to each photographic image; After obtaining each photographic image, the present application can identify the shooting scenic spot for each photographic image respectively to obtain the garden scenic spot information of the corresponding photographic image.

[0038] When performing scenic spot recognition on photographic images, the present application may adopt a method based on feature extraction and matching, or a method based on machine learning.

[0039] Among them, computer vision technology is used based on feature extraction and matching, by extracting feature points and descriptors from photographic images and matching them with features in a pre-built scenic spot database. For example, algorithms such as SIFT, SURF or ORB can be used to extract features, and feature matching algorithms can be used to identify scenic spots.

[0040] Among them, SIFT is a feature extraction algorithm based on scale space, which can extract feature points with unique properties at different scales and rotation angles.

[0041] SURF is a feature extraction algorithm based on image gradients. It achieves an efficient feature extraction process by accelerating the integral image and fast Hessian matrix calculation. Fast Hessian matrix is ​​an algorithm for image feature detection and extraction.

[0042] ORB is an algorithm that combines the FAST corner detector and the BRIEF feature descriptor. ORB finds feature points through the FAST corner detector and generates binary descriptors using the BRIEF algorithm. The BRIEF algorithm generates feature pairs using random sampling and encodes the comparison results of the feature pairs into binary strings to form feature descriptors with rotation invariance and scale invariance.

[0043] FAST (Features from Accelerated Segment Test) is a commonly used corner detection algorithm in computer vision, which aims to quickly and accurately detect corners in images.

[0044] The BRIEF (Binary Robust Independent Elementary Features) algorithm is a binary feature descriptor generation algorithm that can quickly calculate feature descriptors with rotation invariance and scale invariance.

[0045] Step 300, classifying each photographic image by photographic distance to obtain photographic distance classification information corresponding to each photographic image; After obtaining the photographic images of each scenic spot in the garden, the present application can classify the photographic distance of each photographic image to obtain the photographic distance classification information of the corresponding photographic image. Among them, the photographic distance classification can be, for example, less than 10 meters, 10 meters to 20 meters, 20 meters to 50 meters, and more than 50 meters.

[0046] When classifying photographic distances of photographic images, the present application may adopt a camera parameter-based or machine learning-based approach. Among them, the camera parameter-based approach determines the photographic distance by analyzing information such as the focal length, sensor size, and shooting parameters (such as the size of an object in an image) of the photographic device using geometric relationships. This approach requires prior knowledge of the relevant parameters of the photographic device, and different calibration processes may be required for different photographic devices.

[0047] Step 400, performing landscape element recognition on the photographic images classified under each photographic distance, and obtaining landscape element information corresponding to each photographic image; The present application can also identify landscape elements for each photographic image at different photographic distances to obtain landscape element information of the corresponding photographic image, wherein the landscape element information may include the type of landscape element and its area.

[0048] When identifying landscape elements in photographic images, the present application can adopt a machine learning-based approach. In each photography distance classification (below 10 meters, 10 to 20 meters, 20 to 50 meters, and above 50 meters), there are corresponding micro-scale, small-scale, medium-scale, and large-scale image segmentation models. The image segmentation model of each scale constructs a separate training set and test set.

[0049] Specifically, one or more landscape elements such as buildings, rockeries, earthen hills, ground, water bodies, plants and the sky in each photographic image under each photographic distance classification can be identified, as well as the area of ​​each landscape element in the corresponding scale photographic image.

[0050] Step 500, based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and garden plane information of each photographic image, determine the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification.

[0051] After obtaining the garden scenic spot information, photography distance classification information and landscape element information of each photographic image, the present application can classify all photographic images and landscape element information according to the photography distance classification information and the garden scenic spot information, thereby classifying the landscape element information of different garden scenic spots in the garden at different photography distances into one category.

[0052] That is, the landscape element information of the same garden scenic spot and the same photography distance classification is classified into one category.

[0053] Furthermore, according to the type of landscape element and the area of ​​landscape element in each type of landscape element information, the visibility of each landscape element of the garden scenic spot under the photography distance classification can be determined.

[0054] After obtaining the camera parameters and garden plane information of each photographic image, the present application can calculate the photographic scene width through the identification points, garden plane and scale of each photographic image.

[0055] Furthermore, the viewing distance under each photography distance classification can be determined by using the geometric visual relationship according to the focal length (f) of the camera lens, the diagonal size (D) of the sensor, and the width (W) of the photography scene.

[0056] The method for extracting visual information of garden scenic spot images provided in the embodiment of the present application performs scenic spot identification, photographic distance classification and landscape element identification on multiple photographic images of the same garden, so as to quickly and accurately obtain the garden scenic spot information and photographic distance classification information corresponding to each photographic image. After the landscape element information is obtained by identifying the landscape elements of different scales according to the photographic distance classification, since the landscape element information may include the landscape element type and the landscape element area, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under each photographic distance classification can be further accurately determined according to the garden scenic spot information, the photographic distance classification information, the landscape element information, the camera parameters and the garden plane information. The landscape viewing rate and the viewing distance together quickly and accurately calibrate the visual features of the corresponding garden scenic spot, avoid the disadvantages brought by applying the same set of segmentation models to extract information on gardens of different scales and images of different photographic distances, improve the accuracy of garden visual analysis for multi-scale garden scene segmentation algorithms, reduce the random error of garden scenic spot viewing rate analysis, and improve the efficiency and quality of garden analysis.

[0057] In one embodiment, the photographic images are identified with shooting spots to obtain the garden scenic spot information corresponding to each photographic image, including: Step 201 : input each photographic image into a scenic spot recognition model to obtain garden scenic spot information corresponding to each photographic image output by the scenic spot recognition model.

[0058] Furthermore, each sample photographic image and its garden scenic spot annotation information can be used as training data to train the first preset model, and after the training is completed, a scenic spot recognition model that can predict the garden scenic spot according to the input image is obtained. The first preset model in this application can be a residual network (ResNet) model.

[0059] Therefore, after obtaining each photographic image, each photographic image can be input into a scenic spot recognition model respectively, thereby obtaining the garden scenic spot information corresponding to each photographic image output by the scenic spot recognition model.

[0060] In one embodiment, each photographic image is classified by photographic distance to obtain photographic distance classification information corresponding to each photographic image, including: Step 301, inputting each photographic image into a photographic distance classification model, and obtaining photographic distance classification information corresponding to each photographic image output by the photographic distance classification model; In the present application, the images in the garden photography image data set can be classified and marked according to the photography distances below 10 meters, 10 meters to 20 meters, 20 meters to 50 meters, and above 50 meters. Furthermore, the second preset model can be trained by the garden photography image data set and its photography distance to train a photography distance classification model that can predict the photography distance classification based on the input image. Among them, the sample photography images are garden images taken at different photography distances. The second preset model in the present application can be a residual network (ResNet) model.

[0061] Therefore, the acquired photographic images can be respectively input into the photographic distance classification model to obtain the photographic distance classification information corresponding to each photographic image output by the photographic distance classification model, including classification 1, classification 2, classification 3, and classification 4. Classification 1 corresponds to a photographic distance of less than 10 meters, classification 2 corresponds to 10 to 20 meters, classification 3 corresponds to 20 to 50 meters, and classification 4 corresponds to more than 50 meters.

[0062] The present application can classify photographic images by photographic distance classification model obtained by training based on residual network model, thereby quickly obtaining photographic distance classification information corresponding to each photographic image, and obtaining subsequent identified landscape element information according to each photographic distance classification information with a segmentation model of corresponding scale, accurately determining the landscape viewing rate of each garden attraction in the garden under each photographic distance classification, quickly and accurately realizing garden analysis, avoiding the drawbacks of visual analysis through human eye recognition and map street view, and improving the efficiency and quality of garden analysis.

[0063] In one embodiment, landscape element recognition is performed on photographic images classified under each photographic distance to obtain landscape element information corresponding to each photographic image, including: Step 401: input the photographic images under each photographic distance classification into the landscape element recognition model corresponding to the photographic distance classification, and obtain the landscape element information corresponding to each photographic image output by the landscape element recognition model.

[0064] The present application can also obtain the landscape element type annotated for each sample photographic image and the area occupied by each landscape element type in the sample photographic image, and obtain the landscape element label information and landscape element area information of each sample photographic image. At the same time, a third preset model can be obtained. The third preset model in the present application can be an image segmentation model. For example, it can be a model such as SegNet, DeepLab, Mask R-CNN, U-Net, etc. The U-Net model can be specifically used in the present application.

[0065] SegNet (Semantic Segmentation Network) is an image semantic segmentation model based on convolutional neural networks. It uses an encoder-decoder structure to achieve pixel-level classification and segmentation by downsampling and upsampling the image layer by layer.

[0066] DeepLab is a series of image semantic segmentation models. Its core idea is to use dilated convolution to expand the receptive field and improve segmentation performance.

[0067] Mask R-CNN is a deep learning model for object detection and instance segmentation.

[0068] U-Net is a fully convolutional network for image semantic segmentation. U-Net has an encoder-decoder structure that downsamples and upsamples images layer by layer while using skip connections to retain high-resolution feature information.

[0069] Furthermore, the sample photographic images classified under the corresponding photographic distance and their landscape element label information and landscape element area information can be used as training data to train the third preset model. After the training is completed, a landscape element recognition model can be obtained that can predict the landscape elements and the areas of the corresponding landscape elements based on the images classified under different input photographic distances.

[0070] Furthermore, each photographic image classified under the corresponding photographic distance may be input into the landscape element recognition model to obtain the landscape element information corresponding to each photographic image output by the landscape element recognition model.

[0071] The present application uses a landscape element recognition model obtained by training based on an image segmentation model to recognize landscape elements in photographic images, so as to accurately determine the landscape viewing rate of each garden attraction in the garden under each photography distance classification according to the information of each garden attraction, the photography distance classification information and the recognized landscape element information, so as to quickly and accurately realize garden analysis, avoid the disadvantages of applying the same set of segmentation models to extract information on images of gardens of different scales and different photography distances, and improve the accuracy of garden visual analysis for multi-scale garden scene segmentation algorithms.

[0072] In one embodiment, based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and garden plane information of each photographic image, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification are determined, including: Step 501, based on the garden scenic spot information, the photographic distance classification information and the landscape element information of each photographic image, the landscape element information of each garden scenic spot in the garden is classified to obtain the landscape element information of each garden scenic spot in the garden under each photographic distance classification; according to the landscape element information of each garden scenic spot in the garden under each photographic distance classification, the landscape view rate of each garden scenic spot in the garden under each photographic distance classification is determined; Step 502, based on the garden scenic spot information of each photographic image, the photographic distance classification information, the camera parameters and the garden plane information, determine the viewing distance of each garden scenic spot in the garden under each photographic distance classification.

[0073] After obtaining the garden scenic spot information, photography distance classification information and landscape element information corresponding to each photographic image, the present application can classify the landscape element information according to the garden scenic spot information and the photography distance classification information, and classify the landscape element information of different garden scenic spots in the garden under different photography distance classifications into one category, so as to obtain the landscape element information of each garden scenic spot in the garden under each photography distance classification.

[0074] Furthermore, the landscape view rate of each garden scenic spot in the garden under each photography distance classification can be determined respectively according to the landscape element information of each garden scenic spot in the garden under each photography distance classification.

[0075] Further, when determining the landscape view rate of each garden scenic spot in the garden under each photography distance classification according to the landscape element information of each garden scenic spot in the garden under each photography distance classification, the following steps are respectively performed for the landscape element information of each garden scenic spot in the garden under each photography distance classification: Step 5011, determining the view rate of at least one landscape element of the corresponding target photographic image in each photographic image according to the landscape element information of the current garden scenic spot in the garden under the current photographic distance classification; Step 5012, determining an average view rate of the same landscape element in each target photographic image, and determining the average view rate as the view rate of at least one landscape element of the current garden scenic spot in the garden under the current photography distance classification.

[0076] This application is aimed at the landscape element information of each garden scenic spot in the garden under each photography distance classification. It can first determine the visibility of at least one landscape element of the corresponding target photographic image in each photographic image based on the landscape element information of the current garden scenic spot in the garden under the current photography distance classification. For example, the visibility of landscape elements such as the structure, rockery, earthen hill, ground, water body, plant and sky of each target photographic image can be determined respectively. Among them, the target photographic image refers to the image of the same photography distance classification taken at the shooting location with the same garden scenic spot name. The calculation formula is as follows: Where: Pe is the probability of the e landscape element appearing in the field of view of the target photographic image, i.e., the viewing rate; c is the corresponding photographic distance classification of the target photographic image, where 10 meters or less indicates c=1, 10 meters to 20 meters indicates c=2, 20 meters to 50 meters indicates c=3, and 50 meters or more indicates c=4; A e is the area of ​​landscape element e within the field of view of the target photographic image; A is the total area within the field of view of the target photographic image.

[0077] Furthermore, an average value of the views of the same landscape element in a plurality of target photographic images may be calculated, and the average view value may be determined as the view value of the landscape element of the current garden attraction in the garden under the current photographic distance classification.

[0078] Based on this, the visibility of each landscape element of each garden scenic spot in each photography distance classification can be obtained.

[0079] Further, based on the garden scenic spot information of each photographic image, the photographic distance classification information, the camera parameters and the garden plane information, the viewing distance of each garden scenic spot in the garden under each photographic distance classification is determined, including: After classifying each photographic image according to the identification points, garden plane and scale of the current garden scenic spot in the garden at the current photography distance, the present application can calculate the photographic scene width of the corresponding target photographic image through the identification points, garden plane and scale of each photographic image. Figure 2 A schematic diagram of photographic scene width recognition for a method for extracting visual information from garden scenic spot images provided in an embodiment of the present application.

[0080] After obtaining the camera parameters and photographic scene width of each photographic image of the current garden scenic spot in the garden under the current photographic distance classification, the geometric visual relationship is used to determine the viewing distance of each target photographic image of the current garden scenic spot in the garden under each photographic distance classification. The calculation formula is as follows: Where: S i is the viewing distance of the i-th target photographic image of the current garden scenic spot; c is the corresponding photography distance classification, below 10 meters represents c = 1, 10 meters to 20 meters represents c = 2, 20 meters to 50 meters represents c = 3, and above 50 meters represents c = 4; W i is the photographic scene width of the i-th target photographic image; f is the focal length of the camera lens; D is the diagonal size of the sensor.

[0081] The present application performs scenic spot identification, photographic distance classification and landscape element identification on multiple photographic images of the same garden, quickly and accurately obtains the garden scenic spot information and photographic distance classification information corresponding to each photographic image, and after obtaining the landscape element information by identifying the landscape elements of different scales according to the photographic distance classification, since the landscape element information may include the landscape element type and the landscape element area, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under each photographic distance classification can be further accurately determined according to the garden scenic spot information, the photographic distance classification information, the landscape element information, the camera parameters and the garden plane information. The landscape viewing rate and the viewing distance together quickly and accurately calibrate the visual characteristics of the corresponding garden scenic spot, avoid the disadvantages of applying the same set of segmentation models to extract information on images of gardens of different scales and different photographic distances, improve the accuracy of garden visual analysis for multi-scale garden scene segmentation algorithms, reduce the random error of garden scenic spot viewing rate analysis, and improve the efficiency and quality of garden analysis.

[0082] Figure 3 A schematic diagram of a scene of a method for extracting visual information from a garden scenic spot image provided in an embodiment of the present application. Figure 3 In one embodiment, the present application can obtain a garden photography image dataset, which may include images with a focal photography distance of less than 10 meters, images with a focal photography distance of 10 to 20 meters, images with a focal photography distance of 20 to 50 meters, and images with a focal photography distance of more than 50 meters. Each image may include one or more of a structure, a rockery, an earthen hill, the ground, a water body, a plant, and the sky.

[0083] Among them, structures can include buildings, bridges, walls, pavilions, corridors and archways.

[0084] Rockery can include rockery and stone placement, etc.

[0085] Earth hills can include slopes and valleys.

[0086] The ground may include ground without grass and paved ground.

[0087] Water bodies may include ponds, swamps, streams, waterfalls and springs.

[0088] Plants can include trees, shrubs, herbs and aquatic plants.

[0089] The present application can identify the garden scenic spots where multiple garden images to be processed belonging to the same garden scenic spot in the garden photography image dataset are photographed by using a ResNet model to identify the garden scenic spots, and obtain a garden scenic spot sub-dataset of the photographic images.

[0090] Furthermore, the photography distance classification ResNet model is used to further classify the photography distance according to the recognition result of the garden scenic spot recognition ResNet model, and the photography distance classification sub-dataset of the photography image of the garden scenic spot is obtained. Among them, it can include garden images with a photography distance of less than 10m, garden images with a photography distance of 10-20m, garden images with a photography distance of 20-50m, and garden images with a photography distance of more than 50m.

[0091] Furthermore, each photographic distance classification sub-dataset is processed by the photographic image landscape element segmentation Unet model under shooting distance classification to obtain the micro-scale image landscape element category and area, small-scale image landscape element category and area, medium-scale image landscape element category and area, and large-scale image landscape element category and area.

[0092] Furthermore, the confusion matrix can be determined through the categories and areas of landscape elements in micro-scale images, the categories and areas of landscape elements in small-scale images, the categories and areas of landscape elements in medium-scale images, and the categories and areas of landscape elements in large-scale images. The Unet model for segmenting landscape elements in the image can be optimized by the stochastic gradient descent algorithm through the average accuracy of the test set (specifically including the intersection-over-union (IOU) and the Dice coefficient). Therefore, the elements of the garden photography image can be segmented based on the model to obtain the segmentation information of the landscape elements in the image.

[0093] Furthermore, the garden images to be processed belonging to the same garden scenic spot and photography distance classification can be determined according to the micro-scale image landscape element categories and areas, small-scale image landscape element categories and areas, medium-scale image landscape element categories and areas, and large-scale image landscape element categories and areas, and the landscape element information of the garden scenic spot under the corresponding photography distance classification is obtained by calculating the weighted average values ​​respectively.

[0094] At the same time, the camera parameters, garden plane information and image recognition points can be obtained according to the photographic distance classification sub-dataset of the photographic image of the garden scenic spot, and the viewing distance information of the garden scenic spot under the corresponding photographic distance classification can be calculated through the geometric vision method.

[0095] Then, according to the landscape element information and viewing distance information classified under the corresponding photography distance of the garden scenic spot, the garden scenic spot view recognition result is output.

[0096] It should be noted that the view quantification index of garden attractions can be used for visual evaluation of garden attractions, specifically to evaluate the range and diversity of viewing distance, the visibility of target elements, as well as the impact, naturalness, beauty and other characteristics.

[0097] Intersection over Union (IoU), also known as the Jaccard coefficient, is an indicator used to evaluate the accuracy of prediction results in image segmentation tasks. It measures the degree of overlap of prediction results by calculating the ratio between the intersection area and the union area of ​​the prediction result and the true label. The value of IoU ranges from 0 to 1, and the larger the value, the higher the overlap between the prediction result and the true label.

[0098] Dice coefficient, also known as The Dice coefficient is a metric commonly used to evaluate the accuracy of prediction results in image segmentation tasks. It measures the degree of overlap of the prediction results by calculating the ratio between twice the intersection of the prediction result and the true label and the total area of ​​the prediction result and the true label area. The Dice coefficient ranges from 0 to 1. The larger the value, the higher the overlap between the prediction result and the true label.

[0099] When dealing with massive amounts of images and their content data, this application intelligently extracts the required analysis information for garden landscape elements, which is efficient and saves labor costs.

[0100] The following is a description of a visual information extraction device for a garden scenic spot image provided by the present invention. The visual information extraction device for a garden scenic spot image described below and the visual information extraction method for a garden scenic spot image described above can be referred to each other.

[0101] Reference Figure 4 , Figure 4 This is a schematic diagram of the functional modules of an embodiment of a device for extracting visual information from garden scenic spot images of the present application.

[0102] The method and device for extracting visual information of garden scenic spot images comprises: The acquisition module 410 is used to acquire at least two photographic images of the same garden, as well as corresponding camera parameters and garden plane information; The first recognition module 420 is used to identify the scenic spot where each photographic image is taken, and obtain the garden scenic spot information corresponding to each photographic image; The second classification module 430 is used to classify the photographic distance of each photographic image to obtain the photographic distance classification information corresponding to each photographic image; The third recognition module 440 is used to perform landscape element recognition on the photographic images classified under the photographic distances to obtain landscape element information corresponding to each of the photographic images; the landscape element information includes the landscape element type and the landscape element area; The determination module 450 is used to determine the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each photographic image.

[0103] In one embodiment, the first identification module 420 is specifically used for: Each of the photographic images is input into a scenic spot recognition model to obtain the garden scenic spot information corresponding to each of the photographic images output by the scenic spot recognition model; the scenic spot recognition model is obtained by training a first preset model based on sample photographic images and their garden scenic spot annotation information.

[0104] In one embodiment, the second classification module 430 is specifically used for: Input each of the photographic images into a photographic distance classification model to obtain photographic distance classification information corresponding to each of the photographic images output by the photographic distance classification model; wherein the photographic distance classification model is obtained by training a second preset model based on sample photographic images and their photographic distance classification annotation information; In one embodiment, the third identification module 440 is specifically used for: The photographic images under each of the photography distance classifications are respectively input into the landscape element recognition models corresponding to the photography distance classifications to obtain the landscape element information corresponding to each of the photographic images output by the landscape element recognition models; wherein the landscape element recognition model is obtained by training a third preset model based on sample photographic images under the corresponding photography distance classifications and their landscape element label information and landscape element area information.

[0105] In one embodiment, the determination module 450 is specifically configured to: Based on the garden scenic spot information, the photographic distance classification information and the landscape element information of each photographic image, the landscape element information of each garden scenic spot in the garden is classified to obtain the landscape element information of each garden scenic spot in the garden under each photographic distance classification; according to the landscape element information of each garden scenic spot in the garden under each photographic distance classification, the landscape viewing rate of each garden scenic spot in the garden under each photographic distance classification is determined; Based on the garden scenic spot information of each photographic image, the photographic distance classification information, the camera parameters and the garden plane information, the viewing distance of each garden scenic spot in the garden under each photographic distance classification is determined.

[0106] In one embodiment, the determination module 450 includes a first determination unit, which is used to determine the landscape view rate of each garden scenic spot in the garden at each shooting distance according to the landscape element information of each garden scenic spot in the garden at each shooting distance, and respectively perform the following steps for the landscape element information of each garden scenic spot in the garden at each shooting distance: Determining the view rate of at least one landscape element of a corresponding target photographic image in each of the photographic images according to the information of each landscape element of the current garden scenic spot in the garden at the current photographic distance; An average value of the views of the same landscape element in each of the target photographic images is determined, and the average value of the views is determined as the view of the at least one landscape element of the current garden attraction in the garden at the current photographic distance.

[0107] In one embodiment, the determination module 450 includes a second determination unit, which is used to, when determining the viewing distance of each garden scenic spot in the garden at each photographing distance according to the viewing distance of each garden scenic spot in the garden at each photographing distance, respectively perform the following steps for the photographing scene width of each garden scenic spot in the garden at each photographing distance: According to the identification points of each target photographic image of the current garden scenic spot in the garden under the current photography distance classification, each of the garden planes and the scale, the present application can calculate the photographic scene width of the corresponding target photographic image through the identification points, garden planes and scales of each target photographic image.

[0108] After obtaining the camera parameters and the photographic scene width of each target photographic image of the current garden scenic spot in the garden under the current photographic distance classification, the viewing distance of at least one target photographic image of the current garden scenic spot in the garden under the current photographic distance classification is determined using geometric visual relations.

[0109] The method for extracting visual information of garden scenic spot images provided in the embodiment of the present application performs scenic spot identification, photographic distance classification and landscape element identification on multiple photographic images of the same garden, so as to quickly and accurately obtain the garden scenic spot information and photographic distance classification information corresponding to each photographic image. After the landscape element information is obtained by identifying the landscape elements of different scales according to the photographic distance classification, since the landscape element information may include the landscape element type and the landscape element area, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under each photographic distance classification can be further accurately determined according to the garden scenic spot information, the photographic distance classification information, the landscape element information, the camera parameters and the garden plane information. The landscape viewing rate and the viewing distance together quickly and accurately calibrate the visual features of the corresponding garden scenic spot, avoid the disadvantages brought by applying the same set of segmentation models to extract information on gardens of different scales and images of different photographic distances, improve the accuracy of garden visual analysis for multi-scale garden scene segmentation algorithms, reduce the random error of garden scenic spot viewing rate analysis, and improve the efficiency and quality of garden analysis.

[0110] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the method for extracting visual information of a garden scenic spot image, for example, including: Acquire at least two photographic images of the same garden, as well as corresponding camera parameters and garden plane information; Identify the scenic spots where each of the photographic images was taken, and obtain the garden scenic spot information corresponding to each of the photographic images; classify the photographic distances of each of the photographic images, and obtain the photographic distance classification information corresponding to each of the photographic images; identify the landscape elements of the photographic images classified under the photographic distances, and obtain the landscape element information corresponding to each of the photographic images; the landscape element information includes the landscape element type and the landscape element area; Based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each photographic image, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification are determined.

[0111] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0112] On the other hand, an embodiment of the present application further provides a storage medium, wherein the storage medium is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is used to enable a processor to execute the steps of the methods provided in the above embodiments, for example, including: Acquire at least two photographic images of the same garden, as well as corresponding camera parameters and garden plane information; Identify the scenic spots where each of the photographic images was taken, and obtain the garden scenic spot information corresponding to each of the photographic images; classify the photographic distances of each of the photographic images, and obtain the photographic distance classification information corresponding to each of the photographic images; identify the landscape elements of the photographic images classified under the photographic distances, and obtain the landscape element information corresponding to each of the photographic images; the landscape element information includes the landscape element type and the landscape element area; Based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each photographic image, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification are determined.

[0113] The computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0114] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for extracting visual information from a garden scenic spot image, characterized in that: include: Acquire at least two photographic images of the same garden, as well as corresponding camera parameters and garden plane information; Identify the scenic spots where each of the photographic images was taken, and obtain the garden scenic spot information corresponding to each of the photographic images; classify the photographic distances of each of the photographic images, and obtain the photographic distance classification information corresponding to each of the photographic images; identify the landscape elements of the photographic images classified under the photographic distances, and obtain the landscape element information corresponding to each of the photographic images; the landscape element information includes the landscape element type and the landscape element area; Based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each photographic image, the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification are determined.

2. The method for extracting visual information from a garden scenic spot image according to claim 1, characterized in that: The determining of the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each photographic image includes: Based on the garden scenic spot information, the photographic distance classification information and the landscape element information of each photographic image, the landscape element information of each garden scenic spot in the garden is classified to obtain the landscape element information of each garden scenic spot in the garden under each photographic distance classification; according to the landscape element information of each garden scenic spot in the garden under each photographic distance classification, the landscape viewing rate of each garden scenic spot in the garden under each photographic distance classification is determined; Based on the garden scenic spot information of each photographic image, the photographic distance classification information, the camera parameters and the garden plane information, the viewing distance of each garden scenic spot in the garden under each photographic distance classification is determined.

3. The method for extracting visual information from a garden scenic spot image according to claim 2, characterized in that: When determining the landscape view rate of each garden scenic spot in the garden under each photography distance classification according to the landscape element information of each garden scenic spot in the garden under each photography distance classification, the following steps are respectively performed for the landscape element information of each garden scenic spot in the garden under each photography distance classification: Determining the view rate of at least one landscape element of a corresponding target photographic image in each of the photographic images according to the information of each landscape element of the current garden scenic spot in the garden classified under the current photographic distance; An average view rate of the same landscape element in each of the target photographic images is determined, and the average view rate is determined as the view rate of the at least one landscape element of the current garden scenic spot in the garden under the current photography distance classification.

4. The method for extracting visual information from a garden scenic spot image according to claim 1, characterized in that: The step of identifying the scenic spots where each of the photographic images is taken to obtain the garden scenic spot information corresponding to each of the photographic images includes: Each of the photographic images is input into a scenic spot recognition model to obtain the garden scenic spot information corresponding to each of the photographic images output by the scenic spot recognition model; the scenic spot recognition model is obtained by training a first preset model based on sample photographic images and their garden scenic spot annotation information.

5. The method for extracting visual information from a garden scenic spot image according to claim 4, characterized in that: The step of classifying the photographic distances of the photographic images to obtain the photographic distance classification information corresponding to the photographic images includes: Each of the photographic images is input into a photographic distance classification model to obtain photographic distance classification information corresponding to each of the photographic images output by the photographic distance classification model; wherein the photographic distance classification model is obtained by training a second preset model based on sample photographic images and their photographic distance classification annotation information.

6. The method for extracting visual information from a garden scenic spot image according to claim 5, characterized in that: The first preset model and the second preset model are both residual network models.

7. The method for extracting visual information from a garden scenic spot image according to claim 1, characterized in that: The step of performing landscape element recognition on the photographic images classified under the photographic distances to obtain landscape element information corresponding to each of the photographic images includes: The photographic images under each of the photographic distance classifications are respectively input into the landscape element recognition models corresponding to the photographic distance classifications to obtain the landscape element information corresponding to each of the photographic images output by the landscape element recognition models; wherein the landscape element recognition model is obtained by training a third preset model based on the sample photographic images under the corresponding photographic distance classifications and their landscape element label information and landscape element area information.

8. The method for extracting visual information from a garden scenic spot image according to claim 7, characterized in that: The third preset model is an image segmentation model.

9. A method and device for extracting visual information from a garden scenic spot image, characterized in that: include: An acquisition module, used to acquire at least two photographic images of the same garden, as well as corresponding camera parameters and garden plane information; A first recognition module is used to identify the scenic spot where each photographic image is taken, and obtain the garden scenic spot information corresponding to each photographic image; A classification module, used to classify the photographic distances of the photographic images to obtain the photographic distance classification information corresponding to the photographic images; The second recognition module is used to identify the landscape elements of the photographic images under each of the photography distance classifications to obtain the landscape element information corresponding to each of the photographic images; the landscape element information includes the landscape element type and the landscape element area; the determination module is used to determine the landscape viewing rate and viewing distance of each garden scenic spot in the garden under the photography distance classification based on the garden scenic spot information, photography distance classification information, landscape element information, camera parameters and the garden plane information of each of the photographic images.

10. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the method for extracting visual information from a garden scenic spot image according to any one of claims 1 to 8 is implemented.

11. A storage medium, the storage medium being a computer-readable storage medium, comprising a computer program, characterized in that: When the computer program is executed by a processor, the method for extracting visual information from a garden scenic spot image according to any one of claims 1 to 8 is implemented.