CN106600527A - Method and device for embedding adaptive-color text into image - Google Patents

Method and device for embedding adaptive-color text into image Download PDF

Info

Publication number
CN106600527A
CN106600527A CN201611177569.0A CN201611177569A CN106600527A CN 106600527 A CN106600527 A CN 106600527A CN 201611177569 A CN201611177569 A CN 201611177569A CN 106600527 A CN106600527 A CN 106600527A
Authority
CN
China
Prior art keywords
word
gray value
image
pending video
video
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.)
Pending
Application number
CN201611177569.0A
Other languages
Chinese (zh)
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.)
Vtron Technologies Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN201611177569.0A priority Critical patent/CN106600527A/en
Publication of CN106600527A publication Critical patent/CN106600527A/en
Pending legal-status Critical Current

Links

Classifications

    • G06T3/04

Abstract

The embodiments of the invention disclose a method and a device for embedding adaptive-color text into an image. According to the embodiments, memory DC of text outline is generated through GDI drawing, and then, the text memory DC is embedded into each frame (namely, a YUV or RGB image) of a video. Thus, text can be added to each frame of image of a video without relying on any third-party library. Moreover, in the process of video display, the pixel value of the memory DC text can be modified in real time by calculating the gray value of the color around the video, so as to keep a gray value difference between the text color and the video image color in real time. The problem that video text and video images cannot be seen clearly due to color similarity is solved, and the visual experience of users is enhanced.

Description

A kind of method and device of the embedded adaptive color word of image
Technical field
The present invention relates to video text display field, more particularly to a kind of embedded adaptive color word of image method and Device.
Background technology
Video refer to a series of static images are caught in the way of electric signal, are recorded, being processed, being stored, transmit with The various technologies reappeared.
The display of traditional video text has relied on third party's video decoding storehouse to add word to video.
Therefore it provides one kind adds word in the case of not relying on any third party library for each two field picture of video, and The method and device of the problem that can solve the problem that video text similar to video image color and do not see is those skilled in the art The technical issues that need to address.
The content of the invention
A kind of method and device of the embedded adaptive color word of image is embodiments provided, is realized and is independent of Add word for each two field picture of video in the case of any third party library, and solve video text and video image color The similar and problem that do not see, improves user's visual experience effect.
The method for embodiments providing a kind of embedded adaptive color word of image, including:
Get GDI drawing and generate word internal memory DC;
The word internal memory DC is loaded in the image of pending video so that the image of the pending video shows Word corresponding with the word internal memory DC;
The gray value of the image of the pending video is calculated, according to the gray value modification of the image of the pending video The gray value of the word, obtains amended word so that the gray value of the image of the pending video and the modification Difference between the gray value of word afterwards meets preset gray value difference.
Preferably, the image of the pending video is YUV image or RGB image.
Preferably, it is described that the word internal memory DC is loaded in the image of pending video so that described pending to regard The image of frequency shows that word corresponding with the word internal memory DC is specially:
The word internal memory DC is loaded in each two field picture of pending video so that the pending video it is every One two field picture shows word corresponding with the word internal memory DC.
Preferably, the gray value of the image for calculating the pending video, according to the image of the pending video Gray value change the gray value of the word, obtain amended word so that the gray scale of the image of the pending video Difference between the gray value of value and the amended word meets preset gray value difference and is specially:
The gray value of each two field picture of the pending video is calculated, according to each two field picture of the pending video Gray value change the gray value of the word, obtain amended word so that each two field picture of the pending video Gray value and the gray value of the amended word between difference meet preset gray value difference.
Preferably, the embodiment of the present invention additionally provides a kind of device of the embedded adaptive color word of image, including:
Acquiring unit, for getting GDI drawing word internal memory DC is generated;
Loading unit, for the word internal memory DC to be loaded in the image of pending video so that described pending The image of video shows word corresponding with the word internal memory DC;
Modification unit, for calculating the gray value of the image of the pending video, according to the figure of the pending video The gray value of picture changes the gray value of the word, obtains amended word so that the ash of the image of the pending video Difference between the gray value of angle value and the amended word meets preset gray value difference.
Preferably, the modification unit includes:
Computation subunit, for calculating the gray value of the image of the pending video;
Modification subelement, for changing the gray value of the word according to the gray value of the image of the pending video, Obtain amended word so that the gray value of the gray value of the image of the pending video and the amended word it Between difference meet preset gray value difference
Preferably, the loading unit is additionally operable to that the word internal memory DC is loaded into each two field picture of pending video In so that each two field picture of the pending video shows word corresponding with the word internal memory DC.
Preferably, the modification unit is additionally operable to the gray value of each two field picture for calculating the pending video, according to The gray value of each two field picture of the pending video changes the gray value of the word, obtains amended word so that Difference between the gray value of the gray value of each two field picture of the pending video and the amended word meets pre- Put gray value difference.
Preferably, the computation subunit is additionally operable to the gray value of each two field picture for calculating the pending video.
Preferably, the modification subelement is additionally operable to the gray value modification of each two field picture according to the pending video The gray value of the word, obtains amended word so that the gray value of each two field picture of the pending video and institute State the difference between the gray value of amended word and meet preset gray value difference.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:
A kind of method and device of the embedded adaptive color word of image is embodiments provided, wherein, the image The method of embedded adaptive color word includes:Get GDI drawing and generate word internal memory DC;By word internal memory DC loadings To in the image of pending video so that the image of the pending video shows word corresponding with the word internal memory DC; The gray value of the image of the pending video is calculated, the word is changed according to the gray value of the image of the pending video Gray value, obtain amended word so that the gray value of the image of the pending video and the amended word Gray value between difference meet preset gray value difference.The GDI that the embodiment of the present invention is carried by windows operating systems Draw and generate the internal memory DC of text profile, then this word internal memory DC is embedded into each frame i.e. YUV image or RGB of video In image, so it is achieved that in the case of not relying on any third party library to be each two field picture addition word of video, and In video display process, text can be made by calculating video ambient color gray value come the pixel value of real time modifying internal memory DC words Word color and video image remain in real time grey value difference, solve video text similar to video image color and do not see Problem, improve user's visual experience effect.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also To obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the method for the embedded adaptive color word of image provided in an embodiment of the present invention;
Fig. 2 is that a kind of another flow process of the method for the embedded adaptive color word of image provided in an embodiment of the present invention is illustrated Figure;
Fig. 3 is a kind of structural representation of the device of the embedded adaptive color word of image provided in an embodiment of the present invention.
Specific embodiment
A kind of method and device of the embedded adaptive color word of image is embodiments provided, is realized and is independent of Add word for each two field picture of video in the case of any third party library, and solve video text and video image color The similar and problem that do not see, improves user's visual experience effect.
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present invention Accompanying drawing in embodiment, is clearly and completely described, it is clear that disclosed below to the technical scheme in the embodiment of the present invention Embodiment be only a part of embodiment of the invention, and not all embodiment.Based on the embodiment in the present invention, this area All other embodiment that those of ordinary skill is obtained under the premise of creative work is not made, belongs to protection of the present invention Scope.
Refer to Fig. 1, an a kind of reality of the method for the embedded adaptive color word of image provided in an embodiment of the present invention Example is applied, including:
101st, get GDI drawing and generate word internal memory DC;
After GDI draws and generates word internal memory DC, word internal memory DC is got.
102nd, word internal memory DC is loaded in the image of pending video so that the image of pending video shows and text The corresponding words of chaacter memory DC;
After getting word internal memory DC, word internal memory DC is loaded in the image of pending video so that pending to regard The image of frequency shows word corresponding with word internal memory DC.
Wherein, the image of pending video is YUV image or RGB image.
103rd, the gray value of the image of pending video is calculated, according to the gray value modification word of the image of pending video Gray value, obtain amended word so that the gray value of the gray value of the image of pending video and amended word Between difference meet preset gray value difference.
The image of pending video shown after word corresponding with word internal memory DC, calculates the ash of the image of pending video Angle value, according to the gray value of the image of pending video the gray value of word is changed, and obtains amended word so that pending Difference between the gray value of the gray value of the image of video and amended word meets preset gray value difference.
Fig. 2 is referred to, a kind of image provided in an embodiment of the present invention is embedded in another of the method for adaptive color word Embodiment, including:
201st, get GDI drawing and generate word internal memory DC;
After GDI draws and generates word internal memory DC, word internal memory DC is got.
202nd, word internal memory DC is loaded in each two field picture of pending video so that each frame of pending video Image shows word corresponding with word internal memory DC;
After getting word internal memory DC, word internal memory DC is loaded in each two field picture of pending video so that treat The each two field picture for processing video shows word corresponding with word internal memory DC.
Wherein, the image of pending video is YUV image or RGB image.
203rd, the gray value of each two field picture of pending video is calculated, according to the ash of each two field picture of pending video Angle value change word gray value, obtain amended word so that the gray value of each two field picture of pending video with repair Difference between the gray value of the word after changing meets preset gray value difference.
Each two field picture of pending video shown after word corresponding with word internal memory DC, calculates the every of pending video The gray value of one two field picture, according to the gray value of each two field picture of pending video the gray value of word is changed, and is changed Word afterwards so that the difference between the gray value of each two field picture of pending video and the gray value of amended word expires The preset gray value difference of foot.
In the present embodiment, the GDI for being carried by windows operating systems is drawn and generates the internal memory DC of text profile, so This word internal memory DC is embedded in each frame of video i.e. YUV/RGB images afterwards, be so achieved that do not rely on it is any Add word for each two field picture of video in the case of third party library;In video display process, embedded internal memory DC words can By calculating video ambient color gray value come the pixel value of real time modifying internal memory DC words, text color and video image reality are made When remain grey value difference, solve the problems, such as that video text is similar to video image color and does not see, improve user Visual experience effect.
Change video text color in real time and just must be able to real time modifying text pixel value, for video, video image All it is made up of pixel with word, the generation of text pixel can be generated by GDI drawing memories DC, and text pixel is embedded into Video frame image be in YUV/RGB by for video add word, be so embodied as regarding in the case where other storehouses are not relied on Frequency addition word, makes software installation bag lighter and handier, by calculating the video pixel gray value of word ambient color come real time modifying Word gray value, so that word can be highlighted, facilitates user to view the word of video at any time.
Refer to Fig. 3, an a kind of reality of the device of the embedded adaptive color word of image provided in an embodiment of the present invention Example is applied, including:
Acquiring unit 301, for getting GDI drawing word internal memory DC is generated;
Loading unit 302, for word internal memory DC to be loaded in the image of pending video so that pending video Image shows word corresponding with word internal memory DC;
Modification unit 303, for calculating the gray value of the image of pending video, according to the ash of the image of pending video Angle value change word gray value, obtain amended word so that the gray value of the image of pending video with it is amended Difference between the gray value of word meets preset gray value difference.
Modification unit 303 includes:
Computation subunit 3031, for calculating the gray value of the image of pending video;
Modification subelement 3032, for changing the gray value of word according to the gray value of the image of pending video, obtains Amended word so that the difference between the gray value of the gray value of the image of pending video and amended word meets Preset gray value difference
Loading unit 302 is additionally operable to that word internal memory DC is loaded in each two field picture of pending video so that wait to locate Each two field picture of reason video shows word corresponding with word internal memory DC.
Modification unit 303 is additionally operable to calculate the gray value of each two field picture of pending video, according to pending video The gray value of each two field picture changes the gray value of word, obtains amended word so that each frame figure of pending video Difference between the gray value of the gray value of picture and amended word meets preset gray value difference.
Computation subunit 3031 is additionally operable to calculate the gray value of each two field picture of pending video.
Modification subelement 3032 is additionally operable to the gray scale that the gray value of each two field picture according to pending video changes word Value, obtains amended word so that the gray value of each two field picture of pending video and the gray value of amended word Between difference meet preset gray value difference.
Those skilled in the art can be understood that, for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be described here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematic, for example, the unit Divide, only a kind of division of logic function can have other dividing mode, such as multiple units or component when actually realizing Can with reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or The coupling each other for discussing or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit Close or communicate to connect, can be electrical, mechanical or other forms.
The unit as separating component explanation can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can according to the actual needs be selected to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list Unit both can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized using in the form of SFU software functional unit and as independent production marketing or used When, during a computer read/write memory medium can be stored in.Based on such understanding, technical scheme is substantially The part for contributing to prior art in other words or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention Portion or part steps.And aforesaid storage medium includes:USB flash disk, portable hard drive, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
The above, above example only to illustrate technical scheme, rather than a limitation;Although with reference to front State embodiment to be described in detail the present invention, it will be understood by those within the art that:It still can be to front State the technical scheme described in each embodiment to modify, or equivalent is carried out to which part technical characteristic;And these Modification is replaced, and does not make the spirit and scope of the essence disengaging various embodiments of the present invention technical scheme of appropriate technical solution.

Claims (10)

1. a kind of method that image is embedded in adaptive color word, it is characterised in that include:
Get GDI drawing and generate word internal memory DC;
The word internal memory DC is loaded in the image of pending video so that the image of the pending video shows and institute State the corresponding words of word internal memory DC;
The gray value of the image of the pending video is calculated, according to the gray value modification of the image of the pending video The gray value of word, obtains amended word so that the gray value of the image of the pending video is amended with described Difference between the gray value of word meets preset gray value difference.
2. the method that according to claim 1 image is embedded in adaptive color word, it is characterised in that the pending video Image be YUV image or RGB image.
3. the method that according to claim 1 image is embedded in adaptive color word, it is characterised in that described by the word Internal memory DC is loaded in the image of pending video so that the image of the pending video shows and word internal memory DC pair The word answered is specially:
The word internal memory DC is loaded in each two field picture of pending video so that each frame of the pending video Image shows word corresponding with the word internal memory DC.
4. the method that according to claim 1 image is embedded in adaptive color word, it is characterised in that treat described in the calculating The gray value of the image of video is processed, the gray value of the word is changed according to the gray value of the image of the pending video, Obtain amended word so that the gray value of the gray value of the image of the pending video and the amended word it Between difference meet preset gray value difference and be specially:
The gray value of each two field picture of the pending video is calculated, according to the ash of each two field picture of the pending video Angle value changes the gray value of the word, obtains amended word so that the ash of each two field picture of the pending video Difference between the gray value of angle value and the amended word meets preset gray value difference.
5. a kind of image is embedded in the device of adaptive color word, it is characterised in that include:
Acquiring unit, for getting GDI drawing word internal memory DC is generated;
Loading unit, for the word internal memory DC to be loaded in the image of pending video so that the pending video Image show word corresponding with the word internal memory DC;
Modification unit, for calculating the gray value of the image of the pending video, according to the image of the pending video Gray value changes the gray value of the word, obtains amended word so that the gray value of the image of the pending video And the difference between the gray value of the amended word meets preset gray value difference.
6. according to claim 5 image is embedded in the device of adaptive color word, it is characterised in that the modification unit bag Include:
Computation subunit, for calculating the gray value of the image of the pending video;
Modification subelement, for changing the gray value of the word according to the gray value of the image of the pending video, obtains Amended word so that between the gray value of the gray value of the image of the pending video and the amended word Difference meets preset gray value difference.
7. according to claim 5 image is embedded in the device of adaptive color word, it is characterised in that the loading unit is also For the word internal memory DC to be loaded in each two field picture of pending video so that each frame of the pending video Image shows word corresponding with the word internal memory DC.
8. according to claim 6 image is embedded in the device of adaptive color word, it is characterised in that the modification unit is also For calculating the gray value of each two field picture of the pending video, according to the ash of each two field picture of the pending video Angle value changes the gray value of the word, obtains amended word so that the ash of each two field picture of the pending video Difference between the gray value of angle value and the amended word meets preset gray value difference.
9. according to claim 8 image is embedded in the device of adaptive color word, it is characterised in that the computation subunit The gray value of each two field picture for being additionally operable to calculate the pending video.
10. according to claim 8 image is embedded in the device of adaptive color word, it is characterised in that modification is single Unit is additionally operable to the gray value that the gray value of each two field picture according to the pending video changes the word, after being changed Word so that between the gray value of the gray value of each two field picture of the pending video and the amended word Difference meets preset gray value difference.
CN201611177569.0A 2016-12-19 2016-12-19 Method and device for embedding adaptive-color text into image Pending CN106600527A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611177569.0A CN106600527A (en) 2016-12-19 2016-12-19 Method and device for embedding adaptive-color text into image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611177569.0A CN106600527A (en) 2016-12-19 2016-12-19 Method and device for embedding adaptive-color text into image

Publications (1)

Publication Number Publication Date
CN106600527A true CN106600527A (en) 2017-04-26

Family

ID=58601601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611177569.0A Pending CN106600527A (en) 2016-12-19 2016-12-19 Method and device for embedding adaptive-color text into image

Country Status (1)

Country Link
CN (1) CN106600527A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020135795A1 (en) * 2018-12-29 2020-07-02 深圳市道通智能航空技术有限公司 Image display method and apparatus, and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197948A (en) * 2007-12-04 2008-06-11 北京工业大学 Method for implementing multiple special effects of icon and subtitling in video
CN101742129A (en) * 2008-11-18 2010-06-16 中兴通讯股份有限公司 Method for processing caption
CN101917557A (en) * 2010-08-10 2010-12-15 浙江大学 Method for dynamically adding subtitles based on video content
CN102232294A (en) * 2008-12-01 2011-11-02 图象公司 Methods and systems for presenting three-dimensional motion pictures with content adaptive information
CN102611906A (en) * 2012-03-02 2012-07-25 清华大学 Method for displaying and editing stereoscopic video image-text label with adaptive depth
CN103905744A (en) * 2014-04-10 2014-07-02 中央电视台 Rendering synthetic method and system
CN104113749A (en) * 2009-01-08 2014-10-22 Lg电子株式会社 3d Caption Signal Transmission Method And 3d Caption Display Method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197948A (en) * 2007-12-04 2008-06-11 北京工业大学 Method for implementing multiple special effects of icon and subtitling in video
CN101742129A (en) * 2008-11-18 2010-06-16 中兴通讯股份有限公司 Method for processing caption
CN102232294A (en) * 2008-12-01 2011-11-02 图象公司 Methods and systems for presenting three-dimensional motion pictures with content adaptive information
CN104113749A (en) * 2009-01-08 2014-10-22 Lg电子株式会社 3d Caption Signal Transmission Method And 3d Caption Display Method
CN101917557A (en) * 2010-08-10 2010-12-15 浙江大学 Method for dynamically adding subtitles based on video content
CN102611906A (en) * 2012-03-02 2012-07-25 清华大学 Method for displaying and editing stereoscopic video image-text label with adaptive depth
CN103905744A (en) * 2014-04-10 2014-07-02 中央电视台 Rendering synthetic method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020135795A1 (en) * 2018-12-29 2020-07-02 深圳市道通智能航空技术有限公司 Image display method and apparatus, and electronic device

Similar Documents

Publication Publication Date Title
CN109792550B (en) Method, user equipment and server for processing 360-degree video
US9661298B2 (en) Depth image enhancement for hardware generated depth images
CN108230346B (en) Method and device for segmenting semantic features of image and electronic equipment
US8643677B2 (en) Image processing apparatus and image processing method, and program therefor
US9996959B2 (en) Systems and methods to display rendered images
KR20210067783A (en) Electronic apparatus and control method thereof and system
US20220036089A1 (en) Method, electronic apparatus and storage medium for detecting a static logo of a video
US11908051B2 (en) Image processing system and method for generating image content
CN107786780A (en) Video image noise reducing method, device and computer-readable recording medium
EP3828812B1 (en) Electronic apparatus and control method thereof
KR102091072B1 (en) Contents providing apparatus, display apparatus and controlling method thereof
US20180205967A1 (en) Image processing device and method
US10497090B2 (en) Systems and methods for reducing memory bandwidth via multiview compression/decompression
CN110517201A (en) Circulation protects the method, apparatus and electronic equipment of side smothing filtering
AU2017206290B2 (en) Correspondence labels for improved patch match
CN106600527A (en) Method and device for embedding adaptive-color text into image
US20160077659A1 (en) Method and apparatus for processing display data in electronic device
Ding et al. Video pre-processing with JND-based Gaussian filtering of superpixels
US20200279356A1 (en) Method and system for enhancing image, and computer readable storage medium
US20220148235A1 (en) Display apparatus and image processing method thereof for applying random patches to pixel block
CN104808998A (en) Method, device and mobile terminal for showing global control
CN111383289A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
CN112084371B (en) Movie multi-label classification method and device, electronic equipment and storage medium
CN112051974A (en) Electronic price tag information transmission method and system, electronic price tag and server
CN106228519B (en) A kind of image repair method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170426