CN103731608B - Character superimposition display method capable of supporting multiple colors and automatic color inverting - Google Patents

Character superimposition display method capable of supporting multiple colors and automatic color inverting Download PDF

Info

Publication number
CN103731608B
CN103731608B CN201310739553.4A CN201310739553A CN103731608B CN 103731608 B CN103731608 B CN 103731608B CN 201310739553 A CN201310739553 A CN 201310739553A CN 103731608 B CN103731608 B CN 103731608B
Authority
CN
China
Prior art keywords
color
character
value
information
lookup table
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
Application number
CN201310739553.4A
Other languages
Chinese (zh)
Other versions
CN103731608A (en
Inventor
肖仁伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Infinova Ltd
Original Assignee
Shenzhen Infinova Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Infinova Ltd filed Critical Shenzhen Infinova Ltd
Priority to CN201310739553.4A priority Critical patent/CN103731608B/en
Publication of CN103731608A publication Critical patent/CN103731608A/en
Application granted granted Critical
Publication of CN103731608B publication Critical patent/CN103731608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Generation (AREA)

Abstract

The invention provides a character superimposition display method capable of supporting multiple colors and automatic color inverting. The method includes the following steps that firstly, the luminance average value of a background image where a character is located needs to be calculated according to the position and font size information of the superimposed character, wherein the luminance average value needs to be compared with a set value so that whether the set character display color or the character display color which is inverted relative to the set character display color is displayed can be determined; secondly, matrix information generated by the freetype is modified in a dynamic mode according to the judgment result of the luminance value, if the character is displayed in the natural color, no processing is conducted, and if the character is displayed in the inverted color, the corresponding value of a matrix is modified to be the color index value of the inverted color; thirdly, processing and renewing a color lookup table, if a single color needs to be achieved, the same yuv values are filled in the color lookup table, and if the natural color and the inverted color need to be achieved, the yuv values of the two colors are filled in the same table in an alternate mode.

Description

A kind of character adding display methods that can support multiple color and automatic inverse
Technical field
The invention belongs to safety-security area, particularly in digital front end, such as video camera, hemisphere, quick, head etc. sets Standby enterprising line character superposition.
Background technology
Character adding function, is an indispensable function of digital front end.The information of superposition typically can dynamically be arranged, Including time, place, state etc. content.But, the information of common equipment superposition, or display white, or display is black Color, or wrongly written or mispronounced character darkens the display effect on side.These display modes affected by background luminance very big, if background very bright or Person is very dark, and frequently can lead to the information that is superimposed cannot be it is clear that as shown in Figure 1.
Traditional character adding mode has two kinds, and a kind of is to produce a static formed word module information, needs overlaying character When, go in formed word module information table, to search the lattice information of character to be superimposed, the Y that this dot matrix font information is substituted into image divides In amount.The method can realize simple black or white font shows.The shortcoming of the method is, the generation of character library information Journey is cumbersome, and the font size in character library information is fixed, if the font of multiple sizes will be supported, needs to do many parts of character libraries Information, wastes valuable embedded device memory space.
Another way is, by the freetype storehouse increased income, dynamically to generate formed word module information.Freetype function is stronger Greatly, support font size setting, profile, the characteristic such as italic, support the setting of transparency simultaneously, the display effect of font is more beautiful See.Although Freetype storehouse dynamic generates formed word module information, color lookup table need to be coordinated to use, just can show different Color.Common practice is to arrange monochromatic color lookup table, this method will necessarily cause in some scenarios, superposition Character does not see.
YUV, is a kind of colour coding method.
YUV is compiling true-color color space(color space)Species, Y'UV, YUV, YCbCr, YPbPr etc. Proper noun can be referred to as YUV, has overlap each other." Y " represents lightness(Luminance、Luma), " U " and " V " is then color Degree, concentration(Chrominance、Chroma), Y'UV, YUV, YCbCr, YPbPr usually some mixed situations, wherein YUV and Y'UV is commonly used to describe analog signal, and contrary YCbCr and YPbPr is then used to describe the signal of video signal of numerical digit, for example In MPEG, JPEG in some compressed formats, but now, YUV generally widely uses in computer system.YUV Formats is divided into two forms:
Tighten form(packed formats):Y, U, V value is stored into Macro Pixels array, and the depositing of RGB Mode is similar to.
Planar format(planar formats):Three deals of Y, U, V are left in different matrixes respectively.
Tighten form(packed format)In YUV mix, for YUV4:4:For 4 forms, use Tighten form very suitable, therefore just have UYVY, YUYV etc..Planar format(planar formats)Refer to every Y deal, U Deal and V deal are all and the V deal that is to say, that all of U deal must be after Y-component with independent plane tissue After all of U deal, this form is applied to sampling(subsample).Planar format(planar format)There is I420 (4:2:0), YV12, IYUV etc..
Content of the invention
The purpose of the present invention is:In any scene, the information of superposition, the Show Color of font simultaneously can be can be clearly seen that Can arrange.
The present invention provides a kind of character adding display methods that can support multiple color and automatic inverse, and methods described includes Following steps:
1)Need the position of character and the font size information according to superposition, calculate the Background of this character position The average brightness of picture, this average brightness needs and certain setting value compares, and is that the character showing setting shows to determine Still contrary with the setting value character Show Color of color;
2)According to the judged result of brightness value above, need dynamically to go to change the formed word module information that freetype produces, if Being shown with true qualities, be left intact, if shown with inverse, needing to change the color index that type matrix analog value is opposite color Value;
3)Need color lookup table to be processed and updates.General color lookup table supports 8 256 kinds of colors, if It is monochromatic, fill identical yuv value in color lookup table, for example, if white font to be shown, can fill out in color table Fill { .y=235 .u=128 .v=128 .a=i }, wherein .a represents transparency.The principle of other color fillings is identical.If needed Realize positive and negative two kinds of colors, the yuv value of two kinds of colors of filling can be replaced in same table.
Brief description
It is more fully described the exemplary embodiment of the present invention by referring to accompanying drawing, the above and other aspect of the present invention is excellent Point will become clearer from, in the accompanying drawings:
Fig. 1 is pure white font in prior art, the situation schematic diagram that highlighted place does not see;
Fig. 2 is the design sketch of the black and white contrast of the present invention;
Fig. 3 is effect (left side is blue, the right yellow) figure of the colored font of the present invention;
Fig. 4 is method of the present invention flow chart.
Specific embodiment
Hereinafter, it is more fully described the present invention now with reference to accompanying drawing, various embodiments shown in the drawings.So And, the present invention can be implemented in many different forms, and should not be construed as limited to embodiment set forth herein.Phase Instead, these embodiments are provided so that the disclosure will be thoroughly and completely, and fully convey the scope of the present invention to ability Field technique personnel.
Hereinafter, the exemplary embodiment of the present invention will be more fully described referring to figs. 1 to Fig. 4.
When starting character adding, need first the parameter of setting to be parsed in overlapped information parsing part, bag Include the enable of character adding, the positional information of superposition, font size, color and message length.
If the enable switch of character adding is opened, need to proceed to next step, that is, update corresponding character adding letter Breath, otherwise, notifies character adding module to close osd function.
Update character adding information and include two parts, update color lookup table and formed word module information.Update color lookup table letter 256 kinds of colors in color lookup table, according to the color parameter of setting, if only needing to realize monochromatic effect, can be filled out by breath Fill into fixing color, transparency is followed successively by 0 to 255.If realizing positive inverse, can alternately store two kinds of color values, thoroughly Lightness also sets gradually into 0 to 255, i.e. countenance even number transparence value, inverse odd number transparence value.
If the monochromatic display effect of setting is it is not necessary to update formed word module information, the type matrix directly producing freetype Pass to character adding module.If the double-colored display effect of setting, a thread, the effect of this thread need to be created It is that, according to the character adding information of setting, dynamic calculation wants the average brightness of overlaying character region, if this mean value More than the brightness value setting, need corresponding character done with inverse and process, will the formed word module information that produces of freetype be converted into The color index value of opposite color.
The effect of character adding module is, according to the color lookup table obtaining and formed word module information, completes character information superposition Function to image.
The foregoing is only embodiments of the invention, be not limited to the present invention.The present invention can have various conjunctions Suitable change and change.All any modification, equivalent substitution and improvement made within the spirit and principles in the present invention etc., all should It is included within protection scope of the present invention.

Claims (2)

1. a kind of character adding display methods that can support multiple color and automatic inverse it is characterised in that:
Methods described comprises the steps:
1) position of the character according to superposition and font size information, calculate the brightness of the background image of this character position Mean value, this average brightness need and setting value compare, with determine show setting character Show Color or with set The contrary character Show Color of definite value;
2) judged result according to brightness value above, dynamically goes to change the formed word module information that freetype produces, if shown with true qualities Show, be left intact, if shown with inverse, modification type matrix analog value is the color index value of opposite color;
3) color lookup table is processed and updated, if monochromatic, in color lookup table, filled identical yuv value; Realize positive and negative two kinds of colors if necessary, same table is alternately filled the yuv value of two kinds of colors;
When starting character adding, partly first the parameter of setting is parsed in overlapped information parsing, fold including character Plus enable, the positional information of superposition, font size, color and message length;
If the enable switch of character adding is opened, proceed to next step, that is, update corresponding character adding information, otherwise, Character adding module is notified to close osd function;
Described renewal character adding information includes two parts, updates color lookup table and formed word module information;Update color lookup table letter 256 kinds of colors in color lookup table, according to the color parameter of setting, if only needing to realize monochromatic effect, can be filled out by breath Fill into fixing color, transparency is followed successively by 0 to 255;If realizing positive inverse, can alternately store two kinds of color values, thoroughly Lightness also sets gradually into 0 to 255, i.e. countenance even number transparence value, inverse odd number transparence value;
If the monochromatic display effect of setting is it is not necessary to update formed word module information, directly the type matrix that freetype produces is transmitted To character adding module;If the double-colored display effect of setting, create a thread, the effect of this thread is, according to The character adding information of setting, dynamic calculation wants the average brightness of overlaying character region, if this mean value is more than set Fixed brightness value, corresponding character is done inverse process, will freetype produce formed word module information be converted into opposite color Color index value.
2. a kind of character adding display methods that can support multiple color and automatic inverse according to claim 1, it is special Levy and be:
Described character adding module, according to the color lookup table obtaining and formed word module information, completes character information and is added to image Function.
CN201310739553.4A 2013-12-27 2013-12-27 Character superimposition display method capable of supporting multiple colors and automatic color inverting Active CN103731608B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310739553.4A CN103731608B (en) 2013-12-27 2013-12-27 Character superimposition display method capable of supporting multiple colors and automatic color inverting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310739553.4A CN103731608B (en) 2013-12-27 2013-12-27 Character superimposition display method capable of supporting multiple colors and automatic color inverting

Publications (2)

Publication Number Publication Date
CN103731608A CN103731608A (en) 2014-04-16
CN103731608B true CN103731608B (en) 2017-02-08

Family

ID=50455520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310739553.4A Active CN103731608B (en) 2013-12-27 2013-12-27 Character superimposition display method capable of supporting multiple colors and automatic color inverting

Country Status (1)

Country Link
CN (1) CN103731608B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049758B (en) * 2015-06-30 2018-10-02 深圳市创凯智能股份有限公司 The character adding processing system and method for combination
CN105635792B (en) * 2015-12-30 2018-12-07 深圳Tcl数字技术有限公司 Function menu method of adjustment and device
CN106534722B (en) * 2016-12-19 2019-08-16 中国科学院长春光学精密机械与物理研究所 Video flowing character adding processing system and processing method based on FPGA
CN108200361B (en) * 2018-02-07 2020-08-04 中译语通科技股份有限公司 Subtitle background processing method based on environment perception technology and display
CN109151549A (en) * 2018-09-10 2019-01-04 天津市亚安科技有限公司 Realize monitor video picture character adding inverse display system and method, processor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299804A (en) * 2008-05-28 2008-11-05 华为技术有限公司 Character overlapping method and device
CN101477792A (en) * 2009-01-21 2009-07-08 深圳华为通信技术有限公司 Method for displaying overlapped pattern on the background picture and display apparatus thereof
CN103067665A (en) * 2012-12-25 2013-04-24 天津市亚安科技股份有限公司 Implement method of self-adaptation overlying character colors based on video luminance
CN103151022A (en) * 2013-01-31 2013-06-12 广东欧珀移动通信有限公司 Method for automatically changing font colors according to background color and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004172792A (en) * 2002-11-19 2004-06-17 Funai Electric Co Ltd Receiver

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299804A (en) * 2008-05-28 2008-11-05 华为技术有限公司 Character overlapping method and device
CN101477792A (en) * 2009-01-21 2009-07-08 深圳华为通信技术有限公司 Method for displaying overlapped pattern on the background picture and display apparatus thereof
CN103067665A (en) * 2012-12-25 2013-04-24 天津市亚安科技股份有限公司 Implement method of self-adaptation overlying character colors based on video luminance
CN103151022A (en) * 2013-01-31 2013-06-12 广东欧珀移动通信有限公司 Method for automatically changing font colors according to background color and system

Also Published As

Publication number Publication date
CN103731608A (en) 2014-04-16

Similar Documents

Publication Publication Date Title
CN103731608B (en) Character superimposition display method capable of supporting multiple colors and automatic color inverting
EP3465673B1 (en) Transitioning between video priority and graphics priority
CN106228581B (en) Pixel format is converted to the method and system of NV12 by GPU by ARGB
KR101170408B1 (en) Dominant color extraction for ambient light derived from video content mapped through unrendered color space
CN105721841B (en) High resolution ratio array video camera
US20040233217A1 (en) Adaptive pixel-based blending method and system
CN101268700A (en) Method and apparatus for superimposing characters on video
CN109831668B (en) Data compression method and device, data coding/decoding method and device
EP3347811A1 (en) Global command interface for a hybrid display, corresponding method, and head mounted display
CN101523990A (en) Method for color transition for ambient or general illumination system
CN107211142A (en) The method and apparatus decoded to coloured image
EP2890107A1 (en) Method of mapping source colors of images of a video content into the target color gamut of a target color device
WO2016184831A1 (en) Method and device for processing color image data representing colors of a color gamut
WO2022205915A1 (en) Video processing method, video processing device, and display device
WO2015029633A1 (en) Liquid crystal display device, and image display method for liquid crystal display device
US20180139360A1 (en) Method and device for processing color image data representing colors of a color gamut
CN107341835B (en) Image processing method, device, electronic equipment and computer readable storage medium
KR102449634B1 (en) Adaptive color grade interpolation method and device
KR100434380B1 (en) Conversion system of color space of osd and the method
TWI472232B (en) Video transmission by decoupling color components and apparatus thereof and processor readable tangible medium encoded with instructions
CN106063243B (en) Method for generating data on image/video signal, bit stream carrying specific information data and method for obtaining the specific information
US20070109314A1 (en) Adaptive pixel-based blending method and system
CN113207023A (en) Method, device, equipment and medium for processing background color change of television detail page
EP3096510A1 (en) Method and device for processing color image data representing colors of a color gamut
CN102025936A (en) Video aspect ratio conversion method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant