CN105931187B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN105931187B
CN105931187B CN201610282554.4A CN201610282554A CN105931187B CN 105931187 B CN105931187 B CN 105931187B CN 201610282554 A CN201610282554 A CN 201610282554A CN 105931187 B CN105931187 B CN 105931187B
Authority
CN
China
Prior art keywords
image
record
original image
thumbnail
storage item
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.)
Active
Application number
CN201610282554.4A
Other languages
Chinese (zh)
Other versions
CN105931187A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610282554.4A priority Critical patent/CN105931187B/en
Publication of CN105931187A publication Critical patent/CN105931187A/en
Application granted granted Critical
Publication of CN105931187B publication Critical patent/CN105931187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4084Scaling of whole images or parts thereof, e.g. expanding or contracting in the transform domain, e.g. fast Fourier transform [FFT] domain scaling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure discloses a kind of image processing method and device, belongs to field of image processing.Described image processing method includes: the image that traversal is stored in the terminal, determines the original image of pending breviary processing;Breviary processing is carried out to the original image, obtains thumbnail;The thumbnail is replaced into the original image.By being traversed to the image stored in terminal, determines the original image of pending breviary processing, replace original image to be shown using thumbnail;Due to that the original image stored in terminal can be replaced with thumbnail automatically, solve in the related technology because requiring the irregular cloud storage and the manual cleaning in mobile phone space for carrying out photo of user, the higher problem of operating cost;Having reached can use the lesser thumbnail of memory space and is shown instead of original image, saves memory space, simplifies the effect of image displaying.

Description

