CN107886481A - A kind of image processing method, device and mobile terminal - Google Patents

A kind of image processing method, device and mobile terminal Download PDF

Info

Publication number
CN107886481A
CN107886481A CN201711078087.4A CN201711078087A CN107886481A CN 107886481 A CN107886481 A CN 107886481A CN 201711078087 A CN201711078087 A CN 201711078087A CN 107886481 A CN107886481 A CN 107886481A
Authority
CN
China
Prior art keywords
sampling
pixel
input
processing
guiding
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
Application number
CN201711078087.4A
Other languages
Chinese (zh)
Other versions
CN107886481B (en
Inventor
孙向华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711078087.4A priority Critical patent/CN107886481B/en
Publication of CN107886481A publication Critical patent/CN107886481A/en
Application granted granted Critical
Publication of CN107886481B publication Critical patent/CN107886481B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G06T5/70

Abstract

The present invention provides a kind of image processing method, device and mobile terminal, and this method includes:Down-sampling processing is carried out parallel to input figure and guiding figure, obtains down-sampling input figure and down-sampling guiding figure;The down-sampling input figure and the down-sampling guiding figure are handled, filter factor figure is obtained and offsets spirogram with filtering;Up-sampling processing is carried out parallel to the filter factor figure and the filtering skew spirogram, obtains the first up-sampling figure and the second up-sampling figure;Processing is filtered to the first up-sampling figure and the second up-sampling figure, obtains output figure corresponding with the input figure.The present invention schemes in Steerable filter processing procedure is carried out to image, to input and guides figure parallel processing, can accelerate the calculating speed in image processing process, image processing efficiency be lifted, so as to lift the real-time of image procossing.

Description

A kind of image processing method, device and mobile terminal
Technical field
The present invention relates to communication technical field, more particularly to a kind of image processing method, device and mobile terminal.
Background technology
With the fast development of the communication technology, the mobile terminal such as smart mobile phone and tablet personal computer is increasingly popularized, and Become instrument indispensable in people's daily life, requirement of the people for mobile terminal also more and more higher, especially move The processing function of the images such as the photo of dynamic terminal-pair shooting.Steerable filter technology as a kind of image applied to mobile terminal at Reason technology, it can be schemed by a guiding, processing is filtered to input picture, makes the output image after filtering process and input Image is substantially similar, but texture part is similar to guiding figure, keeps image smoothing and fine stingy figure etc. so as to realize, carries Rise picture quality.
But mobile terminal is carried out in image processing process by traditional Steerable filter technology, due to input picture Image resolution ratio is generally larger, and the amount of calculation in Steerable filter processing procedure is larger, so that the processing procedure to input picture Longer time is generally expended, causes the image filtering of mobile terminal to handle the requirement that can not meet real time execution, reduces user Experience effect.It can be seen that mobile terminal is carried out in Steerable filter processing procedure to input picture at present, exist causes because time-consuming The problem of processing real-time difference.
The content of the invention
The embodiment of the present invention provides a kind of image processing method, device and mobile terminal, to solve current mobile terminal pair Input picture carry out Steerable filter processing procedure in, exist because time-consuming cause processing real-time difference the problem of.
In order to solve the above technical problems, what the present invention was realized in:A kind of image processing method, applied to including numeral The mobile terminal of signal processor, including:
Down-sampling processing is carried out parallel to input figure and guiding figure, obtains down-sampling input figure and down-sampling guiding figure;
The down-sampling input figure and the down-sampling guiding figure are handled, obtain filter factor figure and with filtering Offset spirogram;
Up-sampling processing is carried out parallel to the filter factor figure and the filtering skew spirogram, obtains the first up-sampling figure With the second up-sampling figure;
Processing is filtered to the first up-sampling figure and the second up-sampling figure, obtained corresponding with the input figure Output figure.
In a first aspect, the embodiments of the invention provide a kind of image processing method, applied to including digital signal processor Mobile terminal, including:
Down-sampling processing is carried out parallel to input figure and guiding figure, obtains down-sampling input figure and down-sampling guiding figure;
The down-sampling input figure and the down-sampling guiding figure are handled, obtain filter factor figure and with filtering Offset spirogram;
Up-sampling processing is carried out parallel to the filter factor figure and the filtering skew spirogram, obtains the first up-sampling figure With the second up-sampling figure;
Processing is filtered to the first up-sampling figure and the second up-sampling figure, obtained corresponding with the input figure Output figure.
Second aspect, the embodiment of the present invention also provide a kind of image processing apparatus, including digital signal processor, the dress Putting also includes:
Down sample module, for scheming to input and guiding figure is parallel carries out down-sampling processing, obtain down-sampling input figure and Down-sampling guiding figure;
Filtering parameter computing module, for handling the down-sampling input figure and the down-sampling guiding figure, obtain Spirogram is offset to filter factor figure and with filtering;
Module is up-sampled, for carrying out up-sampling processing parallel to the filter factor figure and the filtering skew spirogram, Obtain the first up-sampling figure and the second up-sampling figure;
Filtering process module, for being filtered processing to the first up-sampling figure and the second up-sampling figure, obtain Scheme to output corresponding with the input figure.
The third aspect, the embodiment of the present invention also provide a kind of mobile terminal, including processor, memory and are stored in described On memory and the computer program that can run on the processor, the computer program is by real during the computing device The step of existing above-mentioned image processing method.
Fourth aspect, the embodiment of the present invention also provide a kind of computer-readable recording medium, the computer-readable storage Computer program is stored with medium, the computer program realizes the step of above-mentioned image processing method when being executed by processor Suddenly.
The embodiment of the present invention is schemed in Steerable filter processing procedure is carried out to image, to input and guides figure parallel processing, The calculating speed in image processing process can be accelerated, image processing efficiency is lifted, so as to lift the real-time of image procossing.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed for being described below to the embodiment of the present invention The accompanying drawing to be used is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, For those of ordinary skill in the art, without having to pay creative labor, can also be obtained according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of image processing method provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another image processing method provided in an embodiment of the present invention;
Fig. 3 is a kind of processing procedure schematic diagram of the application example of image processing method provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram that a kind of bilinear interpolation technique provided in an embodiment of the present invention is tabled look-up to Horizontal interpolation;
Fig. 5 is a kind of schematic diagram of scaling figure provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of image processing apparatus provided in an embodiment of the present invention;
Fig. 7 is the structural representation of filtering parameter computing module in a kind of image processing apparatus provided in an embodiment of the present invention Figure;
Fig. 8 is the structural representation of calculating sub module in a kind of image processing apparatus provided in an embodiment of the present invention;
Fig. 9 is that the structure of filtering parameter figure generation submodule in a kind of image processing apparatus provided in an embodiment of the present invention is shown It is intended to;
Figure 10 is the structural representation of computing unit in a kind of image processing apparatus provided in an embodiment of the present invention;
Figure 11 is the first structural representation for searching subelement in a kind of image processing apparatus provided in an embodiment of the present invention;
Figure 12 is the structural representation of down sample module in a kind of image processing apparatus provided in an embodiment of the present invention;
Figure 13 is a kind of hardware structure diagram of mobile terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow sheet of image processing method provided in an embodiment of the present invention, applied to bag Digital signal processor (Digital Signal Processor, DSP) mobile terminal is included, as shown in figure 1, including following step Suddenly:
Step 101, input is schemed and guides figure is parallel to carry out down-sampling processing, obtain down-sampling input figure and down-sampling draws Lead figure.
In the embodiment of the present invention, mobile terminal is filtered in processing procedure to input figure, input can be schemed and be guided Figure is parallel to carry out down-sampling processing, obtains down-sampling input figure and down-sampling guiding figure.Wherein, above-mentioned input figure is pending Image, above-mentioned guiding figure can be with identical size and with the image of specific texture part with input picture.
Such as:Above-mentioned input figure and the size for guiding figure are M × N, and default sampling multiple is s, the DSP of mobile terminal At least two lines journey can be performed simultaneously, and a thread schemes to carry out down-sampling, down-sampling to input in wherein at least two thread The size for obtaining down-sampling input figure afterwards is (M/s) × (N/s);Similarly, DSP another thread can be carried out down to guiding figure Sample, the size of the down-sampling guiding figure obtained after down-sampling is also (M/s) × (N/s).
Step 102, the down-sampling input figure and the down-sampling guiding figure are handled, obtain filter factor figure with And offset spirogram with filtering.
In the embodiment of the present invention, if obtaining down-sampling input figure and down-sampling guiding figure, mobile terminal in above-mentioned steps 101 Down-sampling input figure and down-sampling guiding figure can be handled, obtain filter factor figure and filtering skew spirogram.
Such as:The DSP of mobile terminal can by method of directly summing, in down-sampling input figure using each pixel as Center, calculate with the pixel value sum of the intraoral all pixels point of the square window of predetermined width and;Similarly, DSP can be with The first image and down-sampling that point multiplication obtains pixel-by-pixel between down-sampling guiding figure, two width down-sampling input figures are calculated respectively Put in the second image that thread obtains between input figure and down-sampling guiding figure, centered on each pixel, calculate pixel-by-pixel With the pixel value sum of the intraoral all pixels point of the square window of predetermined width, and drawn by down-sampling input figure, down-sampling Pixel value sum corresponding to each pixel in figure, the first image and the second image is led, is calculated in down-sampling input figure every Pixel value proportionality coefficient corresponding to one pixel and pixel value offset, it is corresponding that each pixel in figure is inputted according to down-sampling Proportionality coefficient, generate pixel value proportionality coefficient figure, and comparative example coefficient figure carry out processing generation filter factor figure;And according to Offset corresponding to each pixel in down-sampling input figure, generation pixel value skew spirogram, and pixel value skew spirogram is entered Row processing generation filtering skew spirogram.
Step 103, up-sampling processing is carried out parallel to the filter factor figure and the filtering skew spirogram, obtain first Up-sampling figure and the second up-sampling are schemed.
In the embodiment of the present invention, if obtaining filter factor figure and filtering skew spirogram in above-mentioned steps 102, mobile terminal DSP can carry out up-sampling processing parallel to filter factor figure and filtering skew spirogram, obtain and the picture size of input figure one The the first up-sampling figure and the second up-sampling figure caused.
Such as:Dimensions indicated above is the chi of above-mentioned filter factor figure and filtering skew spirogram exemplified by M × N guiding figure Very little is (M/s) × (N/s), then the DSP of mobile terminal can be carried out in a thread according to sampling multiple s to filter factor figure Up-sampling, obtain the first up-sampling figure that picture size is M × N;Similarly, the DSP of mobile terminal can be right in another thread Filtering skew spirogram is up-sampled, and obtains the second up-sampling figure that picture size is M × N.
Step 104, processing is filtered to the first up-sampling figure and the second up-sampling figure, obtain with it is described defeated Enter output figure corresponding to figure.
It is mobile whole if getting the first up-sampling figure and the second up-sampling figure in above-mentioned steps 103 in the embodiment of the present invention The DPS at end can be filtered processing to the first up-sampling figure and the second up-sampling figure, obtain output figure corresponding with input figure, Obtained output figure is substantially similar with input figure, but inputs the texture part of figure and specific texture part phase in guiding figure Seemingly.
Wherein, it is above-mentioned that processing is filtered to the first up-sampling figure and the second up-sampling figure, can be the DSP of mobile terminal The value of target pixel points in figure will be guided, the value with pixel corresponding with target pixel points in the first up-sampling figure is target picture Pixel value proportionality coefficient corresponding to vegetarian refreshments is multiplied, corresponding with target pixel points in the result obtained that will be multiplied and the second up-sampling The value of pixel be pixel value offset addition corresponding to target pixel points, and will add up the result of acquisition as in output figure The pixel value of pixel corresponding with target pixel points, so as to generate above-mentioned output figure.
In the embodiment of the present invention, above-mentioned mobile terminal can with any mobile terminal including digital signal processor, such as: Mobile phone, tablet personal computer (Tablet Personal Computer), laptop computer (Laptop Computer), individual digital Assistant (personal digital assistant, abbreviation PDA), mobile Internet access device (Mobile Internet Device, ) or wearable device (Wearable Device) etc. MID.
The image processing method of the embodiment of the present invention, to image carry out Steerable filter processing procedure in, to input figure and Figure parallel processing is guided, the calculating speed in image processing process can be accelerated, image processing efficiency is lifted, so as to lift image The real-time of processing.
Referring to Fig. 2, Fig. 2 is a kind of schematic flow sheet of image processing method provided in an embodiment of the present invention, such as Fig. 2 institutes Show, comprise the following steps:
Step 201, down-sampling processing is carried out to the input figure at least one input figure processing thread, obtain down adopting Sample input figure, and down-sampling processing is carried out to the guiding figure at least one guiding figure processing thread, obtain down-sampling Guiding figure.
In the embodiment of the present invention, mobile terminal is filtered in processing procedure to input picture, DSP can by one or The multiple input figure processing threads of person scheme to carry out down-sampling processing to input, obtain down-sampling input figure, and by one or Multiple guiding figure processing threads scheme to carry out down-sampling processing to guiding, obtain down-sampling guiding figure.Wherein, it is above-mentioned at least one defeated Enter figure processing thread and above-mentioned at least one guiding figure handles the thread that thread is respectively parallel processing in DSP.
Such as:DSP can be handled thread by two input pictures and the input figure that size is M × N is carried out at down-sampling Reason, in processing procedure, DSP input picture processing thread can include the figure of the pixel of M/2 rows to input figure As region progress down-sampling processing, and first processing thread can include the pixel of another M/2 rows to another input figure to input figure The image-region of point carries out down-sampling processing, so as to lift the image processing efficiency of image mobile terminal.
Optionally, above-mentioned steps 201, can include:In at least one input figure processing thread, utilization is default Sampling multiple zooms in and out the input figure, obtains scaling corresponding with the input figure and schemes;Utilize bilinear interpolation technique Search the pixel value of each interpolation point of the scaling figure in the horizontal direction and the vertical direction;Using the pixel value of each interpolation point as The pixel value of pixel corresponding with the interpolation point in the scaling figure, generates the down-sampling input figure;Draw at least one Lead in figure processing thread and down-sampling processing is carried out to the guiding figure, obtain down-sampling guiding figure.
In the present embodiment, during DSP can be to inputting the down-sampling of figure, using bilinear interpolation technique, successively carry out Horizontal interpolation calculates and vertical interpolation calculates, due to that can use look-up table on DSP according to index by bilinear interpolation technique Value batch obtains interpolation point pixel value, it is possible to achieve multiple pixels calculate interpolation simultaneously, further lift DSP in image procossing During arithmetic speed, lifting image filtering processing efficiency.
It should be noted that above-mentioned scheme to carry out down-sampling processing for guiding, bilinear interpolation technique pair can also be passed through Guiding figure is handled, and obtains down-sampling guiding figure, and the implementation process is similar with the above-mentioned down-sampling process to inputting figure, This is no longer repeated.
Step 202, the down-sampling input figure and the down-sampling guiding figure are handled, obtain filter factor figure with And offset spirogram with filtering.
It is mobile whole if getting down-sampling input figure and down-sampling guiding figure in above-mentioned steps 201 in the embodiment of the present invention End can be handled down-sampling input figure and down-sampling guiding figure, obtain filter factor figure and filtering skew spirogram.
Optionally, above-mentioned steps 202, can include:Calculate the pixel of each pixel in the down-sampling input figure It is worth variance and pixel value covariance;The pixel value variance and pixel of each pixel inputted according to the down-sampling in figure It is worth covariance, generation filter factor figure and filtering skew spirogram.
In the embodiment of the present invention, mobile terminal by calculate the pixel value variance of each pixel in down-sampling input figure with And pixel value covariance, and according to the pixel value variance and pixel value covariance of each pixel in down-sampling input figure, it is raw Into filter factor figure and filtering skew spirogram, so that the filter factor figure of generation and filtering skew spirogram are more accurate, so as to move The texture part that dynamic terminal is carried out in the texture part and guiding figure of the output figure after Steerable filter processing is more like, lifting image Quality.
It is further alternative, the pixel value variance and pixel of each pixel in the above-mentioned calculating down-sampling input figure The step of being worth covariance, it can include:The pixel value variance of target pixel points is calculated using pixel value variance calculation formula, The target pixel points are any pixel point that the down-sampling is inputted in figure, and the pixel value variance calculation formula is:
Var=t ' * sumI′I′-sumI′·sumI′
The var represents the pixel value variance of target pixel points,;
The t '=r ' * r ', r '=r/s, the r represent default filter window width, and the s represents the sampling times Number, t ' expressions width are the pixel sum in r ' filter window;
The sumI′Represent in the integrogram of down-sampling guiding figure, pixel corresponding with the target pixel points Pixel and value;
The sumI′I′Represent that point is multiplied in the integrogram of obtained image pixel-by-pixel in down-sampling guiding described in two width, with The pixel and value of pixel corresponding to the target pixel points;
The pixel value covariance of the target pixel points, the pixel are calculated using pixel value covariance calculation formula Value variance calculation formula is:
Cov=t ' * sumI′P′-sumI′·sumP′
The cov represents the pixel value covariance of target pixel points;
The sumP′Represent the picture of the pixel corresponding with target pixel points in the integrogram of down-sampling input figure Element and value;
The sumI′P′Expression is put pixel-by-pixel in the down-sampling guiding figure with the down-sampling input figure is multiplied what is obtained In the integrogram of image, the pixel and value of pixel corresponding with the pixel.
In the embodiment of the present invention, if target pixel points can be calculated using pixel value variance calculation formula in mobile terminal Pixel value variance, and the pixel value association side of the target pixel points is calculated using pixel value covariance calculation formula Difference, the pixel value variance of each pixel that is calculated and pixel value covariance can be made more accurate, further lifted defeated Go out the picture quality of figure.
It is further alternative, the pixel value variance and picture of the above-mentioned each pixel inputted according to the down-sampling in figure The step of element value covariance, generation filter factor figure and filtering skew spirogram, including:Calculate and inputted with the down-sampling in figure Pixel value proportionality coefficient and pixel value offset corresponding to the pixel value variance and pixel value covariance of each pixel;It is raw The pixel value proportionality coefficient figure associated into the pixel value proportionality coefficient that each pixel in figure is inputted with the down-sampling, Yi Jiyu The pixel value skew spirogram of the pixel value offset association of each pixel in the down-sampling input figure;To the pixel value ratio Example coefficient figure is handled to obtain the filter factor figure, and pixel value skew spirogram is handled to obtain the filter Ripple offsets spirogram.
In the embodiment of the present invention, mobile terminal can calculate the pixel value variance of each pixel in down-sampling input figure And pixel value proportionality coefficient corresponding to pixel value covariance and pixel value offset, and generate and each pixel value ratio system The pixel value proportionality coefficient figure of number association, and the pixel value skew spirogram associated with each pixel value offset, so as to pass through Pixel value proportionality coefficient figure is handled to obtain filter factor figure, and pixel value skew spirogram is handled and filtered Spirogram is offset, further makes filter factor figure and filtering skew spirogram more accurate, so as to make the picture quality of obtained output figure It is higher.
It is further alternative, above-mentioned calculating and the pixel value variance and picture of each pixel in down-sampling input figure The step of pixel value proportionality coefficient corresponding to element value covariance and pixel value offset, including:Obtain and the object pixel At least two multipliers corresponding to the pixel value variance of point, and in the default look-up table in the digital signal processor, Search the respective value of each multiplier at least two multiplier;Based on each at least two multiplier The respective value of multiplier, the pixel value proportionality coefficient and pixel value offset of the target pixel points is calculated.
In the present embodiment, default look-up table of the mobile terminal in digital signal processor, search in down-sampling input figure The respective value of at least two multipliers and every two multiplier corresponding to the pixel value variance of one pixel, and pass through lookup The respective value of at least two multipliers and each multiplier corresponding to the pixel value variance of the pixel arrived, is calculated To the pixel value proportionality coefficient and pixel value offset of the pixel, so as to lift the DSP of mobile terminal computing speed Degree and accuracy in computation.
It is further alternative, the above-mentioned pixel value proportionality coefficient that the target pixel points are calculated and pixel value skew The step of amount, it can include:According to proportionality coefficient calculation formula and offset calculation formula, the object pixel is calculated The pixel value proportionality coefficient and pixel value offset of point, wherein, the proportionality coefficient calculation formula is:
The a ' is the pixel value proportionality coefficient of the target pixel points;
The N is default shift amount, and the N is more than 7;
The s is multiplier number corresponding to the pixel value variance of the target pixel points, and s is more than or equal to 2;
The wiFor the respective value of i-th of multiplier in the described second default look-up table;
The offset calculation formula is:
The b ' is the pixel value offset of the target pixel points.
In the present embodiment, mobile terminal can be counted by aforementioned proportion coefficient formulas and offset calculation formula Calculation obtains the pixel value proportionality coefficient and pixel value offset of each pixel in down-sampling input figure, so as to by image Floating-point operation in processing procedure is converted into multiplying and shift operation, further lifts the DSP of mobile terminal computing Speed and accuracy in computation.
It is further alternative, lookup and target picture in above-mentioned the first default look-up table in the digital signal processor Corresponding to the pixel value variance of vegetarian refreshments the step of target shift amount, including:Judge the pixel value variances of the target pixel points with Whether predetermined deviation amount sum obtains judged result in default value scope of tabling look-up;If the judged result is no, by described in The pixel value variance of target pixel points and predetermined deviation amount sum factorization are at least two multipliers, and described default Value corresponding with each multiplier at least two multiplier is searched in look-up table, wherein, at least two phase It is the value in the default value scope of tabling look-up to multiply each multiplier in the factor.
In the present embodiment, when the pixel value variance of a pixel surpasses with predetermined deviation amount sum in above-mentioned down-sampling input figure Go out to preset when tabling look-up value scope, then mobile terminal carries out factor point to the pixel value variance of the pixel with predetermined deviation amount sum Solution, by factorization at least two multipliers of acquisition, and searched and described at least two in the default look-up table It is worth in multiplier corresponding to each multiplier, so that the calculation of mobile terminal is more flexible, and reduces mobile terminal Amount of calculation, lifted image processing efficiency.
Step 203, up-sampling processing is carried out to the filter factor figure at least one filter factor figure handles thread, The first up-sampling figure is obtained, and the filtering skew spirogram is entered at least one filtering skew spirogram processing thread The processing of row up-sampling, obtains the second up-sampling figure.
In the embodiment of the present invention, when filter factor figure and filtering skew spirogram are obtained in above-mentioned steps 202, mobile terminal Up-sampling processing can be carried out to filter factor figure at least one filter factor figure handles thread, obtain the first up-sampling Figure, and up-sampling processing is carried out to filtering skew spirogram at least one filtering skew spirogram processing thread of institute, obtain the Two up-sampling figures.Wherein, above-mentioned at least one filter factor figure processing thread and at least one filtering skew spirogram processing thread The thread of parallel processing in respectively described digital signal processor.
Such as:Exemplified by being up-sampled to filter factor figure, DSP can handle thread pair by two filter factor figures Size is that (M/s) × (N/s) filter factor figure carries out up-sampling processing, in the up-sampling process, a DSP filtering The image-region for the pixel that coefficient figure processing thread can include M/ (2s) rows to filter factor figure carries out up-sampling processing, And the image-region for the pixel that another filter factor figure processing thread can include M/ (2s) rows to filter factor figure enters Row up-sampling processing, so as to lift the image processing efficiency of image mobile terminal.
It should be noted that above-mentioned carry out down-sampling processing to filter factor figure and filtering skew spirogram, can also pass through Bilinear interpolation technique is handled filter factor figure and filtering skew spirogram respectively, obtains the first up-sampling figure and second Up-sampling figure, and the implementation process is similar with the above-mentioned down-sampling process to inputting figure, so as to further lift mobile terminal Image processing efficiency, no longer repeated herein.
Step 204, processing is filtered to the first up-sampling figure and the second up-sampling figure, obtain with it is described defeated Enter output figure corresponding to figure.
It is mobile whole if getting the first up-sampling figure and the second up-sampling figure in above-mentioned steps 203 in the embodiment of the present invention The DPS at end can be filtered processing to the first up-sampling figure and the second up-sampling figure, obtain output figure corresponding with input figure, Obtained output figure is substantially similar with input figure, but inputs the texture part of figure and specific texture part phase in guiding figure Seemingly.
As shown in figure 3, Fig. 3 is a kind of the treated of the application example of the image processing method provided in the embodiment of the present invention Journey schematic diagram, wherein, in the application example by taking single channel image as an example, it is assumed that input figure is P, and guiding figure is I, default filtering The width of window is r, and scaling multiple is s, and output figure is Q, and parameter preset ε is a less constant, the image processing method Application example processing procedure it is as follows:
Step 301, first thread in dsp carry out down-sampling, generation down-sampling input figure P ' to input figure P;
Wherein, DSP samples multiple according to scaling multiple and calculated in input figure P scaling figure, and samples bilinearity Interpolation technique obtain scaling figure in the interpolation point of horizontal direction and vertical direction, due to each interpolation point index value and weights according to Secondary to be stored in array, mobile terminal can obtain the pixel value of each interpolation point, tool on DSP with look-up table according to index batch Body tables look-up process exemplified by being tabled look-up in as shown in Figure 4 to Horizontal interpolation, wherein, numerical value represents the rope of interpolation point in table 4A Draw value, table 4B represents pixel value, and table 4C represents checking result.
Above-mentioned bilinear interpolation principle is as follows:
If the size for inputting figure is a × b, and image m × n after scaling, then artwork is with the figure after scaling in level side It is respectively to the pantograph ratio in vertical directionWith
As shown in figure 5, the image slices vegetarian refreshments (x, y) after scaling should correspond to input figure and existPosition On pixel value.But due toWithAll it is floating number, thereforeIt is also likely to be floating number.Due to pixel Position be all integer, so need found in input figure4 neighbouring pixel positions, such as scheme G points in 5 are equivalent to
Due to inputting in figure and in the absence of point G pixel value, in order to try to achieve this corresponding to the image after scaling at (x, y) The pixel value of position, we are just needed according to 4 pixel (Q adjacent around the position12、Q22、Q11、Q21) pixel value enter Row bilinear interpolation obtains the pixel value of the point.First in the direction of the x axis, to (Q12, Q22) and (Q11, Q21) level is carried out respectively Interpolation, obtain R2, R1.When Horizontal interpolation, because G points are far and near different apart from left and right neighbor pixel, then weighted, with G Point is big apart from weights corresponding near pixel.Similarly, to (R2, R1) vertical interpolation is carried out, obtain G point pixel values.Traversal scaling Each pixel in figure can obtain down-sampling input figure.
Step 302, the second thread in dsp carry out down-sampling, generation down-sampling guiding figure I ' to guiding figure I;
Similar with upper step 301, DSP can equally utilize bilinear interpolation technique generation down-sampling guiding figure P '.Its In, above-mentioned first thread and the thread that above-mentioned second thread is parallel processing.
Step 303, in first thread calculate first integral figure in each pixel pixel and value sumP′, and second The pixel of each pixel and value sum in integrogramI′P′
Wherein, above-mentioned first integral figure is that down-sampling inputs the integrogram for scheming P ', and a pixel in first integral figure Pixel and value sumP′, for all pixels value sum in the filter window of a width of r ' of length centered on the pixel, r '=r/ s;Second integral figure is that point is multiplied obtained image, and second integral to down-sampling guiding figure I ' pixel-by-pixel with down-sampling input figure P ' The pixel of a pixel and value sum in figureI′P′, for all pictures in the filter window of a width of r ' of length centered on the pixel Element value sum.
Step 304, the pixel and value sum of each pixel in third integral figure are calculated in the second threadI′, and the 4th The pixel of each pixel and value sum in integrogramI′I′
Wherein, above-mentioned third integral figure is that down-sampling guides the integrogram for scheming I ', and a pixel in third integral figure Pixel and value sumI′, for all pixels value sum in the filter window of a width of r ' of length centered on the pixel;4th product Component be two width down-samplings guiding figure I ' between pixel-by-pixel point be multiplied obtained image, and in the 4th integrogram a pixel picture Element and value sumI′I′, for all pixels value sum in the filter window of a width of r ' of length centered on the pixel
The pixel value variance and pixel value covariance of step 305, each pixel inputted according to down-sampling in figure, it is raw Into filter factor figure and filtering skew spirogram;
Wherein, if first integral figure, second integral figure, the 3rd product is calculated in above-mentioned steps 303 and step 304 respectively The pixel and value of each pixel in component and the 4th integrogram, mobile terminal can be calculated in down-sampling input figure often The pixel value variance and pixel value covariance of one pixel, i.e.,
Var=t ' * sumI′I′-sumI′·sumI′
Cov=t ' * sumI′P′-sumI′·sumP′
Above-mentioned t '=r ' * r ';
Then mobile terminal can input the pixel value variance of each pixel and pixel value association side in figure according to down-sampling Difference, generate filter factor figure and filtering skew spirogram.The pixel value variance var for sampling each pixel in input figure is set to X, and x is set to y as dividend, and by the pixel value covariance cov for sampling each pixel in input figure, and y is used as and removed Number, then the implementation process of above-mentioned generation filter factor figure and filtering skew spirogram is as follows:
If y<127, table look-up to obtain by yThenCan be by division converted to multiplication and displacement Operation, N represent shift amount, wherein, symbol ">>" represent that the right shift of binary number operates, and now s=1;
If y >=127, according to the y order of magnitude, it may be determined that y is divided intoIndividual multiplier is multiplied, point Y is not designated as it0,y1……ys-1, then
So, can by the larger divisor of a span, be decomposed into 2 or it is multiple be less than or equal to 127 number, pass through Repeatedly table look-up, division is realized in multiplication and displacement.
Mobile terminal can obtain y by looking into division table0,y1……ys-1Corresponding value, it is w0, w1……ws-1, then can To obtain pixel value proportionality coefficient and pixel value offset, pixel value proportionality coefficient isI.e.Pixel value offset is
Because a is likely less than 1, so a is expanded into 2NTimes, round numerical computations.
Mobile terminal can assist the pixel value variance of all pixels point inputted by down-sampling in figure and pixel value The a ' that variance is calculated, the pixel value as the pixel in pixel value proportionality coefficient figure;And all pixels point will be passed through Pixel value variance and the b ' that is calculated of pixel value covariance, the pixel of the pixel in spirogram is offset as pixel value Value, and pixel value proportionality coefficient figure is handled to obtain filter factor figure, and pixel value skew spirogram handle Spirogram is offset to filtering.
It is above-mentioned that pixel value proportionality coefficient figure is handled to obtain filter factor figure, can be the above-mentioned ratio of acquisition for mobile terminal The integrogram of example coefficient figure, and calculate in proportionality coefficient integrogram centered on each pixel, with a width of r ' of length spectral window The average of intraoral all pixels point, the corresponding average that the average of each pixel is updated to be calculated, and will renewal The integrogram of proportionality coefficient figure afterwards is as filter factor figure;Similarly, above-mentioned handled pixel value skew spirogram is filtered Ripple offsets the process of spirogram, similar with the process for being handled to obtain filter factor figure to pixel value proportionality coefficient figure, herein not Repeated again.
Up-sampling processing is carried out to filter factor figure in step 306, the 3rd thread in dsp, obtains the first up-sampling Figure;
Up-sampling processing is carried out to filtering skew spirogram in step 307, the 4th thread in dsp, obtains adopting on second Master drawing;
Wherein, the 3rd thread and the thread that the 4th thread is DSP parallel processings.
Step 308, processing is filtered to the first up-sampling figure and the second up-sampling figure, obtained corresponding with input figure P Output figure Q.
Wherein, processing is filtered to the first up-sampling figure and the second up-sampling figure, obtains output corresponding with input figure P Scheme Q, can be by corresponding pixel i.e. coordinate identical picture in the first up-sampling figure, the second up-sampling figure and guiding figure The pixel value of vegetarian refreshments, is calculated the pixel value of corresponding pixel in output figure Q, and calculation formula is:
Q=(A ' I+B ')/2N
Above-mentioned q represents the pixel value of target pixel points in output figure Q;
Above-mentioned I represents the pixel value of pixel corresponding with target pixel points in guiding figure I;
Above-mentioned A ' represents the pixel value of pixel corresponding with target pixel points in filter factor figure;
Above-mentioned B ' represents the pixel value of pixel corresponding with target pixel points in filtering skew spirogram.
The image processing method of the embodiment of the present invention, by scheming at least one input figure processing thread to the input Down-sampling processing is carried out, obtains down-sampling input figure, and the guiding figure is entered at least one guiding figure handles thread The processing of row down-sampling, obtains down-sampling guiding figure;To the filter factor figure at least one filter factor figure handles thread Up-sampling processing is carried out, obtains the first up-sampling figure, and to institute at least one filtering skew spirogram processing thread State filtering skew spirogram and carry out up-sampling processing, obtain the second up-sampling figure.Mobile terminal so can further be lifted to figure Calculating speed as carrying out Steerable filter processing procedure, so that the real-time of mobile terminal image procossing is higher.
Referring to Fig. 6, Fig. 6 is a kind of structural representation of image processing apparatus provided in an embodiment of the present invention, such as Fig. 6 institutes Show, image processing apparatus 600 includes digital signal processor, and described image processing unit 600 also includes being sequentially connected down adopting Egf block 601, filtering parameter computing module 602, up-sampling module 603 and filtering process module 604:
Down sample module 601, for scheming to input and guiding figure is parallel to carry out down-sampling processing, obtain down-sampling input figure Guide and scheme with down-sampling;
Filtering parameter computing module 602, for handling the down-sampling input figure and the down-sampling guiding figure, Obtain filter factor figure and offset spirogram with filtering;
Module 603 is up-sampled, for being carried out parallel at up-sampling to the filter factor figure and the filtering skew spirogram Reason, obtains the first up-sampling figure and the second up-sampling figure;
Filtering process module 604, for being filtered processing to the first up-sampling figure and the second up-sampling figure, Obtain output figure corresponding with the input figure.
Optionally, the down sample module 601, it is additionally operable at least one input figure handles thread to the input figure Down-sampling processing is carried out, obtains down-sampling input figure, and the guiding figure is entered at least one guiding figure handles thread The processing of row down-sampling, obtains down-sampling guiding figure, wherein, at least one input figure processing thread and described at least one draw Lead the thread that figure processing thread is respectively parallel processing in the digital signal processor;
The up-sampling module 603, it is additionally operable at least one filter factor figure handles thread to the filter factor Figure carries out up-sampling processing, obtains the first up-sampling figure, and at least one filtering skew spirogram processing thread it is right The filtering skew spirogram carries out up-sampling processing, obtains the second up-sampling figure, wherein, at least one filter factor figure It is respectively parallel processing in the digital signal processor to manage thread and at least one filtering skew spirogram processing thread Thread.
Optionally, as shown in fig. 7, the filtering parameter computing module 602, including:
Calculating sub module 6021, for calculate each pixel in the down-sampling input figure pixel value variance and Pixel value covariance;
Filtering parameter figure generates submodule 6022, for the pixel of each pixel inputted according to the down-sampling in figure It is worth variance and pixel value covariance, generation filter factor figure and filtering skew spirogram.
Optionally, as shown in figure 8, the calculating sub module 6021, including:
Variance computing unit 60211, for the pixel of target pixel points to be calculated using pixel value variance calculation formula It is worth variance, any pixel point that the target pixel points are inputted in figure for the down-sampling, the pixel value variance calculation formula For:
Var=t ' * sumI′I′-sumI′·sumI′
The var represents the pixel value variance of target pixel points,;
The t '=r ' * r ', r '=r/s, the r represent default filter window width, and the s represents the sampling times Number;
The sumI′Represent in the integrogram of down-sampling guiding figure, pixel corresponding with the target pixel points Pixel and value;
The sumI′I′Represent to put pixel-by-pixel in down-sampling guiding figure described in two width and be multiplied in the integrogram of obtained image, The pixel and value of pixel corresponding with the target pixel points;
Covariance computing unit 60212, for the object pixel to be calculated using pixel value covariance calculation formula The pixel value covariance of point, the pixel value variance calculation formula are:
Cov=t ' * sumI′P′-sumI′·sumP′
The cov represents the pixel value covariance of target pixel points;
The sumP′Represent the picture of the pixel corresponding with target pixel points in the integrogram of down-sampling input figure Element and value;
The sumI′P′Expression is put pixel-by-pixel in the down-sampling guiding figure with the down-sampling input figure is multiplied what is obtained In the integrogram of image, the pixel and value of pixel corresponding with the pixel.
Optionally, as shown in figure 9, the filtering parameter figure generates submodule 6022, including:
Computing unit 60221, for calculate with the down-sampling input figure in each pixel pixel value variance with And pixel value proportionality coefficient corresponding to pixel value covariance and pixel value offset;
Image generation unit 60222, for generating the pixel value ratio with each pixel in down-sampling input figure The pixel value proportionality coefficient figure of coefficient association, and closed with the pixel value offset of each pixel in down-sampling input figure The pixel value skew spirogram of connection;
Filtering parameter processing unit 60223, for being handled to obtain the filtering to the pixel value proportionality coefficient figure Coefficient figure, and pixel value skew spirogram is handled to obtain the filtering skew spirogram.
Optionally, as shown in Figure 10, the computing unit 60221, including:
Subelement 602211 is searched, for obtaining at least two phase corresponding with the pixel value variance of the target pixel points Multiply the factor, and in the default look-up table in the digital signal processor, search each at least two multiplier The respective value of multiplier;
Computation subunit 602212, for the respective value based on each multiplier at least two multiplier, The pixel value proportionality coefficient and pixel value offset of the target pixel points is calculated.
Optionally, the computation subunit 602212, it is additionally operable to according to proportionality coefficient calculation formula and offset calculating Formula, the pixel value proportionality coefficient and pixel value offset of the target pixel points is calculated, wherein, the proportionality coefficient Calculation formula is
The a ' is the pixel value proportionality coefficient of the target pixel points;
The N is default shift amount, and the N is more than 7;
The s is multiplier number corresponding to the pixel value variance of the target pixel points, and s is more than or equal to 2;
The wiFor the respective value of i-th of multiplier in the described second default look-up table;
The offset calculation formula is:
The b ' is the pixel value offset of the target pixel points.
Optionally, as shown in figure 11, described first subelement 602211 is searched, in addition to:
Judge sub- subelement 6022111, for judge the pixel value variances of the target pixel points and predetermined deviation amount it Whether in default value scope of tabling look-up, and obtain judged result;
Sub- subelement 6022112 is searched, if being no for the judged result, by the pixel value side of the target pixel points Difference with predetermined deviation amount sum factorization be at least two multipliers, and in the default look-up table search and it is described extremely It is worth in few two multipliers corresponding to each multiplier, wherein, each multiplier at least two multiplier For the value in the default value scope of tabling look-up.
Optionally, as shown in figure 12, the down sample module 601 includes:
Figure acquisition submodule 6011 is scaled, at least one input figure processing thread, being adopted using default Sample multiple zooms in and out the input figure, obtains scaling corresponding with the input figure and schemes;
Bilinear interpolation submodule 6012, for using bilinear interpolation technique search it is described scaling figure in the horizontal direction and The pixel value of each interpolation point in vertical direction;
First generation submodule 6013, for using the pixel value of each interpolation point as it is described scaling figure in the interpolation point pair The pixel value for the pixel answered, generate the down-sampling input figure;
Second generation submodule 6014, for being adopted under being carried out in handling thread at least one guiding figure to the guiding figure Sample processing, obtains down-sampling guiding figure.
Image processing apparatus 600 can realize each process that mobile terminal is realized in Fig. 1 to Fig. 5 embodiment of the method, To avoid repeating, repeat no more here.
The image processing apparatus 600 of the embodiment of the present invention, in Steerable filter processing procedure is carried out to image, input is schemed With guiding figure parallel processing, the calculating speed in image processing process can be accelerated, image processing efficiency is lifted, so as to lift figure As the real-time of processing.
Figure 13 is a kind of hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention, the mobile terminal 1300 include but is not limited to:Radio frequency unit 1301, mixed-media network modules mixed-media 1302, audio output unit 1303, input block 1304, sensing Device 1305, display unit 1306, user input unit 1307, interface unit 1308, memory 1309, processor 1310 and The grade part of power supply 1311, processor 1310 are digital signal processor.It will be understood by those skilled in the art that shown in Figure 13 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or less parts, Either combine some parts or different parts arrangement.In embodiments of the present invention, mobile terminal includes but is not limited to hand Machine, tablet personal computer, notebook computer, palm PC, car-mounted terminal, wearable device and pedometer etc..
Wherein, processor 1310, for scheming to input and guiding figure is parallel to carry out down-sampling processing, down-sampling input is obtained Figure and down-sampling guiding figure;The down-sampling input figure and the down-sampling guiding figure are handled, obtain filter factor figure And offset spirogram with filtering;Up-sampling processing is carried out parallel to the filter factor figure and the filtering skew spirogram, obtained First up-sampling figure and the second up-sampling are schemed;Processing is filtered to the first up-sampling figure and the second up-sampling figure, Obtain output figure corresponding with the input figure.
Optionally, the processor 1310 is additionally operable to:The input figure is entered at least one input figure handles thread The processing of row down-sampling, down-sampling input figure is obtained, and the guiding figure is carried out at least one guiding figure processing thread Down-sampling processing, obtains down-sampling guiding figure, wherein, at least one input figure processing thread and at least one guiding Figure processing thread is respectively the thread of parallel processing in the digital signal processor;Line is handled at least one filter factor figure Up-sampling processing is carried out to the filter factor figure in journey, obtains the first up-sampling figure, and it is inclined at least one filtering Move spirogram processing thread in it is described filtering skew spirogram carry out up-sampling processing, obtain the second up-sampling figure, wherein, it is described extremely Few filter factor figure processing thread and at least one filtering skew spirogram processing thread are respectively the data signal The thread of parallel processing in processor.
Optionally, the processor 1310 is additionally operable to:Calculate the pixel of each pixel in the down-sampling input figure It is worth variance and pixel value covariance;The pixel value variance and pixel of each pixel inputted according to the down-sampling in figure It is worth covariance, generation filter factor figure and filtering skew spirogram.
Optionally, the processor 1310 is additionally operable to:Target pixel points are calculated using pixel value variance calculation formula Pixel value variance, the target pixel points be the down-sampling input figure in any pixel point, the pixel value variance meter Calculating formula is:Var=t ' * sumI′I′-sumI′·sumI′, the pixel value variance of the var expressions target pixel points;The t '= R ' * r ', r '=r/s, the r represent default filter window width, and the s represents the sampling multiple;The sumI′Represent In the integrogram of the down-sampling guiding figure, the pixel and value of pixel corresponding with the target pixel points;The sumI′I′ Represent to put pixel-by-pixel in down-sampling guiding figure described in two width and be multiplied in the integrogram of obtained image, with the target pixel points pair The pixel and value for the pixel answered;The pixel value that the target pixel points are calculated using pixel value covariance calculation formula is assisted Variance, the pixel value variance calculation formula are:Cov=t ' * sumI′P′-sumI′·sumP′, the cov expressions target pixel points Pixel value covariance;The sumP′Represent the pixel corresponding with target pixel points in the integrogram of down-sampling input figure The pixel and value of point;The sumI′P′In down-sampling guiding figure, point is mutually multiplied pixel-by-pixel with down-sampling input figure for expression To image integrogram in, the pixel and value of pixel corresponding with the pixel.
Optionally, the processor 1310 is additionally operable to:Calculate the picture with each pixel in down-sampling input figure Pixel value proportionality coefficient and pixel value offset corresponding to element value variance and pixel value covariance;Generation and the down-sampling The pixel value proportionality coefficient figure of the pixel value proportionality coefficient association of each pixel in figure is inputted, and is inputted with the down-sampling The pixel value skew spirogram of the pixel value offset association of each pixel in figure;At the pixel value proportionality coefficient figure Reason obtains the filter factor figure, and pixel value skew spirogram is handled to obtain the filtering skew spirogram.
Optionally, the processor 1310 is additionally operable to:Obtain corresponding extremely with the pixel value variance of the target pixel points Few two multipliers, and in the default look-up table in the digital signal processor, search at least two multiplication because The respective value of each multiplier in son;Based on the respective value of each multiplier at least two multiplier, calculate Obtain the pixel value proportionality coefficient and pixel value offset of the target pixel points.
Optionally, the processor 1310 is additionally operable to:According to proportionality coefficient calculation formula and offset calculation formula, meter Calculation obtains the pixel value proportionality coefficient and pixel value offset of the target pixel points, wherein, the proportionality coefficient calculates public Formula is:The a ' is the pixel value proportionality coefficient of the target pixel points;The a ' is described N described in the pixel value proportionality coefficient of target pixel points is default shift amount, and the N is more than 7;The s is the target picture Multiplier number corresponding to the pixel value variance of vegetarian refreshments, and s is more than or equal to 2;The wiFor the described second default lookup The respective value of i-th of multiplier in table;The offset calculation formula is: The b ' is the pixel value offset of the target pixel points.
Optionally, the processor 1310 is additionally operable to:Judge the pixel value variance and predetermined deviation of the target pixel points Whether amount sum obtains judged result in default value scope of tabling look-up;If the judged result is no, by the object pixel The pixel value variance of point and predetermined deviation amount sum factorization are at least two multipliers, and in the default look-up table Value corresponding with each multiplier at least two multiplier is searched, wherein, at least two multiplier Each multiplier is the value in the default value scope of tabling look-up.
Optionally, the processor 1310 is additionally operable to:In at least one input figure processing thread, utilization is default Sampling multiple zooms in and out the input figure, obtains scaling corresponding with the input figure and schemes;Utilize bilinear interpolation technique Search the pixel value of each interpolation point of the scaling figure in the horizontal direction and the vertical direction;Using the pixel value of each interpolation point as The pixel value of pixel corresponding with the interpolation point in the scaling figure, generates the down-sampling input figure;Draw at least one Lead in figure processing thread and down-sampling processing is carried out to the guiding figure, obtain down-sampling guiding figure.
Mobile terminal 1300 can realize each process that mobile terminal is realized in previous embodiment, to avoid repeating, this In repeat no more.
The mobile terminal 1300 of the embodiment of the present invention, by scheming to input and guiding figure is parallel to carry out down-sampling processing, obtain To down-sampling input figure and down-sampling guiding figure;The down-sampling input figure and the down-sampling guiding figure are handled, obtained Spirogram is offset to filter factor figure and with filtering;The filter factor figure and the filtering skew spirogram are carried out adopting parallel Sample processing, obtains the first up-sampling figure and the second up-sampling figure;The first up-sampling figure and the second up-sampling figure are entered Row filtering process, obtain output figure corresponding with the input figure.So, mobile terminal is carrying out Steerable filter processing to image During, input can be schemed and guide figure parallel processing, accelerate the calculating speed in image processing process, lift image procossing Efficiency, so as to lift the real-time of mobile terminal image procossing.
It should be understood that in the embodiment of the present invention, radio frequency unit 1301 can be used for receiving and sending messages or communication process in, signal Reception and transmission, specifically, by from base station downlink data receive after, handled to processor 1310;In addition, will be up Data are sent to base station.Generally, radio frequency unit 1301 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 1301 can also pass through wireless communication system and network and other Equipment communication.
Mobile terminal has provided the user wireless broadband internet by mixed-media network modules mixed-media 1302 and accessed, and such as helps user to receive Send e-mails, browse webpage and access streaming video etc..
Audio output unit 1303 can be receiving by radio frequency unit 1301 or mixed-media network modules mixed-media 1302 or in memory It is sound that the voice data stored in 1309, which is converted into audio signal and exported,.Moreover, audio output unit 1303 can be with The audio output related to the specific function that mobile terminal 1300 performs is provided (for example, call signal receives sound, message sink Sound etc.).Audio output unit 1303 includes loudspeaker, buzzer and receiver etc..
Input block 1304 is used to receive audio or video signal.Input block 1304 can include graphics processor (Graphics Processing Unit, GPU) 13041 and microphone 13042, graphics processor 13041 in video to capturing The static images or the view data of video obtained in pattern or image capture mode by image capture apparatus (such as camera) enter Row processing.Picture frame after processing may be displayed on display unit 1306.Picture frame after the processing of graphics processor 13041 It can be stored in memory 1309 (or other storage mediums) or be carried out via radio frequency unit 1301 or mixed-media network modules mixed-media 1302 Send.Microphone 13042 can receive sound, and can be voice data by such acoustic processing.Audio after processing Data can be converted to the lattice that mobile communication base station can be sent to via radio frequency unit 1301 in the case of telephone calling model Formula exports.
Mobile terminal 1300 also includes at least one sensor 1305, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ring The light and shade of environmental light adjusts the brightness of display panel 13061, proximity transducer can when mobile terminal 1300 is moved in one's ear, Close display panel 13061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions The size of (generally three axles) acceleration, can detect that size and the direction of gravity when static, available for identification mobile terminal appearance State (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) Deng;Sensor 1305 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, gas Meter, hygrometer, thermometer, infrared ray sensor etc. are pressed, will not be repeated here.
Display unit 1306 is used for the information for showing the information inputted by user or being supplied to user.Display unit 1306 can Including display panel 13061, liquid crystal display (Liquid Crystal Display, LCD), organic light-emitting diodes can be used Forms such as (Organic Light-Emitting Diode, OLED) is managed to configure display panel 13061.
User input unit 1307 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 1307 include contact panel 13071 with And other input equipments 13072.Contact panel 13071, also referred to as touch-screen, collect touch behaviour of the user on or near it Make (for example user uses any suitable objects or annex such as finger, stylus on contact panel 13071 or in contact panel Operation near 13071).Contact panel 13071 may include both touch detecting apparatus and touch controller.Wherein, touch The touch orientation of detection means detection user is touched, and detects the signal that touch operation is brought, transmits a signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 1310, Order that reception processing device 1310 is sent simultaneously is performed.Furthermore, it is possible to using resistance-type, condenser type, infrared ray and surface The polytypes such as sound wave realize contact panel 13071.Except contact panel 13071, user input unit 1307 can also include Other input equipments 13072.Specifically, other input equipments 13072 can include but is not limited to physical keyboard, function key (ratio Such as volume control button, switch key), trace ball, mouse, action bars, will not be repeated here.
Further, contact panel 13071 can be covered on display panel 13061, when contact panel 13071 detects After touch operation on or near it, processor 1310 is sent to determine the type of touch event, is followed by subsequent processing device 1310 Corresponding visual output is provided on display panel 13061 according to the type of touch event.Although in fig. 13, contact panel 13071 realize the input of mobile terminal and output function with display panel 13061 is the part independent as two, but In some embodiments, contact panel 13071 and display panel 13061 can be integrated and realize the input and output of mobile terminal Function, do not limit herein specifically.
Interface unit 1308 is the interface that external device (ED) is connected with mobile terminal 1300.For example, external device (ED) can include Wired or wireless headphone port, external power source (or battery charger) port, wired or wireless FPDP, storage card Port, the port for connecting the device with identification module, audio input/output (I/O) port, video i/o port, earphone Port etc..Interface unit 1308 can be used for receiving the input (for example, data message, electric power etc.) from external device (ED) simultaneously And one or more elements that the input received is transferred in mobile terminal 1300 or it can be used in mobile terminal Data are transmitted between 1300 and external device (ED).
Memory 1309 can be used for storage software program and various data.Memory 1309 can mainly include storage program Area and storage data field, wherein, storing program area can storage program area, needed at least one function application program (such as Sound-playing function, image player function etc.) etc.;Storage data field can store uses created data (ratio according to mobile phone Such as voice data, phone directory) etc..In addition, memory 1309 can include high-speed random access memory, can also include non- Volatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.
Processor 1310 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 1309, and call and be stored in storage Data in device 1309, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 1310 may include one or more processing units;Preferably, processor 1310 can integrate application processor and modulation /demodulation Processor, wherein, application processor mainly handles operating system, user interface and application program etc., modem processor master Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 1310.
Mobile terminal 1300 can also include the power supply 1311 (such as battery) to all parts power supply, it is preferred that power supply 1311 can be logically contiguous by power-supply management system and processor 1310, so as to realize that management is filled by power-supply management system The functions such as electricity, electric discharge and power managed.
In addition, mobile terminal 1300 includes some unshowned functional modules, will not be repeated here.
Preferably, the embodiment of the present invention also provides a kind of mobile terminal, including processor 1310, memory 1309, storage On memory 1309 and the computer program that can be run on the processor 1310, the computer program is by processor 1310 Each process of above-mentioned image processing method embodiment is realized during execution, and identical technique effect can be reached, to avoid repeating, Here repeat no more.
The embodiment of the present invention also provides a kind of computer-readable recording medium, and meter is stored with computer-readable recording medium Calculation machine program, the computer program realize each process of above-mentioned image processing method embodiment, and energy when being executed by processor Reach identical technique effect, to avoid repeating, repeat no more here.Wherein, described computer-readable recording medium, such as only Read memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic disc or CD etc..
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
Embodiments of the invention are described above in conjunction with accompanying drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, one of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make a lot Form, belong within the protection of the present invention.

Claims (10)

  1. A kind of 1. image processing method, applied to the mobile terminal including digital signal processor, it is characterised in that including:
    Down-sampling processing is carried out parallel to input figure and guiding figure, obtains down-sampling input figure and down-sampling guiding figure;
    The down-sampling input figure and the down-sampling guiding figure are handled, filter factor figure is obtained and is offset with filtering Spirogram;
    Up-sampling processing is carried out parallel to the filter factor figure and the filtering skew spirogram, obtains the first up-sampling figure and the Two up-sampling figures;
    Processing is filtered to the first up-sampling figure and the second up-sampling figure, obtained corresponding defeated with the input figure Go out figure.
  2. 2. according to the method for claim 1, it is characterised in that parallel carry out at down-sampling is schemed in described pair of input figure and guiding Reason, the step of obtaining down-sampling input figure and down-sampling guiding figure, including:
    Down-sampling processing is carried out to the input figure at least one input figure processing thread, obtains down-sampling input figure, with And down-sampling processing is carried out to the guiding figure at least one guiding figure processing thread, down-sampling guiding figure is obtained, wherein, At least one input figure processing thread and at least one guiding figure processing thread are respectively the Digital Signal Processing The thread of parallel processing in device;
    It is described that is offset by spirogram and carries out up-sampling processing parallel with the filtering for the filter factor figure, obtain the first up-sampling figure The step of with the second up-sampling figure, including:
    Up-sampling processing is carried out to the filter factor figure at least one filter factor figure handles thread, obtains adopting on first Master drawing, and the filtering skew spirogram is carried out at up-sampling at least one filtering skew spirogram processing thread Reason, obtains the second up-sampling figure, wherein, at least one filter factor figure processing thread and at least one filtering skew Spirogram processing thread is respectively the thread of parallel processing in the digital signal processor.
  3. 3. method according to claim 1 or 2, it is characterised in that described to be adopted to the down-sampling input figure and under described Sample guiding figure is handled, the step of obtaining filter factor figure and offset spirogram with filtering, including:
    Calculate the pixel value variance and pixel value covariance of each pixel in the down-sampling input figure;
    The pixel value variance and pixel value covariance of each pixel inputted according to the down-sampling in figure, generation filtering system Number figure and filtering skew spirogram.
  4. 4. according to the method for claim 3, it is characterised in that described to calculate each pixel in the down-sampling input figure Pixel value variance and pixel value covariance the step of, including:
    The pixel value variance of target pixel points is calculated using pixel value variance calculation formula, the target pixel points are described Any pixel point in down-sampling input figure, the pixel value variance calculation formula are:
    Var=t ' * sumI′I′-sumI′·sumI′,
    The var represents the pixel value variance of target pixel points;
    The t '=r ' * r ', r '=r/s, the r represent default filter window width, and the s represents the sampling multiple;
    The sumI′Represent in the integrogram of down-sampling guiding figure, the picture of pixel corresponding with the target pixel points Element and value;
    The sumI′I′Represent to put pixel-by-pixel in down-sampling guiding figure described in two width and be multiplied in the integrogram of obtained image, with institute State the pixel and value of pixel corresponding to target pixel points;
    The pixel value covariance of the target pixel points, the pixel value side are calculated using pixel value covariance calculation formula Poor calculation formula is:
    Cov=t ' * sumI′P′-sumI′·sumP′,
    The cov represents the pixel value covariance of target pixel points;
    The sumP′Represent the down-sampling input figure integrogram in pixel corresponding with target pixel points pixel and Value;
    The sumI′P′Represent to put the image for being multiplied to obtain pixel-by-pixel with the down-sampling input figure in the down-sampling guiding figure In integrogram, the pixel and value of pixel corresponding with the pixel.
  5. 5. a kind of image processing apparatus, including digital signal processor, it is characterised in that described device also includes:
    Down sample module, for scheming to input and guiding figure is parallel carries out down-sampling processing, obtain down-sampling input figure and under adopt Sample guiding figure;
    Filtering parameter computing module, for handling the down-sampling input figure and the down-sampling guiding figure, filtered Wave system number figure and with filtering offset spirogram;
    Module is up-sampled, for carrying out up-sampling processing parallel to the filter factor figure and the filtering skew spirogram, is obtained First up-sampling figure and the second up-sampling are schemed;
    Filtering process module, for being filtered processing to the first up-sampling figure and the second up-sampling figure, obtain with Output figure corresponding to the input figure.
  6. 6. device according to claim 5, it is characterised in that
    The down sample module, it is additionally operable to carry out at down-sampling the input figure at least one input figure handles thread Reason, down-sampling input figure is obtained, and down-sampling processing is carried out to the guiding figure at least one guiding figure processing thread, Down-sampling guiding figure is obtained, wherein, at least one input figure processing thread and at least one guiding figure processing thread The thread of parallel processing in respectively described digital signal processor;
    The up-sampling module, it is additionally operable to carry out the filter factor figure at least one filter factor figure handles thread Sampling processing, the first up-sampling figure is obtained, and to the filtering at least one filtering skew spirogram processing thread Skew spirogram carries out up-sampling processing, obtains the second up-sampling figure, wherein, at least one filter factor figure processing thread and At least one filtering skew spirogram processing thread is respectively the thread of parallel processing in the digital signal processor.
  7. 7. the device according to claim 5 or 6, it is characterised in that the filtering parameter computing module, including:
    Calculating sub module, for calculating pixel value variance and the pixel value association of each pixel in the down-sampling input figure Variance;
    Filtering parameter figure generate submodule, for according to the down-sampling input figure in each pixel pixel value variance with And pixel value covariance, generation filter factor figure and filtering skew spirogram.
  8. 8. device according to claim 7, it is characterised in that the calculating sub module, including:
    Variance computing unit, for the pixel value variance of target pixel points, institute to be calculated using pixel value variance calculation formula State target pixel points is for any pixel point in the down-sampling input figure, the pixel value variance calculation formula:
    Var=t ' * sumI′I′-sumI′·sumI′,
    The var represents the pixel value variance of target pixel points;
    The t '=r ' * r ', r '=r/s, the r represent default filter window width, and the s represents the sampling multiple;
    The sumI′Represent in the integrogram of down-sampling guiding figure, the picture of pixel corresponding with the target pixel points Element and value;
    The sumI′I′Represent to put pixel-by-pixel in down-sampling guiding figure described in two width and be multiplied in the integrogram of obtained image, with institute State the pixel and value of pixel corresponding to target pixel points;
    Covariance computing unit, for the pixel value of the target pixel points to be calculated using pixel value covariance calculation formula Covariance, the pixel value variance calculation formula are:
    Cov=t ' * sumI′P′-sumI′·sumP′,
    The cov represents the pixel value covariance of target pixel points;
    The sumP′Represent the down-sampling input figure integrogram in pixel corresponding with target pixel points pixel and Value;
    The sumI′P′Represent to put the image for being multiplied to obtain pixel-by-pixel with the down-sampling input figure in the down-sampling guiding figure In integrogram, the pixel and value of pixel corresponding with the pixel.
  9. 9. a kind of mobile terminal, it is in its feature, including processor, memory and is stored on the memory and can be in institute The computer program run on processor is stated, the computer program is realized such as Claims 1-4 during the computing device Any one of image processing method the step of.
  10. 10. a kind of computer-readable recording medium, it is characterised in that be stored with computer on the computer-readable recording medium Program, the image processing method as any one of Claims 1-4 is realized when the computer program is executed by processor The step of.
CN201711078087.4A 2017-11-06 2017-11-06 Image processing method and device and mobile terminal Active CN107886481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711078087.4A CN107886481B (en) 2017-11-06 2017-11-06 Image processing method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711078087.4A CN107886481B (en) 2017-11-06 2017-11-06 Image processing method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN107886481A true CN107886481A (en) 2018-04-06
CN107886481B CN107886481B (en) 2021-01-08

Family

ID=61778834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711078087.4A Active CN107886481B (en) 2017-11-06 2017-11-06 Image processing method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN107886481B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064414A (en) * 2018-07-06 2018-12-21 维沃移动通信有限公司 A kind of image de-noising method and device
CN109474784A (en) * 2018-11-21 2019-03-15 维沃移动通信有限公司 A kind of preview image processing method and terminal device
CN110263730A (en) * 2019-06-24 2019-09-20 北京达佳互联信息技术有限公司 Image-recognizing method, device, electronic equipment and storage medium
CN110458766A (en) * 2019-07-11 2019-11-15 天津大学 A kind of fast illuminated high spectrum image demosaicing methods
CN111199523A (en) * 2019-12-24 2020-05-26 深圳供电局有限公司 Power equipment identification method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103745446A (en) * 2014-01-27 2014-04-23 广东威创视讯科技股份有限公司 Image guide filtering method and system
CN104063847A (en) * 2014-06-18 2014-09-24 长春理工大学 FPGA based guide filter and achieving method thereof
CN104571401A (en) * 2013-10-18 2015-04-29 中国航天科工集团第三研究院第八三五八研究所 Implementing device of high-speed guiding filter on FPGA (field programmable gate array) platform
CN106933579A (en) * 2017-03-01 2017-07-07 西安电子科技大学 Image rapid defogging method based on CPU+FPGA

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104571401A (en) * 2013-10-18 2015-04-29 中国航天科工集团第三研究院第八三五八研究所 Implementing device of high-speed guiding filter on FPGA (field programmable gate array) platform
CN103745446A (en) * 2014-01-27 2014-04-23 广东威创视讯科技股份有限公司 Image guide filtering method and system
CN104063847A (en) * 2014-06-18 2014-09-24 长春理工大学 FPGA based guide filter and achieving method thereof
CN106933579A (en) * 2017-03-01 2017-07-07 西安电子科技大学 Image rapid defogging method based on CPU+FPGA

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
KAIMING HE ET AL.: "Guided Image Filtering", 《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 *
KAIMING HE,JIAN SUN: "Fast Guided Filter", 《COMPUTER SCIENCE》 *
朱秀昌 等: "《数字图像处理与图像信息》", 31 August 2016 *
白林亭等: ""多核 DSP 图像去雾优化方法"", 《电光与控制》 *
肖汉: "利用GPU计算的双线性插值并行算法", 《小型微型计算机系统》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064414A (en) * 2018-07-06 2018-12-21 维沃移动通信有限公司 A kind of image de-noising method and device
CN109064414B (en) * 2018-07-06 2020-11-10 维沃移动通信有限公司 Image denoising method and device
CN109474784A (en) * 2018-11-21 2019-03-15 维沃移动通信有限公司 A kind of preview image processing method and terminal device
CN109474784B (en) * 2018-11-21 2020-07-17 维沃移动通信有限公司 Preview image processing method and terminal equipment
CN110263730A (en) * 2019-06-24 2019-09-20 北京达佳互联信息技术有限公司 Image-recognizing method, device, electronic equipment and storage medium
US11341376B2 (en) 2019-06-24 2022-05-24 Beijing Dajia Internet Information Technology Co., Ltd. Method and device for recognizing image and storage medium
CN110458766A (en) * 2019-07-11 2019-11-15 天津大学 A kind of fast illuminated high spectrum image demosaicing methods
CN110458766B (en) * 2019-07-11 2023-08-25 天津大学 Snapshot hyperspectral image demosaicing method
CN111199523A (en) * 2019-12-24 2020-05-26 深圳供电局有限公司 Power equipment identification method and device, computer equipment and storage medium
CN111199523B (en) * 2019-12-24 2023-08-25 深圳供电局有限公司 Power equipment identification method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN107886481B (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN107886481A (en) A kind of image processing method, device and mobile terminal
CN107835364A (en) One kind is taken pictures householder method and mobile terminal
CN107766939A (en) A kind of data processing method, device and mobile terminal
CN107835367A (en) A kind of image processing method, device and mobile terminal
CN107909583A (en) A kind of image processing method, device and terminal
CN107817939A (en) A kind of image processing method and mobile terminal
CN107833178A (en) A kind of image processing method, device and mobile terminal
CN107589963A (en) A kind of image processing method, mobile terminal and computer-readable recording medium
CN107678614A (en) A kind of method, equipment and computer-readable recording medium for realizing information alert
CN107608606A (en) A kind of image display method, mobile terminal and computer-readable recording medium
CN107749046A (en) A kind of image processing method and mobile terminal
CN107845074A (en) A kind of image rendering method and mobile terminal
CN107818282A (en) Two-dimensional code identification method, terminal and computer-readable recording medium
CN107734281A (en) A kind of image magnification method and mobile terminal
CN107819935A (en) The control method and mobile terminal of a kind of mobile terminal
CN107783747A (en) A kind of interface display processing method and mobile terminal
CN107734172A (en) A kind of method for information display and mobile terminal
CN108228033A (en) A kind of message display method and mobile terminal
CN107783709A (en) The inspection method and mobile terminal of a kind of image
CN108646960A (en) A kind of document handling method and flexible screen terminal
CN107864336A (en) A kind of image processing method, mobile terminal
CN107704185A (en) A kind of split screen desktop display method, terminal and computer-readable recording medium
CN111352892B (en) Operation processing method and electronic equipment
CN107728877A (en) One kind applies recommendation method and mobile terminal
CN107656727A (en) A kind of font object library generating method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant