Information generation method and device and storage medium

文档序号:1042891 发布日期:2020-10-09 浏览:7次 中文

阅读说明:本技术 一种信息生成的方法、装置和存储介质 (Information generation method and device and storage medium ) 是由 赵英男 于 2020-06-04 设计创作,主要内容包括:本申请公开了一种信息生成的方法、装置和存储介质,具体为首先接收待匹配空间的多视图图像帧,其次,基于多视图图像帧,获取待匹配空间的至少一个边缘空间点的像素坐标,进一步地,基于边缘空间点的像素坐标,计算边缘空间点的三维坐标,并生成待匹配空间在世界坐标系下的边缘空间点集合,然后,根据待匹配空间的边缘空间点集合,计算待匹配空间与预先采集的待选取样例空间的空间相似度,最后,对空间相似度按照数值大小进行排序,并在其中选取预设数量的空间相似度对应的待选取样例空间进行展示。本申请实施例通过提取待匹配空间的边缘空间点,与待选取样例空间进行匹配,确定空间相似度,提升了相似空间匹配的匹配效率和准确率。(The application discloses an information generation method, an information generation device and a storage medium, and specifically comprises the steps of firstly receiving a multi-view image frame of a space to be matched, secondly obtaining a pixel coordinate of at least one edge space point of the space to be matched based on the multi-view image frame, further calculating a three-dimensional coordinate of the edge space point based on the pixel coordinate of the edge space point, generating an edge space point set of the space to be matched under a world coordinate system, secondly calculating a spatial similarity between the space to be matched and a pre-collected sample case space to be selected according to the edge space point set of the space to be matched, and finally sequencing the spatial similarities according to the numerical value and selecting the sample case space to be selected corresponding to the spatial similarity of a preset number for displaying. According to the embodiment of the application, the edge space points of the space to be matched are extracted and matched with the space of the sampling case to be selected, the space similarity is determined, and the matching efficiency and accuracy of matching of the similar space are improved.)

1. A method of information generation, comprising:

receiving a multi-view image frame of a space to be matched;

acquiring pixel coordinates of at least one edge space point of the space to be matched based on the multi-view image frame;

calculating the three-dimensional coordinates of the edge space points based on the pixel coordinates of the edge space points, and generating an edge space point set of the space to be matched under a world coordinate system;

according to the edge space point set of the space to be matched, calculating the spatial similarity between the space to be matched and a pre-collected sampling case space to be selected;

and sequencing the spatial similarities according to the numerical values, and selecting the sample spaces to be selected corresponding to the spatial similarities in preset quantity for displaying.

2. The method according to claim 1, wherein the step of obtaining pixel coordinates of at least one edge space point of the space to be matched comprises:

generating disparity maps of the space to be matched at different positions according to the multi-view image frame;

obtaining pixel coordinates of at least one of the edge space points provided with depth information in the multi-view image frame based on the disparity map.

3. The method of claim 1, wherein the step of calculating the three-dimensional coordinates of the edge space points comprises:

acquiring camera internal parameters and camera external parameters of the image acquisition equipment;

and converting pixel coordinates, corresponding to the edge space points, in the multi-view image frame into three-dimensional coordinates in a world coordinate system based on camera internal parameters and camera external parameters of the image acquisition equipment.

4. The method according to claim 1, wherein between the step of receiving the multi-view image frame of the space to be matched and the step of calculating the spatial similarity of the space to be matched and the pre-acquired sample space to be selected, the method further comprises:

determining a first spatial classification label for the received multi-view image frame of the space to be matched;

and comparing the first space classification label with a second space classification label corresponding to a sample space acquired in advance, and selecting the sample space corresponding to the second space classification label as the sample space to be selected when the first space classification label is the same as the second space classification label.

5. The method according to claim 1, wherein the step of calculating the spatial similarity between the space to be matched and the pre-collected sample space to be selected comprises:

selecting a low plane from an edge space point set of the space to be matched under a world coordinate system to establish a standard coordinate system, and calibrating the space positions of the space to be matched and the sampling case space to be selected based on the standard coordinate system;

determining a plurality of tangent planes of the intersection part of the calibrated space to be matched and the sample space to be selected under the standard coordinate system;

calculating the space distance between the adjacent plain noodles, and calculating the coincidence area of the space to be matched in the plain noodles close to the low plane in the adjacent plain noodles and the space of the sampling example to be selected;

calculating the unit overlapping part volume of the space to be matched and the sample space to be selected based on the space distance and the overlapping area;

and taking the sum of the unit overlapped part volumes as the total overlapped part volume of the space to be matched and the sample space to be selected, and taking the ratio of the total overlapped part volume to the volume of the sample space to be selected as the spatial similarity of the space to be matched and the pre-collected sample space to be selected.

6. The method of claim 5, wherein the step of calibrating the spatial positions of the space to be matched and the sample space to be selected based on the standard coordinate system comprises:

and rotating the space of the sampling case to be selected around a vertical axis under the standard coordinate system, stopping rotating when the superposed areas of the bottom planes respectively corresponding to the space to be matched and the space of the sampling case to be selected are maximum, and taking the superposed areas as the calibrated space positions.

7. The method according to claim 1, wherein the step of selecting the sample space to be selected corresponding to the spatial similarity in a preset number for displaying comprises:

and acquiring the article information and the article placement information contained in the sample space to be selected, and displaying the article information and the article placement information and the sample space to be selected.

8. An apparatus for information generation, the apparatus comprising:

the receiving module is used for receiving the multi-view image frame of the space to be matched;

an obtaining module, configured to obtain, based on the multi-view image frame, a pixel coordinate of at least one edge space point of the space to be matched;

the generating module is used for calculating the three-dimensional coordinates of the edge space points based on the pixel coordinates of the edge space points and generating an edge space point set of the space to be matched under a world coordinate system;

the calculation module is used for calculating the spatial similarity between the space to be matched and a pre-collected sampling case space to be selected according to the edge space point set of the space to be matched;

and the display module is used for sequencing the spatial similarities according to the numerical values and selecting the sample spaces to be selected corresponding to the spatial similarities in preset quantity for display.

9. A non-transitory computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of a method of information generation as claimed in any one of claims 1 to 7.

10. A terminal device comprising a processor configured to perform the steps of a method of information generation according to any one of claims 1 to 7.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for generating information.

Background

With the continuous improvement of the requirements of people on living conditions, the personalized requirements of customers are more and more. The visual decoration case not only can provide more choices for the user, but also can provide design reference for the designer. The existing decoration cases can be used for recommendation to a certain extent through decoration case recommendation, and communication cost of an entrusting party and an entrusted party is reduced.

The general decoration case recommendation method mainly comprises two methods: (1) manually classifying the decoration cases, establishing a case library, screening the cases according to keywords input by a user, and recommending the cases to the user. (2) Based on a plane house type graph of the user, house type similarity screening is carried out by utilizing plane geometric characteristics, and decoration case schemes with similar house types are recommended to the user. The two modes are manual modes, the efficiency is low, and the accuracy cannot be guaranteed.

Disclosure of Invention

The embodiment of the application provides an information generation method, which overcomes the problem of low efficiency of manually determining the spatial similarity and improves the calculation efficiency and accuracy of the spatial similarity.

The method comprises the following steps:

receiving a multi-view image frame of a space to be matched;

acquiring pixel coordinates of at least one edge space point of the space to be matched based on the multi-view image frame;

calculating the three-dimensional coordinates of the edge space points based on the pixel coordinates of the edge space points, and generating an edge space point set of the space to be matched under a world coordinate system;

according to the edge space point set of the space to be matched, calculating the spatial similarity between the space to be matched and a pre-collected sampling case space to be selected;

and sequencing the spatial similarities according to the numerical values, and selecting the sample spaces to be selected corresponding to the spatial similarities in preset quantity for displaying.

Optionally, generating disparity maps of the space to be matched at different positions according to the multi-view image frames;

obtaining pixel coordinates of at least one of the edge space points provided with depth information in the multi-view image frame based on the disparity map.

Optionally, acquiring camera internal parameters and camera external parameters of the image acquisition device;

and converting pixel coordinates, corresponding to the edge space points, in the multi-view image frame into three-dimensional coordinates in a world coordinate system based on camera internal parameters and camera external parameters of the image acquisition equipment.

Optionally, determining a first spatial classification label for the received multi-view image frame of the space to be matched;

and comparing the first space classification label with a second space classification label corresponding to a sample space acquired in advance, and selecting the sample space corresponding to the second space classification label as the sample space to be selected when the first space classification label is the same as the second space classification label.

Optionally, selecting a low plane from an edge space point set of the space to be matched under a world coordinate system to establish a standard coordinate system, and calibrating the space positions of the space to be matched and the sampling case space to be selected based on the standard coordinate system;

determining a plurality of tangent planes of the intersection part of the calibrated space to be matched and the sample space to be selected under the standard coordinate system;

calculating the space distance between the adjacent plain noodles, and calculating the coincidence area of the space to be matched in the plain noodles close to the low plane in the adjacent plain noodles and the space of the sampling example to be selected;

calculating the unit overlapping part volume of the space to be matched and the sample space to be selected based on the space distance and the overlapping area;

and taking the sum of the unit overlapped part volumes as the total overlapped part volume of the space to be matched and the sample space to be selected, and taking the ratio of the total overlapped part volume to the volume of the sample space to be selected as the spatial similarity of the space to be matched and the pre-collected sample space to be selected.

Optionally, the space of the sampling case to be selected is rotated around the vertical axis under the standard coordinate system, and the rotation is stopped when the overlapping areas of the bottom planes corresponding to the space to be matched and the space of the sampling case to be selected are maximum, and the overlapping areas are used as the calibrated spatial positions.

Optionally, the article information and the article placement information contained in the sample space to be selected are obtained, and the article information and the article placement information are displayed with the sample space to be selected.

In another embodiment of the present invention, there is provided an apparatus for information generation, including:

the receiving module is used for receiving the multi-view image frame of the space to be matched;

an obtaining module, configured to obtain, based on the multi-view image frame, a pixel coordinate of at least one edge space point of the space to be matched;

the generating module is used for calculating the three-dimensional coordinates of the edge space points based on the pixel coordinates of the edge space points and generating an edge space point set of the space to be matched under a world coordinate system;

the calculation module is used for calculating the spatial similarity between the space to be matched and a pre-collected sampling case space to be selected according to the edge space point set of the space to be matched;

and the display module is used for sequencing the spatial similarities according to the numerical values and selecting the sample spaces to be selected corresponding to the spatial similarities in preset quantity for display.

Optionally, the obtaining module includes:

the generating unit is used for generating disparity maps of the space to be matched at different positions according to the multi-view image frames;

a first obtaining unit configured to obtain, in the multi-view image frame, pixel coordinates of at least one of the edge space points provided with depth information based on the disparity map.

Optionally, the generating module includes:

the second acquisition unit is used for acquiring camera internal parameters and camera external parameters of the image acquisition equipment;

and the conversion unit is used for converting the pixel coordinates of the edge space point corresponding to the multi-view image frame into three-dimensional coordinates in a world coordinate system based on the camera internal parameters and the camera external parameters of the image acquisition equipment.

Optionally, the apparatus further comprises:

the determining module is used for determining a first space classification label for the received multi-view image frame of the space to be matched;

and the selecting module is used for comparing the first space classification label with a second space classification label corresponding to a sample space acquired in advance, and selecting the sample space corresponding to the second space classification label as the sample space to be selected when the first space classification label is the same as the second space classification label.

Optionally, the calculation module comprises:

the calibration unit is used for selecting a low plane from the edge space point set of the space to be matched under the world coordinate system to establish a standard coordinate system, and calibrating the space positions of the space to be matched and the sampling case space to be selected based on the standard coordinate system;

the determining unit is used for determining a plurality of tangent planes of the intersection part of the calibrated space to be matched and the sample space to be selected under the standard coordinate system;

the first calculation unit is used for calculating the space distance between the adjacent planar surfaces and calculating the coincidence area of the space to be matched in the planar surface close to the low plane in the adjacent planar surfaces and the space of the sampling example to be selected;

the second calculation unit is used for calculating the unit overlapping part volume of the space to be matched and the sample space to be selected based on the space distance and the overlapping area;

and the third calculating unit is used for taking the sum of the unit overlapped part volumes as the total overlapped part volume of the space to be matched and the sample space to be selected, and taking the ratio of the total overlapped part volume to the volume of the sample space to be selected as the spatial similarity between the space to be matched and the pre-collected sample space to be selected.

Optionally, the calibration unit is further configured to:

and rotating the space of the sampling case to be selected around a vertical axis under the standard coordinate system, stopping rotating when the superposed areas of the bottom planes respectively corresponding to the space to be matched and the space of the sampling case to be selected are maximum, and taking the superposed areas as the calibrated space positions.

Optionally, the display module is configured to:

and acquiring the article information and the article placement information contained in the sample space to be selected, and displaying the article information and the article placement information and the sample space to be selected.

In another embodiment of the present invention, a non-transitory computer readable storage medium is provided, which stores instructions that, when executed by a processor, cause the processor to perform the steps of one of the above-described methods of information generation.

In another embodiment of the present invention, a terminal device is provided, which includes a processor configured to execute the steps of the information generating method.

Based on the embodiment, firstly, a multi-view image frame of a space to be matched is received, secondly, a pixel coordinate of at least one edge space point of the space to be matched is obtained based on the multi-view image frame, furthermore, a three-dimensional coordinate of the edge space point is calculated based on the pixel coordinate of the edge space point, an edge space point set of the space to be matched under a world coordinate system is generated, secondly, a spatial similarity between the space to be matched and a pre-collected sampling case space to be selected is calculated according to the edge space point set of the space to be matched, and finally, the spatial similarity is sorted according to the value size, and the sampling case spaces to be selected corresponding to the spatial similarity in a preset number are selected for displaying. According to the embodiment of the application, the edge space points of the space to be matched are extracted and matched with the space of the sampling case to be selected, the space similarity is determined, and the matching efficiency and accuracy of matching of the similar space are improved.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.

Fig. 1 is a schematic flow chart illustrating a method for generating information according to an embodiment 100 of the present application;

fig. 2 is a schematic diagram illustrating a specific flow of a method for generating information according to an embodiment 200 of the present application;

fig. 3 is a schematic diagram illustrating a relationship between depth information of an edge space point and a disparity map provided in embodiment 300 of the present application;

FIG. 4 is a diagram illustrating calibration of spatial positions of a to-be-matched space and a to-be-selected sampling case space according to an embodiment 400 of the present application;

fig. 5 is a schematic diagram illustrating a calculation of spatial similarity between a to-be-matched space and a to-be-selected sampling case space according to embodiment 500 of the present application;

fig. 6 shows a schematic diagram of a system for generating information according to embodiment 600 of the present application;

fig. 7 is a schematic diagram illustrating an apparatus for generating information according to an embodiment 700 of the present application;

fig. 8 shows a schematic diagram of a terminal device provided in embodiment 800 of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种图片浏览方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!