Image processing method and device
Technical field
This disclosure relates to field of image processing, in particular to a kind of image processing method and device.
Background technique
In order to improve effect of taking pictures, the resolution ratio of the camera configured in smart phone is also being gradually increased, and high-resolution The photo that rate obtains shooting occupies biggish memory space.
In order to reduce photo to the occupancy of memory space, user is needed manually to store these photos to cloud, then hand It is dynamic to delete the stored photo to cloud in mobile phone.This mode require user it is irregular carry out photo cloud storage with And the manual cleaning in mobile phone space, operating cost are higher.
Summary of the invention
The disclosure provides a kind of image processing method and device.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of image processing method is provided, is applied in terminal, the method Include: the image that traversal is stored in the terminal, determines the original image of pending breviary processing;The original image is carried out Breviary processing, obtains thumbnail;The thumbnail is replaced into the original image.Pass through the image progress time to storing in terminal It goes through, determines the original image of pending breviary processing, replace original image to be shown using thumbnail;Due to can be automatically by terminal The original image of middle storage replaces with thumbnail, therefore solves in the related technology because requiring the irregular cloud for carrying out photo of user End storage and the manual cleaning in mobile phone space, the higher problem of operating cost;Reach that can use memory space lesser Thumbnail replaces original image to be shown, saves memory space, simplifies the effect of image displaying.
Optionally, described to traverse the image being stored in the terminal, determine the original image of pending breviary processing, packet It includes: looping through the record of the image stored in the terminal, include at least in the record of each image for storing original image First Storage Item of storage address information, the second Storage Item for storing identification information and for storing thumbnail storage address The third Storage Item of information, the identification information are after the original image is successfully backed up to Cloud Server, by the cloud service The information for the original image described in the cloud server end unique identification that device is distributed and fed back;For the every figure traversed The record of picture, when it is sky that the second Storage Item in the record of reading, which is not third Storage Item in the empty and described record, Judge whether described image meets breviary condition;When described image meets the breviary condition, by described image be determined as to Carry out the original image of breviary processing.By being used to store the second Storage Item of identification information and for storing in image recording The third Storage Item of thumbnail storage address information determines that image meets pending breviary condition, when the second Storage Item is non-empty And third Storage Item shows that the image has been backed up but had not yet carried out breviary processing, therefore can be by the image when being empty It is determined as the original image of pending breviary processing;Due to the record by image, can quickly and accurately determine image whether be to The original image for carrying out breviary processing, improves the efficiency and accuracy of judgement.
Optionally, described to judge whether described image meets breviary condition, comprising: to read the wide to pixel P of described imagew With height to pixel Ph;Work as Pw≥SwAnd Ph≥ShWhen, then determine that described image meets the breviary condition;Wherein, SwIt is described Terminal screen it is wide to pixel, ShFor the high to pixel of the terminal screen.By the way that width to be greater than to the width of terminal screen, and Height be greater than terminal screen width image, be determined as meeting the image of breviary condition, due to this feature image into After row scaled down, can by lesser one in width or height be contracted to corresponding with screen side it is identical when, avoid Biggish one is distorted when reducing in width or height, ensure that the display effect of thumbnail.
Optionally, described that breviary processing is carried out to the original image, obtain thumbnail, comprising: calculate PwWith SwRatio, Obtain the first ratio;Calculate PhWith ShRatio, obtain the second ratio;It will be minimum in first ratio and second ratio Ratio be determined as diminution ratio;Using the diminution ratio, the width to the original image and height reduce respectively, Obtain the thumbnail of the original image.By the way that the smallest ratio in the first ratio and the second ratio is determined as diminution ratio, benefit It, can be under the premise of reducing as far as possible when being reduced respectively to the width of original image and height with the diminution ratio, breviary Figure is still able to take the entire screen of terminal, and for user, the thumbnail and original image viewed does not have difference.
Optionally, described that the thumbnail is replaced into the original image, comprising: the original image to be deleted, by the breviary Figure is replaced the original image and is shown;Depositing for the thumbnail is stored using the third Storage Item in the record of the original image Store up address;The first Storage Item recorded in original image record is set to sky.By using thumbnail replace original image when, The original image is deleted, and the first Storage Item in the corresponding record of the image is emptied, is deposited using the third Storage Item in record The storage address of thumbnail is stored up, so that in the follow-up process can be according to the first Storage Item and third Storage Item, determining should Record can be shown the thumbnail there is only there is corresponding thumbnail.
Optionally, the method also includes: when shooting obtains image, store described image, for described image generate one Item record;Utilize the store path of the first Storage Item storage described image in the record.By obtaining a figure in shooting When picture, a record is generated for the image, and the store path of the image is stored using the first Storage Item in record, so as to end File management system in end can use the record and show the image.
Optionally, the method also includes: the image being not backed up in the terminal will be stored in, backups to the cloud service Device;The identification information corresponding to the image of the Cloud Server feedback is obtained, the identification information is used to take in the cloud Business device unique identification described image;The identification information is stored using the second Storage Item in the record of described image.By Identification information is stored in the record of image, in order to the identification information stored in later use second Storage Item, determines the note Record whether corresponding image had been backed up.
Optionally, described to be stored in the image being not backed up in the terminal, backup to the Cloud Server, comprising: follow Ring traverses the record of image in the terminal, is that empty image is determined as the figure being not backed up by the second Storage Item in record Picture;The described image that will be not backed up is sent to the Cloud Server and is backed up.
Optionally, the method also includes: according to record show image when, when the first Storage Item in the record is When non-empty, is shown according to the store path of the original image of first Storage Item storage and record corresponding original image with described;When When third Storage Item in the record is non-empty, show according to the store path of the thumbnail of third Storage Item storage and It is described to record corresponding thumbnail.By record in the first Storage Item be non-empty when, judgement record corresponding image as original image Picture then can show the original image according to the store path in the first Storage Item at this time, and third Storage Item is non-in record When empty, judgement records corresponding image as thumbnail, then can show the contracting according to the store path in third Storage Item at this time Sketch map;After generating thumbnail, in order to reduce memory space, original image would generally be directly deleted, therefore can not be determined Whether original image is backed up, or can not also determine whether for thumbnail, and is deposited by the second Storage Item in record and third Chu Xiang can also quickly determine to record whether corresponding image is successfully backed up, may be used also when showing image according to record Record whether corresponding image is thumbnail with quick judgement.
Optionally, the method also includes: when showing thumbnail, obtain third Storage Item be the thumbnail storage The record in path;When the first Storage Item is empty in the record, by the original image downloading attribute setting of the thumbnail of display To allow to download;When receiving the download instruction being downloaded to the original image of the thumbnail, read in the record Identification information has the original image of the identification information from Cloud Server downloading using the identification information, using described Original image carries out covering to the local thumbnail and shows;Third Storage Item in the record is set to sky, using described The first Storage Item in record stores the store path of the original image.By determining to record corresponding image as thumbnail When, the thumbnail that display is arranged allows to download original image, and supports to be downloaded backup in the original image of Cloud Server, right After the completion of original image downloading, then the third Storage Item of corresponding record can be set to sky, and utilize the first Storage Item of record The storage address for storing the original image of downloading, to realize the recovery of original image.
According to the second aspect of an embodiment of the present disclosure, a kind of image processing apparatus is provided, is applied in terminal, described device It comprises determining that module, is configured as from the image being stored in the terminal, determine the original image of pending breviary processing Picture;Processing module is configured as the original image determined to the determining module and carries out breviary processing, obtains thumbnail; Replacement module is configured as the thumbnail obtained after processing module processing replacing the original image.
Optionally, the determining module, comprising: traversal submodule is configured as looping through and stores in the terminal The record of image includes at least the first Storage Item for storing original image storage address information in the record of each image, uses The second Storage Item in storage identification information and third Storage Item for storing thumbnail storage address information, the mark are believed Breath is after the original image is successfully backed up to Cloud Server, and that is distributed and fed back by the Cloud Server is used to take in the cloud The information of original image described in device end unique identification of being engaged in;Judging submodule is configured as traversing what submodule traversed for described The record of every image, when the second Storage Item in the record of reading is not that third Storage Item in the empty and described record is When empty, judge whether described image meets breviary condition;First determines submodule, is configured as determining when the judging submodule When described image meets the breviary condition, described image is determined as to the original image of pending breviary processing.
Optionally, the judging submodule, is also used to: reading the wide to pixel P of described imagewWith height to pixel Ph;Work as Pw ≥SwAnd Ph≥ShWhen, then determine that described image meets the breviary condition;Wherein, SwFor the wide to picture of the terminal screen Element, ShFor the high to pixel of the terminal screen.
Optionally, the processing module, comprising: the first computational submodule is configured as calculating PwWith SwRatio, obtain First ratio;Second computational submodule is configured as calculating PhWith ShRatio, obtain the second ratio;Second determines submodule, First ratio and second computational submodule for being configured as first computational submodule being calculated calculate To second ratio in the smallest ratio be determined as diminution ratio;Module is reduced, is configured as determining using described second The width to the original image and height reduce the diminution ratio that submodule determines respectively, obtain the original image Thumbnail.
Optionally, the replacement module, comprising: replacement submodule is configured as deleting the original image, by the breviary Figure is replaced the original image and is shown;Sub-module stored, the third being configured as in the record using the original image store Item stores the storage address of the thumbnail;Submodule is emptied, be configured as recording in recording the original image first is deposited Storage item is set to sky.
Optionally, described device further include: generation module is configured as when shooting obtains image, stores described image, A record is generated for described image;First memory module is configured as utilizing the first Storage Item storage institute in the record State the store path of image.
Optionally, described device further include: backup module is configured as that the figure being not backed up in the terminal will be stored in Picture backups to the Cloud Server;First obtains module, be configured as obtaining the Cloud Server feedback with described image pair The identification information answered, the identification information are used in the Cloud Server unique identification described image;Second memory module is matched The second Storage Item being set in the record using described image stores the identification information that the first acquisition module is got.
Optionally, the backup module, comprising: third determines submodule, is configured as looping through and scheme in the terminal Second Storage Item in record is that empty image is determined as the described image being not backed up by the record of picture;Backup submodule, is configured For the third is determined the described image being not backed up that submodule is determined, it is sent to the Cloud Server and is backed up.
Optionally, described device further include: the first display module is configured as working as institute when showing image according to record When the first Storage Item for stating in record is non-empty, shown and institute according to the store path of the original image of first Storage Item storage It states and records corresponding original image;Second display module is configured as when the third Storage Item in the record is non-empty, according to The store path of the thumbnail of the third Storage Item storage, which is shown, records corresponding thumbnail with described.
Optionally, described device further include: second obtains module, is configured as when showing thumbnail, obtains third and deposits The record of the store path of thumbnail described in Chu Xiangwei;Setup module is configured as obtaining what module was got described second When the first Storage Item is empty in the record, the original image downloading attribute of the thumbnail of display is positioned to allow for downloading;It covers Cover module is configured as reading the record when receiving the download instruction for being downloaded the original image of the thumbnail In identification information, have the original image of the identification information from Cloud Server downloading using the identification information, utilize The original image carries out covering to the local thumbnail and shows;Third memory module, being configured as will be in the record Third Storage Item is set to sky, and the store path of the original image is stored using the first Storage Item in the record.
According to the third aspect of an embodiment of the present disclosure, a kind of image processing apparatus is provided, is applied in terminal, described device Include:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to:
From the image being stored in the terminal, the original image of pending breviary processing is determined;
Breviary processing is carried out to the original image, obtains thumbnail;
The thumbnail is replaced into the original image.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and consistent with the instructions for explaining the principles of this disclosure.
Fig. 1 be according to exemplary partial implement a kind of image processing method for exemplifying involved in implementation environment signal Figure;
Fig. 2 is a kind of flow chart of image processing method shown according to an exemplary embodiment;
Fig. 3 A is a kind of flow chart of the image processing method shown according to another exemplary embodiment;
Fig. 3 B is a kind of image for being not backed up storage in the terminal shown according to an exemplary embodiment, is backuped to Flow chart when Cloud Server;
Fig. 3 C be it is shown according to an exemplary embodiment a kind of in traversal storage image in the terminal, determine into The flow chart when original image of row breviary processing;
Fig. 3 D is that a kind of terminal shown according to an exemplary embodiment judges stream when whether image meets breviary condition Cheng Tu;
Fig. 3 E is that one kind shown according to an exemplary embodiment carries out breviary processing to the original image, when obtaining thumbnail Flow chart;
Fig. 3 F is a kind of flow chart when the thumbnail to be replaced to the original image shown according to an exemplary embodiment;
Flow chart when Fig. 3 G is a kind of downloading shown according to an exemplary embodiment and shows original image;
The schematic diagram that interface is realized when Fig. 3 H is a kind of downloading original image shown according to an exemplary embodiment;
Fig. 4 is a kind of block diagram of image processing apparatus shown according to an exemplary embodiment;
Fig. 5 is a kind of block diagram of the image processing apparatus shown according to another exemplary embodiment;
Fig. 6 is a kind of block diagram of image processing apparatus shown according to another exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 be according to exemplary partial implement a kind of image processing method for exemplifying involved in implementation environment signal Figure, which may include terminal 110 and Cloud Server 120.
Terminal 110 has image viewing function, such as common smart phone, multimedia player, camera, camera shooting Machine, image viewer, smart television etc..
Terminal 110 can be connect by way of cable network or wireless network with Cloud Server 120.
Cloud Server 120 has cloud store function.Cloud Server 120 can be a server, be also possible to more The cluster of server.
Fig. 2 is a kind of flow chart of the image processing method shown according to an exemplary embodiment, as shown in Fig. 2, should Image processing method can be applied in the terminal 110 in implementation environment shown in Fig. 1, in the image processing method, including such as Lower step.
In step 201, the image of traversal storage in the terminal determines the original image of pending breviary processing.
In step 202, breviary processing is carried out to the original image, obtains thumbnail.
In step 203, which is replaced into the original image.
In conclusion image processing method provided in an embodiment of the present invention, passes through the image progress time to storing in terminal It goes through, determines the original image of pending breviary processing, replace original image to be shown using thumbnail;Due to can be automatically by terminal The original image of middle storage replaces with thumbnail, therefore solves in the related technology because requiring the irregular cloud for carrying out photo of user End storage and the manual cleaning in mobile phone space, the higher problem of operating cost;Reach that can use memory space lesser Thumbnail replaces original image to be shown, saves memory space, simplifies the effect of image displaying.
Fig. 3 A is a kind of flow chart of the image processing method shown according to another exemplary embodiment, as shown in Figure 3A, The image processing method can be applied in the terminal 110 in implementation environment shown in Fig. 1, in the image processing method, including Following steps.
In step 301, when shooting obtains image, the image is stored, generates a record for the image;Utilize the note The first Storage Item in record stores the store path of the image.
Terminal can be equipped with camera or the shooting unit for shooting image, terminal are shot using shooting unit To after image, which can be stored.Optionally, terminal can also get image in other way, and store These images got.
For the ease of to the display of the image and other processing, terminal is after storing image, the file management of terminal System can generate a record for the image.
In general, including at least the first storage for storing original image storage address information in the record of each image Item, the second Storage Item for storing identification information and the third Storage Item for storing thumbnail storage address information.
The identification information is to be distributed by Cloud Server after original image is successfully backed up to Cloud Server and that feeds back is used for The information of the cloud server end unique identification original image.
Obviously, the filename of image, characteristic information of image etc. can also be stored in the record of image.The file of file The characteristic information of name and image can uniquely represent an image.
After one image of terminal storage, the first Storage Item in the record using the image is needed to store depositing for the image Store up path, also will the store path of the image store into first Storage Item.
In step 302, image storage being not backed up in the terminal, backups to Cloud Server.
The resolution ratio of the image shot due to terminal may be relatively high, and high-resolution image then can occupied terminal Biggish memory space, therefore in order to reduce image to the excessive occupancy of memory space, need to carry out image breviary, and will figure The original image of picture backups to Cloud Server, in the case where preventing original image from losing, when being also convenient for user and wanting to check original image, It can be pulled from Cloud Server to original image, not influence user and original image is checked.
Here Cloud Server can be the Cloud Server 120 in implementation environment shown in Fig. 1.
Optionally, the image that storage is not backed up by terminal in the terminal, when backuping to Cloud Server, may refer to Fig. 3 B It is shown, include the following steps:
In step 302a, the record of image in the terminal is looped through, is empty image by the second Storage Item in record It is determined as the image being not backed up.
More image can be stored in terminal, and due to the shooting time of image difference, may in previous backup, The image having been taken when previous backup carried out cloud backup, and to the intermediate period of this backup after the previous backup, eventually End may also get other images, these images then may be not yet backed up at this time, therefore lead to some figures in terminal As being backed up to Cloud Server, some images are not yet backed up to Cloud Server.In response to this, terminal is standby in needs When part not yet backs up to the image of Cloud Server, the record of the image of storage can be traversed.
When terminal is by looping through the record of image in terminal, by the mark that is stored of the second Storage Item in record Information is that image is successfully backed up to Cloud Server by Cloud Server feedback, so if the second Storage Item in some record For non-empty, then generally indicate that original image corresponding to the record is successfully backed up to Cloud Server;And if some is recorded The second Storage Item be sky, then generally indicate that original image corresponding to the record is not yet successfully backed up to Cloud Server.Cause This, the second Storage Item in record can be that empty image is determined as the image being not backed up by terminal.
In step 302b, the image that will be not backed up is sent to Cloud Server and is backed up.
Terminal when being sent to Cloud Server and being backed up, can individually send an image extremely in the image that will be not backed up Cloud Server is sent to Cloud Server after can also being packaged multiple images.
Optionally, terminal can provide account corresponding with the terminal iidentification, the account usually require Cloud Server into Row backs up, and the image in the terminal can be backed up in Cloud Server in the database of the account.
Optionally, terminal can also install some cloud storage application, and apply corresponding Cloud Server in the cloud storage Middle progress successful registration obtains a legal account, which applies after the logged legal account, and user can pass through Backup image in terminal to the cloud storage is applied corresponding Cloud Server by the legal account, which can be by legal account Number image that backs up of needs sent is stored into database corresponding to the legal account.
In step 303, the identification information corresponding with the image for obtaining Cloud Server feedback, utilizes the record of the image In the second Storage Item store the identification information.
Cloud Server can generate an identification information, the mark after the image for successfully storing some backup for the image Know information and is used for unique identification image on Cloud Server.That is, different images has different marks on Cloud Server Know information.
Cloud Server can feed back the identification information to terminal after generating identification information for the image of backup.Terminal is connecing After receiving the identification information, the identification information is stored using the second Storage Item in the record of the image, it also will mark letter Breath stores in the second Storage Item into the record of the image.
In step 304, the image of traversal storage in the terminal determines the original image of pending breviary processing.
Terminal can use third in the record of image when whether determine image is the original image of pending breviary processing Storage Item is determined.
Optionally, image of the terminal in traversal storage in the terminal can when determining the original image of pending breviary processing To include the following steps: referring to shown in Fig. 3 C
In step 304a, the record of the image stored in terminal is looped through.
The second Storage Item in step 304b, for the record of the every image traversed, in the record of reading Be not empty and the record in third Storage Item when being sky, judge whether the image meets breviary condition.
When the second Storage Item in record be not it is empty, show that second Storage Item is stored with identification information namely the record The original image of corresponding image is successfully backed up;When the third Storage Item in record be sky, show the third Storage Item Be not stored with thumbnail storage address namely the record corresponding to image be not thumbnail, at this point, then can should Recording corresponding spectral discrimination is to have carried out the original image of backup in Cloud Server.
And in order to guarantee that the image after reducing is still able to the screen full of terminal, to avoid user is influenced to image just It often watches, only sufficiently wide to width in the embodiment of the present disclosure and sufficiently high image of height carries out breviary processing.
Optionally, it when terminal judges whether image meets breviary condition, may refer to shown in Fig. 3 D, may include walking as follows It is rapid:
In step 304b1, the wide to pixel P of the image is readwWith height to pixel Ph
In one possible implementation, terminal can read the attribute of image, to obtain the wide to pixel P of imagew With height to pixel Ph
Optionally, the attribute that can store image in record, when recording corresponding image is original image, meeting in the record Store the attribute of the original image.Optionally, after original image is replaced by thumbnail, the attribute of the original image in the record can be by It deletes, or may alternatively be the attribute of thumbnail.
Optionally, terminal can bind the attribute of record and image, when the third Storage Item in record is empty, Attribute with record binding is the attribute of corresponding original image;When the third Storage Item in record is non-empty, with the note The attribute for recording binding can be then sky, or the attribute of corresponding thumbnail.
In step 304b2, work as Pw≥SwAnd Ph≥ShWhen, then determine that the image meets breviary condition.
Wherein, SwFor the wide to pixel, S of terminal screenhFor the high to pixel of terminal screen.
By step 304b1 and step 304b2 it is found that width can be wider than the width of terminal screen by terminal, and height is high In the image of terminal screen height, it is determined as meeting the image of breviary condition.
In step 304c, when the image meets breviary condition, which is determined as to the original of pending breviary processing Image.
It, can be true by the image when image is the original image backed up in Cloud Server, and image meets breviary condition It is set to the original image of pending breviary processing.
In step 305, breviary processing is carried out to the original image, obtains thumbnail.
Terminal is carrying out breviary processing to the original image, may include at least the following two kinds mode when obtaining thumbnail:
In the first way, terminal extracts in original image when carrying out breviary processing to original image according to predetermined way Pixel line, obtain thumbnail.Such as it can be every predetermined one pixel line of pixel line extraction.Terminal needs leniently to take out upwards Pixel line is taken, pixel line can also be drawn up from height.
In the second way, terminal can also directly reduce original image in wide upward and/or height upwards, obtain Thumbnail.
In order to not only can guarantee that original image can be reduced as much as possible, but also it can guarantee the image after breviary not and influence user's Normal viewing, or user is not allowed to perceive image by breviary, terminal carries out breviary processing to the original image, when obtaining thumbnail, It may refer to may include steps of shown in Fig. 3 E:
In step 305a, P is calculatedwWith SwRatio, obtain the first ratio.
In step 305b, P is calculatedhWith ShRatio, obtain the second ratio.
In step 305c, the smallest ratio in the first ratio and the second ratio is determined as diminution ratio.
In step 305d, the width of the original image and height are reduced respectively using diminution ratio, are somebody's turn to do The thumbnail of original image.
By each step in Fig. 3 E, after last breviary, one of the height of image or width by breviary to screen The corresponding side of curtain is identical, the height of image or another big by side more corresponding than screen after breviary in width.
Within step 306, which is replaced into the original image.
After obtaining thumbnail, terminal then can use the thumbnail and be shown instead of original image.
In order to avoid original image continues the occupancy to memory space, and it can allow the file management system of terminal that can hit To the thumbnail, when which is replaced the original image by terminal, may refer to may include steps of shown in Fig. 3 F:
In step 306a, the original image is deleted, which is replaced into the original image and is shown.
Terminal deletes the original image from the storage address for storing the original image, and generates a storage ground for the thumbnail Location, will be in the storage address of the thumbnail storage to the generation.
In step 306b, the storage address of the thumbnail is stored using the third Storage Item in the record of the original image.
Since terminal has been that the thumbnail generates a storage address, and the file management system of subsequent terminal needs The thumbnail can just be found according to the storage address of the thumbnail of the generation to be shown, therefore, terminal needs to utilize the original Third Storage Item in the record of image stores the storage address of the thumbnail, namely deposits in third Storage Item in this record Store up the address of the thumbnail.
In step 306c, the first Storage Item recorded in original image record is set to sky.
Since original image is deleted, terminal according to the storage address of the original image stored in the record of the original image, Corresponding original image will not be hit, in order to avoid read error occurs in the file management system of terminal, terminal is needed the note The first Storage Item recorded in record is set to sky.
In step 307, when showing image according to record, when the first Storage Item in the record is non-empty, according to The store path of the original image of first Storage Item storage, which is shown, records corresponding original image with this.
Terminal, if the first Storage Item in record is non-empty, generally indicates that the record when showing image according to record Corresponding original image is not yet deleted, also this means that not yet breviary is carried out to the original image, this is because breviary obtains breviary After figure, the storage address of original image in original image and record will be deleted, can then be stored at this time according to first Storage Item The store path of original image, which is shown, records corresponding original image with this.
In step 308, when showing image according to record, when the third Storage Item in the record is non-empty, according to The store path of the thumbnail of third Storage Item storage, which is shown, records corresponding thumbnail with this.
Terminal, if the third Storage Item in record is non-empty, generally indicates that the record when showing image according to record Corresponding thumbnail has generated, and the store path for the thumbnail that can be then stored at this time according to third Storage Item is shown and the note Record corresponding thumbnail.
The file management system of all or part through the above steps, terminal realizes in picture library, utilizes breviary Replacement of the figure to original image.
In conclusion image processing method provided in an embodiment of the present invention, passes through the image progress time to storing in terminal It goes through, determines the original image of pending breviary processing, replace original image to be shown using thumbnail;Due to can be automatically by terminal The original image of middle storage replaces with thumbnail, therefore solves in the related technology because requiring the irregular cloud for carrying out photo of user End storage and the manual cleaning in mobile phone space, the higher problem of operating cost;Reach that can use memory space lesser Thumbnail replaces original image to be shown, saves memory space, simplifies the effect of image displaying.
By being used to store the second Storage Item of identification information and for storing thumbnail storage in image recording The third Storage Item of location information determines that image meets pending breviary condition, when the second Storage Item is non-empty and third Storage Item When for sky, show that the image has been backed up but had not yet carried out breviary processing, therefore the image can be determined as pending The original image of breviary processing;Due to the record by image, can quickly and accurately determine whether image is pending breviary processing Original image, improve the efficiency and accuracy of judgement.
By the way that width to be greater than to the width of terminal screen, and height is greater than the image of the width of terminal screen, is determined as full The image of sufficient breviary condition, since the image of this feature is after carrying out scaled down, can by width or height compared with Small one be contracted to corresponding with screen side it is identical when, avoid biggish one distortion when reducing in width or height, protect The display effect of thumbnail is demonstrate,proved.
By the way that the smallest ratio in the first ratio and the second ratio is determined as diminution ratio, distinguished using the diminution ratio It, can be under the premise of reducing as far as possible when width and height to original image reduce, thumbnail is still able to take end The entire screen at end, for user, the thumbnail and original image viewed does not have difference.
By deleting the original image when replacing original image using thumbnail, and by the in the corresponding record of the image One Storage Item empties, using the storage address of the third Storage Item storage thumbnail in record, so that in the follow-up process It can determine that the record, and can be to the breviary there is only there is corresponding thumbnail according to the first Storage Item and third Storage Item Figure is shown.
By generating a record for the image, and utilize the first storage in record when shooting obtains an image Item stores the store path of the image, shows the image so that the file management system in terminal can use the record.
By storing identification information in the record of image, in order to the mark stored in later use second Storage Item Information determines that this records whether corresponding image had been backed up.
When by the first Storage Item in record being non-empty, judgement records corresponding image as original image, at this time then can be with The original image is shown according to the store path in the first Storage Item, when third Storage Item is non-empty in record, determines record Corresponding image is thumbnail, then can show the thumbnail according to the store path in third Storage Item at this time;Due to generating After thumbnail, in order to reduce memory space, original image would generally be directly deleted, therefore can not determine whether original image is standby Part, or can not also determine whether for thumbnail, and by the second Storage Item and third Storage Item in record, according to record When showing image, it can also quickly determine to record whether corresponding image is successfully backed up, can also quickly determine to record Whether corresponding image is thumbnail.
It should be added that in actual implementation, one embodiment may include all steps of above-mentioned Fig. 3 A- Fig. 3 F Rapid or part steps, and step is not limited to above-mentioned sequence.
After showing thumbnail, if user wants to check original image, it can also be provided for user and check specified breviary The function of the original image of figure may refer to the description such as Fig. 3 G.
Fig. 3 G is a kind of flow chart of image procossing shown according to an exemplary embodiment, be may include steps of.
In a step 309, when showing thumbnail, the record for the store path that third Storage Item is the thumbnail is obtained.
Since third Storage Item is used to store the store path of thumbnail, when third Storage Item is non-empty, showing can be with According to the thumbnail of the store path hit in third Storage Item to storage, therefore terminal is needing to show thumbnail according to record When, obtain the record for the store path that third Storage Item in the record is the thumbnail.
In the step 310, when the first Storage Item is empty in this record, the original image of the thumbnail of display is downloaded into attribute It is positioned to allow for downloading.
When the first Storage Item is empty in this record, terminal can be shown according to the store path in the third Storage Item Thumbnail, and the function of checking original image can be then provided at this time for the thumbnail, the original image for the thumbnail that will also show Downloading attribute is positioned to allow for downloading.
When the original image of the thumbnail of display downloading attribute is arranged to allow to download, user, which can grow, triggers the thumbnail Or the downloading control shown on triggering thumbnail, to select to download the original image of the thumbnail.
It refers to shown in Fig. 3 H, interface is realized when being a kind of downloading original image shown according to an exemplary embodiment Schematic diagram, in Fig. 3 H, user can set out more controls 32 to transfer more operational controls, including under downloading original Control 34 is carried, user then triggers the process downloaded from Cloud Server when triggering the downloading control 34.It is checked for the ease of user Download progress can show the download progress of original image after starting downloading on interface, such as the download progress instruction 36 in Fig. 3 H. In actual implementation, it can be carried out at transparency in Fig. 3 H for interface when showing region and the downloading original image of control Reason.
The present embodiment is to the showing interface and mode of triggering downloading original image without limiting.
In step 311, when the download instruction that the original image received to the thumbnail is downloaded, the record is read In identification information, have the original image of the identification information from Cloud Server downloading using the identification information, utilize the original image It is shown as carrying out covering to the local thumbnail.
User can grow trigger the thumbnail perhaps trigger the downloading control shown on thumbnail or user according to terminal After relevant to the downloading operation provided is operated, terminal, which then can receive, is downloaded the original image of the thumbnail Download instruction, at this point, terminal can then read the identification information in the thumbnail corresponding record, using the identification information from the cloud Server downloads the original image for having the identification information, carries out covering to the local thumbnail using the original image and shows.
In step 312, the third Storage Item in the record is set to sky, is stored using the first Storage Item in the record The store path of the original image.
After being successfully downloaded to original image from Cloud Server, show that user has the demand for checking original image, at this time terminal The thumbnail can be then deleted, the third Storage Item in the record is set to sky, and deposit using the first Storage Item in the record Store up the store path of the original image.
In subsequent process, the opportunity that terminal can also be backed up in needs traverses the third Storage Item in the record for sky, so After determine that this records corresponding image as original image, and further determine whether to the original image carry out breviary processing, Ye Jiji It is continuous to execute step 304 and subsequent step.
In conclusion image processing method provided in an embodiment of the present invention, by determining to record corresponding image for contracting When sketch map, the thumbnail that display is arranged allows to download original image, and supports to be downloaded backup in the original image of Cloud Server, After the completion of downloading to original image, then the third Storage Item of corresponding record can be set to sky, and first using record is deposited The storage address for storing up the original image of item storage downloading, to realize the recovery of original image.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 4 is a kind of block diagram of image processing apparatus shown according to an exemplary embodiment, as shown in figure 4, the image Processing unit is applied in the terminal 110 in implementation environment shown in Fig. 1, which includes but is not limited to: determining mould Block 401, processing module 402 and replacement module 403.
The determining module 401 can be configured as from the image stored in the terminal, determine at pending breviary The original image of reason;
The processing module 402, which can be configured as, carries out breviary processing to the original image that the determining module 401 is determined, Obtain thumbnail;
The replacement module 403, which can be configured as, replaces the original for the thumbnail obtained after the processing of the processing module 402 Image.
In conclusion image processing apparatus provided in an embodiment of the present invention, passes through the image progress time to storing in terminal It goes through, determines the original image of pending breviary processing, replace original image to be shown using thumbnail;Due to can be automatically by terminal The original image of middle storage replaces with thumbnail, therefore solves in the related technology because requiring the irregular cloud for carrying out photo of user End storage and the manual cleaning in mobile phone space, the higher problem of operating cost;Reach that can use memory space lesser Thumbnail replaces original image to be shown, saves memory space, simplifies the effect of image displaying.
Fig. 5 is a kind of block diagram of the image processing apparatus shown according to another exemplary embodiment, as shown in figure 5, the figure It is applied in the terminal 110 in implementation environment shown in Fig. 1 as processing unit, which includes but is not limited to: determines Module 501, processing module 502 and replacement module 503.
The determining module 501 can be configured as from the image stored in the terminal, determine pending breviary processing Original image.
Terminal can use third in the record of image when whether determine image is the original image of pending breviary processing Storage Item is determined.
In general, including at least the first storage for storing original image storage address information in the record of each image Item, the second Storage Item for storing identification information and the third Storage Item for storing thumbnail storage address information.
The identification information is to be distributed by Cloud Server after original image is successfully backed up to Cloud Server and that feeds back is used for The information of the cloud server end unique identification original image.
Obviously, the filename of image, characteristic information of image etc. can also be stored in the record of image.The file of file The characteristic information of name and image can uniquely represent an image.
The processing module 502, which can be configured as, carries out breviary processing to the original image that determining module 501 is determined, obtains Thumbnail.
Terminal is carrying out breviary processing to the original image, may include at least the following two kinds mode when obtaining thumbnail:
In the first way, terminal extracts in original image when carrying out breviary processing to original image according to predetermined way Pixel line, obtain thumbnail.Such as it can be every predetermined one pixel line of pixel line extraction.Terminal needs leniently to take out upwards Pixel line is taken, pixel line can also be drawn up from height.
In the second way, terminal can also directly reduce original image in wide upward and/or height upwards, obtain Thumbnail.
The replacement module 503, which can be configured as, replaces original image for the thumbnail obtained after the processing of processing module 502.? After obtaining thumbnail, terminal then can use the thumbnail and be shown instead of original image.
In one possible implementation, determining module 501 may include: traversal submodule 501a, judging submodule 501b and first determines submodule 501c.
Traversal submodule 501a can be configured as the record for looping through the image stored in terminal;
Judging submodule 501b can be configured as the record for the traversal submodule 501a every image traversed, When the second Storage Item in the record of reading be not empty and the record in third Storage Item be sky when, judge whether the image full Sufficient breviary condition.
When the second Storage Item in record be not it is empty, show that second Storage Item is stored with identification information namely the record The original image of corresponding image is successfully backed up;When the third Storage Item in record be sky, show the third Storage Item Be not stored with thumbnail storage address namely the record corresponding to image be not thumbnail, at this point, then can should Recording corresponding spectral discrimination is to have carried out the original image of backup in Cloud Server.
And in order to guarantee that the image after reducing is still able to the screen full of terminal, to avoid user is influenced to image just It often watches, only sufficiently wide to width in the embodiment of the present disclosure and sufficiently high image of height carries out breviary processing.
The first determining submodule 501c can be configured as when judging submodule 501b determines that the image meets breviary item When part, which is determined as to the original image of pending breviary processing.
In one possible implementation, judging submodule 501b, is also used to: reading the wide to pixel P of the imagew With height to pixel Ph;Work as Pw≥SwAnd Ph≥ShWhen, then determine that the image meets breviary condition;Wherein, SwFor terminal screen Width is to pixel, ShFor the high to pixel of terminal screen.
In one possible implementation, it in order to not only can guarantee that original image can be reduced as much as possible, but also can guarantee Image after breviary does not influence the normal viewing of user, or user is not allowed to perceive image by breviary, terminal to the original image into The processing of row breviary, when obtaining thumbnail, processing module 502 may include: the first computational submodule 502a, the second computational submodule 502b, second determine submodule 502c and reduce module 502d.
First computational submodule 502a, which can be configured as, calculates PwWith SwRatio, obtain the first ratio;
Second computational submodule 502b, which can be configured as, calculates PhWith ShRatio, obtain the second ratio;
The second determining submodule 502c can be configured as the first ratio that the first computational submodule 502a is calculated The smallest ratio is determined as diminution ratio in the second ratio that value and the second computational submodule 502b are calculated;
It is right respectively that diminution module 502d can be configured as the diminution ratio for determining that submodule 502c is determined using second The width and height of the original image are reduced, and the thumbnail of the original image is obtained.
In one possible implementation, in order to avoid original image continues the occupancy to memory space, and end can be allowed The file management system at end can hit the thumbnail, and when which is replaced the original image by terminal, replacement module 503 can To include: replacement submodule 503a, sub-module stored 503b and empty submodule 503c.
Replacement submodule 503a can be configured as deletion original image, and thumbnail is replaced the original image and is shown.
Terminal deletes the original image from the storage address for storing the original image, and generates a storage ground for the thumbnail Location, will be in the storage address of the thumbnail storage to the generation.
The third Storage Item that sub-module stored 503b can be configured as in the record using the original image stores the contracting The storage address of sketch map.
Since terminal has been that the thumbnail generates a storage address, and the file management system of subsequent terminal needs The thumbnail can just be found according to the storage address of the thumbnail of the generation to be shown, therefore, terminal needs to utilize the original Third Storage Item in the record of image stores the storage address of the thumbnail, namely deposits in third Storage Item in this record Store up the address of the thumbnail.
This, which empties submodule 503c and can be configured as, is set to sky for the first Storage Item for recording in original image record.
Since original image is deleted, terminal according to the storage address of the original image stored in the record of the original image, Corresponding original image will not be hit, in order to avoid read error occurs in the file management system of terminal, terminal is needed the note The first Storage Item recorded in record is set to sky.
In one possible implementation, which can also include generation module 504 and the first storage Module 505.
The generation module 504 can be configured as when shooting obtains image, store the image, generate one for the image Record.
First memory module 505 can be configured as the first Storage Item in the record generated using generation module 504 Store the store path of the image.
Terminal can be equipped with camera or the shooting unit for shooting image, terminal are shot using shooting unit To after image, which can be stored.
For the ease of to the display of the image and other processing, terminal is after storing image, the file management of terminal System can generate a record for the image.
After one image of terminal storage, the first Storage Item in the record using the image is needed to store depositing for the image Store up path, also will the store path of the image store into first Storage Item.
In one possible implementation, which can also include: that backup module 506, first obtains Module 507 and the second memory module 508.
The backup module 506 can be configured as the image for being not backed up storage in the terminal, backup to Cloud Server.
The resolution ratio of the image shot due to terminal may be relatively high, and high-resolution image then can occupied terminal Biggish memory space, therefore in order to reduce image to the excessive occupancy of memory space, need to carry out image breviary, and will figure The original image of picture backups to Cloud Server, in the case where preventing original image from losing, when being also convenient for user and wanting to check original image, It can be pulled from Cloud Server to original image, not influence user and original image is checked.
The first acquisition module 507 can be configured as mark corresponding with the image letter for obtaining Cloud Server feedback Breath.
Second memory module 508 can be configured as the storage of the second Storage Item in the record using the image first and obtain The identification information that modulus block 507 is got.
Cloud Server can generate an identification information, the mark after the image for successfully storing some backup for the image Know information and is used for unique identification image on Cloud Server.That is, different images has different marks on Cloud Server Know information.
Cloud Server can feed back the identification information to terminal after generating identification information for the image of backup.Terminal is connecing After receiving the identification information, the identification information is stored using the second Storage Item in the record of the image, it also will mark letter Breath stores in the second Storage Item into the record of the image.
In one possible implementation, backup module 506 may include: that third determines submodule 506a and backup Module 506b.
The third determines that submodule 506a can be configured as the record for looping through image in the terminal, by record the Two Storage Items are that empty image is determined as the image being not backed up.
More image can be stored in terminal, and due to the shooting time of image difference, may in previous backup, The image having been taken when previous backup carried out cloud backup, and to the intermediate period of this backup after the previous backup, eventually End may also get other images, these images then may be not yet backed up at this time, therefore lead to some figures in terminal As being backed up to Cloud Server, some images are not yet backed up to Cloud Server.In response to this, terminal is standby in needs When part not yet backs up to the image of Cloud Server, the record of the image of storage can be traversed.
When terminal is by looping through the record of image in terminal, by the mark that is stored of the second Storage Item in record Information is that image is successfully backed up to Cloud Server by Cloud Server feedback, so if the second Storage Item in some record For non-empty, then generally indicate that original image corresponding to the record is successfully backed up to Cloud Server;And if some is recorded The second Storage Item be sky, then generally indicate that original image corresponding to the record is not yet successfully backed up to Cloud Server.Cause This, the second Storage Item in record can be that empty image is determined as the image being not backed up by terminal.
Backup submodule 506b, which can be configured as, determines figure being not backed up that submodule 506a is determined for third Picture is sent to the Cloud Server and is backed up.
Terminal when being sent to Cloud Server and being backed up, can individually send an image extremely in the image that will be not backed up Cloud Server is sent to Cloud Server after can also being packaged multiple images.
Optionally, terminal can provide account corresponding with the terminal iidentification, the account usually require Cloud Server into Row backs up, and the image in the terminal can be backed up in Cloud Server in the database of the account.
Optionally, terminal can also install some cloud storage application, and apply corresponding Cloud Server in the cloud storage Middle progress successful registration obtains a legal account, which applies after the logged legal account, and user can pass through Backup image in terminal to the cloud storage is applied corresponding Cloud Server by the legal account, which can be by legal account Number image that backs up of needs sent is stored into database corresponding to the legal account.
In one possible implementation, which can also include: the first display module 509 or the second Display module 510.
First display module 509 can be configured as when showing image according to record, when first in the record is deposited When Chu Xiangwei non-empty, is shown according to the store path of the original image of the first Storage Item storage and record corresponding original image with this.
Terminal, if the first Storage Item in record is non-empty, generally indicates that the record when showing image according to record Corresponding original image is not yet deleted, also this means that not yet breviary is carried out to the original image, this is because breviary obtains breviary After figure, the storage address of original image in original image and record will be deleted, can then be stored at this time according to first Storage Item The store path of original image, which is shown, records corresponding original image with this.
Second display module 510 can be configured as when the third Storage Item in the record is non-empty, according to third The store path of the thumbnail of Storage Item storage, which is shown, records corresponding thumbnail with this.
Terminal, if the third Storage Item in record is non-empty, generally indicates that the record when showing image according to record Corresponding thumbnail has generated, and the store path for the thumbnail that can be then stored at this time according to third Storage Item is shown and the note Record corresponding thumbnail.
The file management system of all or part through the above steps, terminal realizes in picture library, utilizes breviary Replacement of the figure to original image.
In one possible implementation, which can also include: the second acquisition module 511, setting Module 512, overlay module 513 and third memory module 514.
The second acquisition module 511 can be configured as when showing thumbnail, and acquisition third Storage Item is the thumbnail Store path record.
Since third Storage Item is used to store the store path of thumbnail, when third Storage Item is non-empty, showing can be with According to the thumbnail of the store path hit in third Storage Item to storage, therefore terminal is needing to show thumbnail according to record When, obtain the record for the store path that third Storage Item in the record is the thumbnail.
The setup module 512 can be configured as the first Storage Item in the record that the second acquisition module 511 is got When for sky, the original image downloading attribute of the thumbnail of display is positioned to allow for downloading.
When the first Storage Item is empty in this record, terminal can be shown according to the store path in the third Storage Item Thumbnail, and the function of checking original image can be then provided at this time for the thumbnail, the original image for the thumbnail that will also show Downloading attribute is positioned to allow for downloading.
When the original image of the thumbnail of display downloading attribute is arranged to allow to download, user, which can grow, triggers the thumbnail Or the downloading control shown on triggering thumbnail, to select to download the original image of the thumbnail.
The overlay module 513, which can be configured as to work as, receives the download instruction being downloaded to the original image of the thumbnail When, the identification information in the record is read, has the original image of the identification information from Cloud Server downloading using the identification information Picture carries out covering to the local thumbnail using the original image and shows.
User can grow trigger the thumbnail perhaps trigger the downloading control shown on thumbnail or user according to terminal After relevant to the downloading operation provided is operated, terminal, which then can receive, is downloaded the original image of the thumbnail Download instruction, at this point, terminal can then read the identification information in the thumbnail corresponding record, using the identification information from the cloud Server downloads the original image for having the identification information, carries out covering to the local thumbnail using the original image and shows.
The third memory module 514, which can be configured as, is set to sky for the third Storage Item in the record, utilizes the record In the first Storage Item store the store path of the original image.
After being successfully downloaded to original image from Cloud Server, show that user has the demand for checking original image, at this time terminal The thumbnail can be then deleted, the third Storage Item in the record is set to sky, and deposit using the first Storage Item in the record Store up the store path of the original image.
In subsequent process, the opportunity that terminal can also be backed up in needs traverses the third Storage Item in the record for sky, so After determine that this records corresponding image as original image, and further determine whether to the original image carry out breviary processing.
In conclusion image processing apparatus provided in an embodiment of the present invention, passes through the image progress time to storing in terminal It goes through, determines the original image of pending breviary processing, replace original image to be shown using thumbnail;Due to can be automatically by terminal The original image of middle storage replaces with thumbnail, therefore solves in the related technology because requiring the irregular cloud for carrying out photo of user End storage and the manual cleaning in mobile phone space, the higher problem of operating cost;Reach that can use memory space lesser Thumbnail replaces original image to be shown, saves memory space, simplifies the effect of image displaying.
By being used to store the second Storage Item of identification information and for storing thumbnail storage in image recording The third Storage Item of location information determines that image meets pending breviary condition, when the second Storage Item is non-empty and third Storage Item When for sky, show that the image has been backed up but had not yet carried out breviary processing, therefore the image can be determined as pending The original image of breviary processing;Due to the record by image, can quickly and accurately determine whether image is pending breviary processing Original image, improve the efficiency and accuracy of judgement.
By the way that width to be greater than to the width of terminal screen, and height is greater than the image of the width of terminal screen, is determined as full The image of sufficient breviary condition, since the image of this feature is after carrying out scaled down, can by width or height compared with Small one be contracted to corresponding with screen side it is identical when, avoid biggish one distortion when reducing in width or height, protect The display effect of thumbnail is demonstrate,proved.
By the way that the smallest ratio in the first ratio and the second ratio is determined as diminution ratio, distinguished using the diminution ratio It, can be under the premise of reducing as far as possible when width and height to original image reduce, thumbnail is still able to take end The entire screen at end, for user, the thumbnail and original image viewed does not have difference.
By deleting the original image when replacing original image using thumbnail, and by the in the corresponding record of the image One Storage Item empties, using the storage address of the third Storage Item storage thumbnail in record, so that in the follow-up process It can determine that the record, and can be to the breviary there is only there is corresponding thumbnail according to the first Storage Item and third Storage Item Figure is shown.
By generating a record for the image, and utilize the first storage in record when shooting obtains an image Item stores the store path of the image, shows the image so that the file management system in terminal can use the record.
By storing identification information in the record of image, in order to the mark stored in later use second Storage Item Information determines that this records whether corresponding image had been backed up.
When by the first Storage Item in record being non-empty, judgement records corresponding image as original image, at this time then can be with The original image is shown according to the store path in the first Storage Item, when third Storage Item is non-empty in record, determines record Corresponding image is thumbnail, then can show the thumbnail according to the store path in third Storage Item at this time;Due to generating After thumbnail, in order to reduce memory space, original image would generally be directly deleted, therefore can not determine whether original image is standby Part, or can not also determine whether for thumbnail, and by the second Storage Item and third Storage Item in record, according to record When showing image, it can also quickly determine to record whether corresponding image is successfully backed up, can also quickly determine to record Whether corresponding image is thumbnail.
Thumbnail by the way that display when determining to record corresponding image for thumbnail, is arranged allows to download original image, and It supports to be downloaded backup in the original image of Cloud Server, it, then can be by corresponding record after the completion of being downloaded to original image Third Storage Item be set to sky, and the storage address of the original image using the storage downloading of the first Storage Item of record, to realize The recovery of original image.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
An exemplary embodiment of the present disclosure provides a kind of image processing apparatus, at the image that disclosure offer is provided Reason method, the image processing apparatus include: processor, for the memory of storage processor executable instruction;
Wherein, processor is configured as:
The image of traversal storage in the terminal determines the original image of pending breviary processing;
Breviary processing is carried out to the original image, obtains thumbnail;
The thumbnail is replaced into the original image.
Fig. 6 is a kind of block diagram of image processing apparatus shown according to another exemplary embodiment.For example, device 600 can It can also be meter to be the terminal that there is image to show function, such as smart phone, camera, video camera, multimedia player Calculation machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, individual digital Assistant etc..
Referring to Fig. 6, device 600 may include following one or more components: processing component 602, memory 604, power supply Component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor module 614, Yi Jitong Believe component 616.
The integrated operation of the usual control device 600 of processing component 602, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 602 may include that one or more processors 618 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 602 may include one or more modules, just Interaction between processing component 602 and other assemblies.For example, processing component 602 may include multi-media module, it is more to facilitate Interaction between media component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in device 600.These data are shown Example includes the instruction of any application or method for operating on device 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 606 provides electric power for the various assemblies of device 600.Power supply module 606 may include power management system System, one or more power supplys and other with for device 600 generate, manage, and distribute the associated component of electric power.
Multimedia component 608 includes the screen of one output interface of offer between device 600 and user.In some realities It applies in example, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch screen, to receive input signal from the user.Touch panel include one or more touch sensors with Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detect duration and pressure relevant to touch or slide.In some embodiments, multimedia component 608 includes One front camera and/or rear camera.It is such as in a shooting mode or a video mode, preceding when device 600 is in operation mode It sets camera and/or rear camera can receive external multi-medium data.Each front camera and rear camera can Be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 610 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike Wind (MIC), when device 600 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 604 or via communication set Part 616 is sent.In some embodiments, audio component 610 further includes a loudspeaker, is used for output audio signal.
I/O interface 612 provides interface between processing component 602 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 614 includes one or more sensors, and the state for providing various aspects for device 600 is commented Estimate.For example, sensor module 614 can detecte the state that opens/closes of device 600, the relative positioning of component, such as component For the display and keypad of device 600, sensor module 614 can be with the position of 600 1 components of detection device 600 or device Set change, the existence or non-existence that user contacts with device 600, the temperature in 600 orientation of device or acceleration/deceleration and device 600 Variation.Sensor module 614 may include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor module 614 can also include optical sensor, such as CMOS or ccd image sensor, for answering in imaging With middle use.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, such as Wi-Fi, 2G or 3G or their combination.In an exemplary reality It applies in example, communication component 616 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channel Breath.In one exemplary embodiment, communication component 616 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 600 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned weight acquisition of information side Method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 604 of instruction, above-metioned instruction can be executed by the processor 618 of device 600 and be obtained with completing above-mentioned weight information Take method.For example, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic Band, floppy disk and optical data storage devices etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (19)

1. a kind of image processing method, which is characterized in that be applied in terminal, which comprises
The image being stored in the terminal is traversed, determines the original image of pending breviary processing;
Breviary processing is carried out to the original image, obtains thumbnail;
The thumbnail is replaced into the original image;
Wherein, described to traverse the image being stored in the terminal, determine the original image of pending breviary processing, comprising:
The record of the image stored in the terminal is looped through, is included at least in the record of each image for storing original image First Storage Item of storage address information, the second Storage Item for storing identification information and for storing thumbnail storage address The third Storage Item of information, the identification information are after the original image is successfully backed up to Cloud Server, by the cloud service The information for the original image described in the cloud server end unique identification that device is distributed and fed back;
For the record of the every image traversed, when the second Storage Item in the record of reading is not the empty and described record In third Storage Item when being empty, judge whether described image meets breviary condition;
When described image meets the breviary condition, described image is determined as to the original image of pending breviary processing.
2. judging whether described image meets breviary condition the method according to claim 1, wherein described, wrap It includes:
Read the wide to pixel P of described imagewWith height to pixel Ph
Work as Pw≥SwAnd Ph≥ShWhen, then determine that described image meets the breviary condition;
Wherein, SwFor the wide to pixel, S of the terminal screenhFor the high to pixel of the terminal screen.
3. according to the method described in claim 2, it is characterized in that, it is described to the original image carry out breviary processing, contracted Sketch map, comprising:
Calculate PwWith SwRatio, obtain the first ratio;
Calculate PhWith ShRatio, obtain the second ratio;
The smallest ratio in first ratio and second ratio is determined as diminution ratio;
Using the diminution ratio, the width to the original image and height reduce respectively, obtain the contracting of the original image Sketch map.
4. the method according to claim 1, wherein described replace the original image for the thumbnail, comprising:
The original image is deleted, the thumbnail is replaced into the original image and is shown;
The storage address of the thumbnail is stored using the third Storage Item in the record of the original image;
The first Storage Item recorded in original image record is set to sky.
5. the method according to claim 1, wherein the method also includes:
When shooting obtains image, described image is stored, generates a record for described image;
Utilize the store path of the first Storage Item storage described image in the record.
6. the method according to claim 1, wherein the method also includes:
It will be stored in the image being not backed up in the terminal, backups to the Cloud Server;
The identification information corresponding to the image of the Cloud Server feedback is obtained, the identification information is used to take in the cloud Business device unique identification described image;
The identification information is stored using the second Storage Item in the record of described image.
7. according to the method described in claim 6, it is characterized in that, described will be stored in the image being not backed up in the terminal, Backup to the Cloud Server, comprising:
Second Storage Item in record is determined as the institute being not backed up for empty image by the record for looping through image in the terminal State image;
The described image that will be not backed up is sent to the Cloud Server and is backed up.
8. the method according to claim 1, wherein the method also includes:
When showing image according to record, when the first Storage Item in the record is non-empty, according to first Storage Item The store path of the original image of storage, which is shown, records corresponding original image with described;
When the third Storage Item in the record is non-empty, according to the store path of the thumbnail of third Storage Item storage Display records corresponding thumbnail with described.
9. according to the method any in claim 2 to 8, which is characterized in that the method also includes:
When showing thumbnail, the record for the store path that third Storage Item is the thumbnail is obtained;
When the first Storage Item is empty in the record, the original image downloading attribute of the thumbnail of display is positioned to allow for down It carries;
When receiving the download instruction being downloaded to the original image of the thumbnail, the mark letter in the record is read Breath has the original image of the identification information from Cloud Server downloading using the identification information, utilizes the original image Covering is carried out to the local thumbnail to show;
Third Storage Item in the record is set to sky, stores the original image using the first Storage Item in the record Store path.
10. a kind of image processing apparatus, which is characterized in that be applied in terminal, described device includes:
Determining module is configured as from the image being stored in the terminal, determines the original image of pending breviary processing;
Processing module is configured as the original image determined to the determining module and carries out breviary processing, obtains thumbnail;
Replacement module is configured as the thumbnail obtained after processing module processing replacing the original image;
Wherein, the determining module, comprising:
Submodule is traversed, is configured as looping through the record of the image stored in the terminal, in the record of each image extremely Include less for storing the first Storage Item of original image storage address information, the second Storage Item for storing identification information and use In the third Storage Item of storage thumbnail storage address information, the identification information is that the original image is successfully backed up to cloud clothes It is engaged in after device, as the letter for the original image described in the cloud server end unique identification that the Cloud Server distributes and feeds back Breath;
Judging submodule is configured as the record of the every image traversed for the traversal submodule, described in reading The second Storage Item in record is not the third Storage Item in the empty and described record when being sky, judges whether described image meets contracting Slightly condition;
First determines submodule, is configured as when the judging submodule determines that described image meets the breviary condition, will Described image is determined as the original image of pending breviary processing.
11. device according to claim 10, which is characterized in that the judging submodule is also used to:
Read the wide to pixel P of described imagewWith height to pixel Ph
Work as Pw≥SwAnd Ph≥ShWhen, then determine that described image meets the breviary condition;
Wherein, SwFor the wide to pixel, S of the terminal screenhFor the high to pixel of the terminal screen.
12. device according to claim 11, which is characterized in that the processing module, comprising:
First computational submodule is configured as calculating PwWith SwRatio, obtain the first ratio;
Second computational submodule is configured as calculating PhWith ShRatio, obtain the second ratio;
Second determines submodule, is configured as first ratio that first computational submodule is calculated and described the The smallest ratio is determined as diminution ratio in second ratio that two computational submodules are calculated;
Module is reduced, is configured as determining the determining diminution ratio of submodule respectively to the original image using described second Width and height reduced, obtain the thumbnail of the original image.
13. device according to claim 10, which is characterized in that the replacement module, comprising:
Submodule is replaced, is configured as deleting the original image, the thumbnail is replaced into the original image and is shown;
Sub-module stored, the third Storage Item being configured as in the record using the original image store the storage of the thumbnail Address;
Submodule is emptied, the first Storage Item for being configured as recording in recording the original image is set to sky.
14. device according to claim 10, which is characterized in that described device further include:
Generation module is configured as when shooting obtains image, stores described image, generates a record for described image;
First memory module is configured as described in the first Storage Item storage in the record generated using the generation module The store path of image.
15. device according to claim 10, which is characterized in that described device further include:
Backup module is configured as that the image being not backed up in the terminal will be stored in, backups to the Cloud Server;
First obtains module, is configured as obtaining the identification information corresponding to the image of the Cloud Server feedback, described Identification information is used in the Cloud Server unique identification described image;
Second memory module, the second Storage Item being configured as in the record using described image store described first and obtain module The identification information got.
16. device according to claim 15, which is characterized in that the backup module, comprising:
Third determines submodule, is configured as looping through the record of image in the terminal, is by the second Storage Item in record Empty image is determined as the described image being not backed up;
Backup submodule is configured as determining the third into the described image being not backed up that submodule is determined, is sent to institute Cloud Server is stated to be backed up.
17. device according to claim 10, which is characterized in that described device further include:
First display module is configured as when showing image according to record, when the first Storage Item in the record is non-empty When, it is shown according to the store path of the original image of first Storage Item storage and records corresponding original image with described;
Second display module is configured as when the third Storage Item in the record is non-empty, according to the third Storage Item The store path of the thumbnail of storage, which is shown, records corresponding thumbnail with described.
18. any device in 1 to 17 according to claim 1, which is characterized in that described device further include:
Second obtains module, is configured as when showing thumbnail, obtains the store path that third Storage Item is the thumbnail Record;
Setup module will when being configured as that the first Storage Item is empty in the record that gets of the second acquisition module The original image downloading attribute of the thumbnail of display is positioned to allow for downloading;
Overlay module is configured as reading institute when receiving the download instruction for being downloaded the original image of the thumbnail The identification information in record is stated, has the original image of the identification information from Cloud Server downloading using the identification information Picture carries out covering to the local thumbnail using the original image and shows;
Third memory module is configured as the third Storage Item in the record being set to sky, utilizes first in the record Storage Item stores the store path of the original image.
19. a kind of image processing apparatus, which is characterized in that be applied in terminal, described device includes:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to:
From the image being stored in the terminal, the original image of pending breviary processing is determined;
Breviary processing is carried out to the original image, obtains thumbnail;
The thumbnail is replaced into the original image;
Wherein, described from the image being stored in the terminal, determine the original image of pending breviary processing, comprising:
The record of the image stored in the terminal is looped through, is included at least in the record of each image for storing original image First Storage Item of storage address information, the second Storage Item for storing identification information and for storing thumbnail storage address The third Storage Item of information, the identification information are after the original image is successfully backed up to Cloud Server, by the cloud service The information for the original image described in the cloud server end unique identification that device is distributed and fed back;
For the record of the every image traversed, when the second Storage Item in the record of reading is not the empty and described record In third Storage Item when being empty, judge whether described image meets breviary condition;
When described image meets the breviary condition, described image is determined as to the original image of pending breviary processing.
CN201610282554.4A 2016-04-29 2016-04-29 Image processing method and device Active CN105931187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610282554.4A CN105931187B (en) 2016-04-29 2016-04-29 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610282554.4A CN105931187B (en) 2016-04-29 2016-04-29 Image processing method and device

Publications (2)

Publication Number Publication Date
CN105931187A CN105931187A (en) 2016-09-07
CN105931187B true CN105931187B (en) 2019-06-14

Family

ID=56837885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610282554.4A Active CN105931187B (en) 2016-04-29 2016-04-29 Image processing method and device

Country Status (1)

Country Link
CN (1) CN105931187B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651268A (en) * 2020-05-14 2020-09-11 武汉兰丁智能医学股份有限公司 Microscopic image rapid processing system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760490B (en) * 2016-02-17 2019-07-23 北京金山安全软件有限公司 Resource storage method and device and electronic equipment
CN113536163A (en) * 2021-07-13 2021-10-22 北京百度网讯科技有限公司 Processing method, device and equipment for picture linking and storage medium
CN113420171B (en) * 2021-08-23 2022-03-18 深圳市城市交通规划设计研究中心股份有限公司 Image management method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327189A (en) * 2013-06-28 2013-09-25 北京小米科技有限责任公司 Method and device for uploading, browsing and deleting pictures
CN105306625A (en) * 2014-06-19 2016-02-03 Lg电子株式会社 Mobile terminal and controlling method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010154359A (en) * 2008-12-25 2010-07-08 Ricoh Co Ltd Image processor, image processing method, image processing program, and recording medium
KR102180474B1 (en) * 2013-11-20 2020-11-18 삼성전자주식회사 Apparatus and Method For Managing Image Files By Displaying Backup Information
CN104092749A (en) * 2014-07-01 2014-10-08 小米科技有限责任公司 Method and device for synchronizing photos
CN104834713A (en) * 2015-05-08 2015-08-12 武汉网幂科技有限公司 Method and system for storing and transmitting image data of terminal equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327189A (en) * 2013-06-28 2013-09-25 北京小米科技有限责任公司 Method and device for uploading, browsing and deleting pictures
CN105306625A (en) * 2014-06-19 2016-02-03 Lg电子株式会社 Mobile terminal and controlling method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651268A (en) * 2020-05-14 2020-09-11 武汉兰丁智能医学股份有限公司 Microscopic image rapid processing system
CN111651268B (en) * 2020-05-14 2023-01-31 武汉兰丁智能医学股份有限公司 Quick processing system for microscopic image

Also Published As

Publication number Publication date
CN105931187A (en) 2016-09-07

Similar Documents

Publication Publication Date Title
CN102714698B (en) For electronic equipment and the method for photographic images
CN105491642B (en) The method and apparatus of network connection
CN105931187B (en) Image processing method and device
CN104902185B (en) Image pickup method and device
CN104869308A (en) Picture taking method and device
CN105335458B (en) Preview picture method and device
CN104238890B (en) Character displaying method and device
CN106210496A (en) Method, photo taking and device
CN106657780A (en) Image previewing method and device
CN108108418A (en) Picture management method, device and storage medium
CN107133352A (en) Photo display methods and device
CN106020634A (en) Screen capture method and device
CN104035674B (en) Picture displaying method and device
CN106210495A (en) Image capturing method and device
CN104063911A (en) Method for carrying out driving record based on intelligent terminal equipment and intelligent terminal equipment
CN105407275B (en) Photo synthesizer and method
CN104850487A (en) Information display method and device
CN107506423A (en) Photo chooses method, apparatus and storage medium
CN106303198A (en) Photographing information acquisition methods and device
CN105208284A (en) Photographing reminding method and device
CN104850643A (en) Image comparison method and device
CN106997356A (en) The sorting technique and device of picture
KR20100079833A (en) Image processing apparatus and image processing method for displaying photographing information based on digital map
CN106528197A (en) Shooting method and device
CN107506469A (en) Image acquisition method, device and computer-readable recording medium

Legal Events

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