A kind of method and device for adjusting foreground and background
Technical field
The present invention relates to image capture technical field, more particularly to a kind of method and device for adjusting foreground and background.
Background technology
When people take a picture, it is frequently encountered and look at the very little that but seems when the scenery that very U.S.A is very grand is still filmed
Situation, it is difficult to all clap personage and scenery just right.If to look after personage and scenery simultaneously, just need ceaselessly
Position and the angle of people is adjusted, has often run and has only taken seldom several pictures half a day, is also often clapped less than preferable photo.
The content of the invention
In view of this, the embodiments of the invention provide a kind of method for adjusting foreground and background, can be referred to according to user
Adjustment prospect and background are made, makes user not need adjustment position to photograph satisfied photo when taking pictures.
In order to solve the above technical problems, the invention provides a kind of method for adjusting foreground and background, including:Acquisition is found a view
Picture;The picture that will find a view is converted into digitized video;According to finding a view, digitized video is divided into foreground and background by picture;Referred to according to user
Adjustment prospect and background are made, and is preserved with data signal;Take pictures, the image after record adjustment.
Wherein, the step of adjusting prospect and background according to user instruction, and being preserved with data signal includes:It is determined that need to adjust
Whole ratio;User adjusts the size and location of foreground and background according to ratio, and is preserved with data signal.
Wherein, the step of adjusting prospect and background according to user instruction, and being preserved with data signal further comprises:User
According to scaling background, selection needs the part deleted, while ensures that the image edge of reservation is complete;User adjusts according to ratio
The size and location of whole prospect, it is ensured that prospect covering of the prospect after residing place is adjusted originally.
Wherein, the adjustment of foreground and background is realized by touch screen.
Wherein, the digitized video after adjustment is dynamically shown to user.
In order to solve the above technical problems, present invention also offers a kind of device for adjusting foreground and background, including:Find a view mould
Block, for picture of finding a view;Modular converter, for that will find a view, picture is converted into digitized video;Computing module, taken for basis
Digitized video is divided into foreground and background by scape picture;Adjusting module, for adjusting prospect and background according to user instruction, and with number
Word signal preserves;Photo module, for taking pictures, the image after record adjustment.
Wherein, adjusting module is additionally operable to:It is determined that need the ratio adjusted;User adjusts the big of foreground and background according to ratio
Small and position, and preserved with data signal.
Wherein, for user according to scaling background, selection needs the part deleted, while ensures that the image edge of reservation is complete
It is whole;User adjusts the size and location of prospect according to ratio, it is ensured that prospect covering of the prospect after residing place is adjusted originally.
Wherein, the adjustment of foreground and background is realized by touch screen.
Wherein, device also includes image-forming module, for the digitized video after adjustment to be dynamically shown into user.
By such scheme, the beneficial effects of the invention are as follows:By adjusting size and the position of foreground and background, just
The preferable picture of effect can be generated, and the picture record is got off, it becomes possible to realizes and is not moving personage and shooting angle
In the case of, preferable photo can be shot by only adjusting picture of finding a view, and improve user experience.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the method for the adjustment foreground and background of first embodiment of the invention;
Fig. 2 is the method schematic diagram of the adjustment foreground and background of first embodiment of the invention;
Fig. 3 is the schematic flow sheet of the device of the adjustment foreground and background of first embodiment of the invention.Embodiment
Referring to Fig. 1, Fig. 1 is the schematic flow sheet of the method for the adjustment foreground and background of first embodiment of the invention.Such as
Shown in Fig. 1, adjusting the method for foreground and background includes:
Step S11:Acquisition is found a view picture.
So that user Bs of the user A to station before scenery takes pictures as an example, find that scenery is too small or too big after opening camera, personage
It is required for adjusting with the ratio of scenery and position, but needs the amplitude difference adjusted.Then user A selections are opened piecemeal focal length and adjusted
Function is saved, manually selects the scope that personage needs to adjust.Then remaining is exactly that scenery needs the scope that adjusts.Camera is according to user
The personage of selection and the scenery scope to be adjusted, the artwork of imaging is cut out and is presented to user on a pictures, the figure
Piece is picture of finding a view.If the size of scenery is suitable, it is not necessary to is adjusted, is then directly normally shown to user.
Step S12:The picture that will find a view is converted into digitized video.
Digital camera projects photo-sensitive cell top layer using light through camera lens, and light is by filter on photo-sensitive cell top layer point
Solution is into different coloured light.Coloured light is perceived by the corresponding photosensitive unit of each filter, and produces the analog current signal of varying strength,
These signal collections are got up by the circuit of photo-sensitive cell again.Analog current signal is converted into digital letter by digital analog converter
Number, then by DSP(Digital Signal Processing, Digital Signal Processing)These signals are handled, reduction turns into
Digital image.Digital image is transferred on storage card and saved.
Step S13:According to finding a view, digitized video is divided into foreground and background by picture.
According to user in the scope of picture of finding a view, the picture of finding a view that script will be shown on screen is divided into foreground and background
Two parts, boundary member are the foreground part that user chooses.As shown in Fig. 2 in picture 21 of finding a view, a represents prospect, remaining
Part represents background.The picture that will so find a view is divided into foreground and background two parts and shown, the scope adjusted with determining user to need.
Wherein, in an embodiment of the present invention, prospect is personage, and background is scenery, in other embodiments of the invention,
Can also prospect be scenery, background is personage, or foreground and background can be personage or scenery, the picture that will simply find a view draw
It is divided into different parts.
Step S14:Prospect and background are adjusted according to user instruction, and preserved with data signal.
Wherein, it is first determined the ratio adjusted is needed, user adjusts the size and location of foreground and background according to ratio, and
Preserved with data signal.Specifically, scenery, i.e. background are selected first, and user needs what is deleted according to scaling background, selection
Part, while ensure that the image edge of reservation is complete.Because being amplification, the part for the picture scope that is enlarged over finding a view originally is final
Needs are cut.So the part that user can need to delete by the picture selection of finding a view after mobile amplify, but
It is to ensure that in view finder or an edge is completely schemed.Then personage, i.e. prospect are selected, user adjusts prospect according to ratio
Size and location, it is ensured that prospect covering of the prospect after residing place is adjusted originally.In this process, also taking adjustment
The digitized video of scape picture is stored in internal memory, and the digitized video being stored in after adjustment on internal memory is dynamically shown into use
Family.If the effect of adjustment is not fine, foreground and background can be carried out to repeat adjustment, until adjusting out the figure to work well
Untill piece.In embodiments of the present invention, typically require that user first adjusts background, then adjust prospect.So determined according to final
The background area of part that needs to fill may determine that the ratio that user can zoom in or out.Certainly in the other of the present invention
In embodiment, prospect can also be first adjusted, then adjust background.
As shown in Fig. 2 21 be the picture of finding a view before adjustment, a represents prospect, and remainder is background.22 be to put background
Picture of finding a view after big.23 picture of finding a view to be moved to the background after amplification after correct position, wherein, it is shown to user's
It is the part in black thin frame b, it is seen that its edge is complete, and remainder is eventually tailored.Because prospect a in 23
It is still the information that has powerful connections behind covering, so prospect a reduces ratio and do not limited.Otherwise the part after prospect a reduces
To be advisable so that blank space can be covered.24 be the picture of finding a view after adjustment prospect, is to be shown to the final of user in black thin frame b
Image, prospect a are personage, and the other parts outside black thin frame b is need the part deleted.In embodiments of the present invention, it is main
If by amplifying background and selecting suitable part, prospect is then adjusted to suitable position.In other realities of the present invention
Apply in example, background can also keep constant, and prospect is zoomed in or out or only adjusts the position of prospect, can also be to background
All it is sized with prospect and/or position, it is only necessary to which it is complete to be eventually displayed to the image edge of user, originally residing for personage
Personage's covering that place must be adjusted.During this whole adjustment, prospect, i.e. personage, and shooting angle are to protect
Hold constant.In this way, size and position by adjusting foreground and background, it is possible to the preferable picture of effect is generated, it is real
Show in the case where not moving personage and shooting angle, preferable photo can be shot by only adjusting picture of finding a view, and be improved
User experience.
In embodiments of the present invention, the adjustment of foreground and background is realized by touch screen, naturally it is also possible to has others
Implementation.Specifically, background is selected with finger, i.e. scenery, and being amplified is moved to correct position, and selection needs to delete
Part, but need to ensure in view finder or an edge is completely schemed, i.e. black thin frame b edge should be complete in Fig. 2.
Then prospect, i.e. personage are selected, adjustment, with finger select amplify and be moved to suitable position, ensure residing for original personage
The personage that must be adjusted of place cover.
Step S15:Take pictures, the image after record adjustment.
After user adjusts position and the ratio of foreground and background respectively, shutter is pressed, is displayed to the cutting of user
Image afterwards is recorded, and completes the shooting of desirable photograph.
In the present embodiment, find a view picture, and the picture that will find a view is divided into foreground and background, adjusts prospect and the back of the body respectively
The size of scape and position, the preferable picture of effect is ultimately generated, thus achieve and do not moving personage and shooting angle
In the case of, preferable photo can be shot by only adjusting picture of finding a view, and improve user experience.
Referring to Fig. 3, Fig. 3 is the schematic flow sheet of the device of the adjustment foreground and background of first embodiment of the invention.Such as
Shown in Fig. 3, adjusting the device 30 of foreground and background includes:Module of finding a view 31, modular converter 32, computing module 33, adjusting module
34th, image-forming module 35 and photo module 36.Module of finding a view 31 is found a view picture for acquisition.Modular converter 32 is used for the figure that will find a view
Piece is converted into digitized video.Computing module 33 is used to digitized video is divided into foreground and background according to picture of finding a view.Adjusting module
34 are used to adjust prospect and background according to user instruction, and are preserved with data signal.Image-forming module 35 is used for the number after adjustment
Word image is dynamically shown to user.Photo module 36 is used to take pictures, the image after record adjustment.
In the present embodiment, if user has found that scenery is too small or too big after opening camera, the ratio of personage and scenery and
Position is required for adjusting, but needs the amplitude difference adjusted.Then user selects to open piecemeal focus adjustment function, manually selects people
Thing needs the scope adjusted, and remaining is exactly the scope that scenery needs to adjust.Personage that module of finding a view 31 is selected according to user and
The scenery scope to be adjusted, the artwork of imaging is cut out and is presented to user on a pictures, and the picture is figure of finding a view
Piece.If the size of scenery is suitable, it is not necessary to is adjusted, is then directly normally shown to user.The photo-sensitive cell of camera
Light sensing simultaneously generates analog current signal, and analog current signal is converted into counting by modular converter 32 according to the circuit of photo-sensitive cell
Word signal is then reduced into digitized video.Digitized video is divided into foreground and background by computing module 33 according to picture of finding a view.
Adjusting module 34 adjusts prospect and background according to user instruction.Specifically, it is first determined need the ratio adjusted, use
Family adjusts the size and location of foreground and background according to ratio.In the present embodiment, user, can also according to scaling background
Mobile background simultaneously, selection need the part deleted, while ensure that the image edge of reservation is complete.User adjusts further according to ratio
The size and location of prospect, it is ensured that prospect covering of the prospect after residing place is adjusted originally.In this process, adjusting module
34 are also stored in the digitized video of the picture of finding a view of adjustment in internal memory, the number that image-forming module 35 will be stored on internal memory after adjustment
Word image is dynamically shown to user.If the effect of adjustment is not fine, adjusting module 34 can be carried out to foreground and background
Repeat to adjust, untill adjusting out the picture to work well.In the present embodiment, the adjustment of foreground and background is real by touch screen
It is existing, naturally it is also possible to have other implementations.Specifically, background is selected with finger, be i.e. scenery, and being amplified, be moved to
Correct position, selection need the part deleted, but need to ensure that still an edge is completely schemed in view finder.Then before selecting
Scape, i.e. personage, adjustment, with finger select amplify and be moved to suitable position, ensure local necessary residing for original personage
The personage's covering being adjusted.During this whole adjustment, prospect, i.e. personage, and shooting angle be to maintain it is constant.Such as
This, size and the position of foreground and background are adjusted by adjusting module 34, it is possible to are generated the preferable picture of effect, realized
In the case where not moving personage and shooting angle, only adjustment picture of finding a view can shoot preferable photo, improve use
Family Experience Degree.
After user adjusts position and the ratio of foreground and background respectively, shutter is pressed, will be aobvious by photo module 36
Show that the image after the cutting to user is recorded, complete the shooting of desirable photograph.
In an embodiment of the present invention, modular converter 32 can be integrated in module 31 of finding a view, and adjusting module 34 can collect
Into in computing module 33.
In summary, size and the position of the invention by adjusting foreground and background, it is possible to generate effect ideal
Picture, and the picture record is got off, it becomes possible to realize in the case where not moving personage and shooting angle, only adjustment is found a view
Picture can shoot preferable photo, improve user experience.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hair
The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.