Method and device for simulating orthogonal camera image, storage medium and electronic equipment

文档序号:38465 发布日期:2021-09-24 浏览:36次 中文

阅读说明:本技术 正交相机图像的模拟方法和装置、存储介质、电子设备 (Method and device for simulating orthogonal camera image, storage medium and electronic equipment ) 是由 朱毅 金敏华 于 2021-07-30 设计创作,主要内容包括:本公开实施例公开了一种正交相机图像的模拟方法和装置、存储介质、电子设备,其中,方法包括:根据目标方向在基于透视相机获得的三维模型中确定第一平面;确定三维模型中包括的多个像素点中至少一个像素点到第一平面的像素距离;根据所述多个像素点中至少一个像素点对应的像素距离,将所述三维模型中的至少一个所述像素点投影到所述第一平面,得到第二图像;基于所述第二图像,确定所述三维模型在所述目标方向上的正交相机图像;本实施例通过像素距离实现将三维模型中的点投影到平面上,以实现基于透视相机获得的模型模拟正交相机图像的技术效果;实现了具有过渡效果的正交相机图像获得过程,提升了图像转换过程的观感。(The embodiment of the disclosure discloses a method and a device for simulating an orthogonal camera image, a storage medium and an electronic device, wherein the method comprises the following steps: determining a first plane in a three-dimensional model obtained based on a perspective camera according to a target direction; determining the pixel distance from at least one pixel point of a plurality of pixel points included in the three-dimensional model to the first plane; projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image; determining, based on the second image, an orthogonal camera image of the three-dimensional model in the target direction; the embodiment realizes the projection of points in the three-dimensional model onto a plane through the pixel distance so as to realize the technical effect of simulating an orthogonal camera image based on the model obtained by the perspective camera; the orthogonal camera image acquisition process with the transition effect is realized, and the impression of the image conversion process is improved.)

1. A method for simulating an orthogonal camera image, comprising:

determining a first plane in a three-dimensional model obtained based on a perspective camera according to a target direction;

determining the pixel distance from at least one pixel point of a plurality of pixel points included in the three-dimensional model to the first plane;

projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image;

based on the second image, an orthogonal camera image of the three-dimensional model in the target direction is determined.

2. The method of claim 1, wherein said projecting at least one of said pixels in said three-dimensional model to said first plane according to a pixel distance corresponding to at least one of said pixels to obtain a second image comprises:

determining the projection speed corresponding to at least one pixel point according to the pixel distance corresponding to at least one pixel point;

and projecting at least one pixel point of the plurality of pixel points to the first plane according to the corresponding projection speed to obtain the second image.

3. The method of claim 2, wherein determining the projection velocity corresponding to at least one of the pixel points according to the pixel distance corresponding to at least one of the pixel points comprises:

aiming at least one pixel point, determining a unit projection distance corresponding to the pixel point in unit time according to the set projection time and the pixel distance corresponding to the pixel point;

and taking the unit projection distance as the projection speed corresponding to the pixel point.

4. The method of claim 3, wherein said projecting at least one of said plurality of pixels onto said first plane at said corresponding projection speed to obtain said second image comprises:

controlling color information corresponding to at least one pixel point in the plurality of pixel points to move to the first plane according to the projection speed corresponding to the pixel point;

and responding to the fact that the moving time of at least one pixel point in the pixel points reaches the set projection time, and obtaining a second image of the color information of the pixel points projected to the first plane.

5. The method according to any of claims 1-4, wherein said determining a pixel distance of at least one of a plurality of pixel points included in said three-dimensional model to said first plane comprises:

determining the distance information from at least one pixel point in the plurality of pixel points to the first plane in the normal direction of the first plane;

determining a pixel distance of at least one of the plurality of pixel points to the first plane based on the distance information.

6. The method according to any one of claims 1-5, wherein determining the first plane in the three-dimensional model obtained based on the perspective camera according to the target direction comprises:

determining a normal direction of the first plane based on the target direction;

taking a pixel point which is farthest away in the target direction based on the three-dimensional model as a point of the first plane;

determining a position of the first plane in the three-dimensional model based on the normal direction and a point of the first plane.

7. An apparatus for simulating orthogonal camera images, comprising:

the plane determining module is used for determining a first plane in a three-dimensional model obtained based on the perspective camera according to the target direction;

a distance determining module, configured to determine a pixel distance from at least one pixel point of a plurality of pixel points included in the three-dimensional model to the first plane;

the plane projection module is used for projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image;

an image simulation module to determine an orthogonal camera image of the three-dimensional model in the target direction based on the second image.

8. The apparatus of claim 7, wherein the planar projection module comprises:

the speed determining unit is used for determining the projection speed corresponding to at least one pixel point according to the pixel distance corresponding to at least one pixel point;

and the speed projection unit is used for projecting at least one pixel point in the plurality of pixel points to the first plane according to the corresponding projection speed to obtain a second image.

9. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the method of simulating orthogonal camera images according to any one of claims 1 to 6.

10. An electronic device, characterized in that the electronic device comprises:

a processor;

a memory for storing the processor-executable instructions;

the processor is used for reading the executable instructions from the memory and executing the instructions to realize the simulation method of the orthogonal camera image as claimed in any one of the claims 1-6.

Technical Field

The disclosure relates to a method and a device for simulating an orthogonal camera image, a storage medium and an electronic device.

Background

The perspective camera is a reduction monocular camera, and the image color is captured through a viewing cone, so that the effect similar to the human eye in size is formed; an orthogonal camera is a method of projecting color parallel to the acquisition plane. When the model is displayed, the same model can obtain different images in the two cameras; the perspective camera can see a vertical wall when looking at the model from right above due to the principle that the view cone captures an image, while the orthogonal camera does not. The orthogonal camera is more suitable for viewing scenes with model structures, and the perspective camera is more suitable for the sense of a user at an oblique angle.

Disclosure of Invention

The present disclosure is proposed to solve the above technical problems. The embodiment of the disclosure provides a method and device for simulating an orthogonal camera image, a storage medium and an electronic device.

According to an aspect of the embodiments of the present disclosure, there is provided a method for simulating an orthogonal camera image, including:

determining a first plane in a three-dimensional model obtained based on a perspective camera according to a target direction;

determining the pixel distance from at least one pixel point of a plurality of pixel points included in the three-dimensional model to the first plane;

projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image;

based on the second image, an orthogonal camera image of the three-dimensional model in the target direction is determined.

Optionally, the projecting at least one pixel point in the three-dimensional model to the first plane according to a pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image includes:

determining the projection speed corresponding to at least one pixel point according to the pixel distance corresponding to at least one pixel point;

and projecting at least one pixel point of the plurality of pixel points to the first plane according to the corresponding projection speed to obtain the second image.

Optionally, the determining a projection speed corresponding to at least one of the pixel points according to a pixel distance corresponding to at least one of the pixel points includes:

aiming at least one pixel point, determining a unit projection distance corresponding to the pixel point in unit time according to the set projection time and the pixel distance corresponding to the pixel point;

and taking the unit projection distance as the projection speed corresponding to the pixel point.

Optionally, the projecting at least one of the plurality of pixel points to the first plane according to the corresponding projection speed to obtain the second image includes:

controlling color information corresponding to at least one pixel point in the plurality of pixel points to move to the first plane according to the projection speed corresponding to the pixel point;

and responding to the fact that the moving time of at least one pixel point in the pixel points reaches the set projection time, and obtaining a second image of the color information of the pixel points projected to the first plane.

Optionally, the determining a pixel distance from at least one of a plurality of pixel points included in the three-dimensional model to the first plane includes:

determining the distance information from at least one pixel point in the plurality of pixel points to the first plane in the normal direction of the first plane;

determining a pixel distance of at least one of the plurality of pixel points to the first plane based on the distance information.

Optionally, the determining a first plane in the three-dimensional model obtained based on the perspective camera according to the target direction includes:

determining a normal direction of the first plane based on the target direction;

taking a pixel point which is farthest away in the target direction based on the three-dimensional model as a point of the first plane;

determining a position of the first plane in the three-dimensional model based on the normal direction and a point of the first plane.

According to another aspect of the embodiments of the present disclosure, there is provided an apparatus for simulating an orthogonal camera image, including:

the plane determining module is used for determining a first plane in a three-dimensional model obtained based on the perspective camera according to the target direction;

a distance determining module, configured to determine a pixel distance from at least one pixel point of a plurality of pixel points included in the three-dimensional model to the first plane;

the plane projection module is used for projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image;

an image simulation module to determine an orthogonal camera image of the three-dimensional model in the target direction based on the second image.

Optionally, the planar projection module includes:

the speed determining unit is used for determining the projection speed corresponding to at least one pixel point according to the pixel distance corresponding to at least one pixel point;

and the speed projection unit is used for projecting at least one pixel point in the plurality of pixel points to the first plane according to the corresponding projection speed to obtain a second image.

Optionally, the speed determining unit is specifically configured to determine, for at least one of the pixel points, a unit projection distance corresponding to a unit duration of the pixel point according to a set projection duration and a pixel distance corresponding to the pixel point; and taking the unit projection distance as the projection speed corresponding to the pixel point.

Optionally, the speed projection unit is specifically configured to control color information corresponding to at least one pixel point of the plurality of pixel points to move to the first plane according to a projection speed corresponding to the pixel point; and responding to the fact that the moving time of at least one pixel point in the pixel points reaches the set projection time, and obtaining a second image of the color information of the pixel points projected to the first plane.

Optionally, the distance determining module is specifically configured to determine distance information from at least one of the plurality of pixel points to the first plane in a normal direction of the first plane; determining a pixel distance of at least one of the plurality of pixel points to the first plane based on the distance information.

Optionally, the plane determining module is specifically configured to determine a normal direction of the first plane based on the target direction; taking a pixel point which is farthest away in the target direction based on the three-dimensional model as a point of the first plane; determining a position of the first plane in the three-dimensional model based on the normal direction and a point of the first plane.

According to still another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the method for simulating an orthogonal camera image according to any one of the embodiments.

According to still another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:

a processor;

a memory for storing the processor-executable instructions;

the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method for simulating an orthogonal camera image according to any of the embodiments.

Based on the simulation method and device for the orthogonal camera image, the storage medium and the electronic equipment, a first plane is determined in a three-dimensional model obtained based on a perspective camera according to a target direction; determining the pixel distance from at least one pixel point of a plurality of pixel points included in the three-dimensional model to the first plane; projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image; determining, based on the second image, an orthogonal camera image of the three-dimensional model in the target direction; the embodiment realizes the projection of points in the three-dimensional model onto a plane through the pixel distance so as to realize the technical effect of simulating an orthogonal camera image based on the model obtained by the perspective camera; in addition, because the projection is realized based on the pixel distance, the orthogonal camera image obtaining process with the transition effect is realized, and the impression of the image conversion process is improved.

The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.

Drawings

The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.

Fig. 1 is a schematic flowchart of a method for simulating an orthogonal camera image according to an exemplary embodiment of the disclosure.

FIG. 2 is a schematic flow chart of step 106 in the embodiment shown in FIG. 1 of the present disclosure.

Fig. 3 is a schematic flow chart of step 104 in the embodiment shown in fig. 1 of the present disclosure.

FIG. 4 is a schematic flow chart of step 102 in the embodiment shown in FIG. 1 of the present disclosure.

Fig. 5 is a schematic structural diagram of an apparatus for simulating an orthogonal camera image according to an exemplary embodiment of the present disclosure.

Fig. 6 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure.

Detailed Description

Hereinafter, example embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of the embodiments of the present disclosure and not all embodiments of the present disclosure, with the understanding that the present disclosure is not limited to the example embodiments described herein.

It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.

It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.

It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.

In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship. The data referred to in this disclosure may include unstructured data, such as text, images, video, etc., as well as structured data.

It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.

Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.

The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.

Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.

The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like.

Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.

Summary of the application

In implementing the present disclosure, the inventors found that, in some scenarios, it is necessary to dynamically switch between the orthogonal camera and the perspective camera; however, due to the difference of the principle and parameters of the perspective camera and the orthogonal camera, intermediate transition values cannot occur, and the switching is hard.

Exemplary method

Fig. 1 is a schematic flowchart of a method for simulating an orthogonal camera image according to an exemplary embodiment of the disclosure. The embodiment can be applied to an electronic device, as shown in fig. 1, and includes the following steps:

step 102, a first plane is determined in a three-dimensional model obtained based on a perspective camera according to a target direction.

Based on the characteristics of the perspective camera and the viewing requirement of the three-dimensional model, which is generally an effect in accordance with the size of human eyes, therefore, when the three-dimensional model in this embodiment is viewed at each angle, the three-dimensional model corresponds to the image effect of the perspective camera, the target direction in this embodiment may be regarded as a ray determined based on the shooting direction of the orthogonal camera to be simulated and the focus of the orthogonal camera (having an angle and a direction, for example, being understood as a ray with the focus of the orthogonal camera as an origin, and a specific direction may be determined according to external parameters of the orthogonal camera), and the first plane may be any plane perpendicular to the target direction.

Step 104, determining the pixel distance from at least one pixel point of a plurality of pixel points included in the three-dimensional model to the first plane.

Optionally, a pixel distance from each of a plurality of pixel points included in the three-dimensional model to the first plane is determined.

Optionally, at least one pixel point (e.g., each pixel point) in the three-dimensional model may have corresponding color information, e.g., RGB color information, etc., respectively.

And 106, projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image.

Optionally, according to a pixel distance corresponding to none of the plurality of pixel points, projecting each pixel point in the three-dimensional model to the first plane to obtain a second image.

Optionally, at least one pixel point corresponds to at least one pixel distance, for example, each pixel point corresponds to one pixel distance, and in this embodiment, planar projection is implemented based on the pixel distances, so that all the pixel points in the three-dimensional model are projected onto the first plane at the same time, so as to implement a gradual transition, and avoid that the pixel points with a small pixel distance are projected onto the first plane first and then projected onto the first plane after the pixel distance is large.

And step 108, determining an orthogonal camera image of the three-dimensional model in the target direction based on the second image.

Optionally, the simulation of the orthogonal camera image based on the three-dimensional model is implemented with the second image as an orthogonal camera image projected onto the first plane as the three-dimensional model.

In the method for simulating an orthogonal camera image according to the above embodiment of the present disclosure, a first plane is determined in a three-dimensional model obtained based on a perspective camera according to a target direction; based on the pixel distance from at least one pixel point in a plurality of pixel points included in the three-dimensional model to the first plane; determining a pixel distance corresponding to at least one pixel point in the plurality of pixel points, and projecting at least one pixel point in the three-dimensional model to the first plane to obtain a second image; determining, based on the second image, an orthogonal camera image of the three-dimensional model in the target direction; the embodiment realizes the projection of points in the three-dimensional model onto a plane through the pixel distance so as to realize the technical effect of simulating an orthogonal camera image based on the model obtained by the perspective camera; in addition, because the projection is realized based on the pixel distance, the orthogonal camera image obtaining process with the transition effect is realized, and the impression of the image conversion process is improved.

As shown in fig. 2, based on the embodiment shown in fig. 1, step 106 may include the following steps:

step 1061, determining a projection speed corresponding to at least one pixel point according to the pixel distance corresponding to at least one pixel point.

Optionally, the projection speed corresponding to each pixel point is determined according to the pixel distance corresponding to each pixel point.

Step 1062, projecting at least one of the plurality of pixel points to the first plane according to the corresponding projection speed to obtain a second image.

Optionally, each pixel point in the plurality of pixel points is projected to the first plane according to the corresponding projection speed, so as to obtain a second image.

In this embodiment, according to the position of at least one pixel (e.g., each pixel) in the three-dimensional model and the position of the pixel projected onto the first plane, the points on the line segment formed by the two positions are continuous, optionally, according to the transition proportion, a linear continuous transition (i.e., a transition start proportion of 0 and a transition end proportion of 1) is implemented, the transition proportions of all pixels on the three-dimensional model are consistent, i.e., when the transition proportion of one pixel is 0.5, the transition proportions of all pixels are all 0.5, so as to implement the effect that all pixels are projected onto the first plane at the same time, optionally, the embodiment implements the balance of the transition proportions by setting the projection speed of at least one pixel (each pixel), thereby achieving the intermediate smooth transition effect.

Optionally, step 1061 in the above embodiment may further include:

aiming at least one pixel point, determining a unit projection distance corresponding to the pixel point in unit time length according to the set projection time length and the pixel distance corresponding to the pixel point;

and taking the unit projection distance as the projection speed of the pixel point.

Optionally, for each pixel point, determining a unit projection distance corresponding to the pixel point in unit duration according to the set projection duration and the pixel distance corresponding to the pixel point; and taking the unit projection distance as the projection speed of the pixel point.

In this embodiment, in order to achieve a smooth transition effect of projection, a gradual change process exists in projection, and the gradual change requires a projection duration to be set to complete the projection process, so as to facilitate viewing of the transition process; for at least one pixel point (for example, each pixel point), when the pixel distance is known and the projection time length is set, the unit projection distance of unit time can be calculated by dividing the distance by the time length, and the unit projection distance is used as the projection speed, so that all the pixel points are projected at the same transition proportion, and the effect of smooth transition is achieved.

Optionally, step 1062 in the above embodiment may further include:

controlling color information corresponding to at least one pixel point in the plurality of pixel points to move to the first plane according to the projection speed corresponding to the pixel point;

and responding to the fact that the moving time of at least one pixel point in the plurality of pixel points reaches the set projection time, and obtaining a second image of the color information of the plurality of pixel points projected to the first plane.

In this embodiment, at least one pixel point (e.g., each pixel point) in the three-dimensional model has color information corresponding thereto, and the color information corresponding to the pixel point is projected, which can be regarded as actually projecting the color information corresponding to the pixel point.

As shown in fig. 3, based on the embodiment shown in fig. 1, step 104 may include the following steps:

step 1041, determining distance information from at least one pixel point of the plurality of pixel points to the first plane in the normal direction of the first plane.

Step 1042, based on the distance information, determining a pixel distance from at least one of the plurality of pixel points to the first plane.

In this embodiment, when the distance from at least one pixel point (e.g., each pixel point) to the first plane is determined, the distance of the pixel point in the normal direction of the first plane is determined, that is, the vertical distance between the pixel point and the first plane is determined, and the pixel point is vertically projected when being projected to the plane, so that the vertical distance is used as the pixel distance of the at least one pixel point (e.g., each pixel point), and the imaging principle of the orthogonal camera is met, so that the accuracy of the obtained orthogonal camera image is improved.

As shown in fig. 4, based on the embodiment shown in fig. 1, step 102 may include the following steps:

step 1021, determining a normal direction of the first plane based on the target direction.

In order to simulate imaging of the orthogonal camera, the shooting direction of the orthogonal camera is taken as a target direction, at this time, a plane obtained by imaging should be perpendicular to the target direction, optionally, the target direction is taken as a normal direction of the first plane, and then an infinite number of planes perpendicular to the target direction are determined.

Step 1022, a pixel point farthest away in the target direction based on the three-dimensional model is used as a point of the first plane.

Alternatively, in order to determine a plane from an infinite number of planes perpendicular to the target direction, and since the three-dimensional model is projected, the present embodiment may use a pixel point of the three-dimensional model farthest from the origin (the focus of the analog orthogonal camera) in the target direction as a point of the first plane.

Step 1023 determines the position of the first plane in the three-dimensional model based on the normal direction and a point of the first plane.

In this embodiment, a unique plane in space can be determined on the premise that a direction and a point are known, and the plane is used as the first plane to project the three-dimensional model, so that gradient projection can be performed on all pixel points in the three-dimensional model, and orthogonal camera image simulation with a transition effect can be realized.

Any of the methods for simulating orthogonal camera images provided by embodiments of the present disclosure may be performed by any suitable device having data processing capabilities, including but not limited to: terminal equipment, a server and the like. Alternatively, the simulation method of any orthogonal camera image provided by the embodiments of the present disclosure may be executed by a processor, for example, the processor may execute the simulation method of any orthogonal camera image mentioned by the embodiments of the present disclosure by calling a corresponding instruction stored in a memory. And will not be described in detail below.

Exemplary devices

Fig. 5 is a schematic structural diagram of an apparatus for simulating an orthogonal camera image according to an exemplary embodiment of the present disclosure. As shown in fig. 5, the apparatus provided in this embodiment may include:

a plane determining module 51, configured to determine a first plane in the three-dimensional model obtained based on the perspective camera according to the target direction.

A distance determining module 52, configured to determine a distance between at least one of the plurality of pixels included in the three-dimensional model and the first plane.

And the plane projection module 53 is configured to project at least one pixel point in the three-dimensional model to the first plane according to a pixel distance corresponding to at least one pixel point in the plurality of pixel points, so as to obtain a second image.

An image simulation module 54 for determining an orthogonal camera image of the three-dimensional model in the target direction based on the second image.

The simulation apparatus for an orthogonal camera image according to the above embodiment of the present disclosure determines a first plane in a three-dimensional model obtained based on a perspective camera according to a target direction; based on the pixel distance from at least one pixel point in a plurality of pixel points included in the three-dimensional model to the first plane; projecting at least one pixel point in the three-dimensional model to the first plane according to the pixel distance corresponding to at least one pixel point in the plurality of pixel points to obtain a second image; determining, based on the second image, an orthogonal camera image of the three-dimensional model in the target direction; the embodiment realizes the projection of points in the three-dimensional model onto a plane through the pixel distance so as to realize the technical effect of simulating an orthogonal camera image based on the model obtained by the perspective camera; in addition, because the projection is realized based on the pixel distance, the orthogonal camera image obtaining process with the transition effect is realized, and the impression of the image conversion process is improved.

Optionally, the planar projection module 53 includes:

the speed determining unit is used for determining the projection speed corresponding to at least one pixel point according to the pixel distance corresponding to at least one pixel point;

and the speed projection unit is used for projecting at least one pixel point in the plurality of pixel points to the first plane according to the corresponding projection speed to obtain a second image.

Optionally, the speed determining unit is specifically configured to determine, for at least one pixel point, a unit projection distance corresponding to the pixel point in unit duration according to the set projection duration and a pixel distance corresponding to the pixel point; and determining the projection speed corresponding to the pixel point based on the unit projection distance.

Optionally, the speed projection unit is specifically configured to control color information corresponding to at least one pixel point of the multiple pixel points to move to the first plane according to a projection speed corresponding to the pixel point; and responding to the fact that the moving time of at least one pixel point in the plurality of pixel points reaches the set projection time, and obtaining a second image of the color information of the plurality of pixel points projected to the first plane.

Optionally, the distance determining module 52 is specifically configured to determine distance information from at least one of the plurality of pixel points to the first plane in the normal direction of the first plane; based on the distance information, a pixel distance from at least one pixel point of the plurality of pixel points to the first plane is determined.

Optionally, the plane determining module 51 is specifically configured to determine a normal direction of the first plane based on the target direction; taking a pixel point which is farthest away in the target direction on the basis of the three-dimensional model as a point of a first plane; the position of the first plane in the three-dimensional model is determined based on the normal direction and a point of the first plane.

Exemplary electronic device

Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 6. The electronic device may be either or both of the first device 100 and the second device 200, or a stand-alone device separate from them that may communicate with the first device and the second device to receive the collected input signals therefrom.

FIG. 6 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure.

As shown in fig. 6, the electronic device 60 includes one or more processors 61 and a memory 62.

The processor 61 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 60 to perform desired functions.

Memory 62 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer readable storage medium and executed by the processor 61 to implement the method of simulating orthogonal camera images of the various embodiments of the present disclosure described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.

In one example, the electronic device 60 may further include: an input device 63 and an output device 64, which are interconnected by a bus system and/or other form of connection mechanism (not shown).

For example, when the electronic device is the first device 100 or the second device 200, the input device 63 may be a microphone or a microphone array as described above for capturing an input signal of a sound source. When the electronic device is a stand-alone device, the input means 63 may be a communication network connector for receiving the acquired input signals from the first device 100 and the second device 200.

The input device 63 may also include, for example, a keyboard, a mouse, and the like.

The output device 64 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 64 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.

Of course, for simplicity, only some of the components of the electronic device 60 relevant to the present disclosure are shown in fig. 6, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device 60 may include any other suitable components depending on the particular application.

Exemplary computer program product and computer-readable storage Medium

In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the method of simulating orthogonal camera images according to various embodiments of the present disclosure described in the "exemplary methods" section of this specification above.

The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.

Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a method of simulating orthogonal camera images according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.

The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.

In the present specification, each embodiment is described in a progressive manner, at least one embodiment focuses on differences from other embodiments, and the same or similar parts in each embodiment are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".

The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.

The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种裸眼3D显示模式的切换控制方法、介质和系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类