OSD image detection method and device in video image and terminal equipment

文档序号:1142017 发布日期:2020-09-11 浏览:11次 中文

阅读说明:本技术 视频图像中osd图像检测方法、装置及终端设备 (OSD image detection method and device in video image and terminal equipment ) 是由 郭潇蔚 于 2019-03-04 设计创作,主要内容包括:本申请提供了一种视频图像中OSD图像检测方法、装置及终端设备,具体的,利用OSD图像比带有黑边的视频图像中的黑边部分中像素点的亮度值大的特点,对每一帧视频图像中位于黑边区域的各像素点的亮度值进行分析,得到在同一行像素点中亮度值大于预设亮度阈值的有效像素点;然后,基于OSD图像与黑边区域叠加的区域通常为规则图形结构的特点,因此将同时满足每一行中具有计数连续的有效像素点、具有有效像素点的连续行数大于预设连续行数以及具有有效像素点的连续行之间的排布方式满足预设条件的帧视频图像,判定为该视频图像中存在OSD层。进而将该检测结果发送给后级处理芯片后,后级处理芯片便可以进行相应处理,以保护图像中的黑边。(The application provides an OSD image detection method, an OSD image detection device and terminal equipment in a video image, and particularly, the characteristic that the brightness value of pixel points in a black edge part of the OSD image is larger than that of the video image with a black edge is utilized, the brightness value of each pixel point in a black edge area in each frame of video image is analyzed, and effective pixel points with the brightness value larger than a preset brightness threshold value in the same row of pixel points are obtained; then, based on the characteristic that the area overlapped by the OSD image and the black border area is generally a regular graphic structure, the frame video image which simultaneously satisfies the frame video image that has the effective pixel points continuously counted in each line, has the number of continuous lines of the effective pixel points larger than the preset number of continuous lines, and satisfies the preset condition in the arrangement mode between the continuous lines of the effective pixel points is judged to have the OSD layer in the video image. And then after the detection result is sent to a post-processing chip, the post-processing chip can perform corresponding processing to protect the black edge in the image.)

1. A method for detecting an OSD image in a video image, the method comprising:

acquiring the brightness values of pixel points of each row in a black edge area in a current frame video image;

obtaining effective pixels which have brightness values larger than a preset brightness threshold value and are counted continuously in each row of pixels according to the brightness value of each pixel;

judging whether the number of continuous lines with the effective pixel points is larger than a preset number of continuous lines and whether the arrangement mode among the continuous lines with the effective pixel points meets a preset condition;

if yes, determining that the OSD image exists in the current frame video image.

2. The method of claim 1, wherein the obtaining the brightness values of the pixels in each row of the black border area in the current frame of the video image comprises:

obtaining row coordinates of pixel points of each row in the current frame video image according to the row effective signals of the current frame video image;

comparing the line coordinate with a line coordinate of a black edge in a previous frame of video image, and judging whether a pixel point corresponding to the line coordinate is located in a black edge area;

and if the pixel points are located in the black edge area, acquiring the brightness value of each pixel point in the row corresponding to the row coordinate.

3. The method of claim 1, wherein obtaining the effective pixels with brightness values greater than a preset brightness threshold and continuously counted in a same row of pixels according to the brightness values of the pixels comprises:

judging whether the brightness value of each pixel point in a row of pixel points is greater than a preset brightness threshold value or not;

if the number of the effective pixel points is larger than the preset brightness threshold value, counting the number of the effective pixel points;

if the number of the effective pixel points is smaller than a preset brightness threshold, judging whether the number of the effective pixel points is larger than a preset continuous number threshold, and clearing the number of the effective pixel points;

and if the number of the effective pixel points is larger than the preset continuous number threshold, judging that effective pixel points with brightness values larger than the preset brightness threshold and continuously counted exist in the same row of pixel points.

4. The method of claim 1, wherein the determining whether the number of consecutive lines having the active pixel is greater than a preset number of consecutive lines and whether the arrangement between consecutive lines having the active pixel satisfies a preset condition comprises:

judging whether the line where the effective pixel points are located is the line with the effective pixels in the first line or not;

if not, comparing the positions and the numbers of the effective pixel points in the line where the effective pixel points are located and the line where the effective pixels exist in the first line, and judging whether the difference value of the two is smaller than a preset difference value or not;

if the difference value is less than the preset difference value, counting the number of the continuous lines of the effective pixel points;

and if the number of the continuous lines of the effective pixel points is larger than the preset difference value, judging whether the number of the continuous lines of the effective pixel points is larger than the preset number of the lines, and clearing the count of the number of the continuous lines of the effective pixel points.

5. The method of claim 4, wherein the comparing the positions and numbers of the effective pixels in the row where the effective pixels are located and the row where the effective pixels exist in the first row, and determining whether the difference between the two is smaller than a preset difference, comprises;

comparing the difference value of the number of columns of the initial effective pixel points in the row where the effective pixel points are located and the row where the effective pixels exist in the first row, and judging whether the difference value of the two is smaller than the difference value of the preset number of columns;

if the difference value is smaller than the preset column number difference value, comparing the number of the effective pixel points in the row where the effective pixel points are located and the row where the effective pixels exist in the first row, and judging whether the difference value is smaller than the preset number difference value.

6. An apparatus for detecting an OSD image in a video image, the apparatus comprising:

a luminance value acquisition unit: the method comprises the steps of obtaining the brightness value of each row of pixel points positioned in a black edge area in a current frame video image;

an effective pixel point detection unit: the effective pixel points are used for obtaining effective pixel points with the brightness values larger than a preset brightness threshold value and continuously counted in each row of pixel points according to the brightness values of the pixel points;

an OSD image determination unit: and the OSD image judging unit is used for judging whether the continuous line number with the effective pixel points is larger than a preset continuous line number or not and whether the arrangement mode among the continuous lines with the effective pixel points meets a preset condition or not, and if so, judging that the OSD image exists in the current frame video image.

7. The OSD image detection apparatus of claim 6, wherein the luminance value obtaining unit includes:

a falling edge detector for detecting the falling edge of the effective signal of the line in the video image of the current frame;

the line coordinate counter is used for counting the falling edges detected by the falling edge detector to obtain line coordinates of each line of pixel points in the current frame video image;

the pixel point position confirmer is used for comparing the row coordinate output by the row coordinate counter with the row coordinate corresponding to the black edge in the previous frame of video image, wherein if the pixel point corresponding to the row coordinate is judged to be positioned in the black edge area, a first indicating signal is output;

a pixel point brightness acquirer: and the brightness value of each pixel point in the row corresponding to the row coordinate is obtained after the first indication signal is received.

8. The OSD image detection apparatus of claim 7, wherein the active pixel detecting unit comprises:

a brightness value comparator: the device comprises a first indicating signal, a second indicating signal and a control signal, wherein the first indicating signal is used for judging whether the brightness value of each pixel point in the same row of pixel points is greater than a preset brightness threshold value or not, and if the brightness value is greater than the preset brightness value, the second indicating signal is output in a preset level state;

an indication signal detector: the second indicating signal is used for detecting the level state of the second indicating signal, wherein if the second indicating signal is detected to jump from the preset level state to the non-preset level state, a third indicating signal is output;

effective pixel number counter: the counting module is used for counting the number of effective pixel points if the second indicating signal is received; and, if the third indication signal is received, clearing the count of the number of the effective pixel points;

a first pixel count comparator: and the fourth indicating signal is output if the number of the effective pixel points stored before the effective pixel point number counter is cleared is greater than the preset continuous number threshold.

9. The OSD image detection apparatus of claim 8, wherein the consecutive number of lines determining unit comprises:

a line state memory: the display device is used for displaying a line state currently having effective pixels according to a fourth indication signal, wherein the line state comprises a line in which the effective pixels are detected to exist in the first line and a line in which the effective pixels are continuously detected to exist in the first line;

column coordinate memory: the display device is used for respectively storing the column coordinates of the initial effective pixel points in the first row with the effective pixels and the current row with the effective pixels according to the second indicating signal;

column coordinate comparator: the display device is used for comparing the row coordinates of the initial effective pixel points in the row with the effective pixels in the first row and the row with the effective pixels in the present row if the row state is that the rows with the effective pixels exist continuously, wherein if the difference value of the two is less than the preset row difference value, a fifth indication signal is output;

a second pixel number comparator: the display device is used for comparing the number of the effective pixels in the line where the effective pixels are located and the line where the effective pixels exist in the first line according to the fifth indicating signal, wherein if the difference value of the two is less than the difference value of the preset number, a sixth indicating signal is output;

an active line memory: the device is used for counting the number of the continuous rows of the effective pixel points after receiving the sixth indication signal;

continuous line number judger: and the OSD image judging module is used for judging whether the number of the continuous lines of the effective pixel points is greater than the preset number of lines, and if so, judging that the OSD image exists in the current frame video image.

10. A terminal device, comprising the OSD image detection device in video image of any one of claims 6 to 9, and further comprising a black border processing module connected to the OSD image detection device in video image, wherein the black border processing module is configured to perform image quality processing on the video image with the black border.

Technical Field

The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for detecting an OSD (On screen display) image in a video image, and a terminal device.

Background

With the development of television technology, more and more users use televisions as terminal devices for watching videos. In order to provide a clearer and smoother output picture for a user, a chip with an image quality processing function is generally configured in an existing television.

