Summary of the invention
In view of above-mentioned the deficiencies in the prior art, the object of the present invention is to provide a kind of raw data format photo processing method and system, be intended to solve in prior art the mobile terminal excessive problem of storage raw data format photo committed memory of taking pictures.
Technical scheme of the present invention is as follows:
A kind of raw data format photo processing method, wherein, said method comprising the steps of:
A, mobile terminal receive user's operational order, obtain photographic images take frame as unit;
B, the photographic images obtaining is compressed to processing;
C, will be saved to memory through overcompression photographic images after treatment.
Described raw data format photo processing method, wherein, it also comprises:
D is in the time need checking photo, when mobile terminal receives user's operational order, to carrying out decompression through overcompression photographic images after treatment.
Described raw data format photo processing method, wherein, described step B specifically comprises:
B1, will be divided into by the photographic images of acquisition for mobile terminal the x*y piece region of the capable x row of y, wherein x, y is positive integer;
B2, obtain the original image data in the region of the capable first row of i in x*y piece region, keep its size constant, the original image data size that the view data size in every region after capable i first row is compressed to this region deducts its original image data size with the region of a line previous column, be A(i, 1)=Q(i, 1), S(i, 1)=W(i, 1), A (i, m)=Q (i, m)-Q (i, m-1), S (i, m)=W (i, m)-W (i, m-1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
Described raw data format photo processing method, wherein, described step D specifically comprises:
D1, in the time that mobile terminal receives user's decompression operation instruction, from memory, obtain the image of overcompression processing;
D2, the image of described overcompression processing is divided into the x*y piece region of the capable x of y row, wherein x, y is positive integer;
D3, obtain the original image data in the region of the capable first row of i in x*y piece region, keep its size constant, the view data in every region after the capable i first row image compression data size that is compressed to this region that urines is added to its image compression data size with the region of all row before a line, i.e. Q(i, 1)=A(i, 1), W(i, 1)=S(i, 1), Q (i, m)=A (i, m)+A (i, m-1)+...+A(i, 1), W (i, m)=S (i, m)+S (i, m-1)+... + S(i, 1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
Described raw data format photo processing method, wherein, the described x*y piece region in described step B1 is all the rectangular area that every area all equates.
Described raw data format photo processing method, wherein, the described x*y piece region in described step D2 is all the rectangular area that every area all equates.
Described raw data format photo processing method, wherein, described mobile terminal is any one in smart mobile phone, panel computer and digital camera.
A kind of raw data format photo processing system, wherein, comprising:
Initial data acquisition module, for mobile terminal reception user's operational order, obtains photographic images take frame as unit;
Compression module, for compressing processing to the photographic images obtaining;
Memory module, for preserving through compression module photographic images after treatment.
Described raw data format photo processing system, wherein, also comprises:
Decompression module, in the time need checking photo, when mobile terminal receives user's operational order, to carrying out decompression through compression module photographic images after treatment.
Described raw data format photo processing system, wherein, described compression module specifically comprises:
The first division unit, for being divided into the x*y piece region of the capable x row of y by the photographic images of acquisition for mobile terminal, wherein x, y is positive integer;
Compression unit, be used for the original image data in the region that obtains the capable first row of i in x*y piece region, keep its size constant, the original image data size that the view data size in every region after capable i first row is compressed to this region deducts its original image data size with the region of a line previous column, i.e. A(i, 1)=Q(i, 1), S(i, 1)=W(i, 1), A (i, m)=Q (i, m)-Q (i, m-1), S (i, m)=W (i, m)-W (i, m-1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
Described raw data format photo processing system, wherein, described decompression module specifically comprises:
Compressed image acquiring unit when receive user's decompression operation instruction when mobile terminal, obtains the image of overcompression resume module from memory module;
The second division unit, for the image of described overcompression resume module being divided into the x*y piece region of the capable x row of y, wherein x, y is positive integer;
Decompression unit, for obtaining the original image data in region of the capable first row of i in x*y piece region, keep its size constant, the view data in every region after the capable i first row image compression data size that is compressed to this region that urines is added to its image compression data size with the region of all row before a line, be Q(i, 1)=A(i, 1), W(i, 1)=S(i, 1), Q (i, m)=A (i, m)+A (i, m-1)+...+A(i, 1), W (i, m)=S (i, m)+S (i, m-1)+... + S(i, 1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
A kind of raw data format photo processing method provided by the invention and system, compression and decompression step comprise: mobile terminal receives user's operational order, obtains photographic images take frame as unit; The photographic images obtaining is compressed to processing; To be saved to memory through overcompression photographic images after treatment; In the time that need are checked photo, when mobile terminal receives user's operational order, to carrying out decompression through overcompression photographic images after treatment.Adopt the raw data format picture compression storage of the present invention's photographic images that customer mobile terminal can be obtained, reduce the memory space that every photo takies, the photo after the while can be compressed carries out decompression, reduces the initial data of picture completely.
Embodiment
The invention provides a kind of raw data format photo processing method and system, for making object of the present invention, technical scheme and effect clearer, clear and definite, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Below in conjunction with Fig. 1, raw data format photo processing method of the present invention is elaborated, wherein, Fig. 1 is the preferred embodiment flow chart of steps of a kind of raw data format photo processing method provided by the invention.
Step S101, mobile terminal receive user's operational order, obtain photographic images take frame as unit;
Step S102, the photographic images obtaining is compressed to processing;
Step S103, will be saved to memory through overcompression photographic images after treatment.
Embodiment further, as shown in Figure 1, also comprises after step S103:
Step S104, in the time that need are checked photo, when mobile terminal receives user's operational order, to carrying out decompression through overcompression photographic images after treatment.
In step S102, mobile terminal need to compress processing to picture, and as shown in Figure 2, it comprises step:
Step S201, will be divided into by the photographic images of acquisition for mobile terminal the x*y piece region of the capable x row of y, wherein x, y is positive integer;
Step S202, obtain the original image data in the region of the capable first row of i in x*y piece region, keep its size constant, the original image data size that the view data size in every region after capable i first row is compressed to this region deducts its original image data size with the region of a line previous column, be A(i, 1)=Q(i, 1), S(i, 1)=W(i, 1), A (i, m)=Q (i, m)-Q (i, m-1), S (i, m)=W (i, m)-W (i, m-1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
In step S201, the image of the raw data format obtaining by the shooting of acquisition for mobile terminal is divided into the x*y piece region of the capable x row of y, as shown in Figure 3, take raw data format as QW, photo size as x*y be example, the 1st data content is Q (1,1) W (1,1), for the row j of the i(1≤i≤y) row (data content of 1≤j≤x) is Q(i, j) W(i, j).
In step S202, for the i(1≤i≤y) data of row, to be recorded as original data content be Q (i to the 1st data of this row, 1), W (i, 1), the 2nd data are recorded as Q (i, 2)-Q (i, 1), W (i, 2)-W (i, 1), the 3rd data are recorded as Q (i, 3)-Q (i, 2), W (i, 3)-W (i, 2), x data are recorded as Q (i, x)-Q (i, x-1), W (i, x)-W (i, x-1), this seasonal A (i, 1)=Q (i, 1), S (i, 1)=W (i, 1), A (i, 2)=Q (i, 2)-Q (i, 1), S (i, 2)=W (i, 2)-W (i, 1), A (i, 3)=Q (i, 3)-Q (i, 2), S (i, 3)=W (i, 3)-W (i, 2), A (i, x)=Q (i, x)-Q (i, x-1), S (i, x)=W (i, x)-W (i, x-1), as shown in Figure 4, A(i, j) S(i, j) be the data content after the region compression in the capable j row of i, A(x, y) S(x, y) be the data content after the region compression in the capable x row of y.Through step S202, picture compression is stored, can be saved the memory space of every photo, the in the situation that of the inconvenience of internal memory gross space, can store more photo.
In step S104, when mobile terminal need to carry out decompression to compressed picture, as shown in Figure 5, it comprises step:
Step S301, in the time that mobile terminal receives user's decompression operation instruction, from memory, obtain the image of overcompression processing;
Step S302, the image of described overcompression processing is divided into the x*y piece region of the capable x of y row, wherein x, y is positive integer;
Step S303, obtain the original image data in the region of the capable first row of i in x*y piece region, keep its size constant, the view data in every region after the capable i first row image compression data size that is compressed to this region that urines is added to its image compression data size with the region of all row before a line, i.e. Q(i, 1)=A(i, 1), W(i, 1)=S(i, 1), Q (i, m)=A (i, m)+A (i, m-1)+...+A(i, 1), W (i, m)=S (i, m)+S (i, m-1)+... + S(i, 1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
In step S302, consistent with step S201 of its dividing mode, this kind of dividing mode guarantees that photo recovers the initial data of photo in the process decompressing with the inverse process of full symmetric.
In step S303, for the i(1≤i≤y) data of row, the 1st data content of this journey is A (i, 1), S (i, 1), Q (i, 1)=A (i, 1), W (i, 1)=S (i, 1); Second data content of this journey is Q (i, 2)=A (i, 1)+A (i, 2), W (i, 2)=S (i, 1)+S (i, 2); , x data content of this journey is Q (i, x)=A (i, 1)+A (i, 2)+... + A (i, x), W (i, x)=S (i, 1)+S (i, 2)+... + S (i, x); Process if user need adopt the photo of raw data format to carry out other, can, by through the recovery without information loss through the photo of overcompression storage in step S202, process for user through step S303.
Embodiment further, described movement is wherein any in smart mobile phone, panel computer and digital camera eventually.
Based on above-described embodiment, the present invention also provides a kind of raw data format photo processing system, as shown in Figure 6, is the structured flowchart of a kind of raw data format photo processing system provided by the invention preferred embodiment.
As shown in Figure 6, described raw data format photo processing system comprises:
Initial data acquisition module 100, for mobile terminal reception user's operational order, obtains photographic images take frame as unit;
Compression module 200, for compressing processing to the photographic images obtaining;
Memory module 300, for preserving through compression module 200 photographic images after treatment.
Embodiment further, as shown in Figure 6, described raw data format photo processing system also comprises:
Decompression module 400, in the time need checking photo, when mobile terminal receives user's operational order, to carrying out decompression through compression module 200 photographic images after treatment.
Embodiment further, as shown in Figure 7, compression module 200 specifically comprises:
The first division unit 210, for being divided into the x*y piece region of the capable x row of y by the photographic images of acquisition for mobile terminal, wherein x, y is positive integer;
Compression unit 220, be used for the original image data in the region that obtains the capable first row of i in x*y piece region, keep its size constant, the original image data size that the view data size in every region after capable i first row is compressed to this region deducts its original image data size with the region of a line previous column, i.e. A(i, 1)=Q(i, 1), S(i, 1)=W(i, 1), A (i, m)=Q (i, m)-Q (i, m-1), S (i, m)=W (i, m)-W (i, m-1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
Embodiment further, as shown in Figure 8, decompression module 400 specifically comprises:
Compressed image acquiring unit 410 when receive user's decompression operation instruction when mobile terminal, obtains the image that overcompression module 200 is processed from memory module 300;
The second division unit 420, divides for the image that described overcompression module 200 is processed the x*y piece region that the capable x of y is listed as, wherein x, and y is positive integer;
Decompression unit 430, for obtaining the original image data in region of the capable first row of i in x*y piece region, keep its size constant, the view data in every region after the capable i first row image compression data size that is compressed to this region that urines is added to its image compression data size with the region of all row before a line, be Q(i, 1)=A(i, 1), W(i, 1)=S(i, 1), Q (i, m)=A (i, m)+A (i, m-1)+...+A(i, 1), W (i, m)=S (i, m)+S (i, m-1)+... + S(i, 1); Wherein Q (i, m), W (i, m) be the original image data size of the capable m column region of i, A (i, m), S (i, m) be the view data size after the image compression of the capable m column region of i, i is more than or equal to 1 and be less than or equal to the natural number of y, and m is greater than 1 and be less than or equal to the natural number of x.
In sum, a kind of raw data format photo processing method provided by the invention and system, compression and decompression step comprise: mobile terminal receives user's operational order, obtains photographic images take frame as unit; The photographic images obtaining is compressed to processing; To be saved to memory through overcompression photographic images after treatment; In the time that need are checked photo, when mobile terminal receives user's operational order, to carrying out decompression through overcompression photographic images after treatment.Adopt the raw data format picture compression storage of the present invention's photographic images that customer mobile terminal can be obtained, reduce the memory space that every photo takies, the photo after the while can be compressed carries out decompression, reduces the initial data of picture completely.
Should be understood that, application of the present invention is not limited to above-mentioned giving an example, and for those of ordinary skills, can be improved according to the above description or convert, and all these improvement and conversion all should belong to the protection range of claims of the present invention.