Invention content
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide a kind of raw data format photo disposal sides
Method and system, it is intended to solve mobile terminal in the prior art and take pictures that raw data format photo committed memory is excessive asks for storage
Topic.
Technical scheme is as follows:
A kind of raw data format photo processing method, wherein the described method comprises the following steps:
A, mobile terminal receives the operational order of user, and shooting image is obtained as unit of frame;
B, compression processing is carried out to the shooting image of acquisition;
C, the shooting image after compression processing is preserved to memory.
The raw data format photo processing method, wherein it further includes:
D is when that need to check photo, when mobile terminal receives the operational order of user, to the shooting after compression processing
Image unzips it processing.
The raw data format photo processing method, wherein the step B is specifically included:
B1, the x*y blocks region that y rows x row will be divided by the shooting image of acquisition for mobile terminal, wherein x, y are just
Integer;
The original image data in the region of the i-th row first row of B2, acquisition in x*y blocks region, keeps its size constant,
The original image data size that the image data size in every piece of region after the i-th row first row is compressed to the region subtracts it
With the original image data size in 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) are the i-th row m column regions
Original image data size, A (i, m), S (i, m) are the image data size after the compression of images of the i-th row m column regions, and i is
Natural number more than or equal to 1 and less than or equal to y, m are the natural number more than 1 and less than or equal to x.
The raw data format photo processing method, wherein the step D is specifically included:
D1, when mobile terminal receive user decompression operation instruction when, from memory obtain have been compressed from
The image of reason;
D2, the x*y blocks region that the image for having been compressed processing is divided into y rows x row, wherein x, y are just whole
Number;
The original image data in the region of the i-th row first row of D3, acquisition in x*y blocks region, keeps its size constant,
The image data in every piece of region after the i-th row first row is urined and is compressed to the image compression data size in the region and adds
It is the same as the image compression data size in 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) is the original image data size of the i-th row m column regions, and A (i, m), S (i, m) are the image of the i-th row m column regions
Compressed image data size, i are the natural number more than or equal to 1 and less than or equal to y, m be more than 1 and less than or equal to x from
So number.
The raw data format photo processing method, wherein the x*y blocks region in the step B1 is all every piece
The all equal rectangular area of area.
The raw data format photo processing method, wherein the x*y blocks region in the step D2 is all every piece
The all equal rectangular area of area.
The raw data format photo processing method, wherein the mobile terminal is smart mobile phone, tablet computer sum number
Code camera in any one.
A kind of raw data format photo processing system, wherein including:
Initial data acquisition module is received the operational order of user for mobile terminal, shooting figure is obtained as unit of frame
Picture;
Compression module carries out compression processing for the shooting image to acquisition;
Memory module, for preserve by compression module treated shooting image.
The raw data format photo processing system, wherein further include:
Decompression module, for when that need to check photo, when mobile terminal receives the operational order of user, to through overvoltage
Shooting image after contracting resume module unzips it processing.
The raw data format photo processing system, wherein the compression module specifically includes:
First division unit, the x*y blocks region for y rows x row will to be divided by the shooting image of acquisition for mobile terminal,
Wherein x, y are positive integer;
Compression unit, the original image data in the region for obtaining the i-th row first row in x*y blocks region, keeps
Its size is constant, and the image data size in every piece of region after the i-th row first row is compressed to the image original number in the region
Its original image data size with the region of a line previous column, i.e. A are subtracted according to size(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) are the i-th row
The original image data size of m column regions, A (i, m), S (i, m) are the picture number after the compression of images of the i-th row m column regions
According to size, i is the natural number more than or equal to 1 and less than or equal to y, and m is the natural number more than 1 and less than or equal to x.
The raw data format photo processing system, wherein the decompression module specifically includes:
Image acquisition unit is compressed, when the decompression operation for receiving user when mobile terminal instructs, from storage mould
The image for having been compressed resume module is obtained in block;
Second division unit, the x*y blocks area for the image for having been compressed resume module to be divided into y rows x row
Domain, wherein x, y are positive integer;
Decompression unit, the original image data in the region for obtaining the i-th row first row in x*y blocks region, is protected
It holds that its size is constant, the image data in every piece of region after the i-th row first row is urined and is compressed to the image pressure in the region
Contracting size of data is plus it with the image compression data size in 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) are the original image data size of the i-th row m column regions, and A (i, m), S (i, m) are the i-th row the
Image data size after the compression of images of m column regions, i be more than or equal to 1 and less than or equal to y natural number, m be more than 1 and
Natural number less than or equal to x.
A kind of raw data format photo processing method provided by the invention and system, compression and decompression step include:
Mobile terminal receives the operational order of user, and shooting image is obtained as unit of frame;The shooting image of acquisition is carried out at compression
Reason;Shooting image after compression processing is preserved to memory;When that need to check photo, mobile terminal receives user's
When operational order, processing is unziped it to the shooting image after compression processing.User can be moved using the present invention
The raw data format picture compression storage for the shooting image that terminal obtains, reduces the memory space that every photo occupies, simultaneously
Processing can be unziped it with compressed photo, go back the initial data of original picture completely.
Specific implementation mode
A kind of raw data format photo processing method of present invention offer and system, to make the purpose of the present invention, technical side
Case and effect are clearer, clear, and the present invention is described in more detail for the embodiment that develops simultaneously referring to the drawings.It should be appreciated that
The specific embodiments described herein are merely illustrative of the present invention, is not intended to limit the present invention.
It elaborates to raw data format photo processing method of the present invention below in conjunction with Fig. 1, wherein Fig. 1 is this hair
A kind of preferred embodiment flow chart of steps of raw data format photo processing method of bright offer.
Step S101, mobile terminal receives the operational order of user, and shooting image is obtained as unit of frame;
Step S102, compression processing is carried out to the shooting image of acquisition;
Step S103, the shooting image after compression processing is preserved to memory.
Example is further carried out, as shown in Figure 1, further including after step S103:
Step S104, when that need to check photo, when mobile terminal receives the operational order of user, to passing through compression processing
Shooting image afterwards unzips it processing.
In step s 102, mobile terminal needs to carry out compression processing to picture, as shown in Figure 2 comprising step:
Step S201, the x*y blocks region of y rows x row, wherein x, y will be divided by the shooting image of acquisition for mobile terminal
All it is positive integer;
Step S202, the original image data for obtaining the region of the i-th row first row in x*y blocks region keeps it big
Small constant, the original image data that the image data size in every piece of region after the i-th row first row is compressed to the region is big
It is small to subtract 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) are the i-th row m
The original image data size of column region, A (i, m), S (i, m) are the image data after the compression of images of the i-th row m column regions
Size, i are the natural number more than or equal to 1 and less than or equal to y, and m is the natural number more than 1 and less than or equal to x.
In step s 201, the image of the raw data format obtained by the shooting of acquisition for mobile terminal is divided into y
The x*y blocks region of row x row, as shown in figure 3, by taking raw data format is QW, photo size is x*y as an example, then in the 1st data
It is Q (1,1) W (1,1) to hold, then for i-th(1≤i≤y)Row jth arranges(1≤j≤x)Data content be Q(I, j)W(I, j).
In step S202, for i-th(1≤i≤y)Capable data, then the 1st data of the row be recorded as in initial data
It is Q (i, 1) to hold, W (i, 1), and the 2nd data are recorded as Q (i, 2)-Q (i, 1), W (i, 2)-W (i, 1), the 3rd data record
For Q (i, 3)-Q (i, 2), W (i, 3)-W (i, 2) ... ..., x-th of data record is Q (i, x)-Q (i, x-1), W (i, x)-
W (i, x-1), this season 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, then A(I, j)S(I, j)To be in the i-th row jth
Data content after the area compresses of row, A(X, y)S(X, y)For the data content after the area compresses that y row xth arranges.
Picture compression is stored by step S202, the memory space of every photo can be saved, in the case of memory gross space inconvenience,
More photos can be stored.
In step S104, when mobile terminal needs to unzip it processing to compressed picture, as shown in Figure 5 comprising
Step:
Step S301, it when mobile terminal receives the decompression operation instruction of user, obtains and has been subjected to from memory
The image of compression processing;
Step S302, the image for having been compressed processing is divided into the x*y blocks region of y rows x row, wherein x, y are
For positive integer;
Step S303, the original image data for obtaining the region of the i-th row first row in x*y blocks region keeps it big
It is small constant, the image data in every piece of region after the i-th row first row is urined and is compressed to the image compression data in the region
Size is plus it with the image compression data size in 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) are the original image data size of the i-th row m column regions, and A (i, m), S (i, m) are the i-th row m row
Image data size after the compression of images in region, i are the natural number more than or equal to 1 and less than or equal to y, and m is more than 1 and to be less than
Natural number equal to x.
In step s 302, dividing mode is consistent in step S201, and such dividing mode ensures that photo is decompressing
Restore the initial data of photo during contracting with full symmetric inverse process.
In step S303, for i-th(1≤i≤y)Capable data, the 1st data content of this journey be A (i, 1), S (i,
1), then 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-th of data content of this journey be Q (i, x)=A (i, 1)+A (i, 2)+...+A (i,
X), W (i, x)=S (i, 1)+S (i, 2)+...+S (i, x);If user need to use the photo of raw data format to carry out its elsewhere
Reason, can be by recovery of the photo without information loss by being stored through overcompression in step S202, for user by step S303
It is handled.
Example is further carried out, it is described mobile whole for any of which one in smart mobile phone, tablet computer and digital camera
Kind.
Based on above-described embodiment, the present invention also provides a kind of raw data format photo processing systems, as shown in fig. 6,
For a kind of structure diagram of raw data format photo processing system preferred embodiment provided by the invention.
As shown in fig. 6, the raw data format photo processing system includes:
Initial data acquisition module 100 receives the operational order of user for mobile terminal, and shooting is obtained as unit of frame
Image;
Compression module 200 carries out compression processing for the shooting image to acquisition;
Memory module 300, for preserve by compression module 200 treated shooting image.
Example is further carried out, as shown in fig. 6, the raw data format photo processing system further includes:
Decompression module 400, for when that need to check photo, when mobile terminal receives the operational order of user, to warp
Overcompression module 200 treated shooting image unzip it processing.
Example is further carried out, as shown in fig. 7, compression module 200 specifically includes:
First division unit 210, the x*y blocks area for y rows x row will to be divided by the shooting image of acquisition for mobile terminal
Domain, wherein x, y are positive integer;
Compression unit 220, the original image data in the region for obtaining the i-th row first row in x*y blocks region, is protected
Hold that its size is constant, the image that the image data size in every piece of region after the i-th row first row is compressed to the region is original
Size of data subtracts 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) are the
The original image data size of i row m column regions, A (i, m), S (i, m) are the figure after the compression of images of the i-th row m column regions
As size of data, i is the natural number more than or equal to 1 and less than or equal to y, and m is the natural number more than 1 and less than or equal to x.
Example is further carried out, as shown in figure 8, decompression module 400 specifically includes:
Image acquisition unit 410 is compressed, when the decompression operation for receiving user when mobile terminal instructs, from storage
The image for having been compressed the processing of module 200 is obtained in module 300;
Second division unit 420, for by the x*y for having been compressed the image that module 200 handles and dividing y rows x row
Block region, wherein x, y are positive integer;
Decompression unit 430, the original image data in the region for obtaining the i-th row first row in x*y blocks region,
It keeps its size constant, the image data in every piece of region after the i-th row first row is urined and is compressed to the image in the region
Compressed data size is plus it with the image compression data size in 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) are the original image data size of the i-th row m column regions, and A (i, m), S (i, m) are i-th
Image data size after the compression of images of row m column regions, i be more than or equal to 1 and less than or equal to y natural number, m be more than
1 and less than or equal to x natural number.
In conclusion a kind of raw data format photo processing method provided by the invention and system, compression and decompression
Step includes:Mobile terminal receives the operational order of user, and shooting image is obtained as unit of frame;To the shooting image of acquisition into
Row compression processing;Shooting image after compression processing is preserved to memory;When that need to check photo, mobile terminal receives
To user operational order when, processing is unziped it to the shooting image after compression processing.It can be incited somebody to action using the present invention
The raw data format picture compression storage for the shooting image that customer mobile terminal obtains, it is empty to reduce the storage that every photo occupies
Between, while processing can be unziped it with compressed photo, the initial data of original picture is gone back completely.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Protect range.