CN105260985A - Video playing method and apparatus - Google Patents

Video playing method and apparatus Download PDF

Info

Publication number
CN105260985A
CN105260985A CN201510624158.0A CN201510624158A CN105260985A CN 105260985 A CN105260985 A CN 105260985A CN 201510624158 A CN201510624158 A CN 201510624158A CN 105260985 A CN105260985 A CN 105260985A
Authority
CN
China
Prior art keywords
curvature
correction
curve
pixel
vertical
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
Application number
CN201510624158.0A
Other languages
Chinese (zh)
Other versions
CN105260985B (en
Inventor
陈超
李国平
陆小龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201510624158.0A priority Critical patent/CN105260985B/en
Publication of CN105260985A publication Critical patent/CN105260985A/en
Application granted granted Critical
Publication of CN105260985B publication Critical patent/CN105260985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a video playing method and an apparatus, and relates to the technical field of image processing. The method includes: obtaining bitmap data DV of a target video frame shot by video shooting equipment of a preset type; correcting each pixel point in the bitmap data DV according to the preset pixel correction relation; and displaying the bitmap data after correction processing to users. By employing the scheme, videos shot by the video shooting equipment are displayed to the users, and the phenomenon of deformation of the bitmap data corresponding to the video frame displayed to the users can be reduced.

Description

A kind of video broadcasting method and device
Technical field
The present invention relates to technical field of image processing, particularly a kind of video broadcasting method and device.
Background technology
When user is by viewing live videos such as internets, usually wish that the scene domain of live video is the bigger the better, such as, when user watches live football match, almost wish the situation can seeing every nook and cranny in whole football pitch, like this for meeting the demand of user, live video provider often adopts wide angle cameras to take.
But, although employing wide angle cameras can photograph the video compared with large scene scope, but by the impact of the factors such as wide angle cameras camera lens visual range, take the video obtained and often there is deformation phenomenon, such as, " flake " phenomenon etc., and then affect user and normally watch, Consumer's Experience is poor.
Summary of the invention
The embodiment of the invention discloses a kind of video broadcasting method and device, with when showing the video captured by video capture equipment to user, alleviate the deformation phenomenon of data bitmap corresponding to shown frame of video.
For achieving the above object, the embodiment of the invention discloses a kind of video broadcasting method, described method comprises:
The video capture equipment obtaining preset kind takes the data bitmap D of the target video frame obtained v;
According to the pixel correction relation preset to institute bit-map data D vin each pixel correct;
The data bitmap after calibrated process is shown to user;
Wherein, described default pixel correction relation obtains in the following manner:
Video capture equipment according to preset kind carries out to the standard picture preset the video taking gained, obtains the data bitmap D of described default standard picture s, wherein, in described default standard picture, comprise at least one horizontal lines and/or at least one vertical marker line;
At institute bit-map data D sthe curve that the horizontal lines that the described default standard picture of middle detection comprises is corresponding and/or curve corresponding to vertical marker line;
The curve corresponding according to detected horizontal lines and/or curve corresponding to vertical marker line, determine institute bit-map data D scurvature after corresponding correction, wherein, after described correction, curvature comprises: curvature after curvature and/or vertical correction after level correction, after described level correction, curvature is the value that the curve corresponding according to the horizontal lines detected is determined, after described vertical correction, curvature is the value that the curve corresponding according to the vertical marker line detected is determined;
Obtain according to curvature after described correction institute bit-map data D seach pixel and institute bit-map data D in the data bitmap obtained after carrying out correction process sin corresponding relation between each pixel, be described default pixel correction relation, wherein, according to curvature after the level correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle horizontal lines is corresponding carries out correction process, according to curvature after the vertical correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle vertical marker line is corresponding carries out correction process.
In a kind of specific implementation of the present invention, the curve corresponding according to the vertical marker line detected determines a value, as curvature after vertical correction, comprising:
The initial curvature of the curve that the vertical marker line that acquisition detects is corresponding;
According to expression formula C+i* Δ C, determine the curvature correction curvature that the vertical marker line that detects is corresponding, wherein, C represents the initial curvature of the curve that detected arbitrary vertical marker line is corresponding, and Δ C represents curvature adjustment step-length, and i represents adjustment number of times;
According to determined correction curvature, correct detection to curve corresponding to vertical marker line until the horizontal ordinate of pixel after correcting on this curve meets default vertical direction straight line Rule of judgment, wherein, described default vertical direction straight line Rule of judgment is for judging whether the curve after correcting is similar to straight line vertically;
After correcting, meet the bent curvature of a curve of described default vertical direction straight line Rule of judgment, determine one of the curve that the vertical marker line that detects is corresponding correct after curvature as curvature after vertical correction.
In a kind of specific implementation of the present invention, described default vertical direction Rule of judgment, comprises at least one in following situation:
Judge whether the ratio on the number of the pixel that horizontal ordinate is equal on curve after correcting and this curve between the total number of pixel is greater than default ratio, if be greater than, then judges that this curve approximation is in straight line vertically;
Whether the difference between the horizontal ordinate judging predeterminated position pixel on the average of all pixel horizontal ordinates on curve after correcting and this curve is less than default difference, if be less than, then judges that this curve approximation is in straight line vertically;
Judge whether the variance of all pixel horizontal ordinates on curve after correcting is less than default numerical value, if be less than, then judges that this curve approximation is in straight line vertically.
In a kind of specific implementation of the present invention, the pixel correction relation that described basis is preset is to institute bit-map data D vin each pixel correct, comprising:
By institute bit-map data D vmap in three-dimensional system of coordinate by two-dimensional coordinate system;
Call default three-dimensional deformation process function, the pixel correction relation according to presetting corrects the data bitmap mapped in three-dimensional system of coordinate.
In a kind of specific implementation of the present invention, described video broadcasting method also comprises:
Receive the bitmap adjustment instruction for the data bitmap after calibrated process;
Describedly show the data bitmap after calibrated process to user, comprising:
According to described bitmap adjustment instruction, adjust the data bitmap after calibrated process;
The data bitmap after adjustment is shown to user.
In a kind of specific implementation of the present invention, describedly show the data bitmap after calibrated process to user, comprising:
The reproduction time length of the data bitmap after calibrated process is calculated according to the play frame rate preset;
The data bitmap after calibrated process is shown to user according to described reproduction time length.
For achieving the above object, the embodiment of the invention discloses a kind of video play device, described device comprises:
Data bitmap obtains module, and the video capture equipment for obtaining preset kind takes the data bitmap D of the target video frame obtained v;
Pixel correction module, for according to preset pixel correction relation to institute bit-map data D vin each pixel correct;
Data bitmap display module, for showing the data bitmap after calibrated process to user;
Correction relationship obtains module, for obtaining described default pixel correction relation;
Wherein, described correction relationship obtains module, comprising:
Data bitmap obtains submodule, carries out the video taking gained, obtain the data bitmap D of described default standard picture for the video capture equipment according to preset kind to the standard picture preset s, wherein, in described default standard picture, comprise at least one horizontal lines and/or at least one vertical marker line;
Curve detection submodule, at institute bit-map data D sthe curve that the horizontal lines that the described default standard picture of middle detection comprises is corresponding and/or curve corresponding to vertical marker line;
Curvature determination submodule after correcting, for according to curve corresponding to detected horizontal lines and/or curve corresponding to vertical marker line, determines institute bit-map data D scurvature after corresponding correction, wherein, after described correction, curvature comprises: curvature after curvature and/or vertical correction after level correction, after described level correction, curvature is the value that the curve corresponding according to the horizontal lines detected is determined, after described vertical correction, curvature is the value that the curve corresponding according to the vertical marker line detected is determined;
Corresponding relation obtains submodule, for obtaining according to curvature after described correction institute bit-map data D seach pixel and institute bit-map data D in the data bitmap obtained after carrying out correction process sin corresponding relation between each pixel, be described default pixel correction relation, wherein, according to curvature after the level correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle horizontal lines is corresponding carries out correction process, according to curvature after the vertical correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle vertical marker line is corresponding carries out correction process;
Curvature determination submodule after described correction, comprising: curvature determining unit after curvature determining unit and/or vertical correction after level correction;
Curvature determining unit after described level correction, for the value that the curve corresponding according to the horizontal lines detected is determined, as curvature after level correction;
Curvature determining unit after vertical correction, for the value that the curve corresponding according to the vertical marker line detected is determined, as curvature after vertical correction.
In a kind of specific implementation of the present invention, curvature determining unit after described vertical correction, comprising:
Initial curvature obtains subelement, for obtaining the initial curvature of curve corresponding to the vertical marker line that detects;
Curvature correction curvature determination subelement, for according to expression formula C+i* Δ C, determines the curvature correction curvature that the vertical marker line that detects is corresponding, wherein, C represents the initial curvature of the curve that detected arbitrary vertical marker line is corresponding, and Δ C represents curvature adjustment step-length, and i represents adjustment number of times;
Curvature correction unit, for according to determined correction curvature, correct detection to curve corresponding to vertical marker line until the horizontal ordinate of pixel after correcting on this curve meets default vertical direction straight line Rule of judgment, wherein, described default vertical direction straight line Rule of judgment is for judging whether the curve after correcting is similar to straight line vertically;
Curvature determining unit after vertical correction, for meeting the bent curvature of a curve of described default vertical direction straight line Rule of judgment after correcting, determine one of the curve that the vertical marker line that detects is corresponding correct after curvature as curvature after vertical correction.
In a kind of specific implementation of the present invention, described default vertical direction Rule of judgment, comprises at least one in following situation:
Judge whether the ratio on the number of the pixel that horizontal ordinate is equal on curve after correcting and this curve between the total number of pixel is greater than default ratio, if be greater than, then judges that this curve approximation is in straight line vertically;
Whether the difference between the horizontal ordinate judging predeterminated position pixel on the average of all pixel horizontal ordinates on curve after correcting and this curve is less than default difference, if be less than, then judges that this curve approximation is in straight line vertically;
Judge whether the variance of all pixel horizontal ordinates on curve after correcting is less than default numerical value, if be less than, then judges that this curve approximation is in straight line vertically.
In a kind of specific implementation of the present invention, described pixel correction module, comprising:
Data bitmap mapping submodule, for by institute bit-map data D vmap in three-dimensional system of coordinate by two-dimensional coordinate system;
Data bitmap syndrome module, for calling default three-dimensional deformation process function, the pixel correction relation according to presetting corrects the data bitmap mapped in three-dimensional system of coordinate.
In a kind of specific implementation of the present invention, described video play device also comprises:
Bitmap adjustment command reception module, for receiving the bitmap adjustment instruction of the data bitmap after for calibrated process;
Institute's bit-map data display module, comprising:
Data bitmap adjustment submodule, for according to described bitmap adjustment instruction, adjusts the data bitmap after calibrated process;
First data bitmap shows submodule, for showing the data bitmap after adjustment to user.
In a kind of specific implementation of the present invention, institute's bit-map data display module, comprising:
Reproduction time length computation submodule, for calculating the reproduction time length of the data bitmap after calibrated process according to the play frame rate preset;
Second diagram data shows submodule, for showing the data bitmap after calibrated process according to described reproduction time length to user.
As seen from the above, in the scheme that the embodiment of the present invention provides, after obtaining the data bitmap of the target video frame of the video capture equipment shooting of preset kind, according to above-mentioned default pixel correction relation, each pixel in obtained data bitmap is corrected, and show the data bitmap after calibrated process to user.Wherein, the pixel correction relation preset obtains according to the horizontal lines comprised in standard picture and/or vertical marker line and the inflection curves after shooting thereof, this pixel correction relation table understands the relation of the correspondence before and after horizontal lines and/or the linear change of vertical marker between pixel, therefore, after obtained data bitmap being corrected according to the pixel correction relation preset, the deformation phenomenon of obtained data bitmap can be alleviated.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 a is an original image to be captured;
Fig. 1 b is the image obtained after a shooting;
The schematic flow sheet of a kind of video broadcasting method that Fig. 2 provides for the embodiment of the present invention;
A kind of schematic flow sheet obtaining the method for pixel correction relation that Fig. 3 provides for the embodiment of the present invention;
A kind of data bitmap comprising the standard picture of horizontal lines and vertical marker line that Fig. 4 a provides for the embodiment of the present invention;
The data bitmap of the standard picture that a kind of shooting that Fig. 4 b provides for the embodiment of the present invention obtains;
Data bitmap after a kind of calibrated process that Fig. 4 c provides for the embodiment of the present invention;
Data bitmap after the calibrated process of another kind that Fig. 4 d provides for the embodiment of the present invention;
Data bitmap after another calibrated process that Fig. 4 e provides for the embodiment of the present invention;
The structural representation of a kind of video play device that Fig. 5 provides for the embodiment of the present invention;
A kind of structural representation obtaining the device of pixel correction relation that Fig. 6 provides for the embodiment of the present invention.
Embodiment
In practical application, increasing scene needs the video had with great visual angle, such as, in the on-the-spot broadcasting of program, match etc., in big game etc., in order to obtain the video that has with great visual angle, people adopt the video capture equipment with wide-angle lens to take usually, but, although adopt the video capture equipment shooting with wide-angle lens can obtain the video had with great visual angle, often there is serious deformation phenomenon in the video captured by it, affects the viewing effect of user.
Concrete, see Fig. 1 a, be an original image to be captured, Fig. 1 b is the image obtained after a shooting.
Wherein, Fig. 1 a is made up of the vertical bar of multiple different colours, adopts the video capture equipment with wide-angle lens to take the image that Fig. 1 a represents, obtains Fig. 1 b.Two width figure contrasts can be found out, for Fig. 1 a, Fig. 1 b there occurs serious deformation, and this deformation phenomenon is even more serious in the left and right sides of image.Therefore, when representing the video adopting the video capture equipment shooting with wide-angle lens to user, need correct to obtain preferably Consumer's Experience to the video captured by it.
In view of the foregoing, embodiments provide a kind of video broadcasting method and device, to correct the frame of video that there is deformation, represent visual effect preferably video to user.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The schematic flow sheet of a kind of video broadcasting method that Fig. 2 provides for the embodiment of the present invention, the method comprises:
S101: the video capture equipment obtaining preset kind takes the data bitmap D of the target video frame obtained v.
The video capture equipment of above-mentioned preset kind can be the aforementioned video capture equipment with wide-angle lens, also can be the video capture equipment of other types, the application does not limit this, all can be applied in the present embodiment as long as take the video capture equipment that may there is deformation in the frame of video of the video obtained.
Video capture equipment is taken the video obtained and can be applied in different application scenarioss, such as, in streaming media video etc., video captured in different application scenarioss can encapsulate according to no file layout, externally present different file layouts, such as, rtmp file layout, mp4 file layout, flv file layout etc.
When playing video, need resolve, obtain the data bitmap of each frame of video to the file of above-mentioned various different-format, right rear line shows each data bitmap of resolving and obtaining.
Suppose, the resolution of a frame of video is 352x288, then the data bitmap of this frame of video is the set of 352x288 pixel data message.
S102: according to the pixel correction relation preset to data bitmap D vin each pixel correct.
Understandable, under normal circumstances, once video capture equipment is fixed, deformation relationship that in video captured by it, each frame of video is corresponding is to be determined, so, timing is carried out to each frame of video in the video of a video capture equipment shooting, only needs to obtain the pixel correction relation that once this video capture equipment is corresponding in advance.
Concrete, for each video, the pixel correction relation that its video capture equipment is corresponding can exist in the file of the forms such as aforesaid rtmp, mp4, flv, also can store separately in one file, such as, in an independent text etc.
The method of the pixel correction relation preset of acquisition specifically can an embodiment shown in Figure 3, does not first describe in detail to this here.
S103: show the data bitmap after calibrated process to user.
Those skilled in the art are understandable that, the frame per second of video captured by video capture equipment may be identical with the frame per second of player plays video, also may not be identical, therefore, can not simply captured by video capture equipment the frame per second of video determine the displaying duration of the data bitmap that frame of video is corresponding, but need the displaying time being determined the data bitmap that this frame of video is corresponding by the frame per second of player plays video, Given this, in the optional implementation of one of the present invention, when showing the data bitmap after calibrated process to user, the reproduction time length of the data bitmap after calibrated process first can be calculated according to the play frame rate preset, and then show the data bitmap after calibrated process according to reproduction time length to user.
In addition, in prior art, in three-dimensional system of coordinate, carry out the technology comparative maturity of deformation process, so, according to the pixel correction relation preset to data bitmap D vin each pixel carry out timing, can first by data bitmap D vmapped in three-dimensional system of coordinate by two-dimensional coordinate system, and then call default three-dimensional deformation process function, the pixel correction relation according to presetting corrects the data bitmap mapped in three-dimensional system of coordinate.Existing three-dimensional deformation process function can be utilized like this to correct the data bitmap mapped in three-dimensional system of coordinate.
Well-known, GPU (GraphicsProcessingUnit, graphic process unit) has stronger parallel data processing ability, in practical application, by data bitmap D vwhen being mapped in three-dimensional system of coordinate by two-dimensional coordinate system, can be realized by GPU, to accelerate mapping efficiency.
User is in the process of viewing video, owing to needing to check the operations such as impact that other such as to apply at factor may need to reduce the video of normal play, amplification, therefore, in the optional implementation of one of the present invention, client can also receive the bitmap adjustment instruction of the data bitmap after for calibrated process, and this adjustment instruction can be instruction for amplifying data bitmap, for reducing the instruction of data bitmap, the instruction etc. for translational shifting diagram data.
When showing the data bitmap after calibrated process to user in this case, first according to bitmap adjustment instruction, the data bitmap after calibrated process can be adjusted, and then shows the data bitmap after adjustment to user.
Further; during the data bitmap of client after showing calibrated process to user; usually process can be played up to the data bitmap that will show; but; after client receives above-mentioned data bitmap adjustment instruction; owing to adjusting according to data bitmap, instruction adjusted position logarithmic data calculated amount is comparatively large, consumes resources is more; calculated amount and the resource requirement of playing up process are also more; so; first can not play up process to the data bitmap after above-mentioned calibrated process, to make the result of broadcast of client smooth.
Concrete, see Fig. 3, provide a kind of schematic flow sheet obtaining the method for pixel correction relation, the method comprises:
S201: the video capture equipment according to preset kind carries out to the standard picture preset the video taking gained, obtains the data bitmap D of the standard picture preset s.
It should be noted that, in above-mentioned default standard picture, comprise at least one horizontal lines and/or at least one vertical marker line.
The application does not limit the number of horizontal lines and vertical marker line, in addition, does not limit the distance between two horizontal lines yet, does not limit the distance between two vertical marker lines.
S202: at data bitmap D sthe curve that the horizontal lines that the standard picture that middle detection is preset comprises is corresponding and/or curve corresponding to vertical marker line.
S203: the curve corresponding according to detected horizontal lines and/or curve corresponding to vertical marker line, determines data bitmap D scurvature after corresponding correction.
Wherein, after above-mentioned correction, curvature comprises: curvature after curvature and/or vertical correction after level correction, after level correction, curvature is the value that the curve corresponding according to the horizontal lines detected is determined, after vertical correction, curvature is the value that the curve corresponding according to the vertical marker line detected is determined.
Bent curvature of a curve for representing the degree of crook of curve, for upper bit-map data D s; the bent curvature of a curve of the calibrated rear each bar of the curve that wherein horizontal lines is corresponding should be the same; and the curvature after correcting is close to horizontal curvature; the bent curvature of a curve of the calibrated rear each bar of the curve that vertical marker line is corresponding should be the same, and the curvature after correcting is close to vertical curvature of a curve.
Below for curvature after vertical correction, illustrate how according to curvature after curve determination vertical correction corresponding to the vertical marker line detected.
In a kind of specific implementation of the present invention, first can obtain the initial curvature of curve corresponding to the vertical marker line that detects, wherein, the initial curvature of the curve that each bar vertical marker line is corresponding may be equal, also may be unequal, such as, the bent curvature of a curve being in the vertical marker line of the left and right sides in image corresponding is relatively large, and between being in image, the bent curvature of a curve of position is relatively little; Then according to expression formula C+i* Δ C, determine the curvature correction curvature that the vertical marker line that detects is corresponding, wherein, C represents the initial curvature of the curve that detected arbitrary vertical marker line is corresponding, and Δ C represents curvature adjustment step-length, and i represents adjustment number of times; According to determined correction curvature, correct detection to curve corresponding to vertical marker line until the horizontal ordinate of pixel after correcting on this curve meets default vertical direction straight line Rule of judgment, wherein, the vertical direction straight line Rule of judgment preset is for judging whether the curve after correcting is similar to straight line vertically; Finally according to the bent curvature of a curve meeting the vertical direction straight line Rule of judgment preset after correcting, determine one of the curve that the vertical marker line that detects is corresponding correct after curvature as curvature after vertical correction.
It should be noted that, in practical application, for the curve that each the vertical marker line detected is corresponding, can repeat according to expression formula C+i* Δ C, determine the step of the curvature correction curvature that this vertical marker line is corresponding, and for curve corresponding to each the vertical marker line detected, when it meets the vertical direction straight line Rule of judgment preset after adjustment, corresponding adjustment number of times i may equal also may be unequal.
In addition, after adjustment, although the curve that each the vertical marker line detected is corresponding meets the vertical direction straight line Rule of judgment preset all, but the bent curvature of a curve of each bar may still not be completely equal after adjustment, in this case need to determine that a value is as curvature after the vertical correction of curve corresponding to the vertical marker line detected according to the bent curvature of a curve of bar each after adjustment.Concrete grammar can be, being calculated by averaging method, obtaining by getting maximum value process, obtaining etc. by getting minimum value method, the application does not limit this.
Concrete, the vertical direction Rule of judgment preset can comprise at least one in following situation:
Judge whether the ratio on the number of the pixel that horizontal ordinate is equal on curve after correcting and this curve between the total number of pixel is greater than default ratio, if be greater than, then judges that this curve approximation is in straight line vertically;
Whether the difference between the horizontal ordinate judging predeterminated position pixel on the average of all pixel horizontal ordinates on curve after correcting and this curve is less than default difference, if be less than, then judges that this curve approximation is in straight line vertically;
Judge whether the variance of all pixel horizontal ordinates on curve after correcting is less than default numerical value, if be less than, then judges that this curve approximation is in straight line vertically.
It should be noted that, the application is just described for above-mentioned, and the concrete manifestation form of the vertical direction Rule of judgment preset in practical application is not limited in above-mentioned several, can determine as the case may be in practical application.
Can determine that the method for curvature is similar after vertical correction to above-mentioned according to the method for curvature after the curve determination level correction that the horizontal lines detected is corresponding, difference is only, the curve that above-mentioned vertical marker line is corresponding is the curve that horizontal lines is corresponding, the vertical direction straight line Rule of judgment preset is default horizontal direction straight line Rule of judgment, therefore, repeat no more here.
S204: obtain according to curvature after correction data bitmap D seach pixel and data bitmap D in the data bitmap obtained after carrying out correction process sin corresponding relation between each pixel, be default pixel correction relation.
Wherein, according to curvature after the level correction that curvature after correction comprises, to data bitmap D sthe curve that middle horizontal lines is corresponding carries out correction process, according to curvature after the vertical correction that curvature after correction comprises, to data bitmap D sthe curve that middle vertical marker line is corresponding carries out correction process.
Be described below by the method for concrete legend to above-mentioned acquisition pixel correction relation.
See Fig. 4 a, provide a kind of data bitmap comprising the standard picture of horizontal lines and vertical marker line.
See Fig. 4 b, provide the data bitmap of the standard picture that a kind of shooting obtains.
See Fig. 4 c, provide the data bitmap after a kind of calibrated process.
See Fig. 4 d, provide the data bitmap after another kind of calibrated process.
See Fig. 4 e, provide the data bitmap after another calibrated process.
As can be seen from Fig. 4 c, Fig. 4 d and Fig. 4 e, more and more close to perpendicular line after the calibrated process of the curve that in image, vertical marker line is corresponding.
As seen from the above, in the scheme that each embodiment above-mentioned provides, after obtaining the data bitmap of the target video frame of the video capture equipment shooting of preset kind, according to above-mentioned default pixel correction relation, each pixel in obtained data bitmap is corrected, and show the data bitmap after calibrated process to user.Wherein, the pixel correction relation preset obtains according to the horizontal lines comprised in standard picture and/or vertical marker line and the inflection curves after shooting thereof, this pixel correction relation table understands the relation of the correspondence before and after horizontal lines and/or the linear change of vertical marker between pixel, therefore, after obtained data bitmap being corrected according to the pixel correction relation preset, the deformation phenomenon of obtained data bitmap can be alleviated.
Corresponding with above-mentioned video broadcasting method, the embodiment of the present invention additionally provides a kind of video play device.
The structural representation of a kind of video play device that Fig. 5 provides for the embodiment of the present invention, this device comprises:
Data bitmap obtains module 501, and the video capture equipment for obtaining preset kind takes the data bitmap D of the target video frame obtained v;
Pixel correction module 502, for according to preset pixel correction relation to institute bit-map data D vin each pixel correct;
Data bitmap display module 503, for showing the data bitmap after calibrated process to user;
Correction relationship obtains module 504, for obtaining described default pixel correction relation;
Wherein, see Fig. 6, provide a kind of structural representation obtaining the device of pixel correction relation, described correction relationship obtains module 504, comprising:
Data bitmap obtains submodule 5041, carries out the video taking gained, obtain the data bitmap D of described default standard picture for the video capture equipment according to preset kind to the standard picture preset s, wherein, in described default standard picture, comprise at least one horizontal lines and/or at least one vertical marker line;
Curve detection submodule 5042, at institute bit-map data D sthe curve that the horizontal lines that the described default standard picture of middle detection comprises is corresponding and/or curve corresponding to vertical marker line;
Curvature determination submodule 5043 after correcting, for according to curve corresponding to detected horizontal lines and/or curve corresponding to vertical marker line, determines institute bit-map data D scurvature after corresponding correction, wherein, after described correction, curvature comprises: curvature after curvature and/or vertical correction after level correction, after described level correction, curvature is the value that the curve corresponding according to the horizontal lines detected is determined, after described vertical correction, curvature is the value that the curve corresponding according to the vertical marker line detected is determined;
Corresponding relation obtains submodule 5044, for obtaining according to curvature after described correction institute bit-map data D seach pixel and institute bit-map data D in the data bitmap obtained after carrying out correction process sin corresponding relation between each pixel, be described default pixel correction relation, wherein, according to curvature after the level correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle horizontal lines is corresponding carries out correction process, according to curvature after the vertical correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle vertical marker line is corresponding carries out correction process;
Curvature determination submodule 5043 after described correction, comprising: curvature determining unit after curvature determining unit and/or vertical correction after level correction;
Curvature determining unit after described level correction, for the value that the curve corresponding according to the horizontal lines detected is determined, as curvature after level correction;
Curvature determining unit after vertical correction, for the value that the curve corresponding according to the vertical marker line detected is determined, as curvature after vertical correction.
Concrete, after described vertical correction, curvature determining unit can comprise:
Initial curvature obtains subelement, for obtaining the initial curvature of curve corresponding to the vertical marker line that detects;
Curvature correction curvature determination subelement, for according to expression formula C+i* Δ C, determines the curvature correction curvature that the vertical marker line that detects is corresponding, wherein, C represents the initial curvature of the curve that detected arbitrary vertical marker line is corresponding, and Δ C represents curvature adjustment step-length, and i represents adjustment number of times;
Curvature correction unit, for according to determined correction curvature, correct detection to curve corresponding to vertical marker line until the horizontal ordinate of pixel after correcting on this curve meets default vertical direction straight line Rule of judgment, wherein, described default vertical direction straight line Rule of judgment is for judging whether the curve after correcting is similar to straight line vertically;
Curvature determining unit after vertical correction, for meeting the bent curvature of a curve of described default vertical direction straight line Rule of judgment after correcting, determine one of the curve that the vertical marker line that detects is corresponding correct after curvature as curvature after vertical correction.
Concrete, described default vertical direction Rule of judgment can comprise at least one in following situation:
Judge whether the ratio on the number of the pixel that horizontal ordinate is equal on curve after correcting and this curve between the total number of pixel is greater than default ratio, if be greater than, then judges that this curve approximation is in straight line vertically;
Whether the difference between the horizontal ordinate judging predeterminated position pixel on the average of all pixel horizontal ordinates on curve after correcting and this curve is less than default difference, if be less than, then judges that this curve approximation is in straight line vertically;
Judge whether the variance of all pixel horizontal ordinates on curve after correcting is less than default numerical value, if be less than, then judges that this curve approximation is in straight line vertically.
Concrete, described pixel correction module 502 can comprise:
Data bitmap mapping submodule, for by institute bit-map data D vmap in three-dimensional system of coordinate by two-dimensional coordinate system;
Data bitmap syndrome module, for calling default three-dimensional deformation process function, the pixel correction relation according to presetting corrects the data bitmap mapped in three-dimensional system of coordinate.
Concrete, described video play device can also comprise:
Bitmap adjustment command reception module, for receiving the bitmap adjustment instruction of the data bitmap after for calibrated process;
Institute's bit-map data display module, comprising:
Data bitmap adjustment submodule, for according to described bitmap adjustment instruction, adjusts the data bitmap after calibrated process;
First data bitmap shows submodule, for showing the data bitmap after adjustment to user.
Concrete, institute's bit-map data display module 503 can comprise:
Reproduction time length computation submodule, for calculating the reproduction time length of the data bitmap after calibrated process according to the play frame rate preset;
Second diagram data shows submodule, for showing the data bitmap after calibrated process according to described reproduction time length to user.
As seen from the above, in the scheme that each embodiment above-mentioned provides, after obtaining the data bitmap of the target video frame of the video capture equipment shooting of preset kind, according to above-mentioned default pixel correction relation, each pixel in obtained data bitmap is corrected, and show the data bitmap after calibrated process to user.Wherein, the pixel correction relation preset obtains according to the horizontal lines comprised in standard picture and/or vertical marker line and the inflection curves after shooting thereof, this pixel correction relation table understands the relation of the correspondence before and after horizontal lines and/or the linear change of vertical marker between pixel, therefore, after obtained data bitmap being corrected according to the pixel correction relation preset, the deformation phenomenon of obtained data bitmap can be alleviated.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
One of ordinary skill in the art will appreciate that all or part of step realized in said method embodiment is that the hardware that can carry out instruction relevant by program has come, described program can be stored in computer read/write memory medium, here the alleged storage medium obtained, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (12)

1. a video broadcasting method, is characterized in that, described method comprises:
The video capture equipment obtaining preset kind takes the data bitmap D of the target video frame obtained v;
According to the pixel correction relation preset to institute bit-map data D vin each pixel correct;
The data bitmap after calibrated process is shown to user;
Wherein, described default pixel correction relation obtains in the following manner:
Video capture equipment according to preset kind carries out to the standard picture preset the video taking gained, obtains the data bitmap D of described default standard picture s, wherein, in described default standard picture, comprise at least one horizontal lines and/or at least one vertical marker line;
At institute bit-map data D sthe curve that the horizontal lines that the described default standard picture of middle detection comprises is corresponding and/or curve corresponding to vertical marker line;
The curve corresponding according to detected horizontal lines and/or curve corresponding to vertical marker line, determine institute bit-map data D scurvature after corresponding correction, wherein, after described correction, curvature comprises: curvature after curvature and/or vertical correction after level correction, after described level correction, curvature is the value that the curve corresponding according to the horizontal lines detected is determined, after described vertical correction, curvature is the value that the curve corresponding according to the vertical marker line detected is determined;
Obtain according to curvature after described correction institute bit-map data D seach pixel and institute bit-map data D in the data bitmap obtained after carrying out correction process sin corresponding relation between each pixel, be described default pixel correction relation, wherein, according to curvature after the level correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle horizontal lines is corresponding carries out correction process, according to curvature after the vertical correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle vertical marker line is corresponding carries out correction process.
2. method according to claim 1, is characterized in that, the curve corresponding according to the vertical marker line detected determines a value, as curvature after vertical correction, comprising:
The initial curvature of the curve that the vertical marker line that acquisition detects is corresponding;
According to expression formula C+i* Δ C, determine the curvature correction curvature that the vertical marker line that detects is corresponding, wherein, C represents the initial curvature of the curve that detected arbitrary vertical marker line is corresponding, and Δ C represents curvature adjustment step-length, and i represents adjustment number of times;
According to determined correction curvature, correct detection to curve corresponding to vertical marker line until the horizontal ordinate of pixel after correcting on this curve meets default vertical direction straight line Rule of judgment, wherein, described default vertical direction straight line Rule of judgment is for judging whether the curve after correcting is similar to straight line vertically;
After correcting, meet the bent curvature of a curve of described default vertical direction straight line Rule of judgment, determine one of the curve that the vertical marker line that detects is corresponding correct after curvature as curvature after vertical correction.
3. method according to claim 2, is characterized in that, described default vertical direction Rule of judgment, comprises at least one in following situation:
Judge whether the ratio on the number of the pixel that horizontal ordinate is equal on curve after correcting and this curve between the total number of pixel is greater than default ratio, if be greater than, then judges that this curve approximation is in straight line vertically;
Whether the difference between the horizontal ordinate judging predeterminated position pixel on the average of all pixel horizontal ordinates on curve after correcting and this curve is less than default difference, if be less than, then judges that this curve approximation is in straight line vertically;
Judge whether the variance of all pixel horizontal ordinates on curve after correcting is less than default numerical value, if be less than, then judges that this curve approximation is in straight line vertically.
4. the method according to any one of claim 1-3, is characterized in that, the pixel correction relation that described basis is preset is to institute bit-map data D vin each pixel correct, comprising:
By institute bit-map data D vmap in three-dimensional system of coordinate by two-dimensional coordinate system;
Call default three-dimensional deformation process function, the pixel correction relation according to presetting corrects the data bitmap mapped in three-dimensional system of coordinate.
5. the method according to any one of claim 1-3, is characterized in that, described method also comprises:
Receive the bitmap adjustment instruction for the data bitmap after calibrated process;
Describedly show the data bitmap after calibrated process to user, comprising:
According to described bitmap adjustment instruction, adjust the data bitmap after calibrated process;
The data bitmap after adjustment is shown to user.
6. the method according to any one of claim 1-3, is characterized in that, describedly shows the data bitmap after calibrated process to user, comprising:
The reproduction time length of the data bitmap after calibrated process is calculated according to the play frame rate preset;
The data bitmap after calibrated process is shown to user according to described reproduction time length.
7. a video play device, is characterized in that, described device comprises:
Data bitmap obtains module, and the video capture equipment for obtaining preset kind takes the data bitmap D of the target video frame obtained v;
Pixel correction module, for according to preset pixel correction relation to institute bit-map data D vin each pixel correct;
Data bitmap display module, for showing the data bitmap after calibrated process to user;
Correction relationship obtains module, for obtaining described default pixel correction relation;
Wherein, described correction relationship obtains module, comprising:
Data bitmap obtains submodule, carries out the video taking gained, obtain the data bitmap D of described default standard picture for the video capture equipment according to preset kind to the standard picture preset s, wherein, in described default standard picture, comprise at least one horizontal lines and/or at least one vertical marker line;
Curve detection submodule, at institute bit-map data D sthe curve that the horizontal lines that the described default standard picture of middle detection comprises is corresponding and/or curve corresponding to vertical marker line;
Curvature determination submodule after correcting, for according to curve corresponding to detected horizontal lines and/or curve corresponding to vertical marker line, determines institute bit-map data D scurvature after corresponding correction, wherein, after described correction, curvature comprises: curvature after curvature and/or vertical correction after level correction, after described level correction, curvature is the value that the curve corresponding according to the horizontal lines detected is determined, after described vertical correction, curvature is the value that the curve corresponding according to the vertical marker line detected is determined;
Corresponding relation obtains submodule, for obtaining according to curvature after described correction institute bit-map data D seach pixel and institute bit-map data D in the data bitmap obtained after carrying out correction process sin corresponding relation between each pixel, be described default pixel correction relation, wherein, according to curvature after the level correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle horizontal lines is corresponding carries out correction process, according to curvature after the vertical correction that curvature after described correction comprises, to institute bit-map data D sthe curve that middle vertical marker line is corresponding carries out correction process;
Curvature determination submodule after described correction, comprising: curvature determining unit after curvature determining unit and/or vertical correction after level correction;
Curvature determining unit after described level correction, for the value that the curve corresponding according to the horizontal lines detected is determined, as curvature after level correction;
Curvature determining unit after vertical correction, for the value that the curve corresponding according to the vertical marker line detected is determined, as curvature after vertical correction.
8. device according to claim 7, is characterized in that, curvature determining unit after described vertical correction, comprising:
Initial curvature obtains subelement, for obtaining the initial curvature of curve corresponding to the vertical marker line that detects;
Curvature correction curvature determination subelement, for according to expression formula C+i* Δ C, determines the curvature correction curvature that the vertical marker line that detects is corresponding, wherein, C represents the initial curvature of the curve that detected arbitrary vertical marker line is corresponding, and Δ C represents curvature adjustment step-length, and i represents adjustment number of times;
Curvature correction unit, for according to determined correction curvature, correct detection to curve corresponding to vertical marker line until the horizontal ordinate of pixel after correcting on this curve meets default vertical direction straight line Rule of judgment, wherein, described default vertical direction straight line Rule of judgment is for judging whether the curve after correcting is similar to straight line vertically;
Curvature determining unit after vertical correction, for meeting the bent curvature of a curve of described default vertical direction straight line Rule of judgment after correcting, determine one of the curve that the vertical marker line that detects is corresponding correct after curvature as curvature after vertical correction.
9. device according to claim 8, is characterized in that, described default vertical direction Rule of judgment, comprises at least one in following situation:
Judge whether the ratio on the number of the pixel that horizontal ordinate is equal on curve after correcting and this curve between the total number of pixel is greater than default ratio, if be greater than, then judges that this curve approximation is in straight line vertically;
Whether the difference between the horizontal ordinate judging predeterminated position pixel on the average of all pixel horizontal ordinates on curve after correcting and this curve is less than default difference, if be less than, then judges that this curve approximation is in straight line vertically;
Judge whether the variance of all pixel horizontal ordinates on curve after correcting is less than default numerical value, if be less than, then judges that this curve approximation is in straight line vertically.
10. the device according to any one of claim 7-9, is characterized in that, described pixel correction module, comprising:
Data bitmap mapping submodule, for by institute bit-map data D vmap in three-dimensional system of coordinate by two-dimensional coordinate system;
Data bitmap syndrome module, for calling default three-dimensional deformation process function, the pixel correction relation according to presetting corrects the data bitmap mapped in three-dimensional system of coordinate.
11. devices according to any one of claim 7-9, it is characterized in that, described device also comprises:
Bitmap adjustment command reception module, for receiving the bitmap adjustment instruction of the data bitmap after for calibrated process;
Institute's bit-map data display module, comprising:
Data bitmap adjustment submodule, for according to described bitmap adjustment instruction, adjusts the data bitmap after calibrated process;
First data bitmap shows submodule, for showing the data bitmap after adjustment to user.
12. devices according to any one of claim 7-9, it is characterized in that, institute's bit-map data display module, comprising:
Reproduction time length computation submodule, for calculating the reproduction time length of the data bitmap after calibrated process according to the play frame rate preset;
Second diagram data shows submodule, for showing the data bitmap after calibrated process according to described reproduction time length to user.
CN201510624158.0A 2015-09-25 2015-09-25 A kind of video broadcasting method and device Active CN105260985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510624158.0A CN105260985B (en) 2015-09-25 2015-09-25 A kind of video broadcasting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510624158.0A CN105260985B (en) 2015-09-25 2015-09-25 A kind of video broadcasting method and device

Publications (2)

Publication Number Publication Date
CN105260985A true CN105260985A (en) 2016-01-20
CN105260985B CN105260985B (en) 2019-08-09

Family

ID=55100660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510624158.0A Active CN105260985B (en) 2015-09-25 2015-09-25 A kind of video broadcasting method and device

Country Status (1)

Country Link
CN (1) CN105260985B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114902647A (en) * 2020-01-20 2022-08-12 日立安斯泰莫株式会社 Image correction device and image correction method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100208937A1 (en) * 2007-10-02 2010-08-19 Marcin Michal Kmiecik Method of capturing linear features along a reference-line across a surface for use in a map database
CN102801952A (en) * 2011-05-28 2012-11-28 华为终端有限公司 Method and device for adjusting video conference system
CN104616256A (en) * 2015-01-15 2015-05-13 桂林长海发展有限责任公司 Method and device for correcting barrel distortion of image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100208937A1 (en) * 2007-10-02 2010-08-19 Marcin Michal Kmiecik Method of capturing linear features along a reference-line across a surface for use in a map database
CN102801952A (en) * 2011-05-28 2012-11-28 华为终端有限公司 Method and device for adjusting video conference system
CN104616256A (en) * 2015-01-15 2015-05-13 桂林长海发展有限责任公司 Method and device for correcting barrel distortion of image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杨晶晶 等: ""一种基于几何性质的鱼眼图像校正算法"", 《计算机工程》 *
甄红涛 等: ""智能车摄像头图像畸变矫正的研究"", 《信息技术》 *
魏利胜 等: ""基于双经度模型的鱼眼图像畸变矫正方法"", 《仪器仪表学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114902647A (en) * 2020-01-20 2022-08-12 日立安斯泰莫株式会社 Image correction device and image correction method

Also Published As

Publication number Publication date
CN105260985B (en) 2019-08-09

Similar Documents

Publication Publication Date Title
EP3557845B1 (en) Method and device for transmitting panoramic videos, terminal, server and system
US10158846B2 (en) Pseudo-3d forced perspective methods and devices
US9369678B2 (en) Video streaming method and system
CN106162146B (en) The method and system of automatic identification and playing panoramic video
US9396519B2 (en) Content aware video resizing
EP2581900A2 (en) Image output apparatus and method for outputting image thereof
CN104869376B (en) Multi-image and multi-pixel level geometric correction method for video fusion
US10200672B2 (en) Methods and apparatus for capturing images of an environment
US11069322B2 (en) Display method and display device, visible light communication transmission method and device
CN104954715A (en) GPU (graphics processing unit) acceleration based video display method adopting multi-projector splicing fusion on special-shaped screens
CN102265607A (en) image scaling curve generation
CN103761315A (en) Method and system for displaying webpage content
CN105657396A (en) Video play processing method and device
CN104469178A (en) Image display method and electronic device
JP6224516B2 (en) Encoding method and encoding program
US20180220120A1 (en) Method and system for constructing view from multiple video streams
KR20180003590A (en) Generating images for stereoscopic image display without spectacles
US20120008871A1 (en) Image output device and method for outputting image using the same
CN105260985A (en) Video playing method and apparatus
CN108012160B (en) A kind of logo insertion method based on panoramic video
CN108022204A (en) A kind of method that cylinder panorama video is converted to spherical panoramic video
CN100498840C (en) Method of and scaling unit for scaling a three-dimensional model
US10306286B2 (en) Replacing content of a surface in video
CN105245933A (en) Screen display method and device
CN114071223B (en) Optical flow-based video plug-in frame generation method, storage medium and terminal equipment

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