CN105631797B - Watermark adding method and device - Google Patents
Watermark adding method and device Download PDFInfo
- Publication number
- CN105631797B CN105631797B CN201510990243.9A CN201510990243A CN105631797B CN 105631797 B CN105631797 B CN 105631797B CN 201510990243 A CN201510990243 A CN 201510990243A CN 105631797 B CN105631797 B CN 105631797B
- Authority
- CN
- China
- Prior art keywords
- color
- font
- watermark
- added
- font color
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
Abstract
Present disclose provides a kind of watermark adding method and devices, belong to field of terminal technology.The described method includes: obtaining the object region of watermark to be added in image to be processed;From the default font color set including alternative multiple font colors, the color similarity minimum target font color with object region is obtained;Later, the font color of watermark to be added is adjusted to target font color;Watermark adjusted is added to object region, obtains watermarking images.The disclosure can be adjusted the font color of watermark to be added automatically according to the color of object region, the color of watermark to be added and the color of object region are significantly distinguished, therefore the resolution height of watermark, display effect are good in this kind of watermark adding method.
Description
Technical field
This disclosure relates to field of terminal technology more particularly to a kind of watermark adding method and device.
Background technique
With popularizing for the intelligent terminals such as smart phone, tablet computer, not only function is more and more diversified for intelligent terminal, and
And performance is also stronger and stronger.For example the effect of some intelligent terminal shooting pictures can compare favourably with mm professional camera special, then
In addition the portable characteristic of mobile terminal, so that mobile terminal becomes the capital equipment that user is commonly used to shooting figure piece day.For
Meet the picture shooting demand of user, intelligent terminal, which provides, adds the function of watermark for the picture of user's shooting, for example adds
Add the watermarks such as photographing data, weather.
In the related technology, when the picture that shoots for user adds watermark, the watermark chosen of acquisition user first, and by water
The fixed font color of print is covered on the designated position of picture, when detecting that operation is completed in watermark addition, by watermark and figure
Piece is integrated into a watermark picture.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of watermark adding method and device, the technology
Scheme is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of watermark adding method is provided, comprising:
The object region in image to be processed is obtained, the object region is the region of watermark to be added;
From default font color set, target font color is obtained, the target font color is and the target image
The smallest font color of the color similarity in region, the default font color set include alternative multiple font colors;
The font color of watermark to be added is adjusted to the target font color;
Watermark adjusted is added to the object region, obtains watermarking images.
Optionally, described from default font color set, obtaining target font color includes:
For any font color in alternative multiple font colors, any font color and the mesh are calculated
Color distance in logo image region between whole pixels, obtains multiple color distances;
By the corresponding font color of the maximum color distance of numerical value in the multiple color distance, it is determined as the target word
Body color.
Optionally, the color calculated in any font color and the object region between whole pixels
Distance includes:
It is compiled according to the color of the color encoded radio of each pixel in the object region and any font color
Code value calculates the first distance between each pixel and any font color;
The corresponding first distance of each pixel is added, second distance is obtained, the second distance is determined as institute
State the color distance in any font color and the object region between whole pixels.
Optionally, the object region obtained in image to be processed includes:
Obtain the watermark to be added template that user chooses;
According to the watermark to be added template, the position to be added of the watermark to be added is obtained;
In the image to be processed, the object region for being located at the position to be added is obtained.
Optionally, a font color pair is included at least in alternative multiple font colors;Each font color pair
In two font colors, the central symmetry in designated color space;Between two font colors of each font color centering
Color distance be greater than designated color distance.
According to the second aspect of an embodiment of the present disclosure, a kind of watermark adding set is provided, comprising:
Image-region acquisition device, for obtaining the object region in image to be processed, the object region
For the region of watermark to be added;
Font color acquisition device, for obtaining target font color, the target font from default font color set
Color is the smallest font color of color similarity with the object region, and the default font color set includes alternative
Multiple font colors;
Font color adjusts device, for the font color of watermark to be added to be adjusted to the target font color;
Watermark generating means obtain watermarking images for watermark adjusted to be added to the object region.
Optionally, the font color acquisition device, for for any font in alternative multiple font colors
Color calculates the color distance in any font color and the object region between whole pixels, obtains multiple
Color distance;By the corresponding font color of the maximum color distance of numerical value in the multiple color distance, it is determined as the target
Font color.
Optionally, the font color acquisition device, for the color according to each pixel in the object region
The color encoded radio of encoded radio and any font color calculates between each pixel and any font color
First distance;The corresponding first distance of each pixel is added, second distance is obtained, the second distance is determined as institute
State the color distance in any font color and the object region between whole pixels.
Optionally, described image region acquisition device, for obtaining the watermark to be added template of user's selection;According to described
Watermark to be added template obtains the position to be added of the watermark to be added;In the image to be processed, obtain described in being located at
The object region of position to be added.
Optionally, a font color pair is included at least in alternative multiple font colors;Each font color pair
In two font colors, the central symmetry in designated color space;Between two font colors of each font color centering
Color distance be greater than designated color distance.
According to the third aspect of an embodiment of the present disclosure, a kind of watermark adding set is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: obtain the object region in image to be processed, the object-image region
Domain is the region of watermark to be added;From default font color set, obtain target font color, the target font color be with
The smallest font color of the color similarity of the object region, the default font color set include alternative multiple words
Body color;The font color of watermark to be added is adjusted to the target font color;Watermark adjusted is added to described
Object region obtains watermarking images.
The technical scheme provided by this disclosed embodiment can include the following benefits:
Obtain the object region of watermark to be added in image to be processed;From including the pre- of alternative multiple font colors
If font color is concentrated, the color similarity minimum target font color with object region is obtained;Later, by water to be added
The font color of print is adjusted to target font color;Watermark adjusted is added to object region, obtains watermarking images.
Due to that can be adjusted automatically according to the color of object region to the font color of watermark to be added, so that water to be added
The color of print and the color of object region can be distinguished significantly, thus in this kind of watermark adding method watermark knowledge
Bie Dugao, display effect are good.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of watermark adding method shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of watermark adding method shown according to an exemplary embodiment.
Fig. 3 is a kind of block diagram of watermark adding set shown according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of watermark adding set shown according to an exemplary embodiment.
Specific embodiment
To keep the purposes, technical schemes and advantages of the disclosure clearer, below in conjunction with attached drawing to disclosure embodiment party
Formula is described in further detail.
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of watermark adding method shown according to an exemplary embodiment, as shown in Figure 1, including
Following steps:
In a step 101, the object region in image to be processed is obtained.
Wherein, object region is the region of watermark to be added.
In a step 102, from default font color set, target font color is obtained.
Wherein, target font color is the smallest font color of color similarity with object region, presets font
Color set includes alternative multiple font colors.
In step 103, the font color of watermark to be added is adjusted to target font color.
At step 104, watermark adjusted is added to object region, obtains watermarking images.
The method that the embodiment of the present disclosure provides, obtains the object region of watermark to be added in image to be processed;From packet
It includes in the default font color set of alternative multiple font colors, obtains the color similarity minimum target with object region
Font color;Later, the font color of watermark to be added is adjusted to target font color;Watermark adjusted is added to mesh
Logo image region, obtains watermarking images.Due to can automatically according to object region color to the font of watermark to be added
Color is adjusted, and the color of watermark to be added and the color of object region is significantly distinguished, therefore
The display effect of watermark is good in watermark adding method in this.
Optionally, from default font color set, obtaining target font color includes:
For any font color in alternative multiple font colors, calculate in any font color and object region
Color distance between whole pixels obtains multiple color distances;
By the corresponding font color of the maximum color distance of numerical value in multiple color distances, it is determined as target font color.
Optionally, calculating the color distance in any font color and object region between whole pixels includes:
According to the color encoded radio of the color encoded radio of pixel each in object region and any font color, calculate
First distance between each pixel and any font color;
The corresponding first distance of each pixel is added, second distance is obtained, second distance is determined as any font face
Color distance in color and object region between whole pixels.
Optionally, the object region obtained in image to be processed includes:
Obtain the watermark to be added template that user chooses;
According to watermark to be added template, the position to be added of watermark to be added is obtained;
In image to be processed, the object region for being located at position to be added is obtained.
Optionally, a font color pair is included at least in alternative multiple font colors;Each font color centering
Two font colors, the central symmetry in designated color space;Face between two font colors of each font color centering
Color distance is greater than designated color distance.
All the above alternatives can form the alternative embodiment of the disclosure, herein no longer using any combination
It repeats one by one.
Fig. 2 is a kind of flow chart of watermark adding method shown according to an exemplary embodiment, as shown in Fig. 2, including
Following steps:
In step 201, when detecting that user is taken pictures using watermark function, image taking window show to
It handles in image, obtains object region.
Wherein, object region is the region of watermark to be added.
In the embodiments of the present disclosure, the camera of terminal has the function of watermark addition, can add water for the image of user's shooting
Print, watermark addition function can default closing, and user can be arranged the page in corresponding camera and open the watermark addition function, this public affairs
Embodiment is opened to the original state of the watermark addition function without specifically limiting.By opening the watermark addition function, user
The image addition watermark that watermark to be added template is shooting can be chosen in multiple watermark templates of storage.Wherein, watermark template
The information such as font color, position to be added and watermark element for storing watermark indicate watermark in image to be processed
Font color, display area and display content etc..Each watermark template can be the template comprising independent watermark element, such as individually
Include time watermark, weather watermark, mood watermark etc.;Each watermark template can also be the template comprising multiple watermark elements, than
It include such as time watermark, weather watermark, the combination of mood watermark one or more, the embodiment of the present disclosure is to each watermark template
The specific watermark element for including without limit.
When terminal detects opening operation of the user to camera, whether detection watermark addition function is in the open state,
If the watermark is added, function is in the open state, obtains the watermark to be added template of user's selection, and according to the water to be added
Die plate obtains the position to be added of watermark to be added.Later, it according to the position to be added, is shown in image taking window
The watermark to be added, while in the image to be processed that image taking window takes, obtain the mesh for being located at the position to be added
Logo image region.
It should be noted that if user, which is not detected, executes the selection operation of watermark template, then the watermark template of default is chosen.
The position to be added of watermark is included at least in watermark template, which can be coordinate value.Such as when the position to be added
When the region of instruction is a rectangular area, the coordinate value on four vertex in rectangular area can be stored in watermark template, according to this
The coordinate value on four vertex can get the position to be added in image taking window.The position to be added can also be watermark
Distance value of the edge away from image border to be processed, such as when the region of the position instruction to be added is a rectangular area, to
It allows the rectangular area to be located at the lower right corner of image to be processed, then stores the cross on the rectangular area Right vertical side in watermark template
Coordinate, the distance value away from image right hand edge to be processed, the ordinate of bottom water pingbian and the distance away from image lower edge to be processed
Value, can get the position to be added according to the information stored in watermark template in image to be processed.The present invention is implemented
Example is to the particular content of the position to be added without specifically limiting.
It should be noted that shooting the display effect of image, the position to be added of watermark to be added in order to not influence user
Preferably in fringe region of image, such as the lower right corner, the upper right corner, the lower left corner, the upper left corner etc., the embodiment of the present disclosure to this not into
Row is specific to be limited.In addition, watermark template can also be in image according to the position to be added that watermark is arranged in the overall effect of template
Intermediate region, the embodiment of the present disclosure is to this without specifically limiting.
Above-mentioned steps 201 are to obtain the process of the object region in image to be processed, with user during taking pictures
It is illustrated for the scene of addition watermark, in addition, the step can also be that user adds watermark during other than taking pictures
Scene for example, obtain the object region in image to be processed in the image of terminal storage be the image of terminal storage
Add watermark.The object region process that image to be processed is obtained in the image of terminal storage is as follows:
When detecting user to when the checking operation of any image of storage, whether detection watermark addition function is in unlatching
State obtains the watermark to be added template of user's selection if watermark addition function is in the open state, and waits adding according to this
The position to be added that watermarking template obtains watermark to be added according to the position to be added, is checked to be processed later in user
In image, the object region for being located at the position to be added is obtained.It should be noted that in the image addition chosen for user
When watermark, can according to user choose image, generate the copy of the image, for the image copy add watermark, in this way when with
Family can possess the watermarking images of the original image for being not added with watermark and addition watermark simultaneously.Whether watermark template is chosen for user
It is consistent with the explanation in the scene that above-mentioned user takes pictures with the explanation of position to be added in watermark template, herein not
It repeats again.
In step 202, from default font color set, target font color is obtained.
In the embodiments of the present disclosure, target font color is the smallest font face of color similarity with object region
Color, which includes alternative multiple font colors.Since the similarity between different colours is smaller, color
Contrast is bigger, easier differentiation, therefore in order to guarantee that watermark to be added can clearly indicate out, the embodiment of the present disclosure is preferred
It is chosen from default font color set with the smallest font color of color similarity of object region as target font on ground
Color.
In the embodiments of the present disclosure, according to the position to be added of watermark to be added, real-time image acquisition shoot in window to
The object region of image is handled, and from default font color set, obtains the color similarity with the object region
The smallest target font color.It wherein, include alternative multiple font colors in the default font color set, this is alternative more
A font color pair is included at least in a font color;Each font color is to needing to meet two following conditions:
Condition one: two font colors of each font color centering, the central symmetry in designated color space.Wherein,
Designated color space can RGB, CMY, HSV, HSI etc., the embodiment of the present disclosure is to this without specifically limiting.Each color space
A cube being considered as in three-dimensional space, by taking RGB color as an example, instruction be coordinate from (0,0,0) extremely
The area of space of (255,255,255).
Condition two: the color distance between two font colors of each font color centering is greater than designated color distance.
By taking RGB color as an example, two font color respective coordinates of color distance reference between two font colors are subtracted each other exhausted
To the sum of value, for example black coordinate is (0,0,0), and white color coordinates are (255,255,255), then the color between black and white
Distance Cd=| 0-255 |+| 0-255 |+| 0-255 |=765.Wherein, " | | " indicating absolute value sign, designated color distance can be
1/2,1/3 etc. of maximum color distance in the color space can also be 1/2, the 1/3 of color distance very big in the color space
Deng the embodiment of the present disclosure is to this without specifically limiting.Wherein, which is by two font color corresponding colors
The length for the line segment being located inside color space that the point and color space central point in space determine.
Wherein, from default font color set, the smallest target word of color similarity with the object region is obtained
The process of body color is as follows:
For any font color in alternative multiple font colors, any font color and the target image are calculated
Color distance in region between whole pixels, obtains multiple color distances;Numerical value in obtained multiple color distances is maximum
The corresponding font color of color distance, be determined as target font color.
Wherein, the process of the color distance in any font color and the object region between whole pixels is calculated
It is as follows:
According to the color encoded radio of the color encoded radio of pixel each in object region and any font color, calculate
First distance between each pixel and any font color;The corresponding first distance of each pixel is added, obtains second
Distance, by the second distance be determined as in any font color and the object region color between whole pixels away from
From.Wherein, color encoded radio can be the coordinate value of respective pixel or font color in designated color space, can also be the coordinate
Hexadecimal code value, the embodiment of the present disclosure is to this without specifically limiting.When color encoded radio is hexadecimal code value
When, which is converted into metric coordinate value, to facilitate subsequent color distance to calculate.
It is exemplified below how from default font color set, obtains with the color similarity of the object region most
Small target font color, by taking RGB color as an example:
Assuming that include 3 pixels in object region, color coding be respectively (77,77,77), (72,209,
204), (71,60,139), presetting includes black (0,0,0) and white (255,255,255) in font color set.It then calculates black
The first distance of each pixel is respectively as follows: D11=in color and 3 pixels | 0-77 |+| 0-77 |+| 0-77 |=231, D12=| 0-
72 |+| 0-209 |+| 0-204 |=485, D13=| 0-71 |+| 0-60 |+| 0-139 |=270, by three obtained first distance
It is added to obtain second distance D21=D11+D12+D13=231+485+270=986, so the target figure of black and hypothesis
As the distance between pixels whole in region are 986.Equally, the first distance point of white with each pixel in 3 pixels is calculated
Not are as follows: D14=| 255-77 |+| 255-77 |+| 255-77 |=534, D15=| 255-72 |+| 255-209 |+| 255-204 |=
280, D16=| 255-71 |+| 255-60 |+| 255-139 |=495, three obtained first distance is added to obtain
Two distance D22=D14+D15+D16=534+280+495=1309, so in white and the object region assumed all
The distance between pixel is 1309.Since D22 is greater than D21, so choosing white is target font color.
It should be noted that object region includes that 3 pixels are only used to for example, not representing reality in above-mentioned hypothesis
The number of pixels for including in the image-region of border.Second distance can also be averaged to obtain by the corresponding first distance of each pixel,
Or by being normalized to obtain after the corresponding first distance summation of each pixel, the embodiment of the present disclosure is to this without specific
It limits.
In step 203, the font color of watermark to be added is adjusted to the target font color.
It in the embodiments of the present disclosure, include the font color information of watermark to be added, the font in watermark to be added template
Colouring information is encoded radio of the font color in designated color space, which can be the coordinate in designated color space
Value can also be the corresponding hexadecimal code value of the coordinate value, and the embodiment of the present disclosure is to this without specifically limiting.In predetermined word
Got in body color set with after the smallest target font color of the color similarity of object region, by watermark to be added
Font color is adjusted to target font color, enables the color of font color to be added and object region adjusted
Significantly distinguish.
It should be noted that being obtained with the color similarity of the object region most from default font color set
Before small target font color, can first obtain in the font color and the object region of watermark to be added whole pixels it
Between color distance, if the color distance be greater than pre-set color distance, indicate the watermark to be added font color and the target
The color similarity of image-region is lower, can obviously distinguish, then does not adjust to the font color of the watermark to be added
It is whole.If the color distance is not more than pre-set color distance, the font color and the object region of the watermark to be added are indicated
Color similarity it is higher, cannot obviously distinguish, then obtain from default font color set with the object region
The smallest target font color of color similarity.Wherein, full the numerical value of pre-set color distance is in font color and target area
The difference of the specific algorithm of color distance between portion's pixel and it is different.
In another embodiment, it if user does not like the first font color of watermark to be added adjusted, may be selected
The font color for reacquiring watermark to be added, when detecting that user operates the reacquisition of the font color of watermark to be added
When, from other font colors that default font color set removes except the first font color, obtain and the object region
The smallest target font color of color similarity.
In step 204, when detecting image taking confirmation operation, watermark adjusted is added to the target image
Region obtains watermarking images.
In the embodiments of the present disclosure, watermark may include the contents such as text, figure, when detecting image taking confirmation operation
When, watermark adjusted is added to object region, i.e., the contents such as the text indicated watermark adjusted, figure with should
Object region carries out image merging, obtains watermarking images.Wherein, during image merges, watermark can be indicated
The content substances such as text, figure show that other positions to be added in addition to the contents such as the text, figure blur display or transparent
It shows or is shown after being filled with designated color, the embodiment of the present disclosure is to this without specifically limiting.
In another embodiment, when detecting that user adds confirmation operation to the watermark of the image of storage, execute with it is upper
It states same step and obtains watermarking images, details are not described herein.
The method that the embodiment of the present disclosure provides, obtains the object region of watermark to be added in image to be processed;From packet
It includes in the default font color set of alternative multiple font colors, obtains the color similarity minimum target with object region
Font color;Later, the font color of watermark to be added is adjusted to target font color;Watermark adjusted is added to mesh
Logo image region, obtains watermarking images.Due to can automatically according to object region color to the font of watermark to be added
Color is adjusted, and the color of watermark to be added and the color of object region is significantly distinguished, therefore
The resolution of watermark in this kind of watermark adding method is high, display effect is good.
Fig. 3 is a kind of block diagram of watermark adding set shown according to an exemplary embodiment.Referring to Fig. 3, the device packet
Image-region acquisition device 301, font color acquisition device 302 are included, font color adjusts device 303 and watermark generating means
304。
Wherein, image-region acquisition device 301 is connect with font color acquisition device 302, for obtaining image to be processed
In object region, wherein object region be watermark to be added region;Font color acquisition device 302 and font
Color adjusts device 303 and connects, for obtaining target font color, wherein target font color from default font color set
For with the smallest font color of the color similarity of object region, preset font color set include alternative multiple font face
Color;Font color adjustment device 303 is connect with watermark generating means 304, for the font color of watermark to be added to be adjusted to
Target font color;Watermark generating means 304 obtain watermark figure for watermark adjusted to be added to object region
Picture.
Optionally, font color acquisition device 302, for for any font color in alternative multiple font colors,
The color distance in any font color and object region between whole pixels is calculated, multiple color distances are obtained;It will be more
The corresponding font color of the maximum color distance of numerical value, is determined as target font color in a color distance.
Optionally, font color acquisition device 302, for the color encoded radio according to pixel each in object region
With the color encoded radio of any font color, the first distance between each pixel and any font color is calculated;By each picture
The corresponding first distance of element is added, and obtains second distance, second distance is determined as any font color and object region
Color distance between interior whole pixel.
Optionally, image-region acquisition device 301, for obtaining the watermark to be added template of user's selection;According to wait add
Watermarking template obtains the position to be added of watermark to be added;In image to be processed, the target for being located at position to be added is obtained
Image-region.
Optionally, a font color pair is included at least in alternative multiple font colors;Each font color centering
Two font colors, the central symmetry in designated color space;Face between two font colors of each font color centering
Color distance is greater than designated color distance.
The device that the embodiment of the present disclosure provides, obtains the object region of watermark to be added in image to be processed;From packet
It includes in the default font color set of alternative multiple font colors, obtains the color similarity minimum target with object region
Font color;Later, the font color of watermark to be added is adjusted to target font color;Watermark adjusted is added to mesh
Logo image region, obtains watermarking images.Due to can automatically according to object region color to the font of watermark to be added
Color is adjusted, and the color of watermark to be added and the color of object region is significantly distinguished, therefore
The resolution of watermark in this kind of watermark adding method is high, display effect is good.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 4 is a kind of block diagram of watermark adding set shown according to an exemplary embodiment.For example, device 400 can be with
It is mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building
Equipment, personal digital assistant etc..
Referring to Fig. 4, device 400 may include following one or more components: processing component 402, memory 404, power supply
Component 406, multimedia component 404, audio component 410, input/output (I/O) interface 412, sensor module 414, Yi Jitong
Believe component 416.
The integrated operation of the usual control device 400 of processing component 402, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing component 402 may include that one or more processors 420 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 402 may include one or more modules, just
Interaction between processing component 402 and other assemblies.For example, processing component 402 may include multi-media module, it is more to facilitate
Interaction between media component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in device 400.These data are shown
Example includes the instruction of any application or method for operating on device 400, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 406 provides electric power for the various assemblies of device 400.Power supply module 406 may include power management system
System, one or more power supplys and other with for device 400 generate, manage, and distribute the associated component of electric power.
Multimedia component 408 includes the screen of one output interface of offer between described device 400 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 408 includes a front camera and/or rear camera.When device 400 is in operation mode, such as screening-mode or
When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and
Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 410 includes a Mike
Wind (MIC), when device 400 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched
It is set to reception external audio signal.The received audio signal can be further stored in memory 404 or via communication set
Part 416 is sent.In some embodiments, audio component 410 further includes a loudspeaker, is used for output audio signal.
I/O interface 412 provides interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 414 includes one or more sensors, and the state for providing various aspects for device 400 is commented
Estimate.For example, sensor module 414 can detecte the state that opens/closes of device 400, and the relative positioning of component, for example, it is described
Component is the display and keypad of device 400, and sensor module 414 can be with 400 1 components of detection device 400 or device
Position change, the existence or non-existence that user contacts with device 400,400 orientation of device or acceleration/deceleration and device 400
Temperature change.Sensor module 414 may include proximity sensor, be configured to detect without any physical contact
Presence of nearby objects.Sensor module 414 can also include optical sensor, such as CMOS or ccd image sensor, at
As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between device 400 and other equipment.Device
400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation
In example, communication component 416 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 416 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 400 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned watermark adding method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 404 of instruction, above-metioned instruction can be executed by the processor 420 of device 400 to complete the above method.For example,
The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk
With optical data storage devices etc..
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium is additionally provided, when the storage is situated between
When instruction in matter is executed by the processor of mobile terminal, so that mobile terminal is able to carry out above-mentioned watermark adding method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (8)
1. a kind of watermark adding method, which is characterized in that the described method includes:
The object region in image to be processed is obtained, the object region is the region of watermark to be added;
From default font color set, target font color is obtained, the target font color is and the object region
The smallest font color of color similarity, the default font color set includes alternative multiple font colors, described alternative
Multiple font colors in include at least a font color pair;Two font colors of each font color centering, specified
Central symmetry in color space;Color distance between two font colors of each font color centering be greater than designated color away from
From;
The font color of watermark to be added is adjusted to the target font color;
Watermark adjusted is added to the object region, obtains watermarking images.
2. the method according to claim 1, wherein described from default font color set, acquisition target font
Color includes:
For any font color in alternative multiple font colors, any font color and the target figure are calculated
As the color distance between pixels whole in region, multiple color distances are obtained;
By the corresponding font color of the maximum color distance of numerical value in the multiple color distance, it is determined as the target font face
Color.
3. according to the method described in claim 2, it is characterized in that, described calculate any font color and the target figure
As the color distance between pixels whole in region includes:
According to the color encoded radio of the color encoded radio of each pixel in the object region and any font color,
Calculate the first distance between each pixel and any font color;
The corresponding first distance of each pixel is added, second distance is obtained, the second distance is determined as described appoint
Color distance in one font color and the object region between whole pixels.
4. the method according to claim 1, wherein the object region packet obtained in image to be processed
It includes:
Obtain the watermark to be added template that user chooses;
According to the watermark to be added template, the position to be added of the watermark to be added is obtained;
In the image to be processed, the object region for being located at the position to be added is obtained.
5. a kind of watermark adding set, which is characterized in that described device includes:
Image-region acquisition device, for obtaining the object region in image to be processed, the object region be to
Add the region of watermark;
Font color acquisition device, for obtaining target font color, the target font color from default font color set
For with the smallest font color of the color similarity of the object region, the default font color set includes alternative more
A font color includes at least a font color pair in alternative multiple font colors;Each font color centering
Two font colors, the central symmetry in designated color space;Face between two font colors of each font color centering
Color distance is greater than designated color distance;
Font color adjusts device, for the font color of watermark to be added to be adjusted to the target font color;
Watermark generating means obtain watermarking images for watermark adjusted to be added to the object region.
6. device according to claim 5, which is characterized in that the font color acquisition device, for for described standby
Any font color in multiple font colors of choosing calculates whole pictures in any font color and the object region
Color distance between element obtains multiple color distances;The maximum color distance of numerical value in the multiple color distance is corresponding
Font color, be determined as the target font color.
7. device according to claim 6, which is characterized in that the font color acquisition device, for according to the mesh
The color encoded radio of the color encoded radio of each pixel and any font color in logo image region calculates each picture
The plain first distance between any font color;The corresponding first distance of each pixel is added, obtains second
The second distance is determined as the face in any font color and the object region between whole pixels by distance
Color distance.
8. device according to claim 5, which is characterized in that described image region acquisition device, for obtaining user's choosing
The watermark to be added template taken;According to the watermark to be added template, the position to be added of the watermark to be added is obtained;Institute
It states in image to be processed, obtains the object region for being located at the position to be added.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510990243.9A CN105631797B (en) | 2015-12-24 | 2015-12-24 | Watermark adding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510990243.9A CN105631797B (en) | 2015-12-24 | 2015-12-24 | Watermark adding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105631797A CN105631797A (en) | 2016-06-01 |
CN105631797B true CN105631797B (en) | 2019-03-08 |
Family
ID=56046686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510990243.9A Active CN105631797B (en) | 2015-12-24 | 2015-12-24 | Watermark adding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105631797B (en) |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108510424B (en) * | 2017-02-23 | 2022-11-29 | 腾讯科技(深圳)有限公司 | Image processing method and device |
CN108230221A (en) * | 2017-05-17 | 2018-06-29 | 深圳市创梦天地科技有限公司 | Watermark generation method and device, terminal |
CN107392832A (en) * | 2017-06-30 | 2017-11-24 | 广东欧珀移动通信有限公司 | Image processing method and related product |
CN107464206A (en) * | 2017-07-26 | 2017-12-12 | 维沃移动通信有限公司 | A kind of watermark adding method and mobile terminal |
CN109427031A (en) * | 2017-08-22 | 2019-03-05 | 阿里巴巴集团控股有限公司 | A kind of data processing method and equipment |
CN107578366B (en) * | 2017-09-18 | 2020-06-19 | 南京师范大学 | Watermark information embedding and detecting method and device |
CN108198123A (en) * | 2017-12-28 | 2018-06-22 | 上海传英信息技术有限公司 | Watermark embedding method and terminal |
CN108629727B (en) * | 2018-04-16 | 2022-05-03 | 深圳市联软科技股份有限公司 | Method, terminal and medium for generating watermark according to color |
CN110826033B (en) * | 2018-08-14 | 2022-06-07 | 浙江大学 | Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting equipment and data processing method |
CN109474830B (en) * | 2018-11-09 | 2021-02-26 | 北京工业大学 | Embedding and extracting method of digital video steel seal |
CN110909322B (en) * | 2019-11-29 | 2020-12-11 | 杭州天谷信息科技有限公司 | Intelligent printing document processing system and method based on HVS |
CN113450243A (en) * | 2020-03-24 | 2021-09-28 | 北京四维图新科技股份有限公司 | Watermark adding method and device |
CN112784675B (en) * | 2020-11-25 | 2023-06-30 | 上海芯翌智能科技有限公司 | Target detection method and device, storage medium and terminal |
CN113079273A (en) * | 2021-03-29 | 2021-07-06 | 维沃移动通信有限公司 | Watermark processing method, device, electronic equipment and medium |
CN113298687B (en) * | 2021-05-26 | 2023-09-29 | 北京京东振世信息技术有限公司 | Watermark image adding method and device |
CN116542838B (en) * | 2023-07-03 | 2024-03-29 | 平安银行股份有限公司 | Watermark security processing method, device, system and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101320553A (en) * | 2007-06-08 | 2008-12-10 | 鹏智科技(深圳)有限公司 | Picture display apparatus and method |
CN103177451A (en) * | 2013-04-17 | 2013-06-26 | 南京理工大学 | Three-dimensional matching algorithm between adaptive window and weight based on picture edge |
CN104182927A (en) * | 2014-09-12 | 2014-12-03 | 北京国双科技有限公司 | Method and device for adding watermark to image |
CN104281995A (en) * | 2014-10-28 | 2015-01-14 | 新华瑞德(北京)网络科技有限公司 | Method and device for adding watermark to picture |
CN104809686A (en) * | 2015-05-18 | 2015-07-29 | 无锡联云世纪信息技术有限公司 | Picture and text watermark batch processing method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090010483A1 (en) * | 2007-07-02 | 2009-01-08 | The Hong Kong University Of Science And Technology | Block-based lossless data hiding in the delta domain |
-
2015
- 2015-12-24 CN CN201510990243.9A patent/CN105631797B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101320553A (en) * | 2007-06-08 | 2008-12-10 | 鹏智科技(深圳)有限公司 | Picture display apparatus and method |
CN103177451A (en) * | 2013-04-17 | 2013-06-26 | 南京理工大学 | Three-dimensional matching algorithm between adaptive window and weight based on picture edge |
CN104182927A (en) * | 2014-09-12 | 2014-12-03 | 北京国双科技有限公司 | Method and device for adding watermark to image |
CN104281995A (en) * | 2014-10-28 | 2015-01-14 | 新华瑞德(北京)网络科技有限公司 | Method and device for adding watermark to picture |
CN104809686A (en) * | 2015-05-18 | 2015-07-29 | 无锡联云世纪信息技术有限公司 | Picture and text watermark batch processing method |
Also Published As
Publication number | Publication date |
---|---|
CN105631797A (en) | 2016-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105631797B (en) | Watermark adding method and device | |
CN105528606B (en) | Area recognizing method and device | |
CN105491289B (en) | Prevent from taking pictures the method and device blocked | |
KR101772177B1 (en) | Method and apparatus for obtaining photograph | |
CN106355573B (en) | The localization method and device of object in picture | |
CN104918107B (en) | The identification processing method and device of video file | |
JP6374986B2 (en) | Face recognition method, apparatus and terminal | |
CN106454336B (en) | The method and device and terminal that detection terminal camera is blocked | |
CN104038704B (en) | The shooting processing method and processing device of backlight portrait scene | |
CN104700353B (en) | Image filters generation method and device | |
CN109345485A (en) | A kind of image enchancing method, device, electronic equipment and storage medium | |
CN108419016A (en) | Image pickup method, device and terminal | |
CN104090735B (en) | The projecting method and device of a kind of picture | |
CN106713696B (en) | Image processing method and device | |
CN106778773A (en) | The localization method and device of object in picture | |
CN105631803B (en) | The method and apparatus of filter processing | |
CN105957037B (en) | Image enchancing method and device | |
CN105631804B (en) | Image processing method and device | |
CN107231505B (en) | Image processing method and device | |
CN107944367A (en) | Face critical point detection method and device | |
CN104933700B (en) | A kind of method and apparatus carrying out picture material identification | |
CN105528765A (en) | Method and device for processing image | |
CN107426489A (en) | Processing method, device and terminal during shooting image | |
CN106339705B (en) | Image acquisition method and device | |
CN108040204A (en) | A kind of image capturing method based on multi-cam, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |