CN103369205B - Mobile terminal and method of video image processing - Google Patents
Mobile terminal and method of video image processing Download PDFInfo
- Publication number
- CN103369205B CN103369205B CN201210081917.XA CN201210081917A CN103369205B CN 103369205 B CN103369205 B CN 103369205B CN 201210081917 A CN201210081917 A CN 201210081917A CN 103369205 B CN103369205 B CN 103369205B
- Authority
- CN
- China
- Prior art keywords
- black
- region
- detection
- black surround
- rectangular area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
The invention provides a kind of mobile terminal, including: detector unit, take midpoint respectively on four limits of frame picture, point midway on each limit is towards on the path direction of the position of centre of gravity of frame picture, pixel on detection path direction one by one, and when receiving stopping detection signal, stop detection;Judging unit, it is judged that whether pixel is black, if not black, then stops detection signal to detector unit feedback;Black surround determines unit, obtain the stopping detection position of detector unit, by every point midway on one side of frame picture and the corresponding distance stopped between detection position, as the width with the most corresponding every rectangular area, the length of corresponding edge is as the length of rectangular area, and using rectangular area as black surround;Processing unit, according to the rectangular area detected, removes the black surround in frame picture.According to technical scheme, it is possible to high efficient detection goes out the true black surround of video, and processes black surround, shows according to video real picture as far as possible.
Description
Technical field
The present invention relates to communication technical field, in particular to mobile terminal and Computer Vision
Method.
Background technology
Existing video playback great majority all do not account for remove video black surround (namely film cropping) or
Video black surround is made relevant treatment by person, the most original according to the current one in relevant treatment mode
The picture that the content reproduction black surround planted agent of video signal pictures shows, is believing with Letter box converting video
Number displaying ratio time, reach eliminate black surround effect.Another way is from received video
Data determine the picture frame needing to carry out detecting;Take the view data of image given area, examine line by line
Look into frame data, when finding to there is non-completely black row and the junction of completely black row or detect in picture
Between position time stop, it is judged that whether given area is black surround, then remove black surround.
In first kind of way, so-called black surround is can not to be full of play area after video proportionally scales to lead
Causing the black surround occurred, which uses the initial data in video that these regions are filled with approximation
Color so that do not have any black surround during viewing.But which does not accounts in video original image
Black surround, institute may cause a certain opposite side black surround to disappear in this way, and another opposite side yet suffers from black surround
Problem, affects result of broadcast.
Although what the second way processed is the black surround in video original image, but which uses line by line
Scanning, checks the point the most all black of color value of this row, when finding to there is non-completely black row with complete
The junction of black row or stop when the centre position of picture being detected, uses the meansigma methods of repeated detection
Size as final black surround.It is clear that use progressive scan so that this processing method efficiency is relatively
Relatively low.Secondly, typically in a video, the black surround size of every frame picture is just as all the time,
The black surround not havinging a certain picture is very big, and another picture black borders is the least, if the result of detection is
So, then meaning that more that picture of black surround is likely to the picture of night scene etc, it is black
Territory, zone is more, now averages and does not certainly meet truth, is easily caused testing result and loses
Effect, after removing black surround, the part image data of video may be lost or yet suffer from affecting visual experience
Black surround.
Accordingly, it would be desirable to a kind of video image processing technology, the black surround of video can be gone out also with high efficient detection
Accurately remove, it is possible to obtain preferable video display effect.
Summary of the invention
In view of above-mentioned background technology, a technical problem to be solved by this invention is to provide a kind of shifting
Dynamic terminal, another technical problem to be solved by this invention is to provide a kind of Computer Vision side
Method, it is possible to high efficient detection goes out the true black surround of video, and processes black surround, basis as far as possible
Video real picture shows.
The invention provides a kind of mobile terminal, including: detector unit, on four limits of frame picture respectively
Take midpoint, the point midway on each limit towards on the path direction of the position of centre of gravity of described frame picture, by
One detects the pixel on described path direction, and when receiving stopping detection signal, stops inspection
Survey;Judging unit, is connected to described detector unit, it is judged that whether described pixel is black, if not
For black, then detect signal to described stopping of described detector unit feedback, and determine unit to black surround
Feedback determines signal;Described black surround determines unit, is connected to described detector unit and described judgement list
Unit, when receiving described feedback signal, obtains the stopping detection position of described detector unit, by described
Every point midway on one side of frame picture and corresponding stopping detect the distance between position, as with often
The width of rectangular area corresponding on one side, the length of corresponding edge as the length of described rectangular area, and
Using described rectangular area as black surround;Processing unit, according to the described rectangular area detected, removes
Black surround in described frame picture.
This technical scheme can apply the displaying ratio in video pictures ratio Yu the broadcasting pictures of display screen
Inconsistent and video pictures exists the scene of black surround, starts to detect frame from the midpoint on four limits of frame picture
The black surround of picture, until detecting it is not black pixel point, so can obtain this frame picture
The width of black surround (there may be four black rectangle regions, if the black picture that both sides detect relatively
The number of vegetarian refreshments is different, then take the minima width as relative black surround), play this video it
Before, a few frame can be extracted from video, detect the black of every frame picture according to above-mentioned processing method
Limit, takes the minima final width as black surround, and removes all black of video with this final width
Limit.
Such detection method efficiency is high, and the black surround detected is relatively accurate, meets actual play effect
Really.
In technique scheme, it is preferable that described detector unit is additionally operable to use two points of detection methods to enter
One step detects width and the length of black region in described rectangular area, using described black region as institute
State black surround.
Although starting to detect the detection method efficiency of black pixel point number relatively from four midpoints, limit of frame picture
Height, but it cannot be guaranteed that the pixel of every a line or every string is entirely black pixel point, therefore, adopt
Above-mentioned testing result is revised further, to obtain black region more accurately by two points of detection methods.
In technique scheme, it is preferable that it is single that described detector unit may include that son is chosen at midpoint
Unit, takes the midpoint of the broadside of described rectangular area, and the straight line at place, described midpoint is by described rectangular area
Being divided into two regions, described straight line is parallel with the long limit of described rectangular area;Region to be detected determines
Subelement, when described judging unit judges that the pixel on described straight line is all black, will be close to
The region of described position of centre of gravity is defined as region to be detected, judges described straight line at described judging unit
On pixel when being not all black, the region on the long limit that will be close to described rectangular area is defined as to be checked
Survey region;Described midpoint is chosen subelement and is continued to take the midpoint of the broadside in described region to be detected, described
Region to be detected determines that subelement determines new region to be detected, at the width in described new region to be detected
When degree is less than or equal to the first setting value, described black surround determines the unit width by described new region to be detected
The point midway on limit to the distance of the corresponding edge of described frame picture as the width of described black surround.
Described above is the concrete Cleaning Principle of two points of detection methods, carry out two for each rectangular area
Go-on-go is surveyed, in a row or in a column simply by the presence of non-black pixel, then will redefine black
The boundary line in territory, zone (black surround).
In technique scheme, it is preferable that described detector unit is additionally operable to the length at described black surround
On direction, choose detection of straight lines, described detection of straight lines and described frame picture with the interval of the second setting value
Corresponding edge vertical, described judging unit determines whether whether there is non-black in described detection of straight lines
Pixel, if exist, then to described black surround determine unit feedback amendment signal;Described black surround determines
Unit is additionally operable to when receiving described amendment signal, by the pixel of described non-black and corresponding edge it
Between distance as the width of described black surround.
For each rectangular area, in addition it is also necessary to verify that the above-mentioned two points of detection methods of employing determine further black
Territory, zone is the most correct, with the second setting value on the direction in detection direction being perpendicular to two points of detection methods
Spacing distance detect the most all black of the pixel in the direction, if it is not, explanation inspection
Survey wrong, if it is, explanation detection is correct.
It should be understood that this second setting value is the least, then accuracy of detection is the most accurate.And equally exist
Video is extracted out multiple frame pictures, detects the size of black surround in the manner described above, choose minimum black
Region is as the final black surround of all videos.
In technique scheme, it is preferable that described judging unit is additionally operable to judge described frame picture
Displaying ratio is the most consistent with the displaying ratio of display, if inconsistent, then anti-to described detector unit
Feedback enabling signal, to start described detector unit;Described mobile terminal also includes: unit for scaling, even
It is connected to the display of described mobile terminal, according to the displaying ratio of the display frame picture to removing black surround
Zoom in and out process.
Namely when the displaying ratio of frame picture and the displaying ratio of display are inconsistent, just use root
According to technical scheme, the video after black surround processes correspondingly is scaled, to obtain
Optimal display result.
Present invention also offers a kind of method of video image processing, including: step 402, at frame picture
Four limits take midpoint respectively, the point midway on each limit is towards the path of the position of centre of gravity of described frame picture
On direction, detect the pixel on described path direction one by one;Step 404, it is judged that described pixel
Whether it is black, if not black, then stops detection, by every position, midpoint of described frame picture
Put and the corresponding distance stopped between detection position, as the width with the most corresponding rectangular area
Degree, the length of corresponding edge is as the length of described rectangular area, and using described rectangular area as black
Limit;Step 406, according to the described rectangular area detected, removes the black surround in described frame picture.
This technical scheme can apply the displaying ratio in video pictures ratio Yu the broadcasting pictures of display screen
Inconsistent and video pictures exists the scene of black surround, starts to detect frame from the midpoint on four limits of frame picture
The black surround of picture, until detecting it is not black pixel point, so can obtain this frame picture
The width of black surround (there may be four black rectangle regions, if the black picture that both sides detect relatively
The number of vegetarian refreshments is different, then take the minima width as relative black surround), play this video it
Before, a few frame can be extracted from video, detect the black of every frame picture according to above-mentioned processing method
Limit, takes the minima final width as black surround, and removes all black of video with this final width
Limit.
Such detection method efficiency is high, and the black surround detected is relatively accurate, meets actual play effect
Really.
In technique scheme, it is preferable that between described step 404 and described step 406 also
Including: use two points of detection methods to detect width and the length of black region in described rectangular area further
Degree, using described black region as described black surround.
Although starting to detect the detection method of black pixel point number, efficiency from four midpoints, limit of frame picture
Higher, but it cannot be guaranteed that the pixel of every a line or every string is entirely black pixel point, therefore,
Two points of detection methods are used to revise above-mentioned testing result further, to obtain black region more accurately
Territory.
In technique scheme, it is preferable that take the midpoint of the broadside of described rectangular area, described in
Described rectangular area is divided into two regions, described straight line and described rectangular area by the straight line at some place
Long limit parallel;When the pixel judged on described straight line is all black, will be close to described center of gravity
The region of position is defined as region to be detected, is not all black at the pixel judged on described straight line
Time, the region on the long limit that will be close to described rectangular area is defined as region to be detected;Treat described in continuing to take
The midpoint of the broadside in detection region, determines new region to be detected, in described new region to be detected
When width is less than or equal to the first setting value, stop detection, by the broadside in described new region to be detected
Point midway to the distance of the corresponding edge of described frame picture as the width of described black surround.
Described above is the concrete Cleaning Principle of two points of detection methods, carry out two for each rectangular area
Go-on-go is surveyed, in a row or in a column simply by the presence of non-black pixel, then will redefine black
The boundary line in territory, zone (black surround).
In technique scheme, it is preferable that on the length direction of described black surround, set with second
Detection of straight lines is chosen at the interval of value, and described detection of straight lines is vertical with the corresponding edge of described frame picture, it is judged that
The pixel of non-black whether is there is, if existing, then by the picture of described non-black in described detection of straight lines
Distance between vegetarian refreshments and corresponding edge is as the width of described black surround.
For each rectangular area, in addition it is also necessary to verify that the above-mentioned two points of detection methods of employing determine further black
Territory, zone is the most correct, with the second setting value on the direction in detection direction being perpendicular to two points of detection methods
Spacing distance detect the most all black of the pixel in the direction, if it is not, explanation inspection
Survey wrong, if it is, explanation detection is correct.
It should be understood that this second setting value is the least, then accuracy of detection is the most accurate.And equally exist
Video is extracted out multiple frame pictures, detects the size of black surround in the manner described above, choose minimum black
Region is as the final black surround of all videos.
In technique scheme, it is preferable that can also include before described step 402: judge
The displaying ratio of described frame picture is the most consistent with the displaying ratio of display, if inconsistent, then enters
Described step 402;Can also include after described step 406: according to the displaying ratio of display
The frame picture removing black surround is zoomed in and out process.
Namely when the displaying ratio of frame picture and the displaying ratio of display are inconsistent, just use root
According to technical scheme, the video after black surround processes correspondingly is scaled, to obtain
Optimal display result.
Accompanying drawing explanation
Fig. 1 shows the schematic diagram of mobile terminal according to an embodiment of the invention;
Fig. 2 shows frame picture black borders region detection schematic diagram according to an embodiment of the invention;
Fig. 3 shows the black surround using two points of detection method detection frame pictures according to an embodiment of the invention
Schematic diagram;
Fig. 4 shows the flow chart of method of video image processing according to an embodiment of the invention;
Fig. 5 shows the flow chart of method of video image processing according to an embodiment of the invention;
Fig. 6 shows the flow chart of black edge detection method according to an embodiment of the invention.
Detailed description of the invention
In order to be more clearly understood that the above-mentioned purpose of the present invention, feature and advantage, below in conjunction with attached
The present invention is further described in detail by figure and detailed description of the invention.
Elaborate a lot of detail in the following description so that fully understanding the present invention, but,
The present invention can implement to use other to be different from other modes described here, therefore, and the present invention
It is not limited to the restriction of following public specific embodiment.
Fig. 1 shows the schematic diagram of mobile terminal according to an embodiment of the invention.
As it is shown in figure 1, mobile terminal 100 includes according to an embodiment of the invention: detector unit
102, take midpoint respectively on four limits of frame picture, the point midway on each limit is towards the center of gravity of frame picture
On the path direction of position, the pixel on detection path direction one by one, and receiving stopping detection
During signal, stop detection;Judging unit 104, is connected to detector unit 102, it is judged that pixel is
No for black, if not black, then stop detection signals to anti-102 feedbacks of detector unit, and to black
While determine that unit 106 feedback determines signal;Black surround determines unit 106, is connected to detector unit 102
With judging unit 104, when receiving feedback signal, obtain the stopping detecting position of detector unit 102
Put, by every point midway of frame picture and the corresponding distance stopped between detection position, make
For the width with the most corresponding every rectangular area, the length of corresponding edge as the length of rectangular area,
And using rectangular area as black surround;Processing unit 108, according to the rectangular area detected, removes frame
Black surround in picture.
This technical scheme can apply the displaying ratio in video pictures ratio Yu the broadcasting pictures of display screen
Inconsistent and video pictures exists the scene of black surround, starts to detect frame from the midpoint on four limits of frame picture
The black surround of picture, until detecting it is not black pixel point, so can obtain this frame picture
The width of black surround (there may be four black rectangle regions, if the black picture that both sides detect relatively
The number of vegetarian refreshments is different, then take the minima width as relative black surround), play this video it
Before, a few frame can be extracted from video, detect the black of every frame picture according to above-mentioned processing method
Limit, takes the minima final width as black surround, and removes all black of video with this final width
Limit.
As in figure 2 it is shown, take midpoint from four limits of frame picture, two midpoints from frame picture broadside,
Two midpoints on long limit, to video hub position capture vegetarian refreshments, it is judged that whether pixel is black picture
Vegetarian refreshments (RGB color component is 0), for the detection in each direction, if it find that there is non-black
Pixel, just stops detection.Convenient herein for describing, with reference to shown in Fig. 2 coordinate system, false
The setting video upper left corner is initial point, and horizontal right direction is y positive axis, and vertical downward direction is x positive axis,
The a length of W of frame of video picture, a width of H.During detection respectively from point (H/2,0), (0,
W/2), (H/2, W), (H, W/2) start detection, it is assumed that Nh0, Nw0, Nh1,
Nw1 represents the number continuous black color dots being detected on correspondence direction, Nh, Nw represent vertically respectively,
The number of black pixel point in horizontal direction.The most now take the smaller value conduct in Nh0 and Nh1
The number Nh value of the final black pixel point in vertical direction, equally, takes in Nw0 and Nw1
Smaller value as the number Nw value of the black pixel point in final horizontal direction.
Such detection method efficiency is high, and the black surround detected is relatively accurate, meets actual play effect
Really.
In technique scheme, it is preferable that detector unit 102 is additionally operable to use two points of detection methods to enter
One step detects width and the length of black region in rectangular area, using black region as black surround.
Although starting to detect the detection method efficiency of black pixel point number relatively from four midpoints, limit of frame picture
Height, but it cannot be guaranteed that the pixel of every a line or every string is entirely black pixel point, therefore, adopt
Above-mentioned testing result is revised further, to obtain black region more accurately by two points of detection methods.
In technique scheme, it is preferable that it is single that detector unit 102 may include that son is chosen at midpoint
Unit 1022, takes the midpoint of the broadside of rectangular area, and rectangular area is divided into by the straight line at place, midpoint
Two regions, straight line is parallel with the long limit of rectangular area;Region to be detected determines subelement 1024,
When the pixel that judging unit 104 is judged on straight line is all black, will be close to the district of position of centre of gravity
Territory is defined as region to be detected, when the pixel that judging unit is judged on straight line is not all black,
The region on the long limit that will be close to rectangular area is defined as region to be detected;Subelement 1022 is chosen at midpoint
Continuing to take the midpoint of the broadside in region to be detected, it is new that region to be detected determines that subelement 1024 determines
Region to be detected, when the width in new region to be detected is less than or equal to the first setting value, black surround determines
The distance of the point midway of the broadside in new region to be detected to the corresponding edge of frame picture is made by unit 106
Width for black surround.
Described above is the concrete Cleaning Principle of two points of detection methods, carry out two for each rectangular area
Go-on-go is surveyed, in a row or in a column simply by the presence of non-black pixel, then will redefine black
The boundary line in territory, zone (black surround).
In technique scheme, it is preferable that detector unit 102 is additionally operable to the length direction at black surround
On, choose detection of straight lines with the interval of the second setting value, detection of straight lines is vertical with the corresponding edge of frame picture
Directly, it is judged that unit 104 determines whether whether to exist in detection of straight lines the pixel of non-black, if depositing
, then determine unit 106 feedback amendment signal to black surround;Black surround determines that unit 106 is additionally operable to connecing
When receiving amendment signal, using the distance between pixel and the corresponding edge of non-black as the width of black surround
Degree.
For each rectangular area, in addition it is also necessary to verify that the above-mentioned two points of detection methods of employing determine further black
Territory, zone is the most correct, with the second setting value on the direction in detection direction being perpendicular to two points of detection methods
Spacing distance detect the most all black of the pixel in the direction, if it is not, explanation inspection
Survey wrong, if it is, explanation detection is correct.
It should be understood that this second setting value is the least, then accuracy of detection is the most accurate.And equally exist
Video is extracted out multiple frame pictures, detects the size of black surround in the manner described above, choose minimum black
Region is as the final black surround of all videos.
For the ease of understanding above-mentioned two points of detection methods, turn next to Fig. 3.
Region shown in Fig. 3 is acquired possibly as black surround in the embodiment corresponding with Fig. 2
In rectangular area one, and be the black surround on the long side direction of frame picture.
First preset the first setting value α and the second setting value β, be illustrated respectively in two go-on-gos surveys, rectangle
The fineness that region broadside, long frontier inspection are surveyed, owing in frame of video picture, the character of black surround is similar, thus right
Basically identical in the detection method of each black surround, here with the upper left corner in possible black surround region (0,
0) carry out citing detect with the lower right corner (Nh, W).
Concrete grammar is as follows: in the direction of the x axis, takes the midpoint Nhx=Nh/2 in region [0, Nh], so
In this region of rear detection, x-axis coordinate is all pixels of Nh/2, if there is no non-black dot,
Then detection region is adjusted to [Nh/2+1, Nh], now takes the midpoint Nhx=of this adjustment region
(Nh/2+1+Nh)/2, otherwise detection region is adjusted to [0, Nh/2-1], then takes its midpoint Nhx=
(0+Nh/2-1)/2, then constantly recycle above-mentioned Rule of judgment, until the detection zone after Tiao Zhenging
The width in territory less than or equal in the first setting value α or the detection region after adjusting, the former is bigger than the latter,
Nhx now is black surround height, and the length of this black surround i.e. W.
In order to prevent the black region determined from there is non-black zonule, in addition it is also necessary to along the y-axis direction,
The color of the pixel in the direction of the x axis of the interval detection according to the second setting value β, now from long limit
One end starting point detection string number is the point of Nhx, is the most often separated by β distance and just detects string, directly
To the other end arriving long limit.
Need to say, the Cleaning Principle of other three rectangular areas is consistent, is also the width in rectangular area
While take midpoint to carry out two go-on-go surveys, the point taken in broadside with β for interval on long limit detects.
So can prevent non-black pixel further, obtain real black surround.
In technique scheme, it is preferable that judging unit 104 is additionally operable to the display of judgment frame picture
Ratio is the most consistent with the displaying ratio of display, if inconsistent, then starts letter to detector unit feedback
Number, to start detector unit 102;Mobile terminal 100 also includes: unit for scaling 110, is connected to
The display of mobile terminal, zooms in and out the frame picture removing black surround according to the displaying ratio of display
Process.
Namely when the displaying ratio of frame picture and the displaying ratio of display are inconsistent, just use root
According to technical scheme, the video after black surround processes correspondingly is scaled, to obtain
Optimal display result.
Fig. 4 shows the flow chart of method of video image processing according to an embodiment of the invention.
As shown in Figure 4, the method for video image processing of the embodiment of the present invention, including: step 402,
Taking midpoint respectively on four limits of frame picture, the point midway on each limit is towards the position of centre of gravity of frame picture
On path direction, the pixel on detection path direction one by one;Step 404, it is judged that whether pixel
For black, if not black, then stop detection, by every point midway of frame picture with corresponding
The distance stopped between detection position, as the width with often the most corresponding rectangular area, accordingly
The length on limit is as the length of rectangular area, and using rectangular area as black surround;Step 406, according to
The rectangular area detected, removes the black surround in frame picture.
This technical scheme can apply the displaying ratio in video pictures ratio Yu the broadcasting pictures of display screen
Inconsistent and video pictures exists the scene of black surround, starts to detect frame from the midpoint on four limits of frame picture
The black surround of picture, until detecting it is not black pixel point, so can obtain this frame picture
The width of black surround (there may be four black rectangle regions, if the black picture that both sides detect relatively
The number of vegetarian refreshments is different, then take the minima width as relative black surround), play this video it
Before, a few frame can be extracted from video, detect the black of every frame picture according to above-mentioned processing method
Limit, takes the minima final width as black surround, and removes all black of video with this final width
Limit.
Such detection method efficiency is high, and the black surround detected is relatively accurate, meets actual play effect
Really.
In technique scheme, it is preferable that also include between step 404 and step 406: adopt
Width and the length of black region in rectangular area is detected further, by black region by two points of detection methods
As black surround.
Although starting to detect the detection method of black pixel point number, efficiency from four midpoints, limit of frame picture
Higher, but it cannot be guaranteed that the pixel of every a line or every string is entirely black pixel point, therefore,
Two points of detection methods are used to revise above-mentioned testing result further, to obtain black region more accurately
Territory.
In technique scheme, it is preferable that take the midpoint of the broadside of rectangular area, place, midpoint
Rectangular area is divided into two regions by straight line, and straight line is parallel with the long limit of rectangular area;Judging
When pixel on straight line is all black, the region that will be close to position of centre of gravity is defined as region to be detected,
When the pixel judged on straight line is not all black, the region on the long limit that will be close to rectangular area is true
It is set to region to be detected;Continue to take the midpoint of the broadside in region to be detected, determine new district to be detected
Territory, when the width in new region to be detected is less than or equal to the first setting value, stops detection, by new
The point midway of the broadside in region to be detected to the distance of the corresponding edge of frame picture as the width of black surround.
Described above is the concrete Cleaning Principle of two points of detection methods, carry out two for each rectangular area
Go-on-go is surveyed, in a row or in a column simply by the presence of non-black pixel, then will redefine black
The boundary line in territory, zone (black surround).
In technique scheme, it is preferable that on the length direction of black surround, with the second setting value
Detection of straight lines is chosen at interval, and detection of straight lines is vertical with the corresponding edge of frame picture, it is judged that in detection of straight lines be
The no pixel that there is non-black, if exist, then by between pixel and the corresponding edge of non-black away from
From the width as black surround.
For each rectangular area, in addition it is also necessary to verify that the above-mentioned two points of detection methods of employing determine further black
Territory, zone is the most correct, with the second setting value on the direction in detection direction being perpendicular to two points of detection methods
Spacing distance detect the most all black of the pixel in the direction, if it is not, explanation inspection
Survey wrong, if it is, explanation detection is correct.
It should be understood that this second setting value is the least, then accuracy of detection is the most accurate.And equally exist
Video is extracted out multiple frame pictures, detects the size of black surround in the manner described above, choose minimum black
Region is as the final black surround of all videos.
In technique scheme, it is preferable that can also include before step 402: judgment frame is drawn
The displaying ratio in face is the most consistent with the displaying ratio of display, if inconsistent, then enters step
402;Can also include after step 406: according to the displaying ratio of display to removing black surround
Frame picture zooms in and out process.
Namely when the displaying ratio of frame picture and the displaying ratio of display are inconsistent, just use root
According to technical scheme, the video after black surround processes correspondingly is scaled, to obtain
Optimal display result.
The method of video image processing according to the present invention is further illustrated below with reference to Fig. 5 and Fig. 6.
Video image processing technology is mainly used in video pictures ratio and broadcasts according to an embodiment of the invention
Put that viewing area size is inconsistent and there is the situation of black surround in video, application scenarios such as:
1. the mobile phone using screen size to be 480 × 800 as user play frame picture size be 1024 ×
768 video (limit long with screen, black surround direction of this video is consistent) time, if according to video size
Zoom in and out, then broadcasting pictures can be stayed at screen broadside sky, and also there is black surround on this height of video limit simultaneously,
The effect being shown to user is exactly that video does not has full frame, seems a certain region broadcasting in screen.
2. the mobile phone using screen size to be 480 × 800 as user play frame picture size be 960 ×
480 video (black surround direction is consistent with long limit, and black surround is wide by 160) time, there will be black during broadcasting
Limit, if now detecting that black surround is wide by 160, then removes this black surround, then video size reforms into
800 × 480, when using played in full screen, screen does not have any black surround show, visual effect is preferable.
If video has black surround, but the two ratio is the same, then now black surround does not interferes with broadcasting effect
Really, avoid the need for carrying out again black surround detection, otherwise need detection.Related procedure refer to Fig. 5:
Step 502, detection video pictures ratio is the most consistent with playing viewing area size, if
Unanimously, then enter step 508, if inconsistent, then enter step 504.
In step 504, the black surround of detection video pictures, and it is removed.
In step 506, detect screen size.
In step 508, after video pictures being carried out equal proportion scaling according to screen size and carry out complete
Screen is play.
Wherein, the concrete detection method of black surround, may refer to Fig. 6.
As shown in Figure 6, in step 602, midpoint is taken respectively from four limits of frame picture.
In step 604, detect corresponding black surround width to frame picture center position respectively from these four midpoints
Degree.
In step 606, tentatively obtain possible black surround rectangular area.
In step 608, two points of detection methods are used to click in the broadside of the black surround rectangular area obtained takes
Row two go-on-go is surveyed.
In step 610, take pixel broadside in β for interval on the long limit in black rectangle region
Point detects, if not finding the pixel of non-black, then enters step 612, obtains exactly
Video black surround.If finding the pixel of non-black, then it is final black surround with the black number detected
Width, redefines black surround rectangular area.
Multiple frame pictures can be extracted from video, black surround region minimum in multiple frame pictures as
The final black surround rectangular area of video, it is possible to the black surround in each frame of video is removed, so
After obtain the actual size of video pictures, and then the screen size of the equipment such as detection mobile phone, carry out geometric ratio
Video pictures after the process of example scaling, may still suffer from after scaling staying limit, then use black region
Carry out completion.Although the most also black surround, but video effective image surrounding when not havinging broadcasting
There is a situation of black surround, and the abatement of black surround, make visual experience during broadcasting more preferable.
Result of broadcast is influenced whether in view of video black surround according to technical scheme, thus the most right
Black surround is removed operation, then zooms to played in full screen according to screen size, it is to avoid black surround impact is complete
Screen effect, is displayed in full screen according to video real picture the most as far as possible, provides the user with more preferable vision
Effect is experienced.Relative to prior art, make to detect black surround according to technical scheme
In hgher efficiency, it is possible to obtain black surround accurately and reliably, and take the data in the middle of multi-frame video and examine
Surveying, the black surround region that effectively prevent detection is unstable, takes the minimum in detection several times when removing black surround
Black surround, it is to avoid eliminate the probability of view data in video so that result of broadcast is more preferable.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for
For those skilled in the art, the present invention can have various modifications and variations.All essences in the present invention
Within god and principle, any modification, equivalent substitution and improvement etc. made, should be included in the present invention
Protection domain within.
Claims (10)
1. a mobile terminal, it is characterised in that including:
Detector unit, takes midpoint respectively on four limits of frame picture, and the point midway on each limit is towards described
On the path direction of the position of centre of gravity of frame picture, detect the pixel on described path direction one by one, with
And when receiving stopping detection signal, stop detection;
Judging unit, is connected to described detector unit, it is judged that whether described pixel is black, if not
For black, then detect signal to described stopping of described detector unit feedback, and determine unit to black surround
Feedback determines signal;
Described black surround determines unit, is connected to described detector unit and described judging unit, receiving
State when determining signal, obtain the stopping detection position of described detector unit, each by described frame picture
The point midway on limit and the corresponding distance stopped between detection position, as with often the most corresponding square
The width in shape region, the length of corresponding edge is as the length of described rectangular area, and by described rectangle region
Territory is as black surround;
Processing unit, according to the described rectangular area detected, removes the black surround in described frame picture.
Mobile terminal the most according to claim 1, it is characterised in that described detector unit is also
For using two points of detection methods to detect width and the length of black region in described rectangular area further,
Using described black region as described black surround.
Mobile terminal the most according to claim 2, it is characterised in that described detector unit bag
Include: subelement is chosen at midpoint, take the midpoint of the broadside of described rectangular area, place, described midpoint straight
Described rectangular area is divided into two regions by line, and described straight line is flat with the long limit of described rectangular area
OK;
Region to be detected determines subelement, judges the pixel on described straight line at described judging unit
When being all black, the region that will be close to described position of centre of gravity is defined as region to be detected, in described judgement
Unit judges goes out the pixel on described straight line when being not all black, will be close to the length of described rectangular area
The region on limit is defined as region to be detected;
Described midpoint is chosen subelement and is continued to take the midpoint of the broadside in described region to be detected, described to be checked
Surveying region and determine that subelement determines new region to be detected, the width in described new region to be detected is little
When equal to the first setting value, described black surround determines that unit is by the broadside in described new region to be detected
Point midway to the distance of the corresponding edge of described frame picture as the width of described black surround.
Mobile terminal the most according to claim 3, it is characterised in that described detector unit is also
For the length direction at described black surround, choose detection of straight lines with the interval of the second setting value, described
Detection of straight lines is vertical with the corresponding edge of described frame picture, and described judging unit determines whether described detection
Whether there is the pixel of non-black on straight line, if existing, then determining that unit feedback is repaiied to described black surround
The number of converting to;
Described black surround determines that unit is additionally operable to when receiving described amendment signal, by described non-black
Distance between pixel and corresponding edge is as the width of described black surround.
Mobile terminal the most according to any one of claim 1 to 4, it is characterised in that institute
State judging unit and be additionally operable to judge the displaying ratio of the displaying ratio of described frame picture and display whether
Cause, if inconsistent, then feed back enabling signal to described detector unit, to start described detector unit;
Described mobile terminal also includes: unit for scaling, is connected to the display of described mobile terminal, root
According to the displaying ratio of display, the frame picture removing black surround is zoomed in and out process.
6. a method of video image processing, it is characterised in that including:
Step 402, takes midpoint respectively on four limits of frame picture, and the point midway on each limit is towards described
On the path direction of the position of centre of gravity of frame picture, detect the pixel on described path direction one by one;
Step 404, it is judged that whether described pixel is black, if not black, then stops detection,
By every point midway on one side of described frame picture and the corresponding distance stopped between detection position, make
For the width with the most corresponding every rectangular area, the length of corresponding edge is as the length of described rectangular area
Degree, and using described rectangular area as black surround;
Step 406, according to the described rectangular area detected, removes the black surround in described frame picture.
Method of video image processing the most according to claim 6, it is characterised in that described
Also include between step 404 and described step 406: use two points of detection methods to detect described square further
The width of black region and length in shape region, using described black region as described black surround.
Method of video image processing the most according to claim 7, it is characterised in that take described
The midpoint of the broadside of rectangular area, described rectangular area is divided into two by the straight line at place, described midpoint
Region, described straight line is parallel with the long limit of described rectangular area;
When the pixel judged on described straight line is all black, will be close to the district of described position of centre of gravity
Territory is defined as region to be detected, when the pixel judged on described straight line is not all black, will lean on
The region on the long limit of nearly described rectangular area is defined as region to be detected;
Continue to take the midpoint of the broadside in described region to be detected, determine new region to be detected, described
When the width in new region to be detected is less than or equal to the first setting value, stop detection, by described new treating
The point midway of the broadside in detection region to the distance of the corresponding edge of described frame picture as described black surround
Width.
Method of video image processing the most according to claim 8, it is characterised in that described
On the length direction of black surround, choose detection of straight lines with the interval of the second setting value, described detection of straight lines with
The corresponding edge of described frame picture is vertical, it is judged that whether there is the pixel of non-black in described detection of straight lines
Point, if existing, then using the distance between pixel and the corresponding edge of described non-black as described black surround
Width.
10., according to the method for video image processing according to any one of claim 6 to 9, it is special
Levy and be, also included before described step 402: judge displaying ratio and the display of described frame picture
The displaying ratio of device is the most consistent, if inconsistent, then enters described step 402;
Also include after described step 406: according to frame to removing black surround of the displaying ratio of display
Picture zooms in and out process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210081917.XA CN103369205B (en) | 2012-03-26 | 2012-03-26 | Mobile terminal and method of video image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210081917.XA CN103369205B (en) | 2012-03-26 | 2012-03-26 | Mobile terminal and method of video image processing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103369205A CN103369205A (en) | 2013-10-23 |
CN103369205B true CN103369205B (en) | 2016-11-16 |
Family
ID=49369670
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210081917.XA Active CN103369205B (en) | 2012-03-26 | 2012-03-26 | Mobile terminal and method of video image processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103369205B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104915944B (en) * | 2014-03-14 | 2018-08-07 | 北京风行在线技术有限公司 | A kind of method and apparatus for determining the black surround location information of video |
CN104361335B (en) * | 2014-11-03 | 2017-07-07 | 山西同方知网数字出版技术有限公司 | A kind of processing method that black surround is automatically removed based on scan image |
CN105573747B (en) * | 2015-12-10 | 2018-11-06 | 小米科技有限责任公司 | The test method and device of user interface |
CN105916022A (en) * | 2015-12-28 | 2016-08-31 | 乐视致新电子科技(天津)有限公司 | Video image processing method and apparatus based on virtual reality technology |
CN106231278B (en) * | 2016-08-08 | 2019-02-01 | 深圳Tcl数字技术有限公司 | Method for processing video frequency and television system |
CN110505512A (en) * | 2019-07-09 | 2019-11-26 | 咪咕视讯科技有限公司 | Full screen playing method, terminal equipment and computer readable storage medium |
CN112466243A (en) * | 2020-11-25 | 2021-03-09 | 惠州Tcl移动通信有限公司 | Image processing method, device, storage medium and mobile terminal |
CN113905268A (en) * | 2021-09-28 | 2022-01-07 | 四川长虹电器股份有限公司 | Black edge removing method for screen projection display of mobile terminal |
CN114995735A (en) * | 2022-04-22 | 2022-09-02 | 北京金山云网络技术有限公司 | Image display method, system, device, electronic equipment and readable storage medium |
CN115529480A (en) * | 2022-08-03 | 2022-12-27 | 青岛海尔智能家电科技有限公司 | Control method and device for television, television and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101087380A (en) * | 2006-06-08 | 2007-12-12 | 索尼株式会社 | Image signal processing apparatus, image display and image display method |
CN101277381A (en) * | 2008-04-15 | 2008-10-01 | 北京中星微电子有限公司 | Method and apparatus for processing video image |
CN101841643A (en) * | 2010-04-29 | 2010-09-22 | 深圳市茁壮网络股份有限公司 | Method and device for detecting black edge |
CN102111640A (en) * | 2010-11-30 | 2011-06-29 | 广东威创视讯科技股份有限公司 | Effective image area detection method and system |
CN102254544A (en) * | 2011-07-12 | 2011-11-23 | 北京海尔集成电路设计有限公司 | Method for automatically adjusting video signal proportion and television using same |
CN102377960A (en) * | 2010-08-24 | 2012-03-14 | 腾讯科技(深圳)有限公司 | Video picture displaying method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005203933A (en) * | 2004-01-14 | 2005-07-28 | Matsushita Electric Ind Co Ltd | Video-reproducing apparatus and video-reproducing method |
-
2012
- 2012-03-26 CN CN201210081917.XA patent/CN103369205B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101087380A (en) * | 2006-06-08 | 2007-12-12 | 索尼株式会社 | Image signal processing apparatus, image display and image display method |
CN101277381A (en) * | 2008-04-15 | 2008-10-01 | 北京中星微电子有限公司 | Method and apparatus for processing video image |
CN101841643A (en) * | 2010-04-29 | 2010-09-22 | 深圳市茁壮网络股份有限公司 | Method and device for detecting black edge |
CN102377960A (en) * | 2010-08-24 | 2012-03-14 | 腾讯科技(深圳)有限公司 | Video picture displaying method and device |
CN102111640A (en) * | 2010-11-30 | 2011-06-29 | 广东威创视讯科技股份有限公司 | Effective image area detection method and system |
CN102254544A (en) * | 2011-07-12 | 2011-11-23 | 北京海尔集成电路设计有限公司 | Method for automatically adjusting video signal proportion and television using same |
Also Published As
Publication number | Publication date |
---|---|
CN103369205A (en) | 2013-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103369205B (en) | Mobile terminal and method of video image processing | |
EP3770747A1 (en) | Method for displaying a picture and method for rotating a displayed picture | |
US5614956A (en) | Television receiver | |
US8817020B2 (en) | Image processing apparatus and image processing method thereof | |
US8953048B2 (en) | Information processing apparatus and control method thereof | |
CN109658427B (en) | Image processing method and device | |
EP1555814A2 (en) | Reducing burn-in associated with mismatched video image/display aspect ratios | |
US20130027396A1 (en) | Device and method for 2d to 3d conversion | |
CN103839062A (en) | Image character positioning method and device | |
CN110072141B (en) | Media processing method, device, equipment and storage medium | |
CN106201201B (en) | view adjusting method and system | |
CN104469178B (en) | A kind of image display method and electronic equipment | |
US9762889B2 (en) | Subtitle detection for stereoscopic video contents | |
CN102254544B (en) | Method for automatically adjusting video signal proportion and television using same | |
CN103197909A (en) | Display method and display device | |
KR20030026107A (en) | Line interpolation apparatus and method for image signal | |
CN104869325B (en) | One kind shows compensation method, module and display device | |
US20070018999A1 (en) | Auto-centering of main image | |
CN105430382A (en) | Method and device for detecting black edge of video image | |
CN106325788A (en) | Terminal, and screen expansion display method and system | |
CN110248147A (en) | A kind of image display method and apparatus | |
CN103702181A (en) | Method and device for processing video image | |
CN104767985A (en) | Method of using region distribution analysis to automatically detect 3D image format | |
US20100214488A1 (en) | Image signal processing device | |
US20170324921A1 (en) | Method and device for displaying multi-channel video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |