CN105260985B - A kind of video broadcasting method and device - Google Patents
A kind of video broadcasting method and device Download PDFInfo
- Publication number
- CN105260985B CN105260985B CN201510624158.0A CN201510624158A CN105260985B CN 105260985 B CN105260985 B CN 105260985B CN 201510624158 A CN201510624158 A CN 201510624158A CN 105260985 B CN105260985 B CN 105260985B
- Authority
- CN
- China
- Prior art keywords
- correction
- curvature
- curve
- preset
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000012937 correction Methods 0.000 claims abstract description 220
- 238000012545 processing Methods 0.000 claims abstract description 35
- 239000003550 marker Substances 0.000 claims description 82
- 239000008186 active pharmaceutical agent Substances 0.000 claims description 35
- 238000010586 diagram Methods 0.000 claims description 11
- 238000001514 detection method Methods 0.000 claims description 9
- 238000013506 data mapping Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 230000000007 visual effect Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; 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 kind of video broadcasting method and devices, are related to technical field of image processing, wherein the described method includes: the bitmap data D for the target video frame that the video capture equipment for obtaining preset kind is shotV;According to preset pixel correction relationship to institute bit-map data DVIn each pixel be corrected;Calibrated treated bitmap data is shown to user.It can reduce the deformation phenomenon of the corresponding bitmap data of the video frame shown to user when showing video captured by video capture equipment to user using scheme provided in an embodiment of the present invention.
Description
Technical field
The present invention relates to technical field of image processing, in particular to a kind of video broadcasting method and device.
Background technique
When user watches live video by internet etc., it is often desirable that the scene domain of live video is the bigger the better, example
Such as, when user watches the football match of live streaming, the case where seeing every nook and cranny in entire football pitch is almost wanted to, is in this way
It meets the needs of users, live video provider often uses wide angle cameras to shoot.
However, although the video of larger scene domain can be taken using wide angle cameras, by wide angle cameras
Often there is deformation phenomenon in the influence of the factors such as camera lens visual range, the video shot, for example, " flake " phenomenon etc.
Deng, and then influence user and normally watch, user experience is poor.
Summary of the invention
The embodiment of the invention discloses a kind of video broadcasting method and devices, to show video capture equipment institute to user
When the video of shooting, mitigate the deformation phenomenon of the corresponding bitmap data of shown video frame.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of video broadcasting methods, which comprises
The bitmap data D for the target video frame that the video capture equipment of acquisition preset kind is shotV;
According to preset pixel correction relationship to institute bit-map data DVIn each pixel be corrected;
Calibrated treated bitmap data is shown to user;
Wherein, the preset pixel correction relationship obtains in the following manner:
Shoot resulting video to preset standard picture according to the video capture equipment of preset kind, described in acquisition
The bitmap data D of preset standard pictureS, wherein in the preset standard picture comprising at least one horizontal lines and/
Or at least one vertical marker line;
In institute bit-map data DSThe corresponding curve of horizontal lines that the middle detection preset standard picture includes and/
Or the corresponding curve of vertical marker line;
According to the detected corresponding curve of horizontal lines and/or the corresponding curve of vertical marker line, determine described in
Bitmap data DSCurvature after corresponding correction, wherein curvature includes: curvature and/or vertical school after level correction after the correction
Curvature after just, the value that the corresponding curve of the horizontal lines detected according to curvature after the level correction determines, institute
State the value that the corresponding curve of the vertical marker line detected after vertical correction according to curvature determines;
It obtains according to curvature after the correction to institute bit-map data DSIt is corrected in the bitmap data obtained after processing
Each pixel and institute bit-map data DSIn corresponding relationship between each pixel, the as described preset pixel correction closes
System, wherein according to curvature after the level correction for including in curvature after the correction, to institute bit-map data DSMiddle horizontal lines
Corresponding curve is corrected processing, according to curvature after the vertical correction for including in curvature after the correction, to the bitmap number
According to DSThe corresponding curve of middle vertical marker line is corrected processing.
In a specific embodiment of the present invention, one is determined according to the corresponding curve of vertical marker line detected
Value, as curvature after vertical correction, comprising:
Obtain the initial curvature of the corresponding curve of vertical marker line detected;
According to expression formula C+i* Δ C, the corresponding curvature correction curvature of the vertical marker line confirmly detected, wherein C is indicated
The initial curvature of the detected corresponding curve of any vertical marker line, Δ C indicate curvature adjusting step, and i indicates adjustment time
Number;
According to identified correction curvature, the corresponding curve of vertical marker line detected curve after correction is corrected
On the abscissa of pixel meet preset vertical direction straight line Rule of judgment, wherein the preset vertical direction straight line
Rule of judgment is used to judge whether the curve after correction to be similar to straight line vertically;
According to the bent curvature of a curve for meeting the preset vertical direction straight line Rule of judgment after correction, confirmly detect
Curvature is as curvature after vertical correction after one correction of the corresponding curve of vertical marker line.
In a specific embodiment of the present invention, the preset vertical direction Rule of judgment, including following situations
At least one of:
After judgement correction on curve on the number of the equal pixel of abscissa and the curve between pixel total number
Whether ratio is greater than preset ratio, if more than then determining the curve approximation in straight line vertically;
Judge the mean value and the horizontal seat of predeterminated position pixel on the curve of all pixels point abscissa on curve after correcting
Whether the difference between mark is less than preset difference, if being less than, determines the curve approximation in straight line vertically;
Judge whether the variance of all pixels point abscissa on curve after correcting is less than preset numerical value, if being less than, sentences
The fixed curve approximation is in straight line vertically.
In a specific embodiment of the present invention, it is described according to preset pixel correction relationship to institute's bit-map data
DVIn each pixel be corrected, comprising:
By institute bit-map data DVIt is mapped in three-dimensional system of coordinate by two-dimensional coordinate system;
Preset three-dimensional deformation processing function is called, according to preset pixel correction relationship to mapping in three-dimensional system of coordinate
Bitmap data be corrected.
In a specific embodiment of the present invention, the video broadcasting method further include:
Receive the bitmap adjustment instruction for calibrated treated bitmap data;
It is described to show calibrated treated bitmap data to user, comprising:
According to the bitmap adjustment instruction, calibrated treated bitmap data is adjusted;
Bitmap data adjusted is shown to user.
It is described to show calibrated treated bitmap data, packet to user in a specific embodiment of the present invention
It includes:
The play time length of calibrated treated bitmap data is calculated according to preset play frame rate;
Calibrated treated bitmap data is shown to user according to the play time length.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of video play device, described device includes:
Bitmap data obtains module, the target video frame that the video capture equipment for obtaining preset kind is shot
Bitmap data DV;
Pixel correction module is used for according to preset pixel correction relationship to institute bit-map data DVIn each pixel
Point is corrected;
Bitmap data display module, for showing calibrated treated bitmap data to user;
Correction relationship obtains module, for obtaining the preset pixel correction relationship;
Wherein, the correction relationship obtains module, comprising:
Bitmap data obtains submodule, for being carried out according to the video capture equipment of preset kind to preset standard picture
Resulting video is shot, the bitmap data D of the preset standard picture is obtainedS, wherein it is wrapped in the preset standard picture
Containing at least one horizontal lines and/or at least one vertical marker line;
Curve detection submodule, in institute bit-map data DSThe level that the middle detection preset standard picture includes
The corresponding curve of mark line and/or the corresponding curve of vertical marker line;
Curvature determines submodule after correction, for according to the detected corresponding curve of horizontal lines and/or vertically
The corresponding curve of mark line determines institute bit-map data DSCurvature after corresponding correction, wherein curvature includes: after the correction
Curvature, the horizontal lines detected according to curvature after the level correction after curvature and/or vertical correction after level correction
One of corresponding curve determination is worth, and the corresponding curve of vertical marker line detected according to curvature after the vertical correction is true
A fixed value;
Corresponding relationship obtains submodule, for obtaining according to curvature after the correction to institute bit-map data DSIt is corrected
Each pixel and institute bit-map data D in the bitmap data obtained after processingSIn corresponding relationship between each pixel, i.e.,
For the preset pixel correction relationship, wherein according to curvature after the level correction for including in curvature after the correction, to described
Bitmap data DSThe corresponding curve of middle horizontal lines is corrected processing, according to the vertical school for including in curvature after the correction
Curvature after just, to institute bit-map data DSThe corresponding curve of middle vertical marker line is corrected processing;
Curvature determines submodule after the correction, comprising: bent after curvature determination unit and/or vertical correction after level correction
Rate determination unit;
Curvature determination unit after the level correction, for what is determined according to the corresponding curve of the horizontal lines detected
One value, as curvature after level correction;
Curvature determination unit after vertical correction, one for being determined according to the corresponding curve of the vertical marker line detected
Value, as curvature after vertical correction.
In a specific embodiment of the present invention, curvature determination unit after the vertical correction, comprising:
Initial curvature obtains subelement, for obtaining the initial curvature of the corresponding curve of vertical marker line detected;
Curvature correction curvature determines subelement, is used for according to expression formula C+i* Δ C, the vertical marker line pair confirmly detected
The curvature correction curvature answered, wherein C indicates the initial curvature of the detected corresponding curve of any vertical marker line, Δ C table
Show curvature adjusting step, i indicates adjustment number;
Curvature correction unit, for correcting the corresponding song of vertical marker line detected according to identified correction curvature
Line is until the abscissa of the pixel after correction on the curve meets preset vertical direction straight line Rule of judgment, wherein described
Preset vertical direction straight line Rule of judgment is used to judge whether the curve after correction to be similar to straight line vertically;
Curvature determination unit after vertical correction, for judging item according to meeting the preset vertical direction straight line after correction
The bent curvature of a curve of part, after curvature is as vertical correction after a correction of the corresponding curve of vertical marker line confirmly detected
Curvature.
In a specific embodiment of the present invention, the preset vertical direction Rule of judgment, including following situations
At least one of:
After judgement correction on curve on the number of the equal pixel of abscissa and the curve between pixel total number
Whether ratio is greater than preset ratio, if more than then determining the curve approximation in straight line vertically;
Judge the mean value and the horizontal seat of predeterminated position pixel on the curve of all pixels point abscissa on curve after correcting
Whether the difference between mark is less than preset difference, if being less than, determines the curve approximation in straight line vertically;
Judge whether the variance of all pixels point abscissa on curve after correcting is less than preset numerical value, if being less than, sentences
The fixed curve approximation is in straight line vertically.
In a specific embodiment of the present invention, the pixel correction module, comprising:
Bitmap data mapping submodule is used for institute bit-map data DVThree-dimensional system of coordinate is mapped to by two-dimensional coordinate system
In;
Bitmap data correction module, for calling preset three-dimensional deformation processing function, according to preset pixel correction
Relationship is corrected the bitmap data mapped in three-dimensional system of coordinate.
In a specific embodiment of the present invention, the video play device further include:
Bitmap adjustment instruction receiving module is directed to the bitmap adjustment of calibrated treated bitmap data and refers to for receiving
It enables;
Institute's bit-map data display module, comprising:
Bitmap data adjusting submodule, for according to the bitmap adjustment instruction, adjusting calibrated treated bitmap number
According to;
First bitmap data shows submodule, for showing bitmap data adjusted to user.
In a specific embodiment of the present invention, institute's bit-map data display module, comprising:
Play time length computation submodule, for calculating calibrated treated bitmap number according to preset play frame rate
According to play time length;
Second bitmap data shows submodule, after showing calibrated processing to user according to the play time length
Bitmap data.
As seen from the above, in scheme provided in an embodiment of the present invention, the video capture equipment shooting of preset kind is obtained
After the bitmap data of target video frame, according to above-mentioned preset pixel correction relationship to each picture in bitmap data obtained
Vegetarian refreshments is corrected, and shows calibrated treated bitmap data to user.Wherein, preset pixel correction relationship is basis
The horizontal lines and/or vertical marker line and its inflection curves after shooting for including in standard picture obtain, the pixel
Correction relationship shows the corresponding relationship between horizontal lines and/or the linear change front and back pixel of vertical marker, therefore, root
After being corrected according to preset pixel correction relationship to bitmap data obtained, the deformation of obtained bitmap data can reduce
Phenomenon.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical 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
It obtains other drawings based on these drawings.
Fig. 1 a is an original image to be captured;
The image that Fig. 1 b is obtained after shooting for one;
Fig. 2 is a kind of flow diagram of video broadcasting method provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of method for obtaining pixel correction relationship provided in an embodiment of the present invention;
Fig. 4 a is a kind of position of the standard picture comprising horizontal lines and vertical marker line provided in an embodiment of the present invention
Diagram data;
Fig. 4 b is a kind of bitmap data for shooting obtained standard picture provided in an embodiment of the present invention;
Fig. 4 c is calibrated treated the bitmap data of one kind provided in an embodiment of the present invention;
Fig. 4 d is calibrated treated the bitmap data of another kind provided in an embodiment of the present invention;
Fig. 4 e is another calibrated treated bitmap data provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of video play device provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of device for obtaining pixel correction relationship provided in an embodiment of the present invention.
Specific embodiment
In practical application, the video that more and more scenes need to have big visual angle, for example, the scene of program, match etc.
In live streaming, in big game etc., there is the video at big visual angle in order to obtain, people generally use the video with wide-angle lens
Capture apparatus is shot, although however, can obtain having big view using the video capture equipment shooting with wide-angle lens
The video at angle, but often there is serious deformation phenomenon in the video captured by it, influence the viewing effect of user.
Specifically, being an original image to be captured, the image that Fig. 1 b is obtained after shooting for one referring to Fig. 1 a.
Wherein, Fig. 1 a is made of the vertical bar of multiple and different colors, using the video capture equipment with wide-angle lens to figure
The image that 1a is showed is shot, and Fig. 1 b is obtained.The comparison of two width figures is as can be seen that Fig. 1 b has occurred sternly for Fig. 1 a
Deformation again, this deformation phenomenon are even more serious in the left and right sides of image.Therefore, show to use to user and there is wide-angle lens
When the video of video capture equipment shooting, the video captured by it need to be corrected to obtain preferable user experience.
In view of the foregoing, the embodiment of the invention provides a kind of video broadcasting method and devices, to there are deformation
Video frame is corrected, and shows the preferable video of visual effect to user.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Fig. 2 is a kind of flow diagram of video broadcasting method provided in an embodiment of the present invention, this method comprises:
S101: the bitmap data D for the target video frame that the video capture equipment of preset kind is shot is obtainedV。
The video capture equipment of above-mentioned preset kind can be the aforementioned video capture equipment with wide-angle lens, can also
To be other kinds of video capture equipment, the application is defined not to this, as long as the video for the video that shooting obtains
The video capture equipment that may have deformation in frame can be applied in the present embodiment.
The video that video capture equipment is shot can be applied in different application scenarios, for example, streaming media video
In etc., captured video can be packaged according to unused file format in different application scenarios, externally be presented
Different file format, for example, rtmp file format, mp4 file format, flv file format etc..
When playing video, the file of above-mentioned various different-formats need to be parsed, obtain the bitmap of each video frame
Data, right rear line show each bitmap data that parsing obtains.
It is assumed that the resolution ratio of a video frame is 352x288, then the bitmap data of the video frame is 352x288 pixel
The set of point data information.
S102: according to preset pixel correction relationship to bitmap data DVIn each pixel be corrected.
It should be understood that under normal conditions, once video capture equipment is fixed, captured by video in each video frame
Corresponding deformation relationship is determining, so, school is carried out to each video frame in the video of video capture equipment shooting
Timing need to only obtain the corresponding pixel correction relationship of the primary video capture equipment in advance.
Specifically, for each video, before the corresponding pixel correction relationship of video capture equipment may exist
It in the file of the formats such as rtmp, mp4, the flv stated, can also be stored separately in a file, for example, an individual text
In file etc..
A kind of method of the preset pixel correction relationship specifically obtained may refer to embodiment illustrated in fig. 3, here first
It describes in detail not to this.
S103: calibrated treated bitmap data is shown to user.
Those skilled in the art are it is understood that the frame per second of video captured by video capture equipment is broadcast with player
The frame per second for putting video may be identical, it is also possible to and it is not identical, it is thus impossible to the simply video according to captured by video capture equipment
Frame per second determines the displaying duration of the corresponding bitmap data of a video frame, but needs the frame per second by player plays video true
The displaying time of the fixed corresponding bitmap data of the video frame, in consideration of it, in a kind of optional implementation of the invention, to user
When showing calibrated treated bitmap data, calibrated treated bitmap number first can be calculated according to preset play frame rate
According to play time length, then show calibrated treated bitmap data to user according still further to play time length.
In addition, in the prior art, the technology of deformation process comparative maturity is carried out in three-dimensional system of coordinate, so, root
According to preset pixel correction relationship to bitmap data DVIn each pixel when being corrected, can be first by bitmap data DVBy
Two-dimensional coordinate system maps in three-dimensional system of coordinate, preset three-dimensional deformation processing function is then recalled, according to preset pixel
Correction relationship is corrected the bitmap data mapped in three-dimensional system of coordinate.It can use existing three-dimensional deformation processing in this way
Function is corrected the bitmap data mapped in three-dimensional system of coordinate.
It is well known that GPU (Graphics Processing Unit, graphics processor) has stronger data parallel
Processing capacity, in practical application, by bitmap data DVWhen being mapped in three-dimensional system of coordinate by two-dimensional coordinate system, GPU can be passed through
It realizes, to accelerate mapping efficiency.
User is during watching video, due to needing to check that the influence of the factors such as other application may be needed to normal
The video of broadcasting such as is reduced, is amplified at the operation, and therefore, in a kind of optional implementation of the invention, client can be with
The bitmap adjustment instruction for calibrated treated bitmap data is received, which can be for amplifying bitmap data
Instruction, the instruction for reducing bitmap data, the instruction for translating bitmap data etc..
When showing calibrated treated bitmap data to user in this case, can first according to bitmap adjustment instruction,
Calibrated treated bitmap data is adjusted, then shows bitmap data adjusted to user again.
Further, client is when showing calibrated treated bitmap data to user, it will usually to what is shown
Bitmap data carries out rendering processing, still, after client receives above-mentioned bitmap data adjustment instruction, due to according to bitmap
Data point reuse instruction adjustment digit data calculation amount is larger, it is more to expend resource, renders the calculation amount and required resource of processing
Also more, so, can first not to it is above-mentioned it is calibrated treated that bitmap data carries out rendering processing so that client is broadcast
Put effect smoothness.
Specifically, providing a kind of flow diagram of method for obtaining pixel correction relationship, this method packet referring to Fig. 3
It includes:
S201: preset standard picture is carried out to shoot resulting video according to the video capture equipment of preset kind, is obtained
Obtain the bitmap data D of preset standard pictureS。
It should be noted that including at least one horizontal lines and/or at least one in above-mentioned preset standard picture
Vertical marker line.
The application does not limit the item number of horizontal lines and vertical marker line, in addition, not limiting two horizontal lines yet
The distance between, the distance between two vertical marker lines are not limited.
S202: in bitmap data DSThe corresponding curve of horizontal lines that the preset standard picture of middle detection includes and/or
The corresponding curve of vertical marker line.
S203: it according to the detected corresponding curve of horizontal lines and/or the corresponding curve of vertical marker line, determines
Bitmap data DSCurvature after corresponding correction.
Wherein, curvature includes: curvature after curvature and/or vertical correction after level correction after above-mentioned correction, after level correction
The value that the corresponding curve of the horizontal lines detected according to curvature determines is detected according to curvature after vertical correction
A value determining of the corresponding curve of vertical marker line.
Bent curvature of a curve is used to indicate the bending degree of curve, for upper bit-map data DSFor, wherein level marks
Each item song curvature of a curve should be the same after the corresponding curve of line is calibrated, and the curvature after correcting is close to horizontal song
Rate, each item song curvature of a curve should be the same after the corresponding curve of vertical marker line is calibrated, and the curvature after correction is close
In vertical curvature of a curve.
Below by taking curvature after vertical correction as an example, illustrate how to be determined according to the corresponding curve of the vertical marker line detected
Curvature after vertical correction.
In a specific embodiment of the present invention, the corresponding curve of vertical marker line detected can be first obtained
Initial curvature, wherein the initial curvature of the corresponding curve of each vertical marker line may be equal, it is also possible to it is unequal, for example, place
The corresponding bent curvature of a curve of the vertical marker line of the left and right sides is relatively large in image, and is in the song of position between in image
Curvature of a curve is relatively small;Then according to expression formula C+i* Δ C, the corresponding curvature correction of the vertical marker line confirmly detected is bent
Rate, wherein C indicates that the initial curvature of the detected corresponding curve of any vertical marker line, Δ C indicate curvature adjustment step
Long, i indicates adjustment number;According to identified correction curvature, the corresponding curve of vertical marker line detected is corrected until school
Just the abscissa of the pixel on the curve meets preset vertical direction straight line Rule of judgment afterwards, wherein preset Vertical Square
It is used to judge whether the curve after correction to be similar to straight line vertically to straight line Rule of judgment;Finally according to full after correction
The bent curvature of a curve of the preset vertical direction straight line Rule of judgment of foot, the one of the corresponding curve of vertical marker line confirmly detected
Curvature is as curvature after vertical correction after a correction.
It should be noted that in practical application, it, can for the corresponding curve of each vertical marker line detected
To repeat according to expression formula C+i* Δ C, the step of determining the vertical marker line corresponding curvature correction curvature, and for inspection
For the corresponding curve of each vertical marker line measured, preset vertical direction straight line is met after its is adjusted and judges item
When part, corresponding adjustment number i possibility is equal may also be unequal.
In addition, although the corresponding curve of each vertical marker line detected is full foot preset vertical after adjusted
Histogram to straight line Rule of judgment, but after adjusting each item song curvature of a curve may still not be it is essentially equal, need in this case
Vertical school of the value as the corresponding curve of vertical marker line detected is determined according to item song curvature of a curve each after adjustment
Curvature after just.Specific method can be, and is calculated by averaging method, is obtained, by being maximized method by being minimized method
Obtain etc., the application is defined not to this.
Specifically, preset vertical direction Rule of judgment may include at least one of following situations:
After judgement correction on curve on the number of the equal pixel of abscissa and the curve between pixel total number
Whether ratio is greater than preset ratio, if more than then determining the curve approximation in straight line vertically;
Judge the mean value and the horizontal seat of predeterminated position pixel on the curve of all pixels point abscissa on curve after correcting
Whether the difference between mark is less than preset difference, if being less than, determines the curve approximation in straight line vertically;
Judge whether the variance of all pixels point abscissa on curve after correcting is less than preset numerical value, if being less than, sentences
The fixed curve approximation is in straight line vertically.
It should be noted that the application is only illustrated for above-mentioned, preset vertical direction is sentenced in practical application
The specific manifestation form of broken strip part is not limited in above-mentioned several, can be determined as the case may be in practical application.
According to the corresponding curve of the horizontal lines detected determine curvature after level correction method can with it is above-mentioned really
The method for determining curvature after vertical correction is similar, and difference is only that, the corresponding curve of above-mentioned vertical marker line is horizontal lines pair
The curve answered, preset vertical direction straight line Rule of judgment are preset horizontal direction straight line Rule of judgment, therefore, here no longer
It repeats.
S204: it obtains according to curvature after correction to bitmap data DSIt is corrected each in the bitmap data obtained after processing
Pixel and bitmap data DSIn corresponding relationship between each pixel, as preset pixel correction relationship.
Wherein, according to curvature after the level correction for including in curvature after correction, to bitmap data DSMiddle horizontal lines pair
The curve answered is corrected processing, according to curvature after the vertical correction for including in curvature after correction, to bitmap data DSIn it is vertical
The corresponding curve of mark line is corrected processing.
It is illustrated below by method of the specific legend to above-mentioned acquisition pixel correction relationship.
A referring to fig. 4 provides a kind of bitmap data of standard picture comprising horizontal lines and vertical marker line.
B referring to fig. 4 provides a kind of bitmap data of standard picture for shooting and obtaining.
C referring to fig. 4 provides a kind of calibrated treated bitmap data.
D referring to fig. 4 provides another calibrated treated bitmap data.
E referring to fig. 4 provides another calibrated treated bitmap data.
It is got over after the calibrated processing of the corresponding curve of vertical marker line from can be seen that in Fig. 4 c, Fig. 4 d and Fig. 4 e in image
Come closer to vertical line.
As seen from the above, in the scheme that above-mentioned each embodiment provides, the video capture equipment shooting of preset kind is obtained
Target video frame bitmap data after, according to above-mentioned preset pixel correction relationship to each in bitmap data obtained
Pixel is corrected, and shows calibrated treated bitmap data to user.Wherein, preset pixel correction relationship is root
It is obtained according to the horizontal lines and/or vertical marker line and its inflection curves after shooting that include in standard picture, the picture
Plain correction relationship shows the corresponding relationship between horizontal lines and/or the linear change front and back pixel of vertical marker, therefore,
After being corrected according to preset pixel correction relationship to bitmap data obtained, the shape of obtained bitmap data can reduce
Cash as.
Corresponding with above-mentioned video broadcasting method, the embodiment of the invention also provides a kind of video play devices.
Fig. 5 is a kind of structural schematic diagram of video play device provided in an embodiment of the present invention, which includes:
Bitmap data obtains module 501, the target video that the video capture equipment for obtaining preset kind is shot
The bitmap data D of frameV;
Pixel correction module 502 is used for according to preset pixel correction relationship to institute bit-map data DVIn it is each
Pixel is corrected;
Bitmap data display module 503, for showing calibrated treated bitmap data to user;
Correction relationship obtains module 504, for obtaining the preset pixel correction relationship;
Wherein, referring to Fig. 6, a kind of structural schematic diagram of device for obtaining pixel correction relationship is provided, the correction is closed
System obtains module 504, comprising:
Bitmap data obtains submodule 5041, for the video capture equipment according to preset kind to preset standard picture
It carries out shooting resulting video, obtains the bitmap data D of the preset standard pictureS, wherein the preset standard picture
In include at least one horizontal lines and/or at least one vertical marker line;
Curve detection submodule 5042, in institute bit-map data DSThe middle detection preset standard picture includes
The corresponding curve of horizontal lines and/or the corresponding curve of vertical marker line;
Curvature determines submodule 5043 after correction, for according to the detected corresponding curve of horizontal lines and/or
The corresponding curve of vertical marker line determines institute bit-map data DSCurvature after corresponding correction, wherein curvature packet after the correction
It includes: curvature, the level marks detected according to curvature after the level correction after curvature and/or vertical correction after level correction
One of the corresponding curve determination of line is worth, the corresponding curve of vertical marker line detected according to curvature after the vertical correction
A determining value;
Corresponding relationship obtains submodule 5044, for obtaining according to curvature after the correction to institute bit-map data DSIt carries out
Each pixel and institute bit-map data D in the bitmap data obtained after correction processSIn corresponding between each pixel close
System, the as described preset pixel correction relationship, wherein according to curvature after the level correction for including in curvature after the correction,
To institute bit-map data DSThe corresponding curve of middle horizontal lines is corrected processing, includes according in curvature after the correction
Curvature after vertical correction, to institute bit-map data DSThe corresponding curve of middle vertical marker line is corrected processing;
Curvature determines submodule 5043 after the correction, comprising: curvature determination unit and/or vertical correction after level correction
Curvature determination unit afterwards;
Curvature determination unit after the level correction, for what is determined according to the corresponding curve of the horizontal lines detected
One value, as curvature after level correction;
Curvature determination unit after vertical correction, one for being determined according to the corresponding curve of the vertical marker line detected
Value, as curvature after vertical correction.
Specifically, curvature determination unit may include: after the vertical correction
Initial curvature obtains subelement, for obtaining the initial curvature of the corresponding curve of vertical marker line detected;
Curvature correction curvature determines subelement, is used for according to expression formula C+i* Δ C, the vertical marker line pair confirmly detected
The curvature correction curvature answered, wherein C indicates the initial curvature of the detected corresponding curve of any vertical marker line, Δ C table
Show curvature adjusting step, i indicates adjustment number;
Curvature correction unit, for correcting the corresponding song of vertical marker line detected according to identified correction curvature
Line is until the abscissa of the pixel after correction on the curve meets preset vertical direction straight line Rule of judgment, wherein described
Preset vertical direction straight line Rule of judgment is used to judge whether the curve after correction to be similar to straight line vertically;
Curvature determination unit after vertical correction, for judging item according to meeting the preset vertical direction straight line after correction
The bent curvature of a curve of part, after curvature is as vertical correction after a correction of the corresponding curve of vertical marker line confirmly detected
Curvature.
Specifically, the preset vertical direction Rule of judgment may include at least one of following situations:
After judgement correction on curve on the number of the equal pixel of abscissa and the curve between pixel total number
Whether ratio is greater than preset ratio, if more than then determining the curve approximation in straight line vertically;
Judge the mean value and the horizontal seat of predeterminated position pixel on the curve of all pixels point abscissa on curve after correcting
Whether the difference between mark is less than preset difference, if being less than, determines the curve approximation in straight line vertically;
Judge whether the variance of all pixels point abscissa on curve after correcting is less than preset numerical value, if being less than, sentences
The fixed curve approximation is in straight line vertically.
Specifically, the pixel correction module 502 may include:
Bitmap data mapping submodule is used for institute bit-map data DVThree-dimensional system of coordinate is mapped to by two-dimensional coordinate system
In;
Bitmap data correction module, for calling preset three-dimensional deformation processing function, according to preset pixel correction
Relationship is corrected the bitmap data mapped in three-dimensional system of coordinate.
Specifically, the video play device can also include:
Bitmap adjustment instruction receiving module is directed to the bitmap adjustment of calibrated treated bitmap data and refers to for receiving
It enables;
Institute's bit-map data display module, comprising:
Bitmap data adjusting submodule, for according to the bitmap adjustment instruction, adjusting calibrated treated bitmap number
According to;
First bitmap data shows submodule, for showing bitmap data adjusted to user.
Specifically, institute's bit-map data display module 503 may include:
Play time length computation submodule, for calculating calibrated treated bitmap number according to preset play frame rate
According to play time length;
Second bitmap data shows submodule, after showing calibrated processing to user according to the play time length
Bitmap data.
As seen from the above, in the scheme that above-mentioned each embodiment provides, the video capture equipment shooting of preset kind is obtained
Target video frame bitmap data after, according to above-mentioned preset pixel correction relationship to each in bitmap data obtained
Pixel is corrected, and shows calibrated treated bitmap data to user.Wherein, preset pixel correction relationship is root
It is obtained according to the horizontal lines and/or vertical marker line and its inflection curves after shooting that include in standard picture, the picture
Plain correction relationship shows the corresponding relationship between horizontal lines and/or the linear change front and back pixel of vertical marker, therefore,
After being corrected according to preset pixel correction relationship to bitmap data obtained, the shape of obtained bitmap data can reduce
Cash as.
For device embodiment, since it is substantially similar to the method embodiment, related so being described relatively simple
Place illustrates referring to the part of embodiment of the method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Those of ordinary skill in the art will appreciate that all or part of the steps in realization above method embodiment is can
It is completed with instructing relevant hardware by program, the program can store in computer-readable storage medium,
The storage medium designated herein obtained, such as: ROM/RAM, magnetic disk, CD.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of video broadcasting method, which is characterized in that the described method includes:
The bitmap data D for the target video frame that the video capture equipment of acquisition preset kind is shotV;
According to preset pixel correction relationship to institute bit-map data DVIn each pixel be corrected;
Calibrated treated bitmap data is shown to user;
Wherein, the preset pixel correction relationship obtains in the following manner:
Preset standard picture is carried out according to the video capture equipment of preset kind to shoot resulting video, is obtained described default
Standard picture bitmap data DS, wherein comprising at least one horizontal lines and/or extremely in the preset standard picture
A few vertical marker line;
In institute bit-map data DSThe corresponding curve of horizontal lines and/or hang down that the middle detection preset standard picture includes
The corresponding curve of straight mark line;
According to the detected corresponding curve of horizontal lines and/or the corresponding curve of vertical marker line, the bitmap is determined
Data DSCurvature after corresponding correction, wherein curvature includes: after level correction after curvature and/or vertical correction after the correction
Curvature, the value that the corresponding curve of the horizontal lines detected according to curvature after the level correction determines are described to hang down
The value that the corresponding curve of vertical marker line detected according to curvature after straight correction determines;
It obtains according to curvature after the correction to institute bit-map data DSIt is corrected each picture in the bitmap data obtained after processing
Vegetarian refreshments and institute bit-map data DSIn corresponding relationship between each pixel, the as described preset pixel correction relationship,
In, according to curvature after the level correction for including in curvature after the correction, to institute bit-map data DSMiddle horizontal lines are corresponding
Curve be corrected processing, according to curvature after the vertical correction for including in curvature after the correction, to institute bit-map data DS
The corresponding curve of middle vertical marker line is corrected processing;
A value is determined according to the corresponding curve of vertical marker line detected, as curvature after vertical correction, comprising:
Obtain the initial curvature of the corresponding curve of vertical marker line detected;
According to expression formula C+i* Δ C, the corresponding curvature correction curvature of the vertical marker line confirmly detected, wherein C expression is examined
The initial curvature of the corresponding curve of any vertical marker line measured, Δ C indicate curvature adjusting step, and i indicates adjustment number;
According to identified correction curvature, the corresponding curve of vertical marker line detected is corrected until after correction on the curve
The abscissa of pixel meets preset vertical direction straight line Rule of judgment, wherein the preset vertical direction straight line judgement
Condition is used to judge whether the curve after correction to be similar to straight line vertically;
According to the bent curvature of a curve for meeting the preset vertical direction straight line Rule of judgment after correction, what is confirmly detected is vertical
Curvature is as curvature after vertical correction after one correction of the corresponding curve of mark line.
2. the method according to claim 1, wherein the preset vertical direction Rule of judgment, including it is following
At least one of situation:
Ratio after judgement correction on curve on the number of the equal pixel of abscissa and the curve between pixel total number
Whether preset ratio is greater than, if more than then determining the curve approximation in straight line vertically;
After judgement correction on curve on the mean value of all pixels point abscissa and the curve predeterminated position pixel abscissa it
Between difference whether be less than preset difference, if being less than, determine the curve approximation in straight line vertically;Or,
Judge whether the variance of all pixels point abscissa on curve after correcting is less than preset numerical value, if being less than, determining should
Curve approximation is in straight line vertically.
3. method described in any one of -2 according to claim 1, which is characterized in that described according to preset pixel correction relationship
To institute bit-map data DVIn each pixel be corrected, comprising:
By institute bit-map data DVIt is mapped in three-dimensional system of coordinate by two-dimensional coordinate system;
Preset three-dimensional deformation processing function is called, according to preset pixel correction relationship to mapping to the position in three-dimensional system of coordinate
Diagram data is corrected.
4. method described in any one of -2 according to claim 1, which is characterized in that the method also includes:
Receive the bitmap adjustment instruction for calibrated treated bitmap data;
It is described to show calibrated treated bitmap data to user, comprising:
According to the bitmap adjustment instruction, calibrated treated bitmap data is adjusted;
Bitmap data adjusted is shown to user.
5. method described in any one of -2 according to claim 1, which is characterized in that after the calibrated processing to user's displaying
Bitmap data, comprising:
The play time length of calibrated treated bitmap data is calculated according to preset play frame rate;
Calibrated treated bitmap data is shown to user according to the play time length.
6. a kind of video play device, which is characterized in that described device includes:
Bitmap data obtains module, the bitmap for the target video frame that the video capture equipment for obtaining preset kind is shot
Data DV;
Pixel correction module is used for according to preset pixel correction relationship to institute bit-map data DVIn each pixel click through
Row correction;
Bitmap data display module, for showing calibrated treated bitmap data to user;
Correction relationship obtains module, for obtaining the preset pixel correction relationship;
Wherein, the correction relationship obtains module, comprising:
Bitmap data obtains submodule, for being shot according to the video capture equipment of preset kind to preset standard picture
Resulting video obtains the bitmap data D of the preset standard pictureS, wherein comprising extremely in the preset standard picture
Few horizontal lines and/or at least one vertical marker line;
Curve detection submodule, in institute bit-map data DSThe level marks that the middle detection preset standard picture includes
The corresponding curve of line and/or the corresponding curve of vertical marker line;
Curvature determines submodule after correction, for according to the detected corresponding curve of horizontal lines and/or vertical marker
The corresponding curve of line determines institute bit-map data DSCurvature after corresponding correction, wherein curvature includes: level after the correction
Curvature after curvature and/or vertical correction, the horizontal lines detected according to curvature after the level correction are corresponding after correction
A value determining of curve, the corresponding curve of the vertical marker line detected after the vertical correction according to curvature determines
One value;
Corresponding relationship obtains submodule, for obtaining according to curvature after the correction to institute bit-map data DSIt is corrected processing
Each pixel and institute bit-map data D in the bitmap data obtained afterwardsSIn corresponding relationship between each pixel, as institute
State preset pixel correction relationship, wherein according to curvature after the level correction for including in curvature after the correction, to the bitmap
Data DSThe corresponding curve of middle horizontal lines is corrected processing, after the vertical correction for including in curvature after the correction
Curvature, to institute bit-map data DSThe corresponding curve of middle vertical marker line is corrected processing;
Curvature determines submodule after the correction, comprising: curvature is true after curvature determination unit and/or vertical correction after level correction
Order member;
Curvature determination unit after the level correction, one for being determined according to the corresponding curve of the horizontal lines detected
Value, as curvature after level correction;
Curvature determination unit after vertical correction, a value for being determined according to the corresponding curve of the vertical marker line detected,
As curvature after vertical correction;
Curvature determination unit after the vertical correction, comprising:
Initial curvature obtains subelement, for obtaining the initial curvature of the corresponding curve of vertical marker line detected;
Curvature correction curvature determines subelement, for according to expression formula C+i* Δ C, the vertical marker line confirmly detected to be corresponding
Curvature correction curvature, wherein C indicates that the initial curvature of the detected corresponding curve of any vertical marker line, Δ C indicate bent
Rate adjusting step, i indicate adjustment number;
Curvature correction unit, for it is straight to correct the corresponding curve of vertical marker line detected according to identified correction curvature
The abscissa of pixel after to correction on the curve meets preset vertical direction straight line Rule of judgment, wherein described default
Vertical direction straight line Rule of judgment be used to judge to correct after curve whether be similar to straight line vertically;
Curvature determination unit after vertical correction, for according to meeting the preset vertical direction straight line Rule of judgment after correction
Bent curvature of a curve, curvature is as bent after vertical correction after a correction of the corresponding curve of vertical marker line confirmly detected
Rate.
7. device according to claim 6, which is characterized in that the preset vertical direction Rule of judgment, including it is following
At least one of situation:
Ratio after judgement correction on curve on the number of the equal pixel of abscissa and the curve between pixel total number
Whether preset ratio is greater than, if more than then determining the curve approximation in straight line vertically;
After judgement correction on curve on the mean value of all pixels point abscissa and the curve predeterminated position pixel abscissa it
Between difference whether be less than preset difference, if being less than, determine the curve approximation in straight line vertically;Or,
Judge whether the variance of all pixels point abscissa on curve after correcting is less than preset numerical value, if being less than, determining should
Curve approximation is in straight line vertically.
8. the device according to any one of claim 6-7, which is characterized in that the pixel correction module, comprising:
Bitmap data mapping submodule is used for institute bit-map data DVIt is mapped in three-dimensional system of coordinate by two-dimensional coordinate system;
Bitmap data correction module, for calling preset three-dimensional deformation processing function, according to preset pixel correction relationship
The bitmap data mapped in three-dimensional system of coordinate is corrected.
9. the device according to any one of claim 6-7, which is characterized in that described device further include:
Bitmap adjustment instruction receiving module, for receiving the bitmap adjustment instruction for being directed to calibrated treated bitmap data;
Institute's bit-map data display module, comprising:
Bitmap data adjusting submodule, for according to the bitmap adjustment instruction, adjusting calibrated treated bitmap data;
First bitmap data shows submodule, for showing bitmap data adjusted to user.
10. the device according to any one of claim 6-7, which is characterized in that institute's bit-map data display module, packet
It includes:
Play time length computation submodule, for calculating calibrated treated bitmap data according to preset play frame rate
Play time length;
Second bitmap data shows submodule, for showing calibrated treated position to user according to the play time length
Diagram data.
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 CN105260985A (en) | 2016-01-20 |
CN105260985B true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7321947B2 (en) * | 2020-01-20 | 2023-08-07 | 日立Astemo株式会社 | Image correction device and image correction method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2007359782A1 (en) * | 2007-10-02 | 2009-04-09 | Tele Atlas B.V. | Method of capturing linear features along a reference-line across a surface for use in a map database |
CN102801952B (en) * | 2011-05-28 | 2015-01-21 | 华为终端有限公司 | Method and device for adjusting video conference system |
CN104616256B (en) * | 2015-01-15 | 2018-01-09 | 桂林长海发展有限责任公司 | A kind of correction chart is as the method and device of barrel-shaped distortion |
-
2015
- 2015-09-25 CN CN201510624158.0A patent/CN105260985B/en active Active
Non-Patent Citations (1)
Title |
---|
"智能车摄像头图像畸变矫正的研究";甄红涛 等;《信息技术》;20110131(第1期);第52-55页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105260985A (en) | 2016-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9277207B2 (en) | Image processing apparatus, image processing method, and program for generating multi-view point image | |
US8218855B2 (en) | Method and apparatus for receiving multiview camera parameters for stereoscopic image, and method and apparatus for transmitting multiview camera parameters for stereoscopic image | |
US8953931B2 (en) | Video processor, video processing method, integrated circuit for video processing, video playback device | |
KR20170127505A (en) | Methods and apparatus for performing environmental measurements and / or using these measurements in 3D image rendering | |
KR101650702B1 (en) | Creation of depth maps from images | |
US20030038892A1 (en) | Enhancing broadcast of an event with synthetic scene using a depth map | |
US8704843B2 (en) | Image processing apparatus and image processing method | |
US8509521B2 (en) | Method and apparatus and computer program for generating a 3 dimensional image from a 2 dimensional image | |
CN102474644A (en) | Three-dimensional image display system, disparity conversion device, disparity conversion method, and program | |
CN106020758B (en) | A kind of screen splice displaying system and method | |
US8947534B2 (en) | System and method for providing depth imaging | |
US10200672B2 (en) | Methods and apparatus for capturing images of an environment | |
CN105898138A (en) | Panoramic video play method and device | |
CN105430471B (en) | The display methods and device of barrage in a kind of video | |
JP2007189357A (en) | Device and method for distributing arbitrary-viewpoint video | |
CN103761315A (en) | Method and system for displaying webpage content | |
CN113038268A (en) | Plane advertisement implanting method and device | |
EP2405394A2 (en) | Image output device and method for outputting image using the same | |
RU2707726C2 (en) | Image generation for autostereoscopic display | |
CN105260985B (en) | A kind of video broadcasting method and device | |
Lee et al. | Stereoscopic watermarking by horizontal noise mean shifting | |
JP5931062B2 (en) | Stereoscopic image processing apparatus, stereoscopic image processing method, and program | |
US10887573B1 (en) | System for processing 2D content for 3D viewing | |
EP3493541A3 (en) | Selecting an omnidirectional image for display | |
CN106412562A (en) | Method and system for displaying stereoscopic content in three-dimensional scene |
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 |