For example, a main SOC (System on Chip) in a liquid crystal television includes a full-function audio/video processing function, which can analyze and convert an input television signal, perform certain image quality processing, and output the signal to a television screen for displaying. Furthermore, in order to pursue a better image quality effect, in addition to the main SOC, a special image quality post-processing chip is additionally provided in the lcd tv, and the chip is used for further image quality processing of the video image processed by the main SOC from different aspects, wherein the special image quality processing module includes a black edge processing module, and the black edge processing module can be used for performing special image quality processing on the video image with black edges, for example, performing image quality processing on the video image in a movie mode. Specifically, the black edge processing module further suppresses the brightness of the pure black edge pixels in the black edge part of the image, so that the visual effect is blacker and more uniform, and meanwhile, the non-black edge part is protected without brightness processing.

However, when the user watches the video, the user may manipulate the remote controller to perform some operation actions, and the operations are reflected on the television picture, that is, the main SOC superimposes the corresponding OSD image on the video image, and the main SOC does not indicate the OSD superimposed image. Therefore, when the video image superimposed with the OSD, particularly the superimposed OSD image crosses the black border of the video image with black border, and the black border processing module receives the video image with OSD, the black border of the video image is erroneously determined, thereby resulting in an erroneous processing of the video image.

Therefore, in order to ensure correct processing of the video image with OSD, it is necessary to detect whether or not an OSD image is present in a black-edged portion of the video image with black edges.

Disclosure of Invention

Aiming at the problem that the video image is superposed with a corresponding OSD image without indication by the existing main SOC, so that a post-processing chip processes the video image with a black edge wrongly, the application provides a method, a device and a terminal device for detecting the OSD image in the video image, so as to detect whether the OSD image exists in the black edge part of the video image with the black edge.

According to a first aspect of embodiments of the present application, there is provided a method for detecting an OSD image in a video image, the method including:

acquiring the brightness values of pixel points of each row in a black edge area in a current frame video image;

obtaining effective pixels with the brightness values larger than a preset brightness threshold value and continuously counted in each row of pixels according to the brightness values of the pixels;

judging whether the number of continuous lines with the effective pixel points is larger than a preset number of continuous lines and whether the arrangement mode among the continuous lines with the effective pixel points meets a preset condition;

if yes, determining that the OSD image exists in the current frame video image.

According to a second aspect of the embodiments of the present application, there is provided an OSD image detection apparatus in a video image, the apparatus including:

a luminance value acquisition unit: the method comprises the steps of obtaining the brightness value of each row of pixel points positioned in a black edge area in a current frame video image;

an effective pixel point detection unit: the effective pixel points are used for obtaining effective pixel points with the brightness values larger than a preset brightness threshold value and continuously counted in each row of pixel points according to the brightness values of the pixel points;

an OSD image determination unit: and the OSD image judging unit is used for judging whether the continuous line number with the effective pixel points is larger than a preset continuous line number or not and whether the arrangement mode among the continuous lines with the effective pixel points meets a preset condition or not, and if so, judging that the OSD image exists in the current frame video image.

According to a third aspect of the embodiments of the present application, a terminal device is provided, where the terminal device includes the OSD image detection apparatus in the video image provided in the second aspect of the embodiments of the present application, and further includes a black border processing module connected to the OSD image detection apparatus in the video image, where the black border processing module is configured to perform image quality processing on the video image with the black border.

According to the technical scheme, the method, the device and the terminal equipment for detecting the OSD image in the video image provided by the embodiment of the application are characterized in that firstly, the brightness value of each pixel point in a black edge area in each frame of video image is analyzed by utilizing the characteristic that the brightness value of the pixel point in the black edge part of the OSD image is larger than that of the pixel point in the black edge part of the video image with the black edge, and effective pixel points with the brightness value larger than a preset brightness threshold value in the same line of pixel points are obtained; then, based on the characteristic that the area overlapped by the black border area in the OSD image and the video image with the black border is usually a regular graph structure, the frame video image which simultaneously satisfies the frame video image that each line has the effective pixel points which are counted continuously, the number of the continuous lines having the effective pixel points is larger than the preset number of the continuous lines, and the arrangement mode between the continuous lines having the effective pixel points satisfies the preset condition is judged to have the OSD layer in the video image. Furthermore, after the detection result is sent to the post-processing chip, the post-processing chip can perform corresponding processing so as to protect the black edge part in the video image.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.

FIG. 1 is a schematic diagram illustrating the position of the OSD image superimposed on the video image with black border;

FIG. 2 is a schematic diagram of a basic structure of an OSD image;

fig. 3 is a schematic flowchart illustrating a method for detecting an OSD image in a video image according to an embodiment of the present application;

fig. 4 is a schematic flowchart illustrating a method for detecting an OSD image in a video image according to a second embodiment of the present application;

fig. 5 is a schematic diagram illustrating a basic structure of an OSD image detection apparatus for detecting an OSD image in a video image according to an embodiment of the present disclosure;

fig. 6 is a schematic diagram of a basic structure of the luminance value obtaining unit in fig. 5;

fig. 7 is a schematic diagram of the basic structure of the effective pixel point detection unit and the OSD image determination unit in fig. 5;

FIG. 8 is a schematic diagram of data state transitions in the row state memory of FIG. 7;

fig. 9 is a schematic diagram of a basic structure of a terminal device according to an embodiment of the present application.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.

Fig. 1 is a schematic diagram illustrating a position of an OSD image superimposed on a video image with black borders. As shown in fig. 1, the black border area of the video image is located at the top and bottom thereof. Since the width of the black border region does not exceed the width of the OSD in general, the OSD image is not completely contained in the black border after being superimposed, and therefore, after the main SOC processing, the position of the video image where the OSD image is superimposed may have three cases, i.e., position 1 (the OSD image portion overlaps the upper black border), position 2 (the OSD image is entirely located in the non-black border region), and position 3 (the OSD image portion overlaps the lower black border) in fig. 1. When the OSD image appears at position 2, the detection of the black edge of the video image by the black edge processing module is not affected, so that the OSD image at position 2 does not need to be detected. The OSDs at the position 1 and the position 3 are partially included in the black edge, which may affect the detection of the black edge by the black edge processing module, so that the OSDs at the two positions need to be detected, and the detection result is notified to the black edge processing module to implement the protection of the black edge.

Fig. 2 is a schematic diagram of a basic structure of an OSD image. As shown in fig. 2, analyzing the characteristics of the OSD image reveals that the OSD image generally includes two parts: one part is the middle white background area in fig. 2, which is the area where the OSD image is used to display text or graphic information, and the other part is the gray background area around the white background area, because the OSD image is to be distinguished from the normal video image, a uniform background of background color is needed to highlight the OSD image, i.e., the gray background area.

Based on the features of the OSD image, when the OSD image is superimposed on the black border region, the situation that all or part of the gray background region above the white background region is superimposed on the black border, all of the gray background region above the white background region, and part of the white background region are superimposed on the black border in fig. 2, that is, the situation of position 1 in fig. 1, generally occurs; alternatively, in fig. 2, all or part of the gray undertone region below the white undertone region is superimposed on the black, all of the gray undertone region above the white undertone region, and part of the white undertone region is superimposed on the black, that is, one of the two cases in fig. 1, position 3. These two cases share a common feature: a length of consecutive pixels of the same or very similar intensity may be detected and the intensity of the pixel must be much greater than the intensity of the black edge pixels. In addition, in the case of subtitles or captions that may exist in the black border, since neither subtitles nor captions belong to a specific text or graphic, there will be no longer continuous pixels of the same or very similar brightness, so that the two cases can be distinguished by setting the continuous length.

Based on the principle, the embodiment provides a method and a device for detecting an OSD image in a video image and a terminal device. The method and apparatus provided in this embodiment will be described in detail below.

Fig. 3 is a flowchart illustrating a method for detecting an OSD image in a video image according to an embodiment of the present application. As shown in fig. 3, the method mainly includes the following steps:

s101: and acquiring the brightness values of pixel points of each row in the black edge area in the current frame video image.

The black edge position of any frame of video image detected before the current frame of video image in the video can be used as the position of the black edge of the current frame of video image. And then, analyzing the position of each pixel point in the current frame video image to judge whether the pixel point is positioned in the black edge area, and if the pixel point is positioned in the black edge area, acquiring the brightness value of the pixel point.

For the liquid crystal television, the RGB component values of the pixel point correspond to the display screen, which is the deflection angle of the liquid crystal, and when the value is larger, the liquid crystal deflection angle of the corresponding component is larger, the more light is transmitted from the backlight lamp behind the liquid crystal, that is, the brighter the pixel appears. Therefore, the maximum value in the RGB components of the pixel points is selected to represent the brightness value of the current pixel point, and other modes can be used.

S102: and obtaining effective pixels with the brightness values larger than a preset brightness threshold value and continuously counted in each row of pixels according to the brightness values of the pixels.

Specifically, the following determination process may be adopted: firstly, starting from a first pixel point positioned in a line, sequentially judging that the brightness value of the pixel point positioned in the line of the video image is greater than a preset brightness threshold value, and if the brightness value is greater than the preset brightness value, preliminarily considering the pixel point as a pixel point in an OSD image; then, if a preset continuous number of pixel points with brightness values larger than a preset brightness value are continuously detected after the pixel point, the effective pixel points with brightness values larger than a preset brightness threshold value and continuously counted exist in the row. The number of the continuous pixels in the embodiment can be set according to the size of the OSD image and the subtitles and station captions that may be located in the black border area, and if the number of the continuous pixels is greater than or equal to the preset number, the counting is considered to be continuous; in addition, the preset brightness threshold value can be set according to the RGB component values of the pixel points of the bottom color part of the OSD image and the RGB component values of the pixel points of the black edge part of the video in the device.

S103: and judging whether the number of continuous lines with the effective pixel points is larger than a preset number of continuous lines or not and whether the arrangement mode between the continuous lines with the effective pixel points meets a preset condition or not.

Based on the characteristic that the area in which the OSD image is superimposed with the black border area in the video image with the black border is generally a regular graphic structure, in this embodiment, it is determined whether the OSD image exists in the current frame video image by using whether the number of consecutive lines of the effective pixel points is greater than the preset number of consecutive lines and whether the arrangement manner between the consecutive lines having the effective pixel points satisfies the preset condition. If so, executing step S104, otherwise, indicating that there is no OSD image in the current frame video image and continuing to analyze the input next frame video image.

S104: and judging that the OSD image exists in the current frame video image.

Then, the detection result may be notified to a subsequent processing chip, for example, the black edge processing module notifies the black edge processing module, and after knowing that the current frame video image has OSD, the black edge processing module performs special processing, for example, the black edge processing module does not perform re-detection of the black edge position and update of the black edge position on the current frame video image any more, and the black edge position of the previous frame video image is used as the black edge position of the current frame video image, so as to prevent erroneous black edge mode detection and determination of the black edge position caused by the existence of OSD.

Fig. 4 is a flowchart illustrating a method for detecting an OSD image in a video image according to a second embodiment of the present application. In this embodiment, taking the black edge area of the video image at the top and the bottom as an example, as shown in fig. 4, the method includes the following steps:

s201: and obtaining the row coordinates of each row of pixel points in the current frame video image according to the row effective signals of the current frame video image.

When a line of valid signals is about to be input into the current frame video image, there is a line of valid signals, and if the high level of the de signal is pulled high, the present embodiment can determine that the current pixel is the pixel in the several rows in the current frame by counting the falling edge of the de signal.

S202: and comparing the line coordinate with the line coordinate of the black edge in the previous frame of video image, and judging whether the pixel point corresponding to the line coordinate is positioned in the black edge area.

In this embodiment, if the current frame has OSD, the black border processing module does not perform re-detection of the black border mode and update of the black border position on the current frame, so as to prevent the existence of OSD from causing erroneous detection of the black border mode and judgment of the black border position, thereby implementing protection of the black border. Meanwhile, the black border processing module is connected to the OSD image detection device in the video image of this embodiment, and the black border processing module sends the line coordinates of the lower edge of the upper black border and the line coordinates of the upper edge of the lower black border of the previous frame of image of the current frame of video image to the OSD image detection device in the video image of this embodiment. Thus, the OSD image detection device in the video image may determine whether the line coordinate acquired in S201 is greater than the line coordinate of the lower edge of the upper black border or is less than the line coordinate of the upper edge of the lower black border, and if so, determine whether the pixel point corresponding to the line coordinate is located in the black border area and execute step S203; if not, continuing to analyze the line coordinates of the next line of pixel points in the current frame video image.

Similarly, if the black border area applied to the video image is located on the left side and the right side of the video image, the column coordinates of the black border area and the column coordinates of the left side and the right side are used for comparison.

S203: and if the pixel points are located in the black edge area, acquiring the brightness value of each pixel point in the row corresponding to the row coordinate.

S204: and judging whether the brightness value of each pixel point in a row of pixel points is greater than a preset brightness threshold value.

If the brightness is greater than the preset brightness threshold, preliminarily considering the pixel point as a pixel point in the OSD image, and executing step S205; otherwise, steps S206 and S207 are performed.

S205: and counting the number of the effective pixel points.

That is, the number of valid pixels is accumulated by 1.

S206: and clearing the count of the number of the effective pixels.

The count of the number of effective pixels obtained in step S205 is cleared, that is, the count of the number of consecutive effective pixels whose pixel brightness values in the current line satisfy the preset brightness threshold is cleared, and the residual pixel brightness values in the current line are continuously analyzed.

S207: and judging whether the number of the effective pixel points is larger than a preset continuous number threshold value or not.

Judging whether the number of the effective pixel points before being cleared in the step S206 is greater than a preset continuous number threshold, and if so, executing a step S208; otherwise, the brightness values of the remaining pixel points in the current line are continuously analyzed.

S208: and judging that effective pixels with brightness values larger than a preset brightness threshold value and continuously counted exist in the same row of pixels.

That is, the pixel points in the OSD image of the current behavior can be preliminarily determined.

S209: and judging whether the line where the effective pixel points are located is the line with the effective pixels in the first line.

Whether a row with effective pixels is detected in the current frame image for the first time is judged, if yes, effective pixel points in the current row, namely initial column positions corresponding to the pixel points with the pixel brightness values meeting the preset brightness threshold value, can be stored; otherwise, step S210 is executed.

S210: and comparing the positions and the numbers of the effective pixel points in the line where the effective pixel points are located and the line where the effective pixels exist in the first line, and judging whether the difference value between the two is smaller than a preset difference value.

Wherein, the analysis can be carried out according to the following judging steps:

firstly, comparing the difference value of the number of the columns where the initial effective pixel points are located in the row where the effective pixel points are located and the row where the effective pixels exist in the first row, and judging whether the difference value of the two is smaller than the difference value of the preset number of the columns. For example, the difference between the column numbers of the two pixels is set to be 5 pixels, when the difference between the two pixels is less than 5, it is indicated that osd pixels of the first row and the subsequent row which meet the continuous condition are aligned in the first column, and the number of effective pixels is compared; otherwise, it indicates that the first column is not aligned, and may be the icon or subtitle information in the black border, and steps S212 and S213 are performed.

And then, if the difference value is smaller than the preset column number difference value, comparing the number of the effective pixel points in the row where the effective pixel points are located and the row where the effective pixels exist in the first row, and judging whether the difference value between the two is smaller than the preset number difference value. If so, step S211 is performed, otherwise, steps S212 and S213 are performed.

S211: and counting the number of the continuous lines of the effective pixel points.

I.e. adding 1 for the number of consecutive rows of active pixels.

S212: and clearing the count of the number of the continuous lines of the effective pixel points.

And clearing the count of the number of the continuous rows of the effective pixel points obtained in the step S211, and continuously analyzing the pixel points in the remaining rows in the current frame image.

S213: and judging whether the number of continuous lines of the effective pixel points is greater than a preset number of lines.

Judging whether the number of continuous lines of the effective pixel points before being cleared in the step S212 is greater than the preset number of lines, and if so, executing a step S214; otherwise, the brightness values of the remaining pixel points in the current line are continuously analyzed.

S214: and judging that the OSD image exists in the current frame video image.

Based on the above principle, the present embodiment further provides an OSD image detection apparatus in a video image. Fig. 5 is a schematic diagram of a basic structure of an OSD image detection apparatus in a video image according to an embodiment of the present application. As shown in fig. 5, the apparatus specifically includes the following parts:

luminance-value acquisition unit 10: the method comprises the steps of obtaining the brightness value of each row of pixel points positioned in a black edge area in a current frame video image;

effective pixel point detection unit 20: the effective pixel points are used for obtaining effective pixel points with the brightness values larger than a preset brightness threshold value and continuously counted in each row of pixel points according to the brightness values of the pixel points;

OSD image determination unit 30: and the OSD image judging unit is used for judging whether the continuous line number with the effective pixel points is larger than a preset continuous line number or not and whether the arrangement mode among the continuous lines with the effective pixel points meets a preset condition or not, and if so, judging that the OSD image exists in the current frame video image.

Further, the present embodiment further designs a logic circuit to implement the OSD detection function. Fig. 6 is a schematic diagram of a basic structure of the luminance value acquisition unit in fig. 5. As shown in fig. 6, the luminance-value obtaining unit is provided with the following elements:

and a falling edge detector 101 for detecting a falling edge of the line effective signal in the video image of the current frame.

When a line of valid signals is about to be input into the current frame video image, there is a line of valid signals, and if the high level of the de signal is pulled high, the present embodiment can determine that the current pixel is the pixel in the several rows in the current frame by counting the falling edge of the de signal.

And the line coordinate counter 102 is configured to count falling edges detected by the falling edge detector to obtain line coordinates of each line of pixel points in the current frame video image.

And the pixel point position confirmer 103 is configured to compare the row coordinate output by the row coordinate counter with the row coordinate corresponding to the black edge in the previous frame of video image, wherein if it is determined that the pixel point corresponding to the row coordinate is located in the black edge region, a first indication signal is output.

The pixel position determiner 103 is provided with an upper edge row address comparator 1031 for comparing upper edge row addresses, and is configured to determine whether a current row coordinate is greater than a row coordinate of an upper edge of a black edge, and if so, output a high-level signal, which may be a low-level signal; the lower edge row address comparator 1032 is used for comparing the lower edge row address and is used for judging whether the current row coordinate is smaller than the row coordinate of the black edge lower edge or not, and if so, outputting a high-point flat signal; and an or gate 1033 connected to the two comparators, wherein when either of the two comparators outputs a high level signal, the first indicator signal Osd _ det _ en is set to be a high level signal in this embodiment, so as to enable the pixel luminance acquirer 104 and the subsequent device to perform OSD detection.

The pixel luminance acquirer 104: and the brightness value of each pixel point in the row corresponding to the row coordinate is obtained after the first indication signal is received.

Fig. 7 is a schematic diagram of the basic structure of the effective pixel point detection unit and the OSD image determination unit in fig. 5. In order to make the detection circuit operate stably, the embodiment is also provided with a register and an and gate circuit. As shown in fig. 7, the effective pixel point detecting unit in this embodiment includes:

luminance value comparator 201: and the second indicating signal is used for judging whether the brightness value of each pixel point in the same row of pixel points is greater than a preset brightness threshold value, wherein if the brightness value is greater than the preset brightness value, the second indicating signal in a preset level state is output.

And when the judgment result is that the pixel point is larger than the preset brightness value OSD _ th, preliminarily considering the pixel point as a point in the OSD image, outputting a second indicating signal in a preset level state, and performing flag raising.

Indication signal detector 202: and the circuit is used for detecting the level state of the second indicating signal, wherein if the second indicating signal is detected to jump from the preset level state to the non-preset level state, a third indicating signal is output.

If the second indicating signal jumps from high level to low level, a third indicating signal is output.

Effective pixel number counter 203: the counting module is used for counting the number of effective pixel points if the second indicating signal is received; and if the third indication signal is received, clearing the count of the number of the effective pixel points, and storing the count value before clearing into the first register 204.

First pixel number comparator 205: and the fourth indicating signal is output if the number of the effective pixel points stored before the effective pixel point number counter is cleared is greater than the preset continuous number threshold.

That is, it is determined whether or not the count value stored in the first register 204 is equal to or greater than the osd continuation threshold (osd _ col _ th) of the system configuration, and if yes, it is determined that there are osd pixels in the line whose number of consecutive and consecutive effective pixels satisfies the set condition, and the output signal is pulled high.

In addition, the first and circuit 206 may be configured to output the instruction signal to the row state memory 301 and the second and circuit 303 and enable the second register 207 and the fourth register 305 when receiving the fourth instruction signal and the third instruction signal.

Further, the following elements are provided in the consecutive number of lines judging unit:

line state memory 301: for indicating the current row state with active pixels according to the indication signal of the first and circuit 206, but of course, the fourth indication signal may also be used in the implementation process.

Wherein the line state includes a line in which it is detected that the effective pixels exist in the first line, and a line in which it is detected that the effective pixels exist continuously. FIG. 8 is a diagram illustrating data state transitions in the row state memory of FIG. 7. As shown in fig. 8, the present embodiment uses a 2-bit indication signal to indicate the status of the currently detected line, where first _ flag is 2 'b 10 to indicate that the current frame has not detected a line with valid pixels, first _ flag is 2' b11 to indicate that the current frame has detected a line with valid pixels in the first line, first _ flag is 2 'b 01 to indicate that the current frame has detected a line with valid pixels in the consecutive lines, first _ flag is 2' b00 to indicate the initial status, det to indicate that a line with valid pixels is detected, and hs to be the line synchronization signal in the video data signal.

Column coordinate memory 302: and the display device is used for respectively storing the column coordinates of the initial effective pixel points in the first row with the effective pixels and the row with the effective pixels according to the second indicating signal.

Correspondingly, in order to obtain the column coordinates of the pixel points, as shown in fig. 6, the present embodiment further includes a column coordinate counter 105 configured in the luminance value obtaining unit, and configured to confirm that the current pixel is the pixel of the column several times in the current row, that is, the column coordinates of the pixel points, by counting the high level of the de signal using the system clock signal.

The column coordinate memory 302 obtains the column coordinates of the pixels corresponding to the column coordinate counter 105 in fig. 6 according to the flag state, that is, when the flag is in the high level state, the coordinate values are stored through two registers, wherein the third register 304 stores the column coordinates of the first effective pixel in the first row of the frame where the effective pixels exist; the fourth register 305 stores the column coordinates of the first active pixel in the row where the active pixels exist in the other rows in the frame.

In the embodiment, data storage in the two registers is realized by adopting a method that data is stored in the column coordinate memory 302 only when the first _ flag is 2' b11 and the indication signal in the first and circuit 206 is received by arranging the second and circuit 303 connected with the third register 304; and the fourth register 305 is directly connected to the column coordinate memory 302 and the first and-gate circuit 206.

Column coordinate comparator 306: and the controller is used for comparing the row coordinate of the initial effective pixel point in the row with the effective pixel in the first row and the row with the effective pixel currently if the row state is that the rows with the effective pixels continuously exist, wherein if the difference value of the two is less than the preset row difference value, a fifth indication signal is output.

Second pixel count comparator 312: and the sixth indicating signal is output if the difference between the effective pixel point number and the effective pixel point number is smaller than the difference between the preset number and the effective pixel point number.

The present embodiment controls the signal input of the second pixel count comparator 312 as follows: the enable signal line of the seventh register 311 is connected to the output terminal of the fourth and circuit 310, and when the first _ flag is 2' b11 and the current row output by the sixth register 309 has a row of valid pixels, it indicates that the first row of the current row has a row of valid pixels, and at this time, the seventh register 311 is enabled, so that the number of pixels whose input, that is, the current row satisfies the continuous condition, can be stored. The fifth register 308 enables the signal line to be connected to the output of the third and circuit 307, wherein when the presence of valid pixels satisfying the continuity condition is simultaneously satisfied, and the first row and the subsequent row have the initial valid pixel point pair of valid pixels and the row having valid pixels is continuous, the fifth register 308 can store the number of valid pixels satisfying the continuity condition in the current row. Meanwhile, the enable signal line of the second pixel count comparator 312 is also output from the fourth and circuit 310, and comparison of data stored in the fifth register 308 and the seventh register 311 can be performed.

The effective line memory 313: and the counting module is used for counting the number of the continuous lines of the effective pixel points after receiving the sixth indication signal.

The continuous line number determiner 314: and the OSD image judging module is used for judging whether the number of the continuous lines of the effective pixel points is greater than the preset number of lines, and if so, judging that the OSD image exists in the current frame video image.

And when the accumulated result of the continuous line number in a frame of video image is greater than a preset line number threshold value OSD _ line _ th set by the system, judging that the OSD image superposition exists in the current frame of video image, and correspondingly outputting an OSD _ flag high-level signal. Meanwhile, the signal is cleared by the falling edge of the frame synchronization signal.

Based on the method and the device, the embodiment also provides the terminal equipment, wherein the terminal equipment can be a television, a computer and the like. Fig. 9 is a schematic diagram of a basic structure of a terminal device according to an embodiment of the present application. As shown in fig. 9, the device for detecting an OSD image in a video image 100 according to the above embodiment of the present invention further includes a black border processing module 200 connected to the OSD image in a video image detecting device 100, where the black border processing module is configured to perform image quality processing on the video image with the black border.

Further, the signal input of the OSD image detection apparatus 100 in the video image may include the following signals:

the working clock Clk, and a reset signal rst _ n, wherein the reset signal is used for resetting the whole device to be in an initial state. The whole circuit system is still unstable when the power is on, and the whole device is in an initial state by using a reset signal at this time until the system is stable and then is released from reset to really work.

Video data signal, Vs: frame synchronization signal, hs: a line synchronization signal; de: a row valid signal; rgb: the red, green and blue components of the pixel.

Configuration register control signals: a pixel luminance threshold osd _ th, which means that the pixel luminance is primarily considered as a pixel in osd only if the pixel luminance is at least greater than or equal to the threshold; the threshold Osd _ col _ th of the number of consecutive pixels, that is, when there are consecutive pixels whose luminance is greater than or equal to osd _ th and the number is greater than or equal to osd _ col _ th, the current row may be a row having osd pixels; a consecutive line number threshold Osd _ line _ th, which means that when there are consecutive lines having osd pixels and the consecutive line number is greater than or equal to osd _ line _ th, the current frame may have an osd image;

the three signals may be output signals from an SOC chip or from a preceding-stage processing module in an image quality post-processing chip.

In addition, the input signal of the OSD image detecting apparatus 100 in the video image further includes a Top value Top _ pre and a Bottom value Bottom _ pre of the black edge of the previous frame video image from the black edge processing module 200: the top and bottom values refer to the line coordinates of the lower edge of the upper black border and the coordinates of the upper edge of the lower black border in one frame image.

Finally, the output signal of the OSD image detection apparatus 100 in the video image is an OSD indication signal sent to the black border processing module 200, that is, a signal for determining that the OSD image exists in the current frame video image.

The black edge processing module 200 can perform corresponding processing according to the indication signal, so as to achieve the purpose of black edge protection. For example, if there is an OSD image, the black side information of the current frame is not updated any more, and if not, the black side information of the current frame is updated in real time.

It should be noted that the terminal device in this embodiment may further include other components, such as a display screen, a power supply, and the like, which are not described one by one herein.

The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

The foregoing is merely a detailed description of the invention, and it should be noted that modifications and adaptations by those skilled in the art may be made without departing from the principles of the invention, and should be considered as within the scope of the invention.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种多模型集成方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!