CN108986036A - Handle method, the terminal of file - Google Patents
Handle method, the terminal of file Download PDFInfo
- Publication number
- CN108986036A CN108986036A CN201710404417.8A CN201710404417A CN108986036A CN 108986036 A CN108986036 A CN 108986036A CN 201710404417 A CN201710404417 A CN 201710404417A CN 108986036 A CN108986036 A CN 108986036A
- Authority
- CN
- China
- Prior art keywords
- layer
- image data
- pixel
- color value
- value
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000001914 filtration Methods 0.000 claims description 14
- 230000003287 optical effect Effects 0.000 claims description 14
- 238000005516 engineering process Methods 0.000 abstract description 7
- 230000000694 effects Effects 0.000 abstract description 4
- 238000012545 processing Methods 0.000 description 25
- 239000003086 colorant Substances 0.000 description 19
- 238000010586 diagram Methods 0.000 description 9
- 238000004566 IR spectroscopy Methods 0.000 description 6
- 239000000463 material Substances 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 230000004069 differentiation Effects 0.000 description 4
- 238000001228 spectrum Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 description 2
- 238000010521 absorption reaction Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 238000003331 infrared imaging Methods 0.000 description 2
- 230000013011 mating Effects 0.000 description 2
- 238000012856 packing Methods 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 238000001429 visible spectrum Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 229910052742 iron Inorganic materials 0.000 description 1
- 230000005389 magnetism Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000002310 reflectometry Methods 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 230000009469 supplementation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
The present invention provides a kind of method, terminals for handling file, wherein, this method comprises: carrying out image data acquiring to file to be processed by the first light, the first coordinate information of the color value of pixel and the pixel of the first image data in the first image data in the first image data of file to be processed is obtained;Image data acquiring is carried out to file to be processed by the second light, obtains the first coordinate information of pixel in the second image data of file to be processed;Pixel corresponding with the coordinate information of pixel in the first image data in the second image data is adjusted according to the color value of pixel in the first image data.Through the invention, it solves the problems, such as that the image pixel obtained in such a way that file is scanned or is taken pictures in the related technology loss is more serious, improves the experience effect of user.
Description
Technical field
The present invention relates to file process fields, in particular to a kind of method, terminal for handling file.
Background technique
As terminal function is more and more, people daily life many aspects all can using terminal, to allow life
Become efficient and convenient, wherein the scanning that document is carried out using softwares such as evernote, business card scans is taken pictures, and identification etc. is exactly it
In critically important one.Books or business card table etc. can usually be swept other progress documents during stating software in use
It retouches, take pictures.
In the related technology, scanning or take pictures is photochrome obtained in process, and then directly saves or carry out gray scale
Processing, handles the gray scale pictures for black and white for photochrome.For aforesaid way in the related technology, if scanned or shooting
Paper document in have annotation, the trace scribbled;In this way during black white binarization, the loss of pixel is than more serious, most
The photo text edge penalty obtained eventually can be bigger, it may appear that text is thinner, often goes out active stroke for handwriting.
In addition, good differentiation cannot be done for block letter and handwritten portions, for some scenes for needing Text region, handwriting
Be mixed into can have a huge impact the identification of text.
It is tighter for the image pixel loss obtained in such a way that file is scanned or is taken pictures in the related technology
, not yet there is effective solution at present in the above problem of weight.
Summary of the invention
The embodiment of the invention provides it is a kind of handle file method, terminal, at least solve in the related technology using pair
The image pixel that the mode that file is scanned or takes pictures obtains loses more serious problem.
According to an aspect of the invention, there is provided a kind of method for handling file, comprising: by the first light to be processed
File carries out image data acquiring, obtains in the first image data of the file to be processed the color value of pixel and described
First coordinate information of the pixel of first image data in the first image data;By the second light to described to be processed
File carries out image data acquiring, obtains the first coordinate information of pixel in the second image data of the file to be processed;
According to the color value of pixel in the first image data in second image data and in the first image data
The corresponding pixel of the coordinate information of pixel is adjusted.
Further, the color value according to pixel in the first image data is in second image data
It includes: according to preset multiple that pixel corresponding with the coordinate information of pixel in the first image data, which is adjusted,
Color value section is grouped the pixel in the first image data, multiple figure layers after being grouped, wherein same
The color value of pixel is in the same color value section in a figure layer;According to the color value of pixel in one or more figure layers
To the face of pixel corresponding with the coordinate information of pixel in one or more of figure layers in second image data
Color value is adjusted, and/or to the coordinate information in second image data with pixel in one or more of figure layers
The position of corresponding pixel is adjusted.
Further, the color value according to pixel in one or more figure layers in second image data with
In one or more of figure layers the color value of the corresponding pixel of the coordinate information of pixel be adjusted include: will be described
Other coordinate values in second image data in addition to coordinate value corresponding with the first figure layer in the multiple figure layer are corresponding
The color value of pixel is adjusted to consistent with the color value of the first figure layer in the multiple figure layer;Wherein, first figure layer
For the background color figure layer of the file to be processed.
Further, the color value according to pixel in one or more figure layers in second image data with
In one or more of figure layers the color value of the corresponding pixel of the coordinate information of pixel be adjusted include: will be described
Other coordinate values in second image data in addition to coordinate value corresponding with the second figure layer in the multiple figure layer are corresponding
The color value of pixel is adjusted to consistent with the color value of the second figure layer in the multiple figure layer;Wherein, second figure layer
For other figure layers in addition to background color figure layer in the multiple figure layer, and second figure layer includes one or more subgraph layers.
Further, in the case where second figure layer includes multiple subgraph layers, will be in second image data
The color value of the corresponding pixel of other coordinate values in addition to coordinate value corresponding with the second figure layer in the multiple figure layer,
Adjust to after consistent with the color value of the second figure layer in the multiple figure layer, by second image data with the second figure
The color value of partial subgraph layer in the consistent multiple subgraph layers of color value of layer is adjusted to consistent with the color value of the first figure layer;
Wherein, first figure layer is the background color figure layer of the file to be processed;And/or will in second image data except with
The color value of the corresponding pixel of other coordinate values except the corresponding coordinate value of the second figure layer in the multiple figure layer, adjustment
To after consistent with the color value of the second figure layer in the multiple figure layer, by second image data with the second figure layer
The color value of a part of sub- component layer in the consistent multiple subgraph layers of color value adjust to its in the multiple subgraph layer
One of subgraph layer color value it is consistent.
Further, the color value according to pixel in one or more figure layers in second image data with
It includes: described in acquisition that the position of the corresponding pixel of the coordinate information of pixel, which is adjusted, in one or more of figure layers
Coordinate information of second figure layer in first coordinate information in first image data;Movement is in second image data
In pixel corresponding with the coordinate information of the second figure layer position;Wherein, second figure layer is in the multiple figure layer
Other figure layers in addition to background color figure layer, and second figure layer includes one or more subgraph layers.
Further, first light is black light, and second light is visible light.
According to another aspect of the present invention, a kind of terminal is provided, comprising: light compensating lamp component, for issuing the first light
With the second light;Camera assembly carries out image data acquiring to file to be processed for passing through first light, and by described
Second light carries out image data acquiring to the file to be processed;Processor, for the picture number according to first light collection
According to obtaining the pixel of the color value of pixel and the first image data in the first image data of the file to be processed
First coordinate information of the point in the first image data;And it is obtained according to the image data of second light collection described
First coordinate information of pixel in second image data of file to be processed;And according to pixel in the first image data
Color value to pixel corresponding with the coordinate information of pixel in the first image data in second image data
Point is adjusted.
Further, the processor is also used to according to preset multiple color value sections to the first image data
In pixel be grouped, multiple figure layers after being grouped, wherein the color value of pixel is same in the same figure layer
In a color value section;And according to the color value of pixel in one or more figure layers in second image data with institute
The color value for stating the corresponding pixel of coordinate information of pixel in one or more figure layers is adjusted, and/or to described
The position of pixel corresponding with the coordinate information of pixel in one or more of figure layers carries out in second image data
Adjustment.
Further, the processor, be also used to by second image data except with the in the multiple figure layer
The color value of the corresponding pixel of other coordinate values except the corresponding coordinate value of one figure layer, adjust to in the multiple figure layer
The first figure layer color value it is consistent;Wherein, first figure layer is the background color figure layer of the file to be processed.
Further, the processor, be also used to by second image data except with the in the multiple figure layer
The color value of the corresponding pixel of other coordinate values except the corresponding coordinate value of two figure layers, adjust to in the multiple figure layer
The second figure layer color value it is consistent;Wherein, second figure layer is other in addition to background color figure layer in the multiple figure layer
Figure layer, and second figure layer includes one or more subgraph layers.
Further, in the case where second figure layer includes multiple subgraph layers, the processor is also used to by institute
It states in the second image data except other coordinate values in addition to the corresponding coordinate value of the second figure layer in the multiple figure layer are corresponding
Pixel color value, adjust to after consistent with the color value of the second figure layer in the multiple figure layer, by described second
It is adjusted with the color value of the partial subgraph layer in the consistent multiple subgraph layers of the color value of the second figure layer in image data to
The color value of one figure layer is consistent;Wherein, first figure layer is the background color figure layer of the file to be processed;And/or will be described
Other coordinate values in second image data in addition to coordinate value corresponding with the second figure layer in the multiple figure layer are corresponding
The color value of pixel is adjusted to after consistent with the color value of the second figure layer in the multiple figure layer, by second figure
As adjusted in data with the color value of a part of sub- component layer in the consistent multiple subgraph layers of the color value of the second figure layer to
The color value of subgraph layer is consistent one of in the multiple subgraph layer.
Further, the processor is also used to obtain the second figure layer in the first image data described first
Coordinate information in coordinate information;Mobile pixel corresponding with the coordinate information of the second figure layer in second image data
Position;Wherein, second figure layer is other figure layers in addition to background color figure layer in the multiple figure layer, and second figure
Layer includes one or more subgraph layers.
Further, the camera assembly includes: optical filtering changeover module and photosensory assembly;Wherein, in the filtering assembly
In the case where filtering second light, the photosensory assembly carries out image data to file to be processed by first light and adopts
Collection;In the case where the filtering assembly filters first light, the photosensory assembly is by second light to text to be processed
Part carries out image data acquiring.
Further, first light is black light, and second light is visible light.
Through the invention, image data acquiring is carried out to file to be processed by the first light, obtains the of file to be processed
First coordinate information of the pixel of the color value of pixel and the first image in the first image data in one image data;
Image data acquiring is carried out to file to be processed by the second light, obtains pixel in the second image data of file to be processed
First coordinate information;According to the color value of pixel in the first image data in the second image data and in the first image data
The corresponding pixel of the coordinate information of pixel is adjusted, and is scanned to solve and use in the related technology to file
Or the image pixel that the mode taken pictures obtains loses more serious problem, improves the experience effect of user.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the method for processing file according to an embodiment of the present invention;
Fig. 2 is the structural schematic diagram of the device of processing file according to an embodiment of the present invention;
Fig. 3 is hardware location structural schematic diagram according to an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of camera according to an embodiment of the present invention;
Fig. 5 is the circuit diagram of filter switching module according to an embodiment of the present invention;
Fig. 6 is terminal structure schematic diagram according to an embodiment of the present invention;
Fig. 7 is the normal distribution that black light data according to an embodiment of the present invention are formed.
Specific embodiment
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in combination with Examples.It should be noted that not conflicting
In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.
Embodiment 1
A kind of method for handling file is provided in the present embodiment, and Fig. 1 is processing file according to an embodiment of the present invention
Method flow chart, as shown in Figure 1, the process includes the following steps:
Step S102: image data acquiring is carried out to file to be processed by the first light, obtains the first of file to be processed
The the first coordinate letter of the color value of pixel and the pixel of the first image data in the first image data in image data
Breath;
Step S104: image data acquiring is carried out to file to be processed by the second light, obtains the second of file to be processed
First coordinate information of pixel in image data;
Step S106: according to the color value of pixel in the first image data in the second image data with the first picture number
It is adjusted according to the corresponding pixel of the coordinate information of middle pixel.
Above-mentioned steps S102 to step S106 through this embodiment, according to the first light and the second light respectively to text to be processed
Part carries out processing and respectively obtains the first image data and the second image data, and then according to the face of pixel in the first image data
Color value is adjusted pixel corresponding with the coordinate information of pixel in the first image data in the second image data, adopts
With the mode of the present embodiment, the image data of collected file to be processed can be adjusted, to solve related skill
The image pixel obtained in such a way that file is scanned or is taken pictures in art loses more serious problem, improves user
Experience effect.
It should be noted that the executing subject of the method for the present embodiment is preferably intelligent terminal.In addition, being related in the present embodiment
And the color value arrived, it can be the color value of gray value, RGB or extended formatting.
In step S106 according to the color value of pixel in the first image data in the second image data with the first image
The mode that the corresponding pixel of the coordinate information of pixel is adjusted in data, in the optional embodiment of the present embodiment
It may further include:
Step S106-1: being grouped the pixel in the first image data according to preset multiple color value sections,
Multiple figure layers after being grouped, wherein the color value of pixel is in the same color value section in the same figure layer;
Step S106-2: according to the color value of pixel in one or more figure layers in the second image data with one or
The color value of the corresponding pixel of the coordinate information of pixel is adjusted in multiple figure layers, and/or to the second image data
In the position of pixel corresponding with the coordinate information of pixel in one or more figure layers be adjusted.
Above-mentioned steps S106-1 and S106-2 are described in detail below by specific embodiment;
(1) the array of data X of file to be processed is obtained by the first light, binary conversion treatment, access group X is carried out to array X
In Y value, for the Y value of a certain pixel;It should be noted that a data format is YUV in Digital Image Processing
Format, this data are also the collected data format of camera, and each element of array X is color value, include three
Data, YUV, the Y of later process are exactly the Y in YUV.
When Y > M (threshold value), Y=255;
When Y < M (threshold value), Y=0;
When using above-mentioned global binary conversion treatment, the value of threshold value M can take the average value of the Y value of all pixels point.
In addition local binarization can be used herein, be exactly that entire image is divided into N number of window according to certain rules, it is N number of to this
Pixel in the window is divided into two parts according still further to a unified threshold value M by each of window window, carries out two-value
Change processing, when local binarization, can use the higher adaptive threshold value mode of precision.The threshold value of this method is by this
The average value E of window pixel, the difference square P between pixel, the various local features such as root-mean-square value Q between pixel, setting one
A parametric equation carries out the calculating of threshold value, such as: M=a*E+b*P+c*Q, wherein a, b, c are free parameters.In addition M value is really
Recognizing can also be using Two-peak method, and P is parametric method, iterative method, OTSU method etc..
The coordinate value of the point of all Y=255 is recorded, the region of Y=255 is undercolor region.For corresponding paper document just
It is the color of paper, i.e. undercolor region, the coordinate value of record undercolor region point is D.The coordinate of remaining point is character area.Background color
The coordinate value of region and character area is to correspond in visible images and black light image, is consistent.
(2) array X takes the array of the Y value of all coordinate points.The Y value of undercolor region in the array is all set 0, forms one
The array Ye of a correction carries out normal distribution processing using the value of Ye, wherein abscissa is the value of Ye, and ordinate is coordinate points
Quantity.
(3) according to the distribution curve of Ye, several wave crests in available image array, the corresponding figure of each wave crest
Layer, choose the maximum wave crest point value Y0 of area, meet Y0-M0 < Ye < Y0+M0 (M0 herein thus wave crest distribution threshold value,
The variance of distribution can be taken time) point be point that the wave crest correspond to figure layer, these coordinates put store be denoted as figure layer
0, coordinate data is stored in array W.
(4) and so on, distributed acquisition figure layer 1 and figure layer 2, when the number of the point of some figure layer is less than threshold value Mt,
Stop figure layer distribution.
(5) all the points coordinate except figure layer 1, figure layer 2 ... figure layer N is stored, and is denoted as array Z1, data Z2 ... respectively
Array ZN is denoted as annotation figure layer.
Obtain background color figure layer, figure layer 0, figure layer 1, figure layer 2 ... later, the point of each figure layer corresponds to corresponding color value.
The image data for separating different colours value is obtained.
After obtaining final visible images data and figure layer data, system can use these data and carry out further
Processing.Corresponding relationship is as follows:
First light image --- array X
Background color figure layer --- array D
Figure layer 0 --- array W
Figure layer 1 --- array Z1
Figure layer 2 --- array Z2
The case where being annotated for the most common single color printing books user with pen is as follows:
Background color figure layer -- array D, the corresponding color in visible light are the color of paper, take all array D interior elements
Average value, obtain the average color of paper.
Figure layer 0-- array W, figure layer 0 are to take a kind of maximum color of the distribution medium wave peak area of infrared image array D corresponding
Figure layer remove background color figure layer for block letter document, being distributed most should be printing word part, then figure layer 0
The data of printing body portion are just corresponded to, array D is the coordinate position where block letter.
Corresponding figure layer 1, these figure layers of figure layer 2 are comment section in document, each figure layer normal distribution peak value is corresponding
Y value difference, be different colours caused by the brightness under infrared imaging is different, then a figure layer corresponds to a kind of face
Color, coordinate position are distributed as Z1, Z2.
Based on above-mentioned (1)~(5), in the optional embodiment of the present embodiment, the mode of step S106-2 includes following
Optional embodiment:
Mode one: by other in the second image data in addition to coordinate value corresponding with the first figure layer in multiple figure layers
The color value of the corresponding pixel of coordinate value is adjusted to consistent with the color value of the first figure layer in multiple figure layers;Wherein, first
Figure layer is the background color figure layer of file to be processed.
In specific application scenarios, which can be document reduction: access group X, and the D color for calculating background color figure layer is flat
All corresponding color values of annotation figure layer coordinate value of Z1, Z2 etc. in array X are revised as D0 by mean value D0, i.e., by figure layer 1, figure
The data of the comment sections such as layer 2 are filled with the color average of bottom figure layer, obtain array A0, then A0 is the text after restoring
Shelves.Further, it is also possible to carry out the operation such as Text region.
Mode two: by other in the second image data in addition to coordinate value corresponding with the second figure layer in multiple figure layers
The color value of the corresponding pixel of coordinate value is adjusted to consistent with the color value of the second figure layer in multiple figure layers;Wherein, second
Figure layer is other figure layers in addition to background color figure layer in multiple figure layers, and the second figure layer includes one or more subgraph layers.
In specific application scenarios, which can be annotation color differentiation: it is corresponding that figure layer 1, figure layer 2 etc. annotate figure layer
Coordinate position Z1, Z2 be that different colours annotate corresponding coordinate position and take all pixels point of Z1 coordinate points in X
The average value of color value is denoted as color 1, then color 1 is the color of figure layer 1.Identical method obtains the color 2 of figure layer 2.
Z1 --- figure layer 1 --- color 1
Z2 --- figure layer 2 --- color 2
Mode three: it in the case where the second figure layer includes multiple subgraph layers, will removed and multiple figures in the second image data
Layer in the corresponding coordinate value of the second figure layer except the corresponding pixel of other coordinate values color value, adjust to multiple figures
Layer in the second figure layer color value it is consistent after, by the second image data with the consistent multiple sons of the color value of the second figure layer
The color value of partial subgraph layer in figure layer is adjusted to consistent with the color value of the first figure layer;Wherein, the first figure layer is to be processed
The background color figure layer of file;And/or
By other coordinates in the second image data in addition to coordinate value corresponding with the second figure layer in multiple figure layers
It is worth the color value of corresponding pixel, adjusts to after consistent with the color value of the second figure layer in multiple figure layers, by the second figure
As adjusted in data with the color value of a part of sub- component layer in the consistent multiple subgraph layers of the color value of the second figure layer to
The color value of subgraph layer is consistent one of in multiple subgraph layers.
In specific application scenarios, which can be the hiding and display of annotation: in aforesaid way one and mode two
On the basis of, it can be handled by the value to array A0, the hiding and display of different colours annotation may be implemented, A0 is original
Beginning document as hides the document of annotation;In A0 array, the point color value of Z1 respective coordinates position is filled for color 1, filling
Array afterwards is the image of the annotation of display color 1.And so on, the image of the annotation of available display color 2, and
The image of various colors combination annotation.
Mode four: coordinate information of the second figure layer in the first image data in the first coordinate information is obtained;Movement exists
The position of pixel corresponding with the coordinate information of the second figure layer in second image data;Wherein, the second figure layer is multiple figure layers
In other figure layers in addition to background color figure layer, and the second figure layer includes one or more subgraph layers.
In specific application scenarios, which can be the movement of annotation: when certain annotations are located at printing word region
When interior, annotation can be moved to blank parts.
Such as: the array W of figure layer 0 is taken, the value of the array W of coordinate value is handled, takes the minimum value of all abscissa s
S0 and maximum value s1, the minimum value t0 and maximum value t1 of all the points ordinate t, then coordinate points (s0, t0) (s0, t1) (s1,
T0) rectangle of (s1, t1) composition is the region of block letter, takes figure layer 1, and figure layer 2 etc. annotates the Z1 in figure layer, and the transverse and longitudinal of Z2 is sat
Sz and tz is marked, satisfaction is worked as
S0 < sz < s1 and t0 < tz < t1
Then the coordinate is located in block letter region, carries out translation processing to the coordinate.
Sz (e)=sz+Ts
Tz (e)=tz+Tt
All coordinates for belonging to same annotation figure layer abscissa translational movement Ts, ordinate translational movement Tt neighbouring by the coordinate
Point set, which calculates, to be obtained.
In array A, the color value of the coordinate points of the corresponding annotation figure layer of sz (e) tz (e) adjusted is revised as pair
The color value that original annotation releases figure layer coordinate points is revised as background color figure layer color value D0, that is, realizes the movement of annotation by the color answered.
It should be noted that the first light is black light in the present embodiment, the second light is visible light.Black light, such as
Infrared light, when passing through infrared light direct beam, different colours and unlike material are different to the absorptivity of black light, the light of reflection
Line is just different, when the different colours of a certain material of Infrared irradiation, color value that different colours part is imaged under infrared light
With regard to different, pass through the differentiation of color value, so that it may different colours are classified, that is, figure layer mentioned above, it is each
The corresponding color of a figure layer.
Certainly, black light can also using other light in addition to infrared ray, as long as be able to achieve to different colours with
And the different light of unlike material absorptivity is possible.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) method that executes each embodiment of the present invention.
Embodiment 2
A kind of device for handling file is additionally provided in the present embodiment, and the device is for realizing above-described embodiment and preferably
Embodiment, the descriptions that have already been made will not be repeated.As used below, predetermined function may be implemented in term " module "
The combination of software and/or hardware.Although device described in following embodiment is preferably realized with software, hardware, or
The realization of the combination of person's software and hardware is also that may and be contemplated.
Fig. 2 is the structural schematic diagram of the device of processing file according to an embodiment of the present invention, as shown in Fig. 2, the device packet
It includes:
First acquisition module 22 obtains to be processed for carrying out image data acquiring to file to be processed by the first light
In first image data of file the color value of pixel and the pixel of the first image in the first image data first
Coordinate information;
Second acquisition module 24 is coupled with the first acquisition module 22 and is linked, for by the second light to file to be processed into
Row image data acquiring obtains the first coordinate information of pixel in the second image data of file to be processed;
Module 26 is adjusted, couples and links with the second acquisition module 24, for the face according to pixel in the first image data
Color value is adjusted pixel corresponding with the coordinate information of pixel in the first image data in the second image data.
It should be noted that if the device is applied in the terminal with photographing module, first acquisition module 22
It can be inherited on the photographing module with the second acquisition module 24.
In specific application scenarios, the photographing module can be made up of two parts above-mentioned first acquisition module 22 with
Second acquisition module 24;
Wherein, which may is that filter switching module and photosensitive element.The photosensitive element is common CCD CMOS
And other may be used as the element of sightseeing function, filter switching module has two multilayer filters, respectively visible filter and
Infrared fileter, wherein visible filter can filter out all non-visibles, allow photosensitive element to receive only visible
The image of spectra part obtains visible images, and infrared fileter can filter out all non-infrared spectroscopies, allows photosensitive element
The image for receiving only infrared spectroscopy part, obtains infrared image.Filter switching module be it is mechanical, by electric signal control can
Seeing optical filter and infrared fileter, one of them is located at the front of photosensitive element, carries out filter action, under normal mode, infrared absorption filter
Mating plate is in collapsed state, and photosensitive element acquires visible images, and when carrying out document shooting, user presses shutter, and optical filtering is cut
Mold changing block keeps visible filter to work first, and acquisition can be by light image, and infrared absorption filter can be put down for light optical filter by then packing up
Mating plate acquires infrared image.
Optionally, adjustment module includes: grouped element, is used for according to preset multiple color value sections to the first picture number
Pixel in is grouped, multiple figure layers after being grouped, wherein the color value of pixel is same in the same figure layer
In one color value section;Adjustment unit is coupled with grouped element and is linked, for according to pixel in one or more figure layers
Color of the color value to pixel corresponding with the coordinate information of pixel in one or more figure layers in the second image data
Value is adjusted, and/or to picture corresponding with the coordinate information of pixel in one or more figure layers in the second image data
The position of vegetarian refreshments is adjusted.
What the color value of adjustment pixel and/or the position of pixel being related to for above-mentioned adjustment unit were adjusted
Mode can be realized in the embodiment of the present embodiment by following several modes
Mode one: the adjustment unit is also used to remove in the second image data corresponding with the first figure layer in multiple figure layers
Coordinate value except the corresponding pixel of other coordinate values color value, adjust to the face with the first figure layer in multiple figure layers
Color value is consistent;Wherein, the first figure layer is the background color figure layer of file to be processed.
Which corresponds to the mode one of step S106-2 in embodiment one, i.e. which is in specific application scenarios
Document restores mode.
Mode two, the adjustment unit are also used to remove in the second image data corresponding with the second figure layer in multiple figure layers
Coordinate value except the corresponding pixel of other coordinate values color value, adjust to the face with the second figure layer in multiple figure layers
Color value is consistent;Wherein, the second figure layer is other figure layers in addition to background color figure layer in multiple figure layers, and the second figure layer includes one
Or multiple subgraph layers.
Which corresponds to the mode two of step S106-2 in embodiment one, i.e. which is in specific application scenarios
Annotation color is distinguished.
Mode three, the adjustment unit are also used to remove in the second image data corresponding with the second figure layer in multiple figure layers
Coordinate value except the corresponding pixel of other coordinate values color value, adjust to the face with the second figure layer in multiple figure layers
Color value is consistent;Wherein, the second figure layer is other figure layers in addition to background color figure layer in multiple figure layers, and the second figure layer includes one
Or multiple subgraph layers.
Which corresponds to the mode three of step S106-2 in embodiment one, i.e. which is in specific application scenarios
Annotation is hidden and display.
Mode four, the adjustment unit are also used to obtain the second figure layer in the first image data in the first coordinate information
Coordinate information;The position of mobile pixel corresponding with the coordinate information of the second figure layer in the second image data;Wherein,
Two figure layers are other figure layers in addition to background color figure layer in multiple figure layers, and the second figure layer includes one or more subgraph layers.
Which corresponds to the mode four of step S106-2 in embodiment one, i.e. which is in specific application scenarios
The movement of annotation.
In the optional embodiment of the present embodiment, the first light being related in the present embodiment can be black light, the
Two light can be visible light.
It should be noted that the present embodiment 2 corresponds to the Installation practice of embodiment 1, and therefore, the mould in the present embodiment
The mode that block and unit are realized is consistent with above method step.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong
Following manner realization is crossed, but not limited to this: above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned modules are with any
Combined form is located in different processors.
Embodiment 3
A kind of terminal is present embodiments provided, as shown in fig. 6, the terminal includes:
Light compensating lamp component 62, for issuing the first light and the second light;
Camera assembly 64 is coupled with the light compensating lamp component 62 and is linked, for carrying out figure to file to be processed by the first light
Image data acquiring is carried out to file to be processed as data acquisition, and by the second light;
Processor 66 is coupled with the camera assembly 64 and is linked, for being obtained according to the image data of the first light collection wait locate
Manage the of the color value of pixel and the pixel of the first image in the first image data of file in the first image data
One coordinate information;And pixel in the second image data of file to be processed is obtained according to the image data of the second light collection
First coordinate information;And according to the color value of pixel in the first image data in the second image data with the first image data
The corresponding pixel of the coordinate information of middle pixel is adjusted.
Wherein, in the optional embodiment of the present embodiment, which is also used to according to preset multiple color value areas
Between the pixel in the first image data is grouped, multiple figure layers after being grouped, wherein pixel in the same figure layer
The color value of point is in the same color value section;And according to the color value of pixel in one or more figure layers to the second figure
As the color value of pixel corresponding with the coordinate information of pixel in one or more figure layers in data is adjusted, and/
Or the position of pixel corresponding with the coordinate information of pixel in one or more figure layers in the second image data is carried out
Adjustment.
Based on above-mentioned processor according to the color value of pixel in one or more figure layers in the second image data with one
The color value of the corresponding pixel of coordinate information of pixel is adjusted in a or multiple figure layers, and/or to the second image
The mode that the position of pixel corresponding with the coordinate information of pixel in one or more figure layers is adjusted in data,
In the optional embodiment of the present embodiment, which can also implement aforesaid way in the following way:
Mode one: processor is used to that coordinate value corresponding with the first figure layer in multiple figure layers will to be removed in the second image data
Except the corresponding pixel of other coordinate values color value, adjust to the color value one with the first figure layer in multiple figure layers
It causes;Wherein, the first figure layer is the background color figure layer of file to be processed.
Mode two: processor is used to that coordinate value corresponding with the second figure layer in multiple figure layers will to be removed in the second image data
Except the corresponding pixel of other coordinate values color value, adjust to the color value one with the second figure layer in multiple figure layers
It causes;Wherein, the second figure layer is other figure layers in addition to background color figure layer in multiple figure layers, and the second figure layer includes one or more
Subgraph layer.
Mode three: in the case where the second figure layer includes multiple subgraph layers, processor, for will be in the second image data
The color value of the corresponding pixel of other coordinate values in addition to coordinate value corresponding with the second figure layer in multiple figure layers, adjustment
To after consistent with the color value of the second figure layer in multiple figure layers, by the color value one in the second image data with the second figure layer
The color value of the partial subgraph layer in multiple subgraph layers caused is adjusted to consistent with the color value of the first figure layer;Wherein, the first figure
Layer is the background color figure layer of file to be processed;And/or
By other coordinates in the second image data in addition to coordinate value corresponding with the second figure layer in multiple figure layers
It is worth the color value of corresponding pixel, adjusts to after consistent with the color value of the second figure layer in multiple figure layers, by the second figure
As adjusted in data with the color value of a part of sub- component layer in the consistent multiple subgraph layers of the color value of the second figure layer to
The color value of subgraph layer is consistent one of in multiple subgraph layers.
Mode four: processor is used to obtain coordinate letter of the second figure layer in the first image data in the first coordinate information
Breath;The position of mobile pixel corresponding with the coordinate information of the second figure layer in the second image data;Wherein, the second figure layer is
Other figure layers in addition to background color figure layer in multiple figure layers, and the second figure layer includes one or more subgraph layers.
Optionally, camera assembly includes: optical filtering changeover module and photosensory assembly;
Wherein, in the case where filtering assembly filters the second light, photosensory assembly carries out file to be processed by the first light
Image data acquiring;In the case where filtering assembly filters the first light, photosensory assembly carries out file to be processed by the second light
Image data acquiring.
It should be noted that the first light in the present embodiment can be black light, the second light can be visible light.
Embodiment 4
Below with reference to the alternative embodiment of the invention embodiment of the present invention is illustrated;
This alternative embodiment provides the device using black light processing file and picture, wherein the hardware components device
It include: CPU module (corresponding to the processor in embodiment 3), camera module (corresponding to the camera shooting in embodiment 3
Component), the supplementary lighting module of black light (corresponding to the light compensating lamp component in embodiment 3);Wherein, CPU module is used
In the processing work for carrying out image data;Camera module is used to shoot the image data source comprising black light spectrum, and
Black light and visible light part can be separated respectively by way of hardware or software processing, and be transferred to center
Processor is handled.Black light supplementary lighting module passes through bus and central processing mould for emitting the light compensating lamp of black light
Block control is connected, and is controlled its switch state by central processing unit.
Based on above-mentioned hardware module, this alternative embodiment is said using the process of black light processing file and picture
It is bright: firstly, starting document shooting function, equipment enter document screening-mode to start shooting module and image processing module;
Secondly, triggering shooting module control black light light compensating lamp is opened, and then shooting module control camera carries out image data and adopts
Collection, acquires black light part therein and visible light part respectively, is stored in two picture formats respectively.
In addition, image processing module is analyzed and processed black light part, different face are radiated at according to black light
The difference of reflectivity on color causes the brightness value of each pixel in image can be different, for pixel similar in color value
Classification processing is carried out, this partial pixel point is just the pixel of same figure layer, and pixel position is recorded, and respectively will not
Pixel position with figure layer is stored into different arrays.It will be in the array and visible images of the pixel position of different figure layers
Pixel it is corresponding, the image of different figure layers is extracted respectively, and stores respectively;Finally, being required according to user to not
It is further processed with figure layer image.
Fig. 3 is hardware location structural schematic diagram according to an embodiment of the present invention, as shown in figure 3, camera module with can not
Light-exposed light supplementation lamp module is in same plane, guarantees that camera module can collect the invisible of black light light compensating lamp sending
Light;In addition, there are two light sources for the black light light compensating lamp in this alternative embodiment, a light source issues visible light, for taking pictures
When flash lamp use;Another light source can issue infrared light, be used for infrared light filling.Infrared ray is invisible for human eye
, but to camera in this present embodiment, infrared spectroscopy part and visible light part can be collected.And it can
The image of infrared spectroscopy part and the image of visible light part can be filtered out respectively by filter or software.
Fig. 4 is the structural schematic diagram of camera according to an embodiment of the present invention, as shown in figure 4, there are two portions for the camera
It is grouped as, respectively filter switching module (the optical filtering changeover module total corresponding to embodiment 3) and photosensitive element (correspond to real
Apply the photosensory assembly in example 3) and other necessary component parts, photosensitive element is common CCD CMOS and other can be used
Make the element of sightseeing function, filter switching module has two multilayer filters, respectively visible filter and infrared fileter,
In, it is seen that light optical filter can filter out all non-visibles, and photosensitive element is allowed to receive only the figure of visible spectrum part
Picture, obtains visible images, and infrared fileter can filter out all non-infrared spectroscopies, allow photosensitive element to receive only infrared
The image of spectra part, obtains infrared image.Filter switching module be it is mechanical, vision filter and red is controlled by electric signal
One of them is located at the front of photosensitive element to outer optical filter, carries out filter action, and under normal mode, infrared fileter is in and packs up
State, photosensitive element acquire visible images, and when carrying out document shooting, user presses shutter, and filter switching module is protected first
Visible filter work is held, acquisition can be by light image, and infrared fileter can be put down for light optical filter by then packing up, and be acquired red
Outer image.
It should be noted that camera module can also use software processing mode, does not increase filter switching module, pass through
Photosensitive element acquires the signal of all spectrum, is filtered by software, and it is infrared spectroscopy, wave that medium wavelength, which is greater than 760nm,
The long 760nm that is less than is visible spectrum.
Fig. 5 is the circuit diagram of filter switching module according to an embodiment of the present invention, as shown in figure 5, visible light filters
It is connected between piece and infrared fileter and switching module by bracket, there are permanent magnet, the bracket of two optical filters in the top of bracket
For the permanent magnetism magnetic pole iron on top on the contrary, as shown in figure 5, under normal picture taking mode, switching module adds positive voltage+V, connects switching module
Bottom end magnetic pole is N, then, it is seen that light filter supporter homopolarity repels, and extends downwardly, and keeps off the infrared fileter top in front of photosensitive element
Bracket is heteropolar attracting, is upwards collected through, and camera is for visible light shooting mode at this time.When camera module receives system command,
When shooting infrared photograph, switching module adds negative voltage-V, and connection switching module bottom end magnetic pole is S, then infrared filtering plate rack is same
Pole is repelled, and is extended downwardly, and is kept off in front of photosensitive element, it is seen that light optical filter ceiling hold is heteropolar attracting, is upwards collected through, and images at this time
Head is in infrared shooting mode.
It should be noted that the optical filtering switching module can use other mechanical devices, pass through different electric signal controls
The rise of optical filter processed with fall.
Include: using the step of black light processing file and picture in the present embodiment in conjunction with above-mentioned Fig. 3 to Fig. 5
Step S201: the starting of document screening-mode, light compensating lamp enter infrared ray emission mode, at this time the infrared light of light compensating lamp
Source is in running order.Camera enters document screening-mode, in filter switching module plus forward voltage+V.
Step S202: user takes pictures, and camera module controls light compensating lamp transmitting infrared ray and carries out light filling, and simultaneity factor is sent
Instruction control camera module shoots photo.
Step S203: after camera module receives system photographs instruction, filter switching module forward voltage+V acquisition is maintained
Image collects visible images, then adds negative voltage-V in filter switching module, acquires infrared image.
Wherein, the picture format of camera module acquisition is RAW format, is converted to yuv format and handles for next step, respectively
It is stored in two array cachings, it is seen that light image array of data is A, and infrared picture data array is B.
Step S204: figure layer separation.
(1) visible data array A carries out binary conversion treatment, the Y value in visible images array of data is taken, for a certain
The Y value of pixel;
When Y > M (threshold value), Y=255;
When Y < M (threshold value), Y=0;
When using above-mentioned global binary conversion treatment, the value of threshold value M can take the average value of the Y value of all pixels point.
In addition local binarization can be used herein, be exactly that entire image is divided into N number of window according to certain rules, it is N number of to this
Pixel in the window is divided into two parts according still further to a unified threshold value M by each of window window, carries out two-value
Change processing, when local binarization, can use the higher adaptive threshold value mode of precision.The threshold value of this method is by this
The average value E of window pixel, the difference square P between pixel, the various local features such as root-mean-square value Q between pixel, setting one
A parametric equation carries out the calculating of threshold value, such as: M=a*E+b*P+c*Q, wherein a, b, c are free parameters.In addition M value is really
Recognizing can also be using Two-peak method, P parametric method, iterative method, OTSU method etc..
The coordinate value of the point of all Y=255 is recorded, the region of Y=255 is undercolor region.For corresponding paper document just
It is the color of paper, i.e. undercolor region, the coordinate value of record undercolor region point is D.The coordinate of remaining point is character area.Background color
The coordinate value of region and character area is to correspond in visible images and black light image, is consistent.
(2) for black light array of data B, the array of the Y value of all coordinate points is taken.By undercolor region in the array
Y value all sets 0, forms the array Ye of a correction, carries out normal distribution processing using the value of Ye, is illustrated in fig. 7 shown below, abscissa
For the value of Ye, ordinate is the quantity of coordinate points.
(3) according to the distribution curve of Ye, several wave crests in available image array, the corresponding figure of each wave crest
Layer, choose the maximum wave crest point value Y0 of area, meet Y0-M0 < Ye < Y0+M0 (M0 herein thus wave crest distribution threshold value,
The variance of distribution can be taken time) point be point that the wave crest correspond to figure layer, these coordinates put store be denoted as figure layer
0, coordinate data is stored in array W.
(4) and so on, 1 figure layer 2 of distributed acquisition figure layer is stopped when the number of the point of some figure layer is less than threshold value Mt
Only figure layer is distributed.
(5) all the points coordinate except figure layer 1, figure layer 2 ... figure layer N is stored, and is denoted as array Z1, data Z2 ... respectively
Array ZN is denoted as annotation figure layer.
It should be noted that figure layer separation can also use other mathematical algorithms, such as successively shelled using desired variance yields
From data, a similar element value is determined using continuous identical data, other same dvielements are then found according to this value.
Step S205: background color figure layer, figure layer 0, figure layer 1, figure layer 2 ... are obtained later, by figure layer and visible images data
In conjunction with the point of each figure layer corresponds to corresponding color value.The image data for separating different colours value is obtained.
After obtaining final visible images data and figure layer data, system can use these data and carry out further
Processing.Corresponding relationship is as follows
Visible images --- array A
Infrared image --- array B
Background color figure layer --- array D
Figure layer 0 --- array W
Figure layer 1 --- array Z1
Figure layer 2 --- array Z2
When using infrared light direct beam, different colours, unlike material is different to the absorptivity of black light, and the light of reflection is just
Difference, when the different colours of a certain material of Infrared irradiation, the color value that different colours part is imaged under infrared light just has
Institute is different, by the differentiation of color value, so that it may different colours are classified, that is, figure layer mentioned above, each figure
The corresponding color of layer.
The case where being annotated for the most common single color printing books user with pen,
Background color figure layer -- array D, the corresponding color in visible light are the color of paper, take all array D interior elements
Average value, obtain the average color of paper.
Figure layer 0-- array W, figure layer 0 are to take a kind of maximum color of the distribution medium wave peak area of infrared image array D corresponding
Figure layer remove background color figure layer for block letter document, being distributed most should be printing word part, then figure layer 0
The data of printing body portion are just corresponded to, array D is the coordinate position where block letter.
Figure layer 1, figure layer 2 ..., these corresponding figure layers are comment section in document, each figure layer normal distribution peak value pair
The difference for the Y value answered is different colours caused by the brightness under infrared imaging is different, then a figure layer corresponds to one kind
Color, coordinate position are distributed as Z1, Z2 ....
Above-mentioned steps S201- to S205 based on this present embodiment, can perform the following operation;
(1) document restores: taking the array of data A of visible images, calculates the D color average D0 of background color figure layer, will count
All corresponding color values of annotation figure layer coordinate value such as Z1, Z2 are revised as D0 in group A, i.e., by comment sections such as figure layer 1, figure layers 2
The data divided are filled with the color average of bottom figure layer, obtain array A0, then A0 is the document after restoring.Further
It can carry out the operation such as Text region.
(2) annotation color is distinguished: it is different colours that figure layer 1, figure layer 2 etc., which annotate figure layer corresponding coordinate position Z1, Z2,
Corresponding coordinate position is annotated, in A, the average value of the color value of all pixels point of Z1 coordinate points is taken, is denoted as color 1, that
Color 1 is the color of figure layer 1.Identical method obtains the color 2 of figure layer 2.
Z1 --- figure layer 1 --- color 1
Z2 --- figure layer 2 --- color 2
(3) annotation hide and display: on the basis of 1 and 2, can be handled by the value to array A0, can be with
Realize the hiding and display of different colours annotation, A0 is original document, as hides the document of annotation;In A0 array, Z1
The point color value of respective coordinates position fills for color 1, and filled array is the image of the annotation of display color 1.With such
It pushes away, the image of image and various colors the combination annotation of the annotation of available display color 2.
(4) movement annotated: when certain annotations are located in printing word region, annotation can be moved to blank parts
The array W for taking figure layer 0 handles the value of the array W of coordinate value, take the minimum value s0 of all abscissa s with
The minimum value t0 and maximum value t1 of maximum value s1, all the points ordinate t, then coordinate points (s0, t0) (s0, t1) (s1, t0)
The rectangle of (s1, t1) composition is the region of block letter, takes figure layer 1, and figure layer 2 etc. annotates the Z1 in figure layer, the transverse and longitudinal coordinate of Z2
Sz and tz, works as satisfaction
S0 < sz < s1 and t0 < tz < t1
Then the coordinate is located in block letter region, carries out translation processing to the coordinate.
Sz (e)=sz+Ts
Tz (e)=tz+Tt
All coordinates for belonging to same annotation figure layer abscissa translational movement Ts, ordinate translational movement Tt neighbouring by the coordinate
Point set, which calculates, to be obtained.
In array A, the color value of the coordinate points of the corresponding annotation figure layer of sz (e) tz (e) adjusted is revised as pair
The color value that original annotation releases figure layer coordinate points is revised as background color figure layer color value D0, that is, realizes the movement of annotation by the color answered.
Aforesaid way through this embodiment carries out reinforcement processing to file scanning using infrared ray, realizes annotation and knows
Not, a variety of innovative functions such as color identification;It is obscured moreover it is possible to solve the scanning limit that active user encounters very well, binaryzation
Treatment effect is bad, the hand-written problem that cannot be distinguished with block letter.
The embodiments of the present invention also provide a kind of storage mediums.Optionally, in the present embodiment, above-mentioned storage medium can
To be arranged to store the program code for executing following steps:
S1: image data acquiring is carried out to file to be processed by the first light, obtains the first picture number of file to be processed
According to the first coordinate information of the color value of middle pixel and the pixel of the first image in the first image data;
S2: image data acquiring is carried out to file to be processed by the second light, obtains the second picture number of file to be processed
According to the first coordinate information of middle pixel;
S2: according to the color value of pixel in the first image data in the second image data with picture in the first image data
The corresponding pixel of the coordinate information of vegetarian refreshments is adjusted.
Optionally, the specific example in the present embodiment can be with reference to described in above-described embodiment and optional embodiment
Example, details are not described herein for the present embodiment.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
It is performed by computing device in the storage device, and in some cases, it can be to be different from shown in sequence execution herein
Out or description the step of, perhaps they are fabricated to each integrated circuit modules or by them multiple modules or
Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (15)
1. a kind of method for handling file characterized by comprising
Image data acquiring is carried out to file to be processed by the first light, is obtained in the first image data of the file to be processed
The first coordinate information of the color value of pixel and the pixel of the first image data in the first image data;
Image data acquiring is carried out to the file to be processed by the second light, obtains the second picture number of the file to be processed
According to the first coordinate information of middle pixel;
According to the color value of pixel in the first image data in second image data with the first image number
It is adjusted according to the corresponding pixel of the coordinate information of middle pixel.
2. the method according to claim 1, wherein the face according to pixel in the first image data
Color value clicks through pixel corresponding with the coordinate information of pixel in the first image data in second image data
Row adjusts
The pixel in the first image data is grouped according to preset multiple color value sections, after being grouped
Multiple figure layers, wherein the color value of pixel is in the same color value section in the same figure layer;
According to the color value of pixel in one or more figure layers in second image data with one or more of figures
The color value of the corresponding pixel of coordinate information of pixel is adjusted in layer, and/or in second image data
The position of pixel corresponding with the coordinate information of pixel in one or more of figure layers is adjusted.
3. according to the method described in claim 2, it is characterized in that, the color according to pixel in one or more figure layers
Value is to pixel corresponding with the coordinate information of pixel in one or more of figure layers in second image data
Color value, which is adjusted, includes:
By other seats in second image data in addition to coordinate value corresponding with the first figure layer in the multiple figure layer
The color value of the corresponding pixel of scale value is adjusted to consistent with the color value of the first figure layer in the multiple figure layer;
Wherein, first figure layer is the background color figure layer of the file to be processed.
4. according to the method described in claim 2, it is characterized in that, the color according to pixel in one or more figure layers
Value is to pixel corresponding with the coordinate information of pixel in one or more of figure layers in second image data
Color value, which is adjusted, includes:
By other seats in second image data in addition to coordinate value corresponding with the second figure layer in the multiple figure layer
The color value of the corresponding pixel of scale value is adjusted to consistent with the color value of the second figure layer in the multiple figure layer;
Wherein, second figure layer is other figure layers in addition to background color figure layer in the multiple figure layer, and second figure layer
Including one or more subgraph layers.
5. according to the method described in claim 4, it is characterized in that, including the case where multiple subgraph layers in second figure layer
Under,
By other in second image data in addition to coordinate value corresponding with the second figure layer in the multiple figure layer
The color value of the corresponding pixel of coordinate value is adjusted to after consistent with the color value of the second figure layer in the multiple figure layer,
By the color value in second image data with the partial subgraph layer in the consistent multiple subgraph layers of the color value of the second figure layer
It adjusts to consistent with the color value of the first figure layer;Wherein, first figure layer is the background color figure layer of the file to be processed;With/
Or,
By other in second image data in addition to coordinate value corresponding with the second figure layer in the multiple figure layer
The color value of the corresponding pixel of coordinate value is adjusted to after consistent with the color value of the second figure layer in the multiple figure layer,
By the face in second image data with a part of sub- component layer in the consistent multiple subgraph layers of the color value of the second figure layer
Color value is adjusted to consistent with the color value of subgraph layer one of in the multiple subgraph layer.
6. according to the method described in claim 2, it is characterized in that, the color according to pixel in one or more figure layers
Value is to pixel corresponding with the coordinate information of pixel in one or more of figure layers in second image data
Position, which is adjusted, includes:
Obtain coordinate information of the second figure layer in the first image data in first coordinate information;
The position of mobile pixel corresponding with the coordinate information of the second figure layer in second image data;
Wherein, second figure layer is other figure layers in addition to background color figure layer in the multiple figure layer, and second figure layer
Including one or more subgraph layers.
7. method according to any one of claims 1 to 6, which is characterized in that first light is black light, described the
Two light are visible light.
8. a kind of terminal characterized by comprising
Light compensating lamp component, for issuing the first light and the second light;
Camera assembly carries out image data acquiring to file to be processed for passing through first light, and passes through described second
Light carries out image data acquiring to the file to be processed;
Processor, for being obtained in the first image data of the file to be processed according to the image data of first light collection
The first coordinate information of the color value of pixel and the pixel of the first image data in the first image data;
And of pixel in the second image data of the file to be processed is obtained according to the image data of second light collection
One coordinate information;And according to the color value of pixel in the first image data in second image data with described
The corresponding pixel of the coordinate information of pixel is adjusted in one image data.
9. terminal according to claim 8, which is characterized in that
The processor is also used to carry out the pixel in the first image data according to preset multiple color value sections
Grouping, multiple figure layers after being grouped, wherein the color value of pixel is in the same color value section in the same figure layer
It is interior;And according to the color value of pixel in one or more figure layers in second image data with it is one or more of
The color value of the corresponding pixel of the coordinate information of pixel is adjusted in figure layer, and/or to second image data
In the position of pixel corresponding with the coordinate information of pixel in one or more of figure layers be adjusted.
10. terminal according to claim 9, which is characterized in that
The processor is also used to that seat corresponding with the first figure layer in the multiple figure layer will be removed in second image data
The color value of the corresponding pixel of other coordinate values except scale value is adjusted to the face with the first figure layer in the multiple figure layer
Color value is consistent;
Wherein, first figure layer is the background color figure layer of the file to be processed.
11. terminal according to claim 9, which is characterized in that
The processor is also used to that seat corresponding with the second figure layer in the multiple figure layer will be removed in second image data
The color value of the corresponding pixel of other coordinate values except scale value is adjusted to the face with the second figure layer in the multiple figure layer
Color value is consistent;
Wherein, second figure layer is other figure layers in addition to background color figure layer in the multiple figure layer, and second figure layer
Including one or more subgraph layers.
12. terminal according to claim 11, which is characterized in that include the case where multiple subgraph layers in second figure layer
Under,
The processor is also used to will be in second image data except corresponding with the second figure layer in the multiple figure layer
The color value of the corresponding pixel of other coordinate values except coordinate value, adjust to the second figure layer in the multiple figure layer
After color value is consistent, by second image data with the part in the consistent multiple subgraph layers of the color value of the second figure layer
The color value of subgraph layer is adjusted to consistent with the color value of the first figure layer;Wherein, first figure layer is the file to be processed
Background color figure layer;And/or
By other in second image data in addition to coordinate value corresponding with the second figure layer in the multiple figure layer
The color value of the corresponding pixel of coordinate value is adjusted to after consistent with the color value of the second figure layer in the multiple figure layer,
By the face in second image data with a part of sub- component layer in the consistent multiple subgraph layers of the color value of the second figure layer
Color value is adjusted to consistent with the color value of subgraph layer one of in the multiple subgraph layer.
13. terminal according to claim 9, which is characterized in that
The processor is also used to obtain seat of second figure layer in first coordinate information in the first image data
Mark information;The position of mobile pixel corresponding with the coordinate information of the second figure layer in second image data;
Wherein, second figure layer is other figure layers in addition to background color figure layer in the multiple figure layer, and second figure layer
Including one or more subgraph layers.
14. terminal according to claim 8, which is characterized in that the camera assembly includes: optical filtering changeover module and photosensitive
Component;
Wherein, in the case where the filtering assembly filters second light, the photosensory assembly is treated by first light
It handles file and carries out image data acquiring;
In the case where the filtering assembly filters first light, the photosensory assembly is by second light to text to be processed
Part carries out image data acquiring.
15. according to the described in any item terminals of claim 8 to 14, which is characterized in that first light is black light, described
Second light is visible light.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710404417.8A CN108986036B (en) | 2017-06-01 | 2017-06-01 | Method and terminal for processing files |
PCT/CN2018/078154 WO2018219005A1 (en) | 2017-06-01 | 2018-03-06 | File processing method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710404417.8A CN108986036B (en) | 2017-06-01 | 2017-06-01 | Method and terminal for processing files |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108986036A true CN108986036A (en) | 2018-12-11 |
CN108986036B CN108986036B (en) | 2022-01-28 |
Family
ID=64454371
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710404417.8A Active CN108986036B (en) | 2017-06-01 | 2017-06-01 | Method and terminal for processing files |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108986036B (en) |
WO (1) | WO2018219005A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114543995A (en) * | 2022-04-26 | 2022-05-27 | 南通市海视光电有限公司 | Color recognition instrument for chemical liquid phase color detection and detection method thereof |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111080732B (en) * | 2019-11-12 | 2023-09-22 | 望海康信(北京)科技股份公司 | Method and system for forming virtual map |
US11595625B2 (en) * | 2020-01-02 | 2023-02-28 | Qualcomm Incorporated | Mechanical infrared light filter |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1112759A (en) * | 1993-12-09 | 1995-11-29 | 美国电报电话公司 | Dropped-from document image compression |
US20030068081A1 (en) * | 2001-10-05 | 2003-04-10 | Charles Jia | Digital image processing |
US20030161547A1 (en) * | 2002-02-22 | 2003-08-28 | Huitao Luo | Systems and methods for processing a digital image |
CN1477590A (en) * | 2002-06-19 | 2004-02-25 | 微软公司 | System and method for white writing board and voice frequency catching |
US20070263922A1 (en) * | 2001-02-13 | 2007-11-15 | Orbotech Ltd. | Multiple optical input inspection system |
US20110182508A1 (en) * | 2010-01-27 | 2011-07-28 | Ives Paul M | Segregation of handwritten information from typographic information on a document |
CN102542548A (en) * | 2011-12-30 | 2012-07-04 | 深圳市万兴软件有限公司 | Method and device for correcting color between images |
CN102687502A (en) * | 2009-08-25 | 2012-09-19 | Ip链有限公司 | Reducing noise in a color image |
CN103544722A (en) * | 2013-10-25 | 2014-01-29 | 深圳市掌网立体时代视讯技术有限公司 | Method and device for handwriting decoration of digital painting and chirography |
CN104050651A (en) * | 2014-06-19 | 2014-09-17 | 青岛海信电器股份有限公司 | Scene image processing method and device |
CN105205798A (en) * | 2015-10-19 | 2015-12-30 | 北京经纬恒润科技有限公司 | Image processing method and system |
-
2017
- 2017-06-01 CN CN201710404417.8A patent/CN108986036B/en active Active
-
2018
- 2018-03-06 WO PCT/CN2018/078154 patent/WO2018219005A1/en active Application Filing
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1112759A (en) * | 1993-12-09 | 1995-11-29 | 美国电报电话公司 | Dropped-from document image compression |
US20070263922A1 (en) * | 2001-02-13 | 2007-11-15 | Orbotech Ltd. | Multiple optical input inspection system |
US20030068081A1 (en) * | 2001-10-05 | 2003-04-10 | Charles Jia | Digital image processing |
US20030161547A1 (en) * | 2002-02-22 | 2003-08-28 | Huitao Luo | Systems and methods for processing a digital image |
CN1477590A (en) * | 2002-06-19 | 2004-02-25 | 微软公司 | System and method for white writing board and voice frequency catching |
CN102687502A (en) * | 2009-08-25 | 2012-09-19 | Ip链有限公司 | Reducing noise in a color image |
US20110182508A1 (en) * | 2010-01-27 | 2011-07-28 | Ives Paul M | Segregation of handwritten information from typographic information on a document |
CN102542548A (en) * | 2011-12-30 | 2012-07-04 | 深圳市万兴软件有限公司 | Method and device for correcting color between images |
CN103544722A (en) * | 2013-10-25 | 2014-01-29 | 深圳市掌网立体时代视讯技术有限公司 | Method and device for handwriting decoration of digital painting and chirography |
CN104050651A (en) * | 2014-06-19 | 2014-09-17 | 青岛海信电器股份有限公司 | Scene image processing method and device |
CN105205798A (en) * | 2015-10-19 | 2015-12-30 | 北京经纬恒润科技有限公司 | Image processing method and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114543995A (en) * | 2022-04-26 | 2022-05-27 | 南通市海视光电有限公司 | Color recognition instrument for chemical liquid phase color detection and detection method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN108986036B (en) | 2022-01-28 |
WO2018219005A1 (en) | 2018-12-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6905602B2 (en) | Image lighting methods, devices, electronics and storage media | |
CN108228114B (en) | Control method and storage medium | |
CN108234814B (en) | Control method and storage medium | |
US7421102B2 (en) | System and method for finding regions of interest for microscopic digital montage imaging | |
WO2019103295A1 (en) | Server and method for reconstructing image | |
US9497355B2 (en) | Image processing apparatus and recording medium for correcting a captured image | |
WO2005022466A2 (en) | Detecting and correcting redeye in an image | |
CN108986036A (en) | Handle method, the terminal of file | |
CN111967319B (en) | Living body detection method, device, equipment and storage medium based on infrared and visible light | |
KR20150112535A (en) | Representative image managing apparatus and method | |
JP2018107593A (en) | Image processing apparatus, image processing method, and program | |
CN101751512A (en) | Recipe management system applied to communication device and method | |
KR102503872B1 (en) | Information processing device, information processing method, and program | |
CN106934349A (en) | Dual camera is imaged and iris capturing identification integration apparatus | |
CN110319933A (en) | A kind of light source light spectrum optimization method based on CAM02-UCS colored quantum noise | |
RU2329535C2 (en) | Method of automatic photograph framing | |
EP1300810A3 (en) | Method and device for validating security papers | |
KR101513931B1 (en) | Auto-correction method of composition and image apparatus with the same technique | |
CN111931008B (en) | Visual transmission design information management system | |
CN110276388A (en) | Image processing method and device applied to underwater unmanned plane | |
CN107358150B (en) | Object frame identification method and device and high-speed shooting instrument | |
CN114283107A (en) | Oral cavity detection method, oral cavity detection device and computer readable storage medium | |
Lefkaditis et al. | Intelligent optical classification system for electronic components | |
CN117412158B (en) | Method, device, equipment and medium for processing photographed original image into multiple credentials | |
JP2007193553A (en) | Image processing method, image processing apparatus, and image processing program |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |