CN108965718A - image generating method and device - Google Patents
image generating method and device Download PDFInfo
- Publication number
- CN108965718A CN108965718A CN201810877067.1A CN201810877067A CN108965718A CN 108965718 A CN108965718 A CN 108965718A CN 201810877067 A CN201810877067 A CN 201810877067A CN 108965718 A CN108965718 A CN 108965718A
- Authority
- CN
- China
- Prior art keywords
- image
- attribute
- sensor
- described image
- image sensor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Studio Devices (AREA)
Abstract
The embodiment of the present disclosure provides a kind of image generating method, device, hardware device and computer readable storage medium.Wherein, which includes: load three-dimensional scenic;Imaging sensor is positioned to the origin of the three-dimensional scenic;Obtain the attribute of described image sensor;According to the attribute of described image sensor, the first image is generated, wherein the first image is made of the parts of images of three-dimensional scenic.The technical solution directly acquires the attribute of imaging sensor, and the image that imaging sensor is acquired from three-dimensional scenic is determined according to the attribute of imaging sensor, keeps the switching of image more flexible.
Description
Technical field
This disclosure relates to a kind of image technique field, more particularly to a kind of image generating method, device, electronic equipment and
Computer readable storage medium.
Background technique
With the development of computer technology, the application range of intelligent terminal has obtained extensive raising, such as can pass through
Intelligent terminal listens to music, plays game, chats on line and take pictures.For the shooting technology of intelligent terminal, pixel of taking pictures
Have reached ten million pixel or more, the effect of taking pictures of clarity with higher and the mm professional camera special that matches in excellence or beauty.
Taken pictures at present using intelligent terminal or when recorded video, when factory not only can be used it is built-in take pictures it is soft
Part realize traditional function effect of taking pictures, can also by from network-side download application program (Application, referred to as are as follows:
APP) effect of taking pictures with additional function is realized.
Currently, three-dimensional scenic can be generated in the APP of some intelligent terminals, intelligent terminal generates three-dimensional scenic in the prior art
Later, can be by relative position of the control mobile image sensor in three-dimensional scenic, but the move mode is inflexible,
Imaging sensor cannot flexibly be switched and acquire image from three-dimensional scenic, user experience is bad.
Summary of the invention
A kind of image generating method, device, electronic equipment and computer readable storage medium are provided.According to the one of the disclosure
A aspect, the following technical schemes are provided:
A kind of image generating method, comprising:
Load three-dimensional scenic;
Imaging sensor is positioned to the origin of the three-dimensional scenic;
Obtain the attribute of described image sensor;
According to the attribute of described image sensor, generate the first image, wherein the first image by three-dimensional scenic portion
Partial image composition.
Further, the load three-dimensional scenic includes: the Background for obtaining the three-dimensional scenic, according to the Background
Generate the three-dimensional scenic.
Further, the three-dimensional scenic is hexahedron, and the Background includes the image in hexahedral six faces.
Further, the attribute for obtaining described image sensor, comprising: when the attribute of described image sensor is figure
As sensor towards when, read the data of Position and attitude sensor, according to the data acquisition imaging sensor of the Position and attitude sensor
Direction.
Further, the attribute according to described image sensor generates the first image, comprising: according to described image
The direction of sensor generates the first image, and the first image is aobvious on the display apparatus.
Further, after the attribute according to described image sensor, the first image of generation, further includes: receive
The attribute of described image sensor changes order, changes the attribute that order changes described image sensor according to the attribute;Root
According to the attribute of the described image sensor after change, generate the second image, wherein second image by three-dimensional scenic portion
Partial image composition.
Further, the attribute of described image sensor is the type of imaging sensor, the type of described image sensor
Including preposition imaging sensor and postposition imaging sensor;The attribute for receiving described image sensor changes order, according to
The attribute changes the attribute that order changes described image sensor, comprising: receives the type change life of described image sensor
It enables, switches the type of imaging sensor according to the type change order of described image sensor;According to the figure after change
As the attribute of sensor, the second image is generated, comprising: described the according to corresponding to the type of the sensor before change
One image generates second image.
Further, the attribute of described image sensor is the direction of imaging sensor;The reception described image sensing
The attribute of device changes order, changes the attribute that order changes described image sensor according to the attribute, comprising: receive the figure
It is ordered as the direction of sensor changes, is ordered according to described towards change, change the direction of described image sensor;The basis
The attribute of described image sensor after change generates the second image, comprising: according to the court of the imaging sensor after change
To the second image of generation.
Further, after the attribute for obtaining described image sensor, further includes: judge that described image sensor is adopted
Whether there is predeterminated target in the image of collection;If there is the predeterminated target, then by the predeterminated target from first figure
It is extracted as in.
Further, the attribute according to described image sensor generates the first image, comprising: according to described image
The attribute of sensor and the predeterminated target generate the first image.
To achieve the goals above, according to another aspect of the disclosure, also the following technical schemes are provided:
A kind of video generation device, comprising:
Loading module, for loading three-dimensional scenic;
Locating module, for imaging sensor to be positioned to the origin of the three-dimensional scenic;
Attribute obtains module, for obtaining the attribute of described image sensor;
Image generation module generates the first image, wherein described first for the attribute according to described image sensor
Image is made of the parts of images of three-dimensional scenic.
Further, the loading module is also used to obtain the Background of the three-dimensional scenic, raw according to the Background
At the three-dimensional scenic.
Further, the three-dimensional scenic is hexahedron, and the Background includes the image in hexahedral six faces.
Further, the attribute obtains module, is also used to when the attribute of described image sensor be imaging sensor
Towards when, the data of Position and attitude sensor are read, according to the direction of the data acquisition imaging sensor of the Position and attitude sensor.
Further, described image generation module is also used to the direction according to described image sensor, generates described first
Image, and the first image is aobvious on the display apparatus.
Further, described image generating means further include: attribute changes command module, for receiving described image sensing
The attribute of device changes order, changes the attribute that order changes described image sensor according to the attribute;Second image generates mould
Block generates the second image, wherein second image is by three for the attribute according to the described image sensor after change
Tie up the parts of images composition of scene.
Further, the attribute of described image sensor is the type of imaging sensor, the type of described image sensor
Including preposition imaging sensor and postposition imaging sensor;The attribute for receiving described image sensor changes order, according to
The attribute changes the attribute that order changes described image sensor, comprising: receives the type change life of described image sensor
It enables, switches the type of imaging sensor according to the type change order of described image sensor;According to the figure after change
As the attribute of sensor, the second image is generated, comprising: described the according to corresponding to the type of the sensor before change
One image generates second image.
Further, the attribute of described image sensor is the direction of imaging sensor;The reception described image sensing
The attribute of device changes order, changes the attribute that order changes described image sensor according to the attribute, comprising: receive the figure
It is ordered as the direction of sensor changes, is ordered according to described towards change, change the direction of described image sensor;The basis
The attribute of described image sensor after change generates the second image, comprising: according to the court of the imaging sensor after change
To the second image of generation.
Further, described image generating means further include: predeterminated target judgment module, for judging that described image senses
Whether there is predeterminated target in device acquired image;Predeterminated target abstraction module is used for if there is the predeterminated target, then
The predeterminated target is extracted from described image sensor acquired image.
Further, described image generation module is also used to attribute and the predetermined mesh according to described image sensor
Mark generates the first image.
To achieve the goals above, according to the another aspect of the disclosure, and also the following technical schemes are provided:
A kind of electronic equipment, comprising:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that the processor realizes any of the above-described side when executing
Step described in method.
To achieve the goals above, according to the another aspect of the disclosure, and also the following technical schemes are provided:
A kind of computer readable storage medium, for storing non-transitory computer-readable instruction, when the non-transitory
When computer-readable instruction is executed by computer, so that the step of computer executes described in any of the above-described method.
The embodiment of the present disclosure provides a kind of image generating method, device, hardware device and computer readable storage medium.Its
In, which includes: load three-dimensional scenic;Imaging sensor is positioned to the origin of the three-dimensional scenic;It obtains
The attribute of described image sensor;According to the attribute of described image sensor, the first image is generated, wherein the first image
It is made of the parts of images of three-dimensional scenic.In the prior art, it after intelligent terminal generates three-dimensional scenic, can be moved by control
Relative position of the motion video sensor in three-dimensional scenic, but the move mode is inflexible, cannot flexibly switch image biography
Sensor acquires image from three-dimensional scenic, which directly acquires the attribute of imaging sensor, according to the category of imaging sensor
Property determines image that imaging sensor is acquired from three-dimensional scenic, keeps the switching of image more flexible.
Above description is only the general introduction of disclosed technique scheme, in order to better understand the technological means of the disclosure, and
It can be implemented in accordance with the contents of the specification, and to allow the above and other objects, features and advantages of the disclosure can be brighter
Show understandable, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Detailed description of the invention
Fig. 1 is the flow diagram according to the image generating method of an embodiment of the present disclosure;
Fig. 2 is the flow diagram according to the image generating method of the disclosure another embodiment;
Fig. 3 is the method schematic diagram that the viewfinder range of imaging sensor is determined in Fig. 2 embodiment;
Fig. 4 is the flow diagram according to the image generating method of the disclosure another embodiment;
Fig. 5 is the structural schematic diagram according to the video generation device of an embodiment of the present disclosure;
Fig. 6 is the structural schematic diagram according to the video generation device of the disclosure another embodiment;
Fig. 7 is the structural schematic diagram according to the video generation device of the disclosure another embodiment
Fig. 8 is the structural schematic diagram according to the electronic equipment of an embodiment of the present disclosure;
Fig. 9 is the structural schematic diagram according to the computer readable storage medium of an embodiment of the present disclosure;
Figure 10 is the structural schematic diagram that terminal is generated according to the image of an embodiment of the present disclosure.
Specific embodiment
Illustrate embodiment of the present disclosure below by way of specific specific example, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the disclosure easily.Obviously, described embodiment is only the disclosure
A part of the embodiment, instead of all the embodiments.The disclosure can also be subject to reality by way of a different and different embodiment
It applies or applies, the various details in this specification can also be based on different viewpoints and application, in the spirit without departing from the disclosure
Lower carry out various modifications or alterations.It should be noted that in the absence of conflict, the feature in following embodiment and embodiment can
To be combined with each other.Based on the embodiment in the disclosure, those of ordinary skill in the art are without creative efforts
Every other embodiment obtained belongs to the range of disclosure protection.
It should be noted that the various aspects of embodiment within the scope of the appended claims are described below.Ying Xian
And be clear to, aspect described herein can be embodied in extensive diversified forms, and any specific structure described herein
And/or function is only illustrative.Based on the disclosure, it will be understood by one of ordinary skill in the art that one described herein
Aspect can be independently implemented with any other aspect, and can combine the two or both in these aspects or more in various ways.
For example, carry out facilities and equipments in terms of any number set forth herein can be used and/or practice method.In addition, can make
With other than one or more of aspect set forth herein other structures and/or it is functional implement this equipment and/or
Practice the method.
It should also be noted that, diagram provided in following embodiment only illustrates the basic structure of the disclosure in a schematic way
Think, component count, shape and the size when only display is with component related in the disclosure rather than according to actual implementation in schema are drawn
System, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel can also
It can be increasingly complex.
In addition, in the following description, specific details are provided for a thorough understanding of the examples.However, fields
The skilled person will understand that the aspect can be practiced without these specific details.
In order to solve the technical issues of how improving user experience effect, the embodiment of the present disclosure provides a kind of image generation side
Method.The image generating method provided in this embodiment can be executed by a video generation device, which can be with
It is embodied as software, or is embodied as the combination of software and hardware, which, which can integrate, is arranged in image procossing system
In certain equipment in system, such as in image processing server or image processing terminal equipment.As shown in Figure 1, the image generates
Method mainly includes the following steps S1 to step S4.Wherein:
Step S1: load three-dimensional scenic.
Wherein, the load of the three-dimensional scenic can be there are two types of mode, and first way is to be loaded directly into three-dimensional scenic mould
Plate, the three-dimensional scenic template are the three-dimensional scenics made, and obtain the three-dimensional scenic template, and match to it
It sets, completes the load of three-dimensional scenic;The second way is image required for load three-dimensional scenic, for example three-dimensional scenic is one
The position of 6 images is arranged in hexahedron, the image in six faces of the hexahedron three-dimensional scenic available at this time, than
As six positions of up, down, left, right, before and after directly generate described three according to 6 images when loading three-dimensional scenic later
Tie up scene.In the second way, be related to the splicing of picture, can with cross mark characteristic point on the image, splicing when
It waits, described image is spliced according to the characteristic point, generate three-dimensional scenic.
Step S2: imaging sensor is positioned to the origin of the three-dimensional scenic.
In this embodiment, described image generation method can be run in terminal, and the terminal includes imaging sensor,
As the position of imaging sensor is set to the origin of three-dimensional scenic, in this public affairs after three-dimensional scenic, which loads, to be completed by camera
In opening, the origin can be the central point of the three-dimensional scenic, and if three-dimensional scenic is sphere, then the origin is in sphere
The heart, three-dimensional scenic are regular hexahedron, then origin is the center of three-dimensional scenic, and the center can be by hexahedron no longer the same face
The line decision on vertex etc..According to the origin, three-dimensional system of coordinate is established in three-dimensional scenic can when the terminal is mobile
To set origin for the position of terminal always;The origin can also be fixed, when terminal is mobile, the terminal is in three dimensional field
It is moved in scape, can determine the coordinate of the terminal in real time.
Step S3: the attribute of described image sensor is obtained.
The attribute of described image sensor may include position, direction or the type of imaging sensor in this embodiment
One or more of.Wherein, the position and orientation of described image sensor can be described by the data acquisition of Position and attitude sensor
Position and attitude sensor is set in the terminal where imaging sensor or is directly set together with described image sensor, mesh
Be judge the position of imaging sensor and posture.The data of the Position and attitude sensor include position and posture, the position
For describing position of the described image sensor in the three-dimensional scenic, the posture exists for describing described image sensor
Direction in three-dimensional scenic.The type of described image sensor include it is preposition and two kinds of postposition, exist to distinguish imaging sensor
Position in terminal, preposition and postposition imaging sensor are respectively provided on the front and back two sides for being located at terminal at the terminal, direction
On the contrary.The type of described image sensor can be read by image sensor types flag bit, for example, in imaging sensor or
Caching can be set in person's terminal, for storing the flag bit of currently used imaging sensor, such as the 1 preposition camera shooting of expression
Head, 0 indicates rear camera.
Step S4: according to the attribute of described image sensor, the first image is generated, wherein the first image is by three-dimensional
The parts of images of scene forms.
In this step, according to the attribute of described image sensor, judge the current position of imaging sensor, direction or
One of type is a variety of, the comprehensive attribute, generates the first image, and the first image is imaging sensor in three dimensional field
In scape collected three-dimensional scenic parts of images, for example three-dimensional scenic is a house, and the first image is exactly image
Parts of images in the room of sensor institute direction, first image are shown in display device, which can be figure
The display device of terminal as where sensor or the independent display device coupled with affiliated imaging sensor.
The embodiment of the present disclosure provides a kind of image generating method, device, hardware device and computer readable storage medium.Its
In, which includes: load three-dimensional scenic;Imaging sensor is positioned to the origin of the three-dimensional scenic;It obtains
The attribute of described image sensor;According to the attribute of described image sensor, the first image is generated, wherein the first image
It is made of the parts of images of three-dimensional scenic.In the prior art, it after intelligent terminal generates three-dimensional scenic, can be moved by control
Relative position of the motion video sensor in three-dimensional scenic, but the move mode is inflexible, cannot flexibly switch image biography
Sensor acquires image from three-dimensional scenic, which directly acquires the attribute of imaging sensor, according to the category of imaging sensor
Property determines image that imaging sensor is acquired from three-dimensional scenic, keeps the switching of image more flexible.
As shown in Fig. 2, in an alternative embodiment, in step S4, that is, category according to described image sensor
Property, after generating the first image, can also include:
Step S51, the attribute for receiving described image sensor change order, are changed according to the attribute and ordered described in change
The attribute of imaging sensor;
Step S52 generates the second image, wherein described second according to the attribute of the described image sensor after change
Image is made of the parts of images of three-dimensional scenic.
According to the description in step S3, the attribute of described image sensor may include position, direction or type.
When the attribute of described image sensor be position and/or towards when, receive described image sensor position and/or
Towards order is changed, is ordered according to the position and/or towards changing, change described image sensor and/or direction;According to changing
The position of imaging sensor after change and/or direction generate the second image.
According to the attitude data of Position and attitude sensor, position and/or the direction of described image sensor are judged, in the embodiment
In, the attitude transducer is the merge sensor of multiple sensors, and typical attitude data therein can derive from gyro
Instrument;According to the direction, the part scene image that three-dimensional scenic is fallen into imaging sensor acquisition range is judged.Position therein
Data can judge opposite position of the imaging sensor in three-dimensional scenic according to the position data from position sensor
It sets.
In one embodiment, position of the origin always situated in imaging sensor, that is to say, that no matter image passes
The mobile any position of sensor, is all located at the center of three-dimensional scenic, three-dimensional scenic follows the movement of imaging sensor and moves, at this
In the case of kind, the position data in the Position and attitude sensor is global position data, and the part scene image will not be with figure
As sensor movement and size variation occurs, only occur the variation of picture position, the position data of imaging sensor at this time,
It can not have to, because opposite change does not occur in three-dimensional scenic for the position of imaging sensor.
In one embodiment, the origin is not mobile with the position of imaging sensor, that is to say, that works as image sensing
When device is mobile, the origin is located at it and generates position, and imaging sensor moves in the relative coordinate system of three-dimensional scenic, institute's rheme
Position data in appearance sensor is the station-keeping data in relative coordinate system, in this case, the part scene figure
The range size of picture changes according to the distance of imaging sensor and the part scene image, the range size
It can be calculated at a distance from plane where the scene image of part by imaging sensor.As shown in figure 3, imaging sensor 31,
, in first position C, the viewfinder range in plane 32 is AB for it, and the vertical point at center to plane 32 is O, imaging sensor 31
In position when C apart from the distance of plane be CO, when imaging sensor 31 is moved to second position C ', finding a view in plane 32
Range is A ' B ', and the vertical point at center to plane 32 is O, and distance of the imaging sensor 31 in position C ' apart from plane is C ' O,
Then:
It can be seen that calculating when imaging sensor is located at new position, the size of viewfinder range, and calculates and show
Show the range in panoramic picture generating means.Preferably, the direction of imaging sensor, binding site be can be combined with
Second image is generated with direction.It is understood that above-described embodiment is only described from section, in fact, image
The viewfinder range of sensor is a plane, replaces plane using the length AB and A ' B ' in plane herein.
When the attribute of described image sensor is the type of imaging sensor, it is to be understood that when receiving image
It, can be directly described first according to corresponding to the type of the sensor before change when the attribute change order of sensor
Image generates second image.For example, currently used imaging sensor is preposition imaging sensor, works as reception
After changing order to image sensor types, currently used imaging sensor is switched to postposition imaging sensor, this
When, it can be according to the image in the opposite direction of the first image as the second image, the program can quickly generate image, and nothing
Three-dimensional scenic need to be reloaded again for the imaging sensor after switching.
As shown in figure 4, in an alternative embodiment, step S3 be obtain described image sensor attribute it
Afterwards, further includes:
Step S31 judges whether predeterminated target occur in described image sensor acquired image;
In this embodiment, imaging sensor acquires the image in reality, includes real field in the image in the reality
Multiple targets in scape, for example in a room scene, may include desk, chair and personage etc., can be set in advance
Predeterminated target, such as personage then can identify in image whether personage occur according to human face characteristic point.It is said by taking face as an example
The acquisition methods of bright characteristic point, facial contour mainly include 5 eyebrow, eyes, nose, mouth and cheek parts, can also sometimes
Including pupil and nostril, in general realizes and facial contour is more completely described, the number of characteristics of needs point is on 60 left sides
The right side if only describing basic structure does not need that each position details is described in detail, or does not need description cheek, then can be with
It is corresponding to reduce characteristic point number, if necessary to describe pupil, nostril or the five features for needing more details, then it can increase spy
Levy the number of point.Human face characteristic point extraction is carried out on the image, is equivalent to and is found each face contour feature point in facial image
In corresponding position coordinate, i.e. positioning feature point, this process needs to carry out based on the corresponding feature of characteristic point, is obtaining energy
After the characteristics of image of enough clear identification characteristics points, scan for comparing in the picture according to this feature, it is accurate fixed on the image
The position of position characteristic point.Since characteristic point only occupies very small area (usually only several to tens pixels in the picture
Size), the corresponding feature of characteristic point on the image occupied region be generally also it is very limited and local, at present
There are two types of feature extraction modes: (1) the one-dimensional range image feature extraction vertical along profile;(2) the two of characteristic point Square Neighborhood
Tie up range image feature extraction.There are many kinds of implementation methods for above two mode, such as ASM and AAM class method, statistics energy function
Class method, regression analysis, deep learning method, classifier methods, batch extracting method etc..Above-mentioned various implementation methods
Used feature point number, accuracy and speed are different, suitable for different application scenarios.
In this embodiment it is possible to a part of predeterminated target be identified by Partial Feature point, later according to this portion
Divide and continue to identify complete predeterminated target, for example by recognition of face, personage is determined to be, later further according to character physical's
Other characteristic points identify body and four limbs of personage etc..
Step S32, it is if there is the predeterminated target, then the predeterminated target is collected from described image sensor
It is extracted in image.
If identifying predeterminated target in step S31, such as personage, then the personage is taken out from real world images
It takes out, stingy graphic operation can be used to realize in extraction herein.Stingy figure is a kind of foreground part image from background point
The technology come is separated out, it specifies a small amount of part foreground and background region in image by user, and according to these prompts according to one
Fixed decision rule isolates all foreground objects.Following formula can be used to indicate in image:
C=α F+ (1- α) B
Wherein C expression image pixel, F expression foreground image pixel, B expression background image pixels, α expression transparency, 0≤
α≤1, it is that the value for solving 3 variables according to the gray value of current picture C can be used in solution procedure that prospect, which scratches figure,
A variety of methods, one of method be the method based on sampling, the method based on sampling assume each unknown pixel prospect and
Background component can be obtained from surrounding known pixels, for each unknown pixel, by finding most in known region
Excellent preceding background is to further solving α value.There are many modes of sampling, is in comprehensive method of sampling wherein typical a kind of,
This method is in the local to be sampled compared with small neighbourhood of close known foreground and background, in the place far from known foreground and background
It is then sampled with biggish neighborhood, so that sampled point is more fully.The stingy drawing method of majority is carried out to above-mentioned formula
It solves, the mode being only to solve for is different.The disclosure does not limit specific predeterminated target abstracting method, as long as being capable of abstract image
In the method for specific objective can be introduced into disclosed technique scheme.
In the disclosure, when carrying out predeterminated target extraction using the mode of stingy figure, it is also possible to which different modes are realized.It is typical
, after can identifying predeterminated target in step s3, the image in predeterminated target and its neighbouring preset range is carried out stingy
Figure, directly extracts predeterminated target;Or all foreground image and background image can be extracted, in the foreground picture
Predeterminated target is obtained as in, and by other foreground images and background image transparence, predeterminated target is extracted with this.
In this embodiment, the step S4 is the attribute according to described image sensor, generates the first image, comprising:
Step S41 generates the first image according to the attribute of described image sensor and the predeterminated target.
In this step, described image sensor three-dimensional scenic collected is determined according to the attribute of described image sensor
In parts of images, according in described image sensor three-dimensional scenic collected parts of images and the predeterminated target, it is raw
At the first image.Specifically, using the parts of images in the three-dimensional scenic as the background component of the first image, it will be described
Prospect component of the goal-selling as the first image, according to formula:
C=α F+ (1- α) B
In the case where setting α value, the first image after synthesis can be calculated, α value herein can be set in advance
It is fixed, setting interface can also be provided, allow the customized α value of user, and pass through the conjunction of the different α value of display device live preview
At effect.
In this embodiment it is possible to rendering sequence be generated according to the three-dimensional scenic and the goal-selling, in the wash with watercolours
It contaminates in sequence, renders the three-dimensional scenic first, render the goal-selling later, be overlapped in three-dimensional scenic and goal-selling
The three-dimensional scenic is set transparent (α=1) by position.
Hereinbefore, although describing each step in above method embodiment, this field skill according to above-mentioned sequence
Art personnel it should be clear that the step in the embodiment of the present disclosure not necessarily executes in the order described above, can also with inverted order, it is parallel,
Other sequences such as intersection execute, moreover, those skilled in the art can also add other steps on the basis of above-mentioned steps
Suddenly, the mode of these obvious variants or equivalent replacement should also be included within the protection scope of the disclosure, and details are not described herein.
It is below embodiment of the present disclosure, embodiment of the present disclosure can be used for executing embodiments of the present disclosure realization
The step of, for ease of description, part relevant to the embodiment of the present disclosure is illustrated only, it is disclosed by specific technical details, it asks
Referring to embodiments of the present disclosure.
In order to solve flexibly switch in the prior art the technical issues of imaging sensor acquires image from three-dimensional scenic,
The embodiment of the present disclosure provides a kind of video generation device.It is as described in the examples that the device can execute above-mentioned image generating method
Step.As shown in figure 5, the device mainly includes: loading module 51, locating module 52, attribute obtain module 53 and image generates
Module 54.Wherein, loading module 51, for loading three-dimensional scenic;Locating module 52, it is described for imaging sensor to be positioned at
The origin of three-dimensional scenic;Attribute obtains module 53, for obtaining the attribute of described image sensor;Image generation module 54 is used
In the attribute according to described image sensor, generate the first image, wherein the first image by three-dimensional scenic parts of images
Composition.
The loading module 51, is also used to obtain the Background of the three-dimensional scenic, according to Background generation
Three-dimensional scenic.
Further, the three-dimensional scenic is hexahedron, and the Background includes the image in hexahedral 6 faces.
Attribute obtain module 53, be also used to when the attribute of described image sensor be imaging sensor towards when, read
The data of Position and attitude sensor, according to the direction of the data acquisition imaging sensor of the Position and attitude sensor.
Described image generation module 54 is also used to the direction according to described image sensor, generates the first image, and
The first image is aobvious on the display apparatus.
Above-mentioned video generation device is corresponding with the image generating method in above-mentioned embodiment illustrated in fig. 1 consistent, detail
It can refer to the above-mentioned description to image generating method, details are not described herein.
As shown in fig. 6, a kind of video generation device provided for another embodiment of the disclosure.The video generation device is being schemed
On the basis of video generation device shown in 5, further includes: attribute changes command module 61 and the second image generation module 62.Wherein,
Attribute changes command module 61, and the attribute for receiving described image sensor changes order, is changed according to the attribute and is ordered
Change the attribute of described image sensor;Second image generation module 62, for according to the described image sensor after change
Attribute, generate the second image, wherein second image is made of the parts of images of three-dimensional scenic.
Above-mentioned video generation device is corresponding with the image generating method in above-mentioned embodiment illustrated in fig. 2 consistent, detail
It can refer to the above-mentioned description to image generating method, details are not described herein.
It is illustrated in figure 7 another embodiment of video generation device, the embodiment is on the basis of the video generation device of Fig. 5
On, it further comprises: predeterminated target judgment module 71, it is pre- for judging whether to occur in described image sensor acquired image
It sets the goal;Predeterminated target abstraction module 72, for if there is the predeterminated target, then by the predeterminated target from described image
It is extracted in sensor acquired image.
In this embodiment, described image generation module 54, for according to the attribute of described image sensor and described pre-
It sets the goal, generates the first image.
Above-mentioned video generation device is corresponding with the image generating method in above-mentioned embodiment illustrated in fig. 4 consistent, detail
It can refer to the above-mentioned description to image generating method, details are not described herein.
The detailed descriptions such as the technical effect of working principle, realization in relation to video generation device embodiment can refer to aforementioned
Related description in image generating method embodiment, details are not described herein.
Fig. 8 is the hardware block diagram for illustrating electronic equipment according to an embodiment of the present disclosure.As shown in figure 8, according to the disclosure
The electronic equipment 80 of embodiment includes memory 81 and processor 82.
The memory 81 is for storing non-transitory computer-readable instruction.Specifically, memory 81 may include one
Or multiple computer program products, the computer program product may include various forms of computer readable storage mediums, example
Such as volatile memory and/or nonvolatile memory.The volatile memory for example may include random access memory
(RAM) and/or cache memory (cache) etc..The nonvolatile memory for example may include read-only memory
(ROM), hard disk, flash memory etc..
The processor 82 can be central processing unit (CPU) or have data-handling capacity and/or instruction execution energy
The processing unit of the other forms of power, and can control other components in electronic equipment 80 to execute desired function.?
In one embodiment of the disclosure, which makes for running the computer-readable instruction stored in the memory 81
Obtain all or part of the steps that the electronic equipment 80 executes the image generating method of each embodiment of the disclosure above-mentioned.
Those skilled in the art will be understood that solve the technical issues of how obtaining good user experience effect, this
It also may include structure well known to communication bus, interface etc. in embodiment, these well known structures should also be included in this public affairs
Within the protection scope opened.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
Fig. 9 is the schematic diagram for illustrating computer readable storage medium according to an embodiment of the present disclosure.As shown in figure 9, root
According to the computer readable storage medium 90 of the embodiment of the present disclosure, it is stored thereon with non-transitory computer-readable instruction 91.When this
When non-transitory computer-readable instruction 91 is run by processor, the image generating method of each embodiment of the disclosure above-mentioned is executed
All or part of the steps.
Above-mentioned computer readable storage medium 90 includes but is not limited to: and optical storage media (such as: CD-ROM and DVD), magnetic
Optical storage media (such as: MO), magnetic storage medium (such as: tape or mobile hard disk), with built-in rewritable nonvolatile
The media (such as: storage card) of memory and media (such as: ROM box) with built-in ROM.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
Figure 10 is to illustrate the hardware structural diagram that terminal is generated according to the image of the embodiment of the present disclosure.As shown in Figure 10,
It includes above-mentioned video generation device embodiment that the image, which generates terminal 100,.
The terminal device can be implemented in a variety of manners, and the terminal device in the disclosure can include but is not limited to such as
Mobile phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer),
PMP (portable media player), navigation device, vehicle-mounted terminal equipment, vehicle-mounted image generate terminal, vehicle electronics rearview mirror
Etc. mobile terminal device and such as number TV, desktop computer etc. fixed terminal equipment.
As the embodiment of equivalent replacement, which can also include other assemblies.As shown in Figure 10, the image special effect
Processing terminal 100 may include power supply unit 101, wireless communication unit 102, A/V (audio/video) input unit 103, user
Input unit 104, sensing unit 105, interface unit 106, controller 107, output unit 108 and storage unit 109 etc..Figure
10 show the terminal with various assemblies, it should be understood that being not required for implementing all components shown, can also replace
Implement more or fewer components in generation ground.
Wherein, wireless communication unit 102 allows the radio communication between terminal 100 and wireless communication system or network.
A/V input unit 103 is for receiving audio or video signal.The order that user input unit 104 can be inputted according to user is raw
At key input data with the various operations of controlling terminal equipment.Current state, the terminal 100 of the detection terminal 100 of sensing unit 105
Position, user it is mobile for the acceleration or deceleration of the orientation of the presence or absence of touch input of terminal 100, terminal 100, terminal 100
With direction etc., and generate order or the signal of operation for controlling terminal 100.Interface unit 106 is used as at least one
External device (ED) connect with terminal 100 can by interface.Output unit 108 is configured to vision, audio and/or tactile side
Formula provides output signal.Storage unit 109 can store the software program etc. of the processing and control operation that are executed by controller 107
Deng, or can temporarily store oneself data through exporting or will export.Storage unit 109 may include at least one type
Storage medium.Moreover, terminal 100 can be with the network storage for the store function for executing storage unit 109 by network connection
Device cooperation.The overall operation of the usual controlling terminal equipment of controller 77.In addition, controller 107 may include for reproduce or
The multi-media module of multimedia playback data.Controller 107 can be with execution pattern identifying processing, by what is executed on the touchscreen
Handwriting input or picture draw input and are identified as character or image.Power supply unit 101 receives outer under control of the controller 107
Portion's electric power or internal power and electric power appropriate needed for each element of operation and component are provided.
The disclosure propose image generating method various embodiments can with use such as computer software, hardware or
The computer-readable medium of any combination thereof is implemented.For hardware implement, the disclosure propose image generating method it is various
Embodiment can be filled by using application-specific IC (ASIC), digital signal processor (DSP), Digital Signal Processing
It sets (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, micro-
Processor is designed to execute at least one of electronic unit of function described herein to implement, in some cases, this
The various embodiments of the open image generating method proposed can be implemented in controller 107.For software implementation, the disclosure
The various embodiments of the image generating method of proposition can be with the individual software that allows to execute at least one functions or operations
Module is implemented.Software code can be by the software application (or program) write with any programming language appropriate Lai real
It applies, software code can store in storage unit 109 and be executed by controller 107.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
The basic principle of the disclosure is described in conjunction with specific embodiments above, however, it is desirable to, it is noted that in the disclosure
The advantages of referring to, advantage, effect etc. are only exemplary rather than limitation, must not believe that these advantages, advantage, effect etc. are the disclosure
Each embodiment is prerequisite.In addition, detail disclosed above is merely to exemplary effect and the work being easy to understand
With, rather than limit, it is that must be realized using above-mentioned concrete details that above-mentioned details, which is not intended to limit the disclosure,.
Device involved in the disclosure, device, equipment, system block diagram only as illustrative example and be not intended to
It is required that or hint must be attached in such a way that box illustrates, arrange, configure.As those skilled in the art will appreciate that
, it can be connected by any way, arrange, configure these devices, device, equipment, system.Such as "include", "comprise", " tool
" etc. word be open vocabulary, refer to " including but not limited to ", and can be used interchangeably with it.Vocabulary used herein above
"or" and "and" refer to vocabulary "and/or", and can be used interchangeably with it, unless it is not such that context, which is explicitly indicated,.Here made
Vocabulary " such as " refers to phrase " such as, but not limited to ", and can be used interchangeably with it.
In addition, as used herein, the "or" instruction separation used in the enumerating of the item started with "at least one"
It enumerates, so that enumerating for such as " at least one of A, B or C " means A or B or C or AB or AC or BC or ABC (i.e. A and B
And C).In addition, wording " exemplary " does not mean that the example of description is preferred or more preferable than other examples.
It may also be noted that in the system and method for the disclosure, each component or each step are can to decompose and/or again
Combination nova.These decompose and/or reconfigure the equivalent scheme that should be regarded as the disclosure.
The technology instructed defined by the appended claims can not departed from and carried out to the various of technology described herein
Change, replace and changes.In addition, the scope of the claims of the disclosure is not limited to process described above, machine, manufacture, thing
Composition, means, method and the specific aspect of movement of part.It can be essentially identical according to being carried out to corresponding aspect described herein
Function or realize essentially identical result there is currently or later to be developed processing, machine, manufacture, event group
At, means, method or movement.Thus, appended claims include such processing, machine, manufacture, event within its scope
Composition, means, method or movement.
The above description of disclosed aspect is provided so that any person skilled in the art can make or use this
It is open.Various modifications in terms of these are readily apparent to those skilled in the art, and are defined herein
General Principle can be applied to other aspect without departing from the scope of the present disclosure.Therefore, the disclosure is not intended to be limited to
Aspect shown in this, but according to principle disclosed herein and the consistent widest range of novel feature.
In order to which purpose of illustration and description has been presented for above description.In addition, this description is not intended to the reality of the disclosure
It applies example and is restricted to form disclosed herein.Although already discussed above multiple exemplary aspects and embodiment, this field skill
Its certain modifications, modification, change, addition and sub-portfolio will be recognized in art personnel.
Claims (13)
1. a kind of image generating method characterized by comprising
Load three-dimensional scenic;
Imaging sensor is positioned to the origin of the three-dimensional scenic;
Obtain the attribute of described image sensor;
According to the attribute of described image sensor, generate the first image, wherein the first image by three-dimensional scenic part figure
As composition.
2. image generating method as described in claim 1, which is characterized in that the load three-dimensional scenic includes:
The Background for obtaining the three-dimensional scenic generates the three-dimensional scenic according to the Background.
3. image generating method as claimed in claim 2, it is characterised in that:
The three-dimensional scenic is hexahedron, and the Background includes the image in hexahedral six faces.
4. image generating method as described in claim 1, which is characterized in that the attribute for obtaining described image sensor,
Include:
When the attribute of described image sensor be imaging sensor towards when, the data of Position and attitude sensor are read, according to described
The direction of the data acquisition imaging sensor of Position and attitude sensor.
5. image generating method as claimed in claim 4, which is characterized in that the attribute according to described image sensor,
Generate the first image, comprising:
According to the direction of described image sensor, the first image is generated, and the first image is aobvious on the display apparatus.
6. image generating method as described in claim 1, which is characterized in that in the category according to described image sensor
Property, generate the first image after, further includes:
The attribute for receiving described image sensor changes order, changes order according to the attribute and changes described image sensor
Attribute;
According to the attribute of the described image sensor after change, the second image is generated, wherein second image is by three dimensional field
The parts of images of scape forms.
7. image generating method as claimed in claim 6, it is characterised in that:
The attribute of described image sensor is the type of imaging sensor, and the type of described image sensor includes that preposition image passes
Sensor and postposition imaging sensor;
The attribute for receiving described image sensor changes order, changes order according to the attribute and changes described image sensing
The attribute of device, comprising:
The type change order for receiving described image sensor switches image according to the type change order of described image sensor
The type of sensor;
According to the attribute of the described image sensor after change, the second image is generated, comprising:
According to the first image corresponding to the type of the sensor before change, second image is generated.
8. image generating method as claimed in claim 6, it is characterised in that:
The attribute of described image sensor is the direction of imaging sensor;
The attribute for receiving described image sensor changes order, changes order according to the attribute and changes described image sensing
The attribute of device, comprising:
The direction for receiving described image sensor changes order, is changed according to the direction and is ordered, changes described image sensor
Direction;
According to the attribute of the described image sensor after change, the second image is generated, comprising:
According to the direction of the imaging sensor after change, the second image is generated.
9. image generating method as described in claim 1, which is characterized in that obtain described image sensor attribute it
Afterwards, further includes:
Judge whether predeterminated target occur in described image sensor acquired image;
If there is the predeterminated target, then the predeterminated target is extracted from the first image.
10. image generating method as claimed in claim 9, which is characterized in that the attribute according to described image sensor,
Generate the first image, comprising:
According to the attribute of described image sensor and the predeterminated target, the first image is generated.
11. a kind of video generation device characterized by comprising
Loading module, for loading three-dimensional scenic;
Locating module, for imaging sensor to be positioned to the origin of the three-dimensional scenic;
Attribute obtains module, for obtaining the attribute of described image sensor;
Image generation module generates the first image, wherein the first image for the attribute according to described image sensor
It is made of the parts of images of three-dimensional scenic.
12. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one
It manages device to execute, so that at least one described processor is able to carry out any image generating method of claim 1-10.
13. a kind of non-transient computer readable storage medium, which is characterized in that non-transient computer readable storage medium storage
Computer instruction, the computer instruction are used to that computer perform claim to be made to require any image generating method of 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810877067.1A CN108965718B (en) | 2018-08-03 | 2018-08-03 | Image generation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810877067.1A CN108965718B (en) | 2018-08-03 | 2018-08-03 | Image generation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108965718A true CN108965718A (en) | 2018-12-07 |
CN108965718B CN108965718B (en) | 2021-03-23 |
Family
ID=64467085
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810877067.1A Active CN108965718B (en) | 2018-08-03 | 2018-08-03 | Image generation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108965718B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102157011A (en) * | 2010-12-10 | 2011-08-17 | 北京大学 | Method for carrying out dynamic texture acquisition and virtuality-reality fusion by using mobile shooting equipment |
CN102436621A (en) * | 2011-11-08 | 2012-05-02 | 莫健新 | Systems and methods for displaying housing estate landscape data and generating housing estate landscape display data |
US20130328858A9 (en) * | 2004-08-31 | 2013-12-12 | William D. Meadow | Three dimensional image data models |
CN103703758A (en) * | 2011-07-01 | 2014-04-02 | 英特尔公司 | Mobile augmented reality system |
CN106296783A (en) * | 2016-07-28 | 2017-01-04 | 众趣(北京)科技有限公司 | A kind of combination space overall situation 3D view and the space representation method of panoramic pictures |
CN106294918A (en) * | 2015-06-10 | 2017-01-04 | 中国科学院宁波材料技术与工程研究所 | A kind of method for designing of virtual transparence office system |
CN106993126A (en) * | 2016-05-11 | 2017-07-28 | 深圳市圆周率软件科技有限责任公司 | A kind of method and device that lens image is expanded into panoramic picture |
CN107633547A (en) * | 2017-09-21 | 2018-01-26 | 北京奇虎科技有限公司 | Realize the view data real-time processing method and device, computing device of scene rendering |
CN108305327A (en) * | 2017-11-22 | 2018-07-20 | 北京居然设计家家居连锁集团有限公司 | A kind of image rendering method |
-
2018
- 2018-08-03 CN CN201810877067.1A patent/CN108965718B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130328858A9 (en) * | 2004-08-31 | 2013-12-12 | William D. Meadow | Three dimensional image data models |
CN102157011A (en) * | 2010-12-10 | 2011-08-17 | 北京大学 | Method for carrying out dynamic texture acquisition and virtuality-reality fusion by using mobile shooting equipment |
CN103703758A (en) * | 2011-07-01 | 2014-04-02 | 英特尔公司 | Mobile augmented reality system |
CN102436621A (en) * | 2011-11-08 | 2012-05-02 | 莫健新 | Systems and methods for displaying housing estate landscape data and generating housing estate landscape display data |
CN106294918A (en) * | 2015-06-10 | 2017-01-04 | 中国科学院宁波材料技术与工程研究所 | A kind of method for designing of virtual transparence office system |
CN106993126A (en) * | 2016-05-11 | 2017-07-28 | 深圳市圆周率软件科技有限责任公司 | A kind of method and device that lens image is expanded into panoramic picture |
CN106296783A (en) * | 2016-07-28 | 2017-01-04 | 众趣(北京)科技有限公司 | A kind of combination space overall situation 3D view and the space representation method of panoramic pictures |
CN107633547A (en) * | 2017-09-21 | 2018-01-26 | 北京奇虎科技有限公司 | Realize the view data real-time processing method and device, computing device of scene rendering |
CN108305327A (en) * | 2017-11-22 | 2018-07-20 | 北京居然设计家家居连锁集团有限公司 | A kind of image rendering method |
Also Published As
Publication number | Publication date |
---|---|
CN108965718B (en) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020216008A1 (en) | Image processing method, apparatus and device, and storage medium | |
EP3885965B1 (en) | Image recognition method based on micro facial expressions, apparatus and related device | |
CN108958610A (en) | Special efficacy generation method, device and electronic equipment based on face | |
CN104350509B (en) | Quick attitude detector | |
CN108986016B (en) | Image beautifying method and device and electronic equipment | |
WO2020029554A1 (en) | Augmented reality multi-plane model animation interaction method and device, apparatus, and storage medium | |
CN109064387A (en) | Image special effect generation method, device and electronic equipment | |
US20220237812A1 (en) | Item display method, apparatus, and device, and storage medium | |
CN110135336B (en) | Training method, device and storage medium for pedestrian generation model | |
WO2020024569A1 (en) | Method and device for dynamically generating three-dimensional face model, and electronic device | |
CN109191507A (en) | Three-dimensional face images method for reconstructing, device and computer readable storage medium | |
CN108830787A (en) | The method, apparatus and electronic equipment of anamorphose | |
CN106571072A (en) | Method for realizing children education card based on AR | |
CN111680678B (en) | Target area identification method, device, equipment and readable storage medium | |
CN107924452A (en) | Combined shaped for face's alignment in image returns | |
CN109003224A (en) | Strain image generation method and device based on face | |
CN110858277A (en) | Method and device for obtaining attitude classification model | |
CN107944381A (en) | Face tracking method, device, terminal and storage medium | |
CN112733946A (en) | Training sample generation method and device, electronic equipment and storage medium | |
CN109218615A (en) | Image taking householder method, device, terminal and storage medium | |
CN111199169A (en) | Image processing method and device | |
CN108833881B (en) | Method and device for constructing image depth information | |
CN108989681A (en) | Panorama image generation method and device | |
CN108961314A (en) | Moving image generation method, device, electronic equipment and computer readable storage medium | |
CN112149599B (en) | Expression tracking method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |