CN105100641B - The method and apparatus that a kind of picture is converted to output video - Google Patents
The method and apparatus that a kind of picture is converted to output video Download PDFInfo
- Publication number
- CN105100641B CN105100641B CN201510549941.5A CN201510549941A CN105100641B CN 105100641 B CN105100641 B CN 105100641B CN 201510549941 A CN201510549941 A CN 201510549941A CN 105100641 B CN105100641 B CN 105100641B
- Authority
- CN
- China
- Prior art keywords
- output video
- parameter
- specified region
- video
- region
- 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.)
- Active
Links
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
An embodiment of the present invention provides the method and apparatus that a kind of picture is converted to output video, this method includes:The parameter in specified region and the parameter of output video are obtained, according to the parameter in specified region and the parameter of output video, determines video effect;The parameter and video effect of parameter, output video according to specified region, calculate scaling;Specified region is zoomed in and out, generates region to be split;Divide region to be split, output video is sequentially generated according to segmentation.A kind of method and apparatus provided through the embodiment of the present invention, under the premise of user's area-of-interest natural form is kept, by entire picture of user's area-of-interest full of output video, without supplementing black surround, show the content element of user's area-of-interest in an optimal manner.
Description
Technical field
The present invention relates to technical field of image processing, and the method and dress of output video are converted to more particularly to a kind of picture
It puts.
Background technology
With the progress of electronic technology, smart mobile phone and tablet computer are more and more universal, and user can clap anywhere or anytime
Take the photograph photo.Output video production application can be organized together photo is orderly, forms the output video with certain topic,
So as to improve ornamental value.
The photo component of user's shooting is more, and when the output video for making a certain theme, user often merely desires to open up
Certain elements of existing photo, these elements are often unrelated with the objective factors such as position, size, light, only liked by user's subjectivity
It determines.In addition, the size of user's area-of-interest, shape are different, and export the resolution of video production application output video
Rate, the ratio of width to height are fixed.When the ratio of width to height and the ratio of width to height of output video of user's area-of-interest mismatch, regarded in output
Pair when showing user's area-of-interest content in frequency or boundary need to be supplemented or user's area-of-interest natural form need to be changed, i.e.,
User's area-of-interest carries out non-equal proportion scaling, these all seriously affect the viewing effect of output video.
Therefore, the technical problem that those skilled in the art urgently solve is needed to be exactly at present:The sense that user is selected
When the region of interest is converted into output video, under the premise of the natural form for keeping user's region of interest field element, how most
The content of excellent displaying user's area-of-interest.
Invention content
The embodiment of the present invention provides the method and apparatus that a kind of picture is converted to output video, to solve select user
It is optimal to show how under the premise of region of interest field element nature is kept when interested region is converted into output video
User's area-of-interest problem.
To solve the above-mentioned problems, the method for exporting video is converted to the embodiment of the invention discloses a kind of picture, including:
The parameter in specified region and the parameter of output video are obtained, is regarded according to the parameter in the specified region and the output
The parameter of frequency determines output video effect;
The parameter of parameter, the output video according to the specified region and the output video effect, calculate scaling
Ratio;
According to the scaling, the specified region is zoomed in and out, generates region to be split;
Divide the region to be split, the output video is sequentially generated according to segmentation.
Preferably, the output video effect includes:
Any one in moving left and right and moving up and down.
Preferably, it is the parameter according to the specified region, described if the output video effect is moves left and right
The parameter of video and the output video effect are exported, the formula for calculating scaling r is as follows:
R=max ((vw+fps*t)/w, vh/h)
Wherein, vw is the width of the output video, fps is the output frame per second of video, t be the output video when
Long, w is the width in the specified region, and vh is the height of the output video, and h is the height in the specified region.
Preferably, it is the parameter according to the specified region, described if the output video effect is moves up and down
The parameter of video and the output video effect are exported, the formula for calculating scaling r is as follows:
R=max ((vh+fps*t)/h, vw/w)
Wherein, vh be it is described output video height, fps be it is described output video frame per second, t be it is described output video when
Long, h is the height in the specified region, and vw is the width of the output video, and w is the width in the specified region.
The embodiment of the present invention additionally provides the device that a kind of picture is converted to output video, including:
Video effect determining module is exported, for obtaining the parameter in specified region and exporting the parameter of video, according to described in
The parameter of the parameter in specified region and the output video, determines output video effect;
Scaling computing module, for parameter, the output parameter of video and described according to the specified region
Video effect is exported, calculates scaling;
Zoom module, for according to the scaling, the specified region being zoomed in and out, generates region to be split;
Video generation module is exported, for dividing the region to be split, the output video is sequentially generated according to segmentation.
Preferably, the output video effect includes:
Any one in moving left and right and moving up and down.
Preferably, if the output video effect is moves left and right, the scaling computing module is specifically used for, according to
According to the parameter in the specified region and the parameter of the output video, the formula for calculating scaling r is as follows:
R=(vw+fps*t)/w
Wherein, vw is the width of the output video, fps is the output frame per second of video, t be the output video when
Long, w is the width in the specified region, and vh is the height of the output video, and h is the height in the specified region.
Preferably, if the output video effect is moves left and right, the scaling computing module is specifically used for, according to
According to the parameter in the specified region and the parameter of the output video, the formula for calculating scaling r is as follows:
R=(vw+fps*t)/h
Wherein, vh be it is described output video height, fps be it is described output video frame per second, t be it is described output video when
Long, h is the height in the specified region, and vw is the width of the output video, and w is the width in the specified region.
Compared with prior art, the method and apparatus that a kind of picture provided in an embodiment of the present invention is converted to output video,
Under the premise of user's area-of-interest natural form is kept, user's area-of-interest is full of to the entire picture of output video,
Black surround need not be supplemented, shows the content element of user's area-of-interest in an optimal manner.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram for the method that a kind of picture provided in an embodiment of the present invention is converted to output video;
Fig. 2 is specified area schematic provided in an embodiment of the present invention;
Fig. 3 zooms in and out generation cut zone schematic diagram to be provided in an embodiment of the present invention according to scaling;
Fig. 4 is the structure diagram for the device that a kind of picture provided in an embodiment of the present invention is converted to output video.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work
Embodiment shall fall within the protection scope of the present invention.
Embodiment one
The embodiment of the present invention one provide a kind of picture be converted to output video method, as shown in Figure 1, can include with
Lower step:
Step S101 obtains the parameter in specified region and the parameter of output video, parameter and output according to specified region
The parameter of video determines output video effect.
In this step, specified region is the subregion that user intercepts on original image, as shown in Fig. 2, wherein 1 is
Original image, 2 be specified region.The parameter in specified region can include:It specifies the high h in region, the wide w in specified region and specifies
Coordinate (x, y) of the region in original image.The parameter of output video v can include:Duration t, width vw, high vh and frame per second fps.
Output video effect can be any one in moving left and right and moving up and down, parameter that can be according to specified region and output
The parameter of video runs following process to determine output video effect:
Scheme=a
Scheme=a
Scheme=a
else:
Scheme=b
In above-mentioned process, the output video for moving left and right effect can be generated if scheme=a;If scheme=b
The output video for moving up and down effect can then be generated.
Step S102, the parameter of parameter, output video and output video effect according to specified region, calculates pantograph ratio
Example.
In this step, if output video effect is moves left and right, parameter and output video according to specified region
Parameter is calculated shown in scaling r processes such as formula (1):
R=max ((vw+fps*t)/w, vh/h) (1)
Wherein, vw is the width for exporting video, and fps is the frame per second for exporting video, and t is the duration for exporting video, and w is specified area
The width in domain, vh are the height for exporting video, and h is the height in specified region;
If output video effect to move up and down, according to the parameter in specified region and the parameter of output video, calculates contracting
It puts shown in ratio r processes such as formula (2):
R=max ((vh+fps*t)/h, vw/w) (2)
Wherein, vh is the height for exporting video, and fps is the frame per second for exporting video, and t is the duration for exporting video, and h is specified area
The height in domain, vw are the width for exporting video, and w is the width in specified region.
Step S103 according to scaling, specified region is zoomed in and out, generates region to be split.
As shown in figure 3,2 be specified region, 3 be the cut zone that generation is zoomed in and out according to scaling r.
Step S104 divides region to be split, and output video is sequentially generated according to segmentation.
In this step, from left to right partitioning scheme and partitioning scheme from right to left, which can obtain, moves left and right effect
The output video of fruit.Partitioning scheme from top to bottom and partitioning scheme from the bottom to top, which can obtain, moves up and down the defeated of effect
Go out video.
The method that an a kind of picture provided is converted to output video through the embodiment of the present invention, keeping, user is interested
Under the premise of regional nature form, by user's area-of-interest full of the entire picture for exporting video, without supplementing black surround, with most
Excellent mode shows the content element of user's area-of-interest.
For clarity, an embodiment of the present invention provides partitioning scheme from left to right, partitioning scheme from right to left, by
Four kinds of image partitioning schemes of partitioning scheme under, partitioning scheme from the bottom to top.
Partitioning scheme from left to right is as follows:Respectively with (0,0), (1,0), (2,0) ... on region to be split
(fps*t-1,0) is top left corner apex, using vw and vh as wide and high interception picture c0, c1 ... cfps*t-1, by c0, c1 ...
Cfps*t-1 sequence combinations obtain output video v.Wherein, fps is the frame per second for exporting video, and t is the duration for exporting video, and vw is
The width of video is exported, vh is the height for exporting video.
Partitioning scheme from right to left is as follows:On region to be split respectively with (gw, 0), (gw-1,0), (gw-2,
0) ... (gw-fps*t+1,0) is top left corner apex, using vw and vh as wide and high interception picture c0, c1 ... cfps*t-1, will
C0, c1 ... cfps*t-1 sequence combinations obtain output video v.
Partitioning scheme from top to bottom is as follows:Respectively with (0,0), (0,1), (0,2) ... on region to be split
(0, fps*t-1) is top left corner apex, using vw and vh as wide and high interception picture c0, c1 ... cfps*t-1, by c0, c1 ...
Cfps*t-1 sequence combinations obtain output video v.
The partitioning scheme of partitioning scheme from the bottom to top is as follows:On region to be split respectively with (0, gw), (0,
Gw-1), (0, gw-2) ... (0, gw-fps*t+1) be top left corner apex, using vw and vh as wide and high interception picture c0,
C0, c1 ... cfps*t-1 sequence combinations are obtained output video v by c1 ... cfps*t-1.
Embodiment two
The embodiment of the present invention two provides the device that a kind of picture is converted to output video, can perform the embodiment of the present invention
The method that a kind of one picture provided is converted to output video, as shown in figure 4, the device can include with lower module:Output regards
Yupin effect determining module 41, scaling computing module 42, Zoom module 43 and output video generation module 44.
Video effect determining module 41 is exported, for obtaining the parameter in specified region and exporting the parameter of video, foundation refers to
Determine the parameter in region and the parameter of output video, determine output video effect;Scaling computing module 42, for according to specified
The parameter in region, the parameter for exporting video and output video effect, calculate scaling;Zoom module 43, for according to scaling
Ratio zooms in and out specified region, generates region to be split;Video generation module 44 is exported, for dividing region to be split,
Output video is sequentially generated according to segmentation.
In video effect determining module 41 is exported, specified region is the subregion that user intercepts on original image,
As shown in Fig. 2, wherein 1 is original image, 2 be specified region.The parameter in specified region can include:The high h in specified region, refer to
Determine the coordinate (x, y) of the wide w and specified region in region in original image.The parameter of output video v can include:Duration t, width
Vw, high vh and frame per second fps.Output video effect can be any one in moving left and right and moving up and down, can be according to referring to
Determine the parameter in region and the parameter of output video runs following process to determine output video effect:
Scheme=a
Scheme=a
Scheme=a
else:
Scheme=b
In above-mentioned process, the output video for moving left and right effect can be generated if scheme=a;If scheme=b
The output video for moving up and down effect can then be generated.
In scaling computing module 42, if output video effect is to move left and right, scaling computing module 42
It is specifically used for, according to the parameter in specified region and the parameter of output video, calculates shown in scaling r processes such as formula (1):
R=max ((vw+fps*t)/w, vh/h) (1)
Wherein, vw is the width for exporting video, and fps is the frame per second for exporting video, and t is the duration for exporting video, and w is specified area
The width in domain, vh are the height for exporting video, and h is the height in specified region;
If to move up and down, scaling computing module 42 is specifically used for output video effect, according to specified region
The parameter of parameter and output video is calculated shown in scaling r processes such as formula (2):
R=max ((vh+fps*t)/h, vw/w) (2)
Wherein, vh is the height for exporting video, and fps is the frame per second for exporting video, and t is the duration for exporting video, and h is specified area
The height in domain, vw are the width for exporting video, and w is the width in specified region.
In video generation module 44 is exported, partitioning scheme from left to right and partitioning scheme from right to left can obtain
The output video of effect must be moved left and right.Partitioning scheme from top to bottom and partitioning scheme from the bottom to top can obtain up and down
The output video of mobile effect.
A kind of two pictures provided are converted to the device of output video through the embodiment of the present invention, can keep user's sense
Under the premise of the natural form of interest region, user's area-of-interest is full of to the entire picture of output video, without supplementing black surround,
Show the content element of user's area-of-interest in an optimal manner.
Each embodiment in this specification is described by the way of progressive, the highlights of each of the examples are with
The difference of other embodiment, just to refer each other for identical similar part between each embodiment.
The method and apparatus for being converted to output video to a kind of picture provided by the present invention above, have carried out detailed Jie
It continues, specific case used herein is expounded the principle of the present invention and embodiment, and the explanation of above example is only
It is the method and its core concept for being used to help understand the present invention;Meanwhile for those of ordinary skill in the art, according to this hair
Bright thought, there will be changes in specific embodiments and applications, to sum up, the content of the present specification should not be construed as
Limitation of the present invention.
Claims (6)
1. a kind of method that picture is converted to output video, which is characterized in that including:
The parameter in specified region and the parameter of output video are obtained, parameter and the output video according to the specified region
Parameter determines output video effect;
The parameter of parameter, the output video according to the specified region and the output video effect, calculate scaling;
According to the scaling, the specified region is zoomed in and out, generates region to be split;
Divide the region to be split, the output video is sequentially generated according to segmentation;
Wherein, if the output video effect is moves left and right, the parameter according to the specified region, the output regard
The parameter of frequency and the output video effect, the formula for calculating scaling r are as follows:
R=max ((vw+fps*t)/w, vh/h)
Wherein, vw is the width of the output video, and fps is the frame per second of the output video, t is duration, the w for exporting video
For the width in the specified region, vh is the height of the output video, and h is the height in the specified region.
2. according to the method described in claim 1, it is characterized in that, the output video effect further includes:It moves up and down.
If 3. according to the method described in claim 2, it is characterized in that, the output video effect to move up and down, it is described
The parameter of parameter, the output video according to the specified region and the output video effect calculate the public affairs of scaling r
Formula is as follows:
R=max ((vh+fps*t)/h, vw/w)
Wherein, vh be it is described output video height, fps be it is described output video frame per second, t be it is described output video duration, h
For the height in the specified region, vw is the width of the output video, and w is the width in the specified region.
4. a kind of picture is converted to the device of output video, which is characterized in that including:
Video effect determining module is exported, for obtaining the parameter in specified region and exporting the parameter of video, according to described specified
The parameter of the parameter in region and the output video, determines output video effect;
Scaling computing module, for parameter, the parameter of the output video and the output according to the specified region
Video effect calculates scaling;
Zoom module, for according to the scaling, the specified region being zoomed in and out, generates region to be split;
Video generation module is exported, for dividing the region to be split, the output video is sequentially generated according to segmentation;
Wherein, if the output video effect is moves left and right, the scaling computing module is specifically used for, according to described in
The parameter of the parameter in specified region and the output video, the formula for calculating scaling r are as follows:
R=(vw+fps*t)/w
Wherein, vw is the width of the output video, and fps is the frame per second of the output video, t is duration, the w for exporting video
For the width in the specified region, vh is the height of the output video, and h is the height in the specified region.
5. device according to claim 4, which is characterized in that the output video effect further includes:It moves up and down.
6. device according to claim 5, which is characterized in that described if the output video effect is moves up and down
Scaling computing module is specifically used for, and according to the parameter in the specified region and the parameter of the output video, calculates scaling
The formula of ratio r is as follows:
R=(vh+fps*t)/h
Wherein, vh be it is described output video height, fps be it is described output video frame per second, t be it is described output video duration, h
For the height in the specified region, vw is the width of the output video, and w is the width in the specified region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510549941.5A CN105100641B (en) | 2015-08-31 | 2015-08-31 | The method and apparatus that a kind of picture is converted to output video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510549941.5A CN105100641B (en) | 2015-08-31 | 2015-08-31 | The method and apparatus that a kind of picture is converted to output video |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105100641A CN105100641A (en) | 2015-11-25 |
CN105100641B true CN105100641B (en) | 2018-06-19 |
Family
ID=54580079
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510549941.5A Active CN105100641B (en) | 2015-08-31 | 2015-08-31 | The method and apparatus that a kind of picture is converted to output video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105100641B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106780363B (en) | 2016-11-21 | 2019-07-23 | 北京金山安全软件有限公司 | Picture processing method and device and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007259193A (en) * | 2006-03-24 | 2007-10-04 | Matsushita Electric Ind Co Ltd | Video output apparatus, and method |
CN101242474A (en) * | 2007-02-09 | 2008-08-13 | 中国科学院计算技术研究所 | A dynamic video browse method for phone on small-size screen |
JP2010093452A (en) * | 2008-10-06 | 2010-04-22 | Toshiba Corp | Video server, signal conversion circuit and signal converting method |
WO2010090484A3 (en) * | 2009-02-09 | 2010-11-18 | 삼성전자 주식회사 | Video encoding method and apparatus using low-complexity frequency transformation, and video decoding method and apparatus |
CN104202661A (en) * | 2014-09-15 | 2014-12-10 | 厦门美图之家科技有限公司 | Automatic picture-to-video conversion method |
CN104796779A (en) * | 2015-03-25 | 2015-07-22 | 广东威创视讯科技股份有限公司 | Method and system for converting PPT into videos to be played |
-
2015
- 2015-08-31 CN CN201510549941.5A patent/CN105100641B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007259193A (en) * | 2006-03-24 | 2007-10-04 | Matsushita Electric Ind Co Ltd | Video output apparatus, and method |
CN101242474A (en) * | 2007-02-09 | 2008-08-13 | 中国科学院计算技术研究所 | A dynamic video browse method for phone on small-size screen |
JP2010093452A (en) * | 2008-10-06 | 2010-04-22 | Toshiba Corp | Video server, signal conversion circuit and signal converting method |
WO2010090484A3 (en) * | 2009-02-09 | 2010-11-18 | 삼성전자 주식회사 | Video encoding method and apparatus using low-complexity frequency transformation, and video decoding method and apparatus |
CN104202661A (en) * | 2014-09-15 | 2014-12-10 | 厦门美图之家科技有限公司 | Automatic picture-to-video conversion method |
CN104796779A (en) * | 2015-03-25 | 2015-07-22 | 广东威创视讯科技股份有限公司 | Method and system for converting PPT into videos to be played |
Also Published As
Publication number | Publication date |
---|---|
CN105100641A (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9299152B2 (en) | Systems and methods for image depth map generation | |
US8655055B2 (en) | Method, system and computer program product for converting a 2D image into a 3D image | |
EP3201879B1 (en) | Optimizing the legibility of displayed text | |
KR101775253B1 (en) | Real-time automatic conversion of 2-dimensional images or video to 3-dimensional stereo images or video | |
US7839422B2 (en) | Gradient-domain compositing | |
Lei et al. | Depth-preserving stereo image retargeting based on pixel fusion | |
US20150235408A1 (en) | Parallax Depth Rendering | |
WO2015070668A1 (en) | Image processing method and apparatus | |
US20220046183A1 (en) | High-speed video from camera arrays | |
WO2016107962A1 (en) | Improving focus in image and video capture using depth maps | |
CN107851302A (en) | Stable video | |
WO2013054462A1 (en) | User interface control device, user interface control method, computer program, and integrated circuit | |
CN104463873B (en) | A kind of image object method for relocating scaled based on local uniform | |
GB2523329A (en) | Method, apparatus and computer program product for image segmentation | |
Hu et al. | Hybrid shift map for video retargeting | |
CN106888333A (en) | A kind of image pickup method and device | |
CN106055299B (en) | The method of image Arbitrary Rotation is realized in multiple display equipment | |
CN102572305B (en) | Method of video image processing and system | |
CN105100641B (en) | The method and apparatus that a kind of picture is converted to output video | |
WO2017206824A1 (en) | Position information processing method and system for use in smart display of visual images | |
Liao et al. | Depth Map Design and Depth-based Effects With a Single Image. | |
RU2509377C2 (en) | Method and system for image viewing on display device | |
Li et al. | Region-based depth-preserving stereoscopic image retargeting | |
CN105163043B (en) | The method and apparatus that a kind of picture is converted to output video | |
CN104978712B (en) | Image processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |