[go: up one dir, main page]

CN109726302A - Mask method, device, computer equipment and the storage medium of image - Google Patents

Mask method, device, computer equipment and the storage medium of image Download PDF

Info

Publication number
CN109726302A
CN109726302A CN201811502859.7A CN201811502859A CN109726302A CN 109726302 A CN109726302 A CN 109726302A CN 201811502859 A CN201811502859 A CN 201811502859A CN 109726302 A CN109726302 A CN 109726302A
Authority
CN
China
Prior art keywords
image
marked
color
pixel
layer
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
CN201811502859.7A
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.)
Guangzhou Jingqi Technology Co Ltd
Original Assignee
Guangzhou Jingqi Technology Co 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 Guangzhou Jingqi Technology Co Ltd filed Critical Guangzhou Jingqi Technology Co Ltd
Priority to CN201811502859.7A priority Critical patent/CN109726302A/en
Publication of CN109726302A publication Critical patent/CN109726302A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

This application involves a kind of mask method of image, device, computer equipment and storage mediums, the color value that computer equipment passes through pixel in acquisition image to be marked, then according to the comparison result of above-mentioned color value and preset threshold, increase corresponding visual aids layer on image to be marked, obtains target image;Then, increase mark layer on above-mentioned target image, and obtain markup information on above-mentioned mark layer.Since computer equipment increases visual aids layer according to above-mentioned comparison result on image to be marked, the color of image to be marked and/or brightness is allowed to be adjusted to suitable value, to allow the object on image to be marked to highlight, the accuracy to contour of object mark is improved.

Description

Mask method, device, computer equipment and the storage medium of image
Technical field
The present invention relates to field of image processing, more particularly to a kind of mask method of image, device, computer equipment and Storage medium.
Background technique
With deepening continuously for unmanned technical research, deep learning algorithm obtains widely in unmanned field Using.In the course of the research, deep learning model usually needs largely to contain the image of markup information as training sample, example Such as, the attributes such as the color of the traffic lights in the road image to acquisition is needed to be labeled.
In the conventional technology, image labeling method is mainly based upon the profile of the picture recognition objects in images of shooting, comes Object is labeled.
But since there may be excessively bright or excessively dark problems for captured picture, lead to the profile of the object of mark It is not accurate enough.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide the mask method, device, computer equipment of a kind of image And storage medium.
A kind of mask method of image, which comprises
Obtain the color value of pixel in image to be marked;
According to the color value of pixel and the comparison result of preset threshold in the image to be marked, in the image to be marked It is upper to increase the corresponding visual aids layer of the comparison result, to obtain target image;Described image auxiliary layer is described for adjusting The color and/or brightness of image to be marked;
Increase mark layer on the target image, and obtains the mark letter of the target image on the mark layer Breath.
The ratio according to the color value of pixel and preset threshold in the image to be marked in one of the embodiments, Compared with as a result, increase the corresponding visual aids layer of the comparison result on the image to be marked, to obtain target image, packet It includes:
According to the color value of pixel and the comparison result of preset threshold in the image to be marked, determine that described image assists The color and/or transparency of layer;
According to the color and/or transparency of described image auxiliary layer, it is auxiliary to increase described image on the image to be marked Layer is helped, to obtain target image.
The ratio according to the color value of pixel and preset threshold in the image to be marked in one of the embodiments, Compared with as a result, determining the color of described image auxiliary layer, comprising:
If the color value that the comparison result is pixel in the image to be marked is greater than the preset threshold, it is determined that institute The color for stating visual aids layer is black;
If the color value that the comparison result is pixel in the image to be marked is not more than the preset threshold, it is determined that The color of described image auxiliary layer is white.
The ratio according to the color value of pixel and preset threshold in the image to be marked in one of the embodiments, Compared with as a result, determining the transparency of described image auxiliary layer, comprising:
According to the size of the comparison result, the adjusted value of transparency is determined;
According to the adjusted value and preset benchmark transparency, the transparency of described image auxiliary layer is determined.
The color value for obtaining pixel in image to be marked in one of the embodiments, comprising:
The image to be marked is identified, to obtain region to be reinforced;
Obtain the color value of each pixel in the region to be reinforced.
The ratio according to the color value of pixel and preset threshold in the image to be marked in one of the embodiments, Compared with as a result, determining the color and/or transparency of described image auxiliary layer, comprising:
According to the comparison result of the color value of each pixel in the region to be reinforced and preset threshold, the figure is determined As the color and/or transparency in region identical with the regional location to be reinforced in auxiliary layer.
In one of the embodiments, the method also includes:
According to the number in the region to be reinforced, the visual aids layer of corresponding number is set.
A kind of annotation equipment of image, described device include:
Module is obtained, for obtaining the color value of pixel in image to be marked;
Increase module, for according to the color value of pixel and the comparison result of preset threshold in the image to be marked, Increase the corresponding visual aids layer of the comparison result on the image to be marked, to obtain target image;Described image auxiliary Layer is for adjusting the color and/or brightness of the image to be marked;The increase module is also used to increase on the target image It marks layer.
Labeling module, for obtaining the markup information of the target image on the mark layer.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing The step of device realizes the mask method of image when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor The step of mask method of image is realized when row.
Mask method, device, computer equipment and the storage medium of above-mentioned image, computer equipment are to be marked by obtaining The color value of pixel in image increases on image to be marked then according to the comparison result of above-mentioned color value and preset threshold Corresponding visual aids layer, has obtained target image;Then, increase mark layer on above-mentioned target image, and in above-mentioned mark Markup information is obtained on layer.Since computer equipment increases visual aids on image to be marked according to above-mentioned comparison result Layer, allows the color of image to be marked and/or brightness to be adjusted to suitable value, to make the object on image to be marked It can highlight, improve the accuracy to contour of object mark.
Detailed description of the invention
Fig. 1 is the applied environment figure of the mask method of image in one embodiment;
Fig. 2 is the flow diagram of the mask method of image in one embodiment;
Fig. 3 is the flow diagram of the mask method of image in another embodiment;
Fig. 4 is the flow diagram of the mask method of image in another embodiment;
Fig. 5 is the structural block diagram of the annotation equipment of image in one embodiment;
Fig. 6 is the structural block diagram of the annotation equipment of image in another embodiment;
Fig. 7 is the structural block diagram of the annotation equipment of image in another embodiment;
Fig. 8 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
The mask method of image provided by the embodiments of the present application can be applied in application environment as shown in Figure 1.Its In, computer equipment 130 is labeled the object on image 110 to be marked, obtains markup information 120.Wherein, computer is set Standby 130 can be, but not limited to be various personal computers, laptop, smart phone and tablet computer.
In one embodiment, as shown in Fig. 2, providing a kind of mask method of image, it is applied in Fig. 1 in this way Computer equipment for be illustrated, the above method includes:
S101, the color value for obtaining pixel in image to be marked.
Wherein, the pixel in image to be marked refers to the minimum unit of image to be marked, point with above-mentioned image to be marked Resolution is related, such as the resolution ratio of above-mentioned image to be marked can be 72, i.e. per inch pixel is 72, passes through conversion one 15x15 centimetres of image to be marked may include 420*420 pixel.
The color value of above-mentioned pixel refers in the image to be marked in digitlization storage, indicates the color of each pixel Value, can be RGB color value, wherein above-mentioned RGB color value refers to by red R (red), green G (green), indigo plant B (blue) Three colors and their mutual superpositions are to identify miscellaneous color, for the RGB color value of a pixel Including three numbers, the brightness of three colors of red, green, blue is respectively represented, digital scope can be 0~255, the bigger expression of number Brightness is higher, for example, the RGB color value of the pixel can be (255,0,0) if one of pixel is red;On in addition, It states color value and is also possible to hexadecimal color value, above-mentioned hexadecimal color value can be by being converted into ten for RGB color value The number of senary and obtain, such as red hexadecimal color value can be FF0000.For the color value of above-mentioned pixel Concrete form it is not limited here.
Specifically, computer equipment can pass through java work in obtaining above-mentioned image to be marked when the color value of pixel Tool extracts the color value of pixel in above-mentioned image to be marked, can also be by image processing platforms such as opencv to above-mentioned The color value of pixel extracts in image to be marked, for above-mentioned color value acquisition modes it is not limited here.
S102, according to the comparison result of the color value of pixel and preset threshold in image to be marked, on image to be marked Increase the corresponding visual aids layer of comparison result, to obtain target image;Visual aids layer is used to adjust the face of image to be marked Color and/or brightness.
Computer equipment, can will be above-mentioned when by the color value of pixel and preset threshold are compared in image to be marked The color value of each pixel in image to be marked is compared respectively at preset threshold, can also will be in above-mentioned image to be marked The color value of each pixel is averaged, and obtains average color, then above-mentioned average pixel value is compared with preset threshold, For above-mentioned color value and preset threshold manner of comparison it is not limited here.
On the basis of by the color value of pixel and preset threshold are compared in image to be marked, computer equipment can be with The comparison result is obtained, which can be the difference of above-mentioned color value Yu above-mentioned preset threshold, be also possible to above-mentioned face The ratio of color value and above-mentioned preset threshold, for above-mentioned comparison result concrete form it is not limited here.Include with one For the image to be marked of 420*420 pixel, computer equipment is averaged to the color value of above-mentioned 420*420 pixel, The average color of acquisition can be (136,244,28), and above-mentioned preset threshold can be 128, and computer equipment can will be above-mentioned Three data in average color are averaged, and are then subtracted each other with preset threshold, and obtained comparison result can be 8, are calculated Machine equipment can consider that the average color of pixel in above-mentioned image to be marked is greater than preset threshold, the color mistake of image to be marked It is bright.
Further, in order to keep the profile of objects in images to be marked apparent, computer equipment can be according to above-mentioned ratio , can be according to map overlay technology compared with as a result, increase the corresponding visual aids layer of above-mentioned comparison result on image to be marked, it will Above-mentioned image to be marked is overlapped with above-mentioned visual aids layer, to adjust the color and/or brightness of image to be marked, obtains mesh Logo image.Wherein, the size of above-mentioned visual aids layer is as the size of above-mentioned image to be marked, such as image to be marked includes 420*420 pixel, then visual aids layer also should include 420*420 pixel;Each pixel of above-mentioned visual aids layer Color value can be identical, such as visual aids layer is white, and the color value of each pixel is (255,255,255);Above-mentioned figure As the color value of each pixel of auxiliary layer can also be different, the concrete form of above-mentioned visual aids layer is not limited herein It is fixed.
Computer equipment can determine corresponding visual aids layer according to above-mentioned comparison result;Such as computer equipment root According to above-mentioned comparison result, it is believed that when the brightness of above-mentioned image to be marked is too low, corresponding visual aids layer can be increased to improve The brightness of above-mentioned image to be marked;If according to above-mentioned comparison result, it is believed that the brightness of above-mentioned image to be marked is excessively high, Ke Yizeng Add corresponding visual aids layer to reduce the brightness of above-mentioned image to be marked;In addition, computer equipment is according to above-mentioned comparison result, Identify the red light in the characteristic area in above-mentioned image, such as image to be marked in traffic lights, it is believed that the profile of above-mentioned red light It is not clear enough, corresponding visual aids layer can also be increased to change the color in features described above region, for example, making above-mentioned red light Color becomes good or improves red saturation degree etc..
Computer equipment can by different image superposition modes, to adjust the color and/or brightness of image to be marked, Obtain target image.For example, it is assumed that the color of image to be marked is A, the color of visual aids layer is B, computer equipment according to Above-mentioned comparison result, it is believed that when needing to reduce the brightness of image to be marked, formula C can be passed through by dimmed hybrid mode =Min (A, B) obtains the color C of target image;Formula C=A+B-255 can also be passed through by linearly deepening hybrid mode To obtain the color C of target image;For the acquisition modes of above-mentioned target image, it is not limited here.
S103, increase mark layer on target image, and obtain the markup information of target image on mark layer.
On the basis of obtaining target image, computer equipment can increase mark layer on target image, make to succeed in one's scheme Calculating the markup information that machine equipment obtains can concentrate on above-mentioned mark layer, without having an impact to target image.Above-mentioned mark The size for infusing layer can also carry out dynamic adjustment with markup information, it is not limited here as image to be marked.
Wherein, above-mentioned markup information may include callout box, for marking the object in image to be marked;Can also include When marking object information, such as the traffic lights image on street being labeled, mark object information may include traffic lights Color and the instruction direction of traffic lights etc.;For above-mentioned markup information content it is not limited here.
Specifically, computer equipment is available automatic when obtaining the markup information of target image on above-mentioned mark layer The markup information that annotation tool generates, the markup information that also available mark personnel input;For obtaining for above-mentioned markup information Take mode it is not limited here.
The mask method of above-mentioned image, computer equipment pass through the color value for obtaining pixel in image to be marked, then root According to the comparison result of above-mentioned color value and preset threshold, increases corresponding visual aids layer on image to be marked, obtained mesh Logo image;Then, increase mark layer on above-mentioned target image, and obtain markup information on above-mentioned mark layer.Due to calculating Machine equipment increases visual aids layer according to above-mentioned comparison result on image to be marked so that the color of image to be marked and/ Or brightness can be adjusted to suitable value, so that the object on image to be marked be allow to highlight, improve to object The accuracy of profile mark.
Fig. 3 is the flow diagram of the mask method of image in another embodiment, and the present embodiment is related to a kind of computer Equipment increases the mode of visual aids layer on image to be marked, on the basis of the above embodiments, as shown in figure 3, above-mentioned S102 includes:
S201, according to the comparison result of the color value of pixel and preset threshold in image to be marked, determine visual aids layer Color and/or transparency.
Computer equipment can be determined in the comparison result according to the color value of pixel and preset threshold in image to be marked The color and/or transparency of visual aids layer, then set identified face for the color of visual aids layer and/or transparency Color and/or transparency, and by the addition of above-mentioned visual aids layer on image to be marked.
Optionally, if the color value that comparison result is pixel in image to be marked is greater than preset threshold, computer equipment The color for determining visual aids layer is black;If the color value that comparison result is pixel in image to be marked is not more than default threshold Value, it is determined that the color of visual aids layer is white.
Specifically, if the color value that comparison result is pixel in image to be marked is greater than preset threshold, then computer is set It is standby to think that the color of pixel in above-mentioned image to be marked is excessively bright, it can be to be marked to adjust by increasing the visual aids layer of black The color and/or brightness of image;If the color value that comparison result is pixel in image to be marked is not more than preset threshold, then counting It calculates machine equipment and thinks that the color of pixel in above-mentioned image to be marked is excessively dark, can be adjusted by increasing the visual aids layer of white The color and/or brightness of image to be marked.
Further, computer equipment can determine the transparency of above-mentioned visual aids layer, Ke Yigen according to comparison result According to the judgment threshold area of the color value of pixel and the difference of preset threshold and difference in image to be marked in above-mentioned comparison result Between, to directly determine the transparency of above-mentioned visual aids layer;Optionally, computer equipment can also be according to above-mentioned comparison result Size determines the adjusted value of transparency, then according to adjusted value and preset benchmark transparency, determines the transparent of visual aids layer Degree.Assume that above-mentioned comparison result is M, can according to the size of M, to determine the adjusted value of transparency, for example, if 0≤M < 20, it can determine that above-mentioned adjusted value is 0.1, if 20≤M < 40, can determine that above-mentioned adjusted value is 0.2, if 40≤M < 60 Can determine above-mentioned adjusted value be 0.3 etc., for adjusted value method of determination it is not limited here.
S202, color and/or transparency according to visual aids layer increase visual aids layer on image to be marked, with Obtain target image.
On the basis of obtaining the color and/or transparency of above-mentioned visual aids layer, computer equipment can be according to upper Color and/or transparency are stated, increases the visual aids layer of corresponding color and/or transparency, on image to be marked to obtain mesh Logo image.Assuming that the color value of a pixel M is (A1, A2, A3), the face of each pixel of visual aids layer in image to be marked Color value is (B1, B2, B3), then computer equipment can be according to formula Ci=Bi×d+Ai× (1-d), wherein d is above-mentioned The transparency of visual aids layer, come obtain in target image adjusted with the color value of the pixel C of pixel M location matches (C1, C2, C3).
Continue to obtain in corresponding embodiment according to fig. 2 by taking an image to be marked comprising 420*420 pixel as an example Comparison result, computer equipment can consider pixel in above-mentioned image to be marked average color be greater than preset threshold, that The color that can determine visual aids layer is black;Further, according to being above-mentioned comparison result 8, computer equipment can be with The difference of the average color and preset threshold that think above-mentioned image to be marked is little, and the benchmark transparency of visual aids layer can be with It is 0, appropriate adjustment is carried out on the basis of said reference transparency, such as can determine according to section 0≤8 < 20 is judged The adjusted value of above-mentioned transparency is 0.1, then can determine visual aids layer according to above-mentioned adjusted value and said reference transparency Transparency be 0.1.Such as in above-mentioned image to be marked one of pixel M color value be (140,160,220) when, due to The color of visual aids layer is that black obtains then the color value of each pixel of visual aids layer is (0,0,0) according to above-mentioned The transparency d=0.1 of the visual aids layer taken, passes through formula Ci=Bi×d+AiPixel in the available target image of × (1-d) The color value of N, for (126,144,198);It can be seen from above-mentioned calculated result by be arranged visual aids layer color be it is black The color value of color, transparency 0.1, the pixel N in above-mentioned target image is respectively less than the color of pixel M in above-mentioned image to be marked Value, that is, reduce the brightness of image to be marked.
The mask method of above-mentioned image, computer equipment according to the color and/or transparency of the visual aids layer of acquisition come Visual aids layer is added, so that the setting of the color and/or transparency of above-mentioned visual aids layer is more suitable, it can be to be marked The color of image and/or brightness are more accurately adjusted, so that the object in image to be marked can be highlighted preferably Out, the accuracy to contour of object mark is further improved.
Fig. 4 is the flow diagram of the mask method of image in an another embodiment, and the present embodiment is related to computer equipment According to region to be reinforced, a kind of mode of the color value of pixel in image to be marked is obtained, on the basis of the above embodiments, such as Shown in Fig. 4, above-mentioned S101 includes:
S301, identification image to be marked, to obtain region to be reinforced.
Computer equipment can according to the feature of object to be marked, to identify the mark object of above-mentioned image to be marked, Then the region where above-mentioned object to be marked is determined as region to be reinforced.For example, if image to be marked is on street The image of traffic lights, the color of traffic lights may be red, yellow perhaps green or the shape of traffic lights may be it is round or Person's digital modulation etc., computer equipment can identify the color characteristic of above-mentioned object to be marked, by image to be marked comprising red The region of color, yellow or green is determined as region to be reinforced;The profile of above-mentioned object to be marked can also be identified to identify, incited somebody to action Region in above-mentioned image to be marked comprising circular contour or digital profile, is determined as region to be reinforced;For it is above-mentioned to The identification method of object is marked, it is not limited here.
S302, the color value for obtaining each pixel in region to be reinforced.
Specifically, computer equipment is on the basis of obtaining region to be reinforced, available above-mentioned region to be reinforced The color value of each pixel allows computer equipment according to the color value of each pixel in above-mentioned region to be reinforced, Lai Zengjia Visual aids layer.Each pixel in the color value of each pixel in above-mentioned region to be reinforced embodiment corresponding with Fig. 2 The acquisition modes of color value are similar, and details are not described herein.
Further, computer equipment can be according to the color value of each pixel in region to be reinforced and preset threshold Comparison result determines the color and/or transparency in region identical with regional location to be reinforced in visual aids layer.
Specifically, computer equipment can be according to the color value of each pixel in region to be reinforced and the ratio of preset threshold Compared with as a result, to increase visual aids layer, above-mentioned visual aids layer can be carried out the region to be reinforced in above-mentioned image to be marked The adjustment of color and/or brightness, for example, above-mentioned region to be reinforced brightness it is excessively high when, by above-mentioned visual aids layer with it is above-mentioned to The color in the identical region of enhancing regional location is set as black, determines the saturating of above-mentioned visual aids layer by above-mentioned comparison result Then lightness increases visual aids layer, the brightness in above-mentioned region to be reinforced is reduced;The determination of above-mentioned color and/or transparency Mode is similar with above-described embodiment, and details are not described herein.
When for including multiple regions to be reinforced in above-mentioned image to be marked, computer equipment can be according to each to be reinforced The color value of each pixel in region and each comparison result of preset threshold, come determine visual aids layer and it is above-mentioned it is each to The color or transparency for enhancing the identical region in position in region, by increasing a visual aids layer, to adjust figure to be marked The color and/or brightness of picture, that is to say, that in a visual aids layer, different regional locations to be reinforced, visual aids layer Color can be different;Optionally, computer equipment can be according to the number in region to be reinforced, and the image of the corresponding number of setting is auxiliary Layer, such as the to be reinforced region different for three in image to be marked are helped, can be set respectively according to above-mentioned region to be reinforced Set three different visual aids layers.
The mask method of above-mentioned image, computer equipment, can be with needles by identifying the region to be reinforced in image to be marked To property the color of the image in different regions to be reinforced and/or brightness are adjusted separately, to make above-mentioned figure to be marked The profile of object to be marked as in is more clear, and further improves the accuracy to contour of object mark.
It should be understood that although each step in the flow chart of Fig. 2-4 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-4 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in figure 5, providing a kind of annotation equipment of image, comprising: obtain module 10, increase Add module 20 and labeling module 30, in which:
Module 10 is obtained, for obtaining the color value of pixel in image to be marked.
Increase module 20, for the comparison result according to the color value of pixel and preset threshold in image to be marked, to It marks and increases the corresponding visual aids layer of comparison result on image, to obtain target image;Visual aids layer is for adjusting wait mark Infuse the color and/or brightness of image;The increase module 20 is also used to increase mark layer on the target image.
Labeling module 30, for obtaining the markup information of target image on mark layer.
In one embodiment, as shown in fig. 6, above-mentioned increase module 20 includes determination unit 201 and adding unit 202, Wherein:
Determination unit 201 is determined for the comparison result according to the color value of pixel and preset threshold in image to be marked The color and/or transparency of visual aids layer.
Adding unit 202 increases figure for the color and/or transparency according to visual aids layer on image to be marked As auxiliary layer, to obtain target image.
In one embodiment, determination unit 201 is specifically used for: in the color that comparison result is pixel in image to be marked When value is greater than preset threshold, determine that the color of visual aids layer is black;In the face that comparison result is pixel in image to be marked When color value is not more than preset threshold, determine the color of visual aids layer for white.
In one embodiment, determination unit 201 is specifically used for: according to the size of comparison result, determining the tune of transparency Whole value;According to adjusted value and preset benchmark transparency, the transparency of visual aids layer is determined.
In one embodiment, obtaining module 10 includes recognition unit 101 and acquiring unit 102, in which:
Recognition unit 101, image to be marked for identification, to obtain region to be reinforced.
Acquiring unit 102, for obtaining the color value of each pixel in region to be reinforced.
In one embodiment, determination unit 201 is specifically used for: according to the color value of each pixel in region to be reinforced With the comparison result of preset threshold, the color in region identical with regional location to be reinforced and/or thoroughly is determined in visual aids layer Lightness.
In a real-time example, above-mentioned increase module 20 is also used to: according to the number in region to be reinforced, corresponding number is arranged Visual aids layer.
The annotation equipment of image provided in an embodiment of the present invention, can execute above method embodiment, realization principle and Technical effect is similar, and details are not described herein.
The specific of annotation equipment about image limits the restriction that may refer to the mask method above for image, This is repeated no more.Modules in the annotation equipment of above-mentioned image can come fully or partially through software, hardware and combinations thereof It realizes.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with software Form is stored in the memory in computer equipment, executes the corresponding operation of the above modules in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 8.The computer equipment includes processor, the memory, network interface, display connected by system bus Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with Realize a kind of mask method of image.The display screen of the computer equipment can be liquid crystal display or electric ink is shown Screen, the input unit of the computer equipment can be the touch layer covered on display screen, be also possible on computer equipment shell Key, trace ball or the Trackpad of setting can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 8, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, the processor perform the steps of when executing computer program
Obtain the color value of pixel in image to be marked;
According to the comparison result of the color value of pixel and preset threshold in image to be marked, increase ratio on image to be marked Visual aids layer corresponding compared with result, to obtain target image;Visual aids layer be used for adjust image to be marked color and/or Brightness;
Increase mark layer on target image, and obtains the markup information of target image on mark layer.
In one embodiment, it also performs the steps of when processor executes computer program according in image to be marked The color value of pixel and the comparison result of preset threshold determine the color and/or transparency of visual aids layer;According to visual aids The color and/or transparency of layer increase visual aids layer, on image to be marked to obtain target image.
In one embodiment, if processor also performs the steps of comparison result when executing computer program be wait mark The color value for infusing pixel in image is greater than preset threshold, it is determined that the color of visual aids layer is black;If comparison result be to The color value for marking pixel in image is not more than preset threshold, it is determined that the color of visual aids layer is white.
In one embodiment, it also performs the steps of when processor executes computer program according to the big of comparison result It is small, determine the adjusted value of transparency;According to adjusted value and preset benchmark transparency, the transparency of visual aids layer is determined.
In one embodiment, identification image to be marked is also performed the steps of when processor executes computer program, with Obtain region to be reinforced;Obtain the color value of each pixel in region to be reinforced.
In one embodiment, it also performs the steps of when processor executes computer program according in region to be reinforced Each pixel color value and preset threshold comparison result, determine identical with regional location to be reinforced in visual aids layer The color and/or transparency in region.
In one embodiment, it also performs the steps of when processor executes computer program according to region to be reinforced The visual aids layer of corresponding number is arranged in number.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Obtain the color value of pixel in image to be marked;
According to the comparison result of the color value of pixel and preset threshold in image to be marked, increase ratio on image to be marked Visual aids layer corresponding compared with result, to obtain target image;Visual aids layer be used for adjust image to be marked color and/or Brightness;
Increase mark layer on target image, and obtains the markup information of target image on mark layer.
In one embodiment, it also performs the steps of when computer program is executed by processor according to image to be marked The color value of middle pixel and the comparison result of preset threshold determine the color and/or transparency of visual aids layer;It is auxiliary according to image The color and/or transparency for helping layer increase visual aids layer, on image to be marked to obtain target image.
In one embodiment, if also performed the steps of when computer program is executed by processor comparison result be to The color value for marking pixel in image is greater than preset threshold, it is determined that the color of visual aids layer is black;If comparison result is The color value of pixel is not more than preset threshold in image to be marked, it is determined that the color of visual aids layer is white.
In one embodiment, it also performs the steps of when computer program is executed by processor according to comparison result Size determines the adjusted value of transparency;According to adjusted value and preset benchmark transparency, the transparency of visual aids layer is determined.
In one embodiment, identification image to be marked is also performed the steps of when computer program is executed by processor, To obtain region to be reinforced;Obtain the color value of each pixel in region to be reinforced.
In one embodiment, it also performs the steps of when computer program is executed by processor according to region to be reinforced In each pixel color value and preset threshold comparison result, determine identical as regional location to be reinforced in visual aids layer Region color and/or transparency.
In one embodiment, it also performs the steps of when computer program is executed by processor according to region to be reinforced Number, the visual aids layer of corresponding number is set.
Computer readable storage medium provided in this embodiment, implementing principle and technical effect and above method embodiment Similar, details are not described herein.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of mask method of image, which is characterized in that the described method includes:
Obtain the color value of pixel in image to be marked;
According to the color value of pixel and the comparison result of preset threshold in the image to be marked, increase on the image to be marked Add the corresponding visual aids layer of the comparison result, to obtain target image;Described image auxiliary layer is described wait mark for adjusting Infuse the color and/or brightness of image;
Increase mark layer on the target image, and obtains the markup information of the target image on the mark layer.
2. the method according to claim 1, wherein the color value according to pixel in the image to be marked With the comparison result of preset threshold, increase the corresponding visual aids layer of the comparison result, on the image to be marked to obtain Take target image, comprising:
According to the color value of pixel and the comparison result of preset threshold in the image to be marked, described image auxiliary layer is determined Color and/or transparency;
According to the color and/or transparency of described image auxiliary layer, increase described image auxiliary layer on the image to be marked, To obtain target image.
3. according to the method described in claim 2, it is characterized in that, the color value according to pixel in the image to be marked With the comparison result of preset threshold, the color of described image auxiliary layer is determined, comprising:
If the color value that the comparison result is pixel in the image to be marked is greater than the preset threshold, it is determined that the figure As the color of auxiliary layer is black;
If the color value that the comparison result is pixel in the image to be marked is not more than the preset threshold, it is determined that described The color of visual aids layer is white.
4. according to the method described in claim 2, it is characterized in that, the color value according to pixel in the image to be marked With the comparison result of preset threshold, the transparency of described image auxiliary layer is determined, comprising:
According to the size of the comparison result, the adjusted value of transparency is determined;
According to the adjusted value and preset benchmark transparency, the transparency of described image auxiliary layer is determined.
5. according to the method described in claim 2, it is characterized in that, the color value for obtaining pixel in image to be marked, packet It includes:
The image to be marked is identified, to obtain region to be reinforced;
Obtain the color value of each pixel in the region to be reinforced.
6. according to the method described in claim 5, it is characterized in that, the color value according to pixel in the image to be marked With the comparison result of preset threshold, the color and/or transparency of described image auxiliary layer are determined, comprising:
According to the comparison result of the color value of each pixel in the region to be reinforced and preset threshold, determine that described image is auxiliary Help the color and/or transparency in region identical with the regional location to be reinforced in layer.
7. according to the method described in claim 5, it is characterized in that, the method also includes:
According to the number in the region to be reinforced, the visual aids layer of corresponding number is set.
8. a kind of annotation equipment of image, which is characterized in that described device includes:
Module is obtained, for obtaining the color value of pixel in image to be marked;
Increase module, for according to the color value of pixel and the comparison result of preset threshold in the image to be marked, described Increase the corresponding visual aids layer of the comparison result on image to be marked, to obtain target image;Described image auxiliary layer is used In the color and/or brightness that adjust the image to be marked;
The increase module is also used to increase mark layer on the target image;
Labeling module, for obtaining the markup information of the target image on the mark layer.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201811502859.7A 2018-12-10 2018-12-10 Mask method, device, computer equipment and the storage medium of image Pending CN109726302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811502859.7A CN109726302A (en) 2018-12-10 2018-12-10 Mask method, device, computer equipment and the storage medium of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811502859.7A CN109726302A (en) 2018-12-10 2018-12-10 Mask method, device, computer equipment and the storage medium of image

Publications (1)

Publication Number Publication Date
CN109726302A true CN109726302A (en) 2019-05-07

Family

ID=66295272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811502859.7A Pending CN109726302A (en) 2018-12-10 2018-12-10 Mask method, device, computer equipment and the storage medium of image

Country Status (1)

Country Link
CN (1) CN109726302A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377338A (en) * 2019-07-23 2019-10-25 网易无尾熊(杭州)科技有限公司 Information labeling method, medium, device and calculating equipment
CN112131414A (en) * 2020-09-23 2020-12-25 北京百度网讯科技有限公司 Signal lamp image labeling method and device, electronic equipment and road side equipment
CN112381905A (en) * 2020-12-01 2021-02-19 北京光启元数字科技有限公司 Color superposition method and device and electronic equipment
CN117632069A (en) * 2023-12-19 2024-03-01 歌尔科技有限公司 Image display method, device and virtual reality equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011242645A (en) * 2010-05-19 2011-12-01 Ricoh Co Ltd Image forming apparatus
CN104392419A (en) * 2014-12-04 2015-03-04 厦门美图之家科技有限公司 Method for adding vignette effect into image
CN104715445A (en) * 2013-12-13 2015-06-17 腾讯科技(深圳)有限公司 Image processing method and system
CN106155542A (en) * 2015-04-07 2016-11-23 腾讯科技(深圳)有限公司 Image processing method and device
US20170084006A1 (en) * 2015-09-17 2017-03-23 Michael Edwin Stewart Methods and Apparatus for Enhancing Optical Images and Parametric Databases
CN107886105A (en) * 2016-09-30 2018-04-06 法乐第(北京)网络科技有限公司 A kind of annotation equipment of image
CN108492348A (en) * 2018-03-30 2018-09-04 北京金山安全软件有限公司 Image processing method, image processing device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011242645A (en) * 2010-05-19 2011-12-01 Ricoh Co Ltd Image forming apparatus
CN104715445A (en) * 2013-12-13 2015-06-17 腾讯科技(深圳)有限公司 Image processing method and system
CN104392419A (en) * 2014-12-04 2015-03-04 厦门美图之家科技有限公司 Method for adding vignette effect into image
CN106155542A (en) * 2015-04-07 2016-11-23 腾讯科技(深圳)有限公司 Image processing method and device
US20170084006A1 (en) * 2015-09-17 2017-03-23 Michael Edwin Stewart Methods and Apparatus for Enhancing Optical Images and Parametric Databases
CN107886105A (en) * 2016-09-30 2018-04-06 法乐第(北京)网络科技有限公司 A kind of annotation equipment of image
CN108492348A (en) * 2018-03-30 2018-09-04 北京金山安全软件有限公司 Image processing method, image processing device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭杰荣等: "《光电信息技术实验教程》", 31 December 2015 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377338A (en) * 2019-07-23 2019-10-25 网易无尾熊(杭州)科技有限公司 Information labeling method, medium, device and calculating equipment
CN112131414A (en) * 2020-09-23 2020-12-25 北京百度网讯科技有限公司 Signal lamp image labeling method and device, electronic equipment and road side equipment
CN112381905A (en) * 2020-12-01 2021-02-19 北京光启元数字科技有限公司 Color superposition method and device and electronic equipment
CN117632069A (en) * 2023-12-19 2024-03-01 歌尔科技有限公司 Image display method, device and virtual reality equipment

Similar Documents

Publication Publication Date Title
CN109726302A (en) Mask method, device, computer equipment and the storage medium of image
CN113888437B (en) Image processing method, device, electronic device and computer readable storage medium
CN105843494B (en) Method, device and terminal for realizing area screen capture
CN108921905A (en) Target localization method, device, computer equipment and readable storage medium storing program for executing
CN111915483A (en) Image splicing method and device, computer equipment and storage medium
JP6006543B2 (en) Image processing apparatus and image processing method
CN107688772A (en) Method, apparatus, computer equipment and the storage medium of policy information typing
CN101783019A (en) Subject tracking apparatus and control method therefor, image capturing apparatus, and display apparatus
CN103400400B (en) A kind of method for correcting image based on region
CN115222739B (en) Defect labeling method, device, storage medium, equipment and computer program product
CN106415348B (en) Photographic device and focusing control method
CN110163804A (en) Image defogging method, device, computer equipment and storage medium
CN109377509A (en) Method, apparatus, storage medium and the equipment of image, semantic segmentation mark
CN109920018A (en) Black-and-white photograph color recovery method, device and storage medium neural network based
CN109063598A (en) Face pore detection method, device, computer equipment and storage medium
CN110580693A (en) Image processing method, image processing device, computer equipment and storage medium
CN109919030A (en) Black eye kind identification method, device, computer equipment and storage medium
WO2023151210A1 (en) Image processing method, electronic device and computer-readable storage medium
CN114359337A (en) RGBT visual target tracking method, device, electronic device and storage medium
CN109657671A (en) Nameplate character recognition method and device, computer equipment and storage medium
CN110867243B (en) Image annotation method, device, computer system and readable storage medium
CN102375980B (en) Image processing method and device
CN111383166B (en) Method and device for processing image to be displayed, electronic equipment and readable storage medium
CN119942588A (en) Fingertip detection method, device, equipment and storage medium based on event camera
CN115083571A (en) Pathological slice processing method, computer equipment and storage medium

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: 20190507