CN105701834B - Automatic picture backup device and method - Google Patents

Automatic picture backup device and method Download PDF

Info

Publication number
CN105701834B
CN105701834B CN201610107759.9A CN201610107759A CN105701834B CN 105701834 B CN105701834 B CN 105701834B CN 201610107759 A CN201610107759 A CN 201610107759A CN 105701834 B CN105701834 B CN 105701834B
Authority
CN
China
Prior art keywords
picture
preset
processed
backup
edge contour
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
CN201610107759.9A
Other languages
Chinese (zh)
Other versions
CN105701834A (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.)
Zhuhai Dahengqin Technology Development Co Ltd
Original Assignee
Zhuhai Dahengqin Technology Development 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 Zhuhai Dahengqin Technology Development Co Ltd filed Critical Zhuhai Dahengqin Technology Development Co Ltd
Priority to CN201610107759.9A priority Critical patent/CN105701834B/en
Publication of CN105701834A publication Critical patent/CN105701834A/en
Application granted granted Critical
Publication of CN105701834B publication Critical patent/CN105701834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an automatic picture backup device, which comprises: the edge contour processing module is used for carrying out edge contour processing on the picture to be processed; the matching module is used for matching the picture subjected to edge contour processing with a picture template library corresponding to a preset picture backup type; and the uploading module is used for uploading the picture to be processed to a server when the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type, so that the server stores the picture. The invention also discloses an automatic picture backup method. In the invention, the terminal can select the picture with the same type as the preset picture backup type from the current pictures to be processed for backup processing, thereby effectively simplifying the operation steps of picture backup, realizing automatic backup of important pictures to the server and improving the safety of important picture storage.

Description

Automatic picture backup device and method
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an apparatus and a method for automatically backing up a picture.
Background
At present, people often use terminals such as mobile phones and tablets to take pictures in life and work, and the pictures taken are generally stored in a terminal memory. If the terminal is lost or damaged, the pictures stored in the terminal are also lost, especially for some precious pictures, the pictures cannot be restored after being lost, which causes a cost which is difficult to make up for a user, and therefore, the picture which is shot is only stored in the terminal without safety.
In order to prevent the loss of the pictures shot by the terminal, the user can manually upload the important pictures shot by the terminal to the network disk, but the method is complicated, and the user easily forgets to upload the important pictures, so that the important pictures still have the risk of loss and are unreliable.
Disclosure of Invention
The invention mainly aims to provide a device and a method for automatically backing up an important picture, which aim to realize the automatic backing up of the important picture, simplify the operation steps of backing up the important picture and improve the safety of storing the important picture.
The picture automatic backup device provided by the invention comprises:
the edge contour processing module is used for carrying out edge contour processing on the picture to be processed;
the matching module is used for matching the picture subjected to edge contour processing with a picture template library corresponding to a preset picture backup type;
and the uploading module is used for uploading the picture to be processed to a server when the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type, so that the server stores the picture.
Optionally, the automatic picture backup apparatus further includes:
the judging module is used for judging whether the definition of the matched picture to be processed reaches the preset definition or not;
when the judging module judges that the definition of the picture reaches the preset definition, the uploading module uploads the picture to be processed to a server.
Optionally, the determining module is further configured to calculate a width of the outline in the to-be-processed picture after the edge outline processing, and determine that the definition of the to-be-processed picture does not reach a preset definition when the width of the outline is greater than a first preset threshold.
Optionally, the picture to be processed is an unmarked picture stored locally; the automatic picture backup device further comprises a marking module, and the marking module is used for marking the pictures which are stored locally and are uploaded completely.
Optionally, the matching module includes:
the subtraction processing unit is used for respectively carrying out subtraction processing between pixel points at each corresponding position between the image subjected to edge contour processing and each image template in the image template library corresponding to the preset image backup type to obtain a difference absolute value corresponding to the pixel point at each position of the image template;
and the judging unit is used for judging that the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type when the sum of the absolute difference values corresponding to at least one picture template is smaller than a second preset threshold.
In addition, the picture automatic backup method further provided by the invention comprises the following steps:
carrying out edge contour processing on the picture to be processed;
matching the picture subjected to edge contour processing with a picture template library corresponding to a preset picture backup type;
and when the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type, uploading the picture to be processed to a server so that the server stores the picture.
Optionally, the method for automatically backing up pictures further includes:
judging whether the definition of the matched picture to be processed reaches a preset definition or not;
when the definition of the picture reaches the preset definition, the step of uploading the picture to be processed to a server is executed
Optionally, the step of judging whether the definition of the matched picture to be processed reaches the preset definition includes:
calculating the width of the contour in the to-be-processed picture after edge contour processing;
and when the width of the outline is greater than a first preset threshold value, judging that the definition of the picture to be processed does not reach the preset definition.
Optionally, the picture to be processed is an unmarked picture stored locally;
after the step of uploading the picture to be processed to the server, the method for automatically backing up the picture further comprises the following steps: and marking the locally stored picture which is uploaded completely.
Optionally, the step of matching the image subjected to edge contour processing with an image template library corresponding to a preset image backup type includes:
subtracting pixel points at corresponding positions between the picture subjected to edge contour processing and each picture template in a picture template library corresponding to a preset picture backup type respectively to obtain difference absolute values corresponding to the pixel points at the positions of the picture templates;
and when the sum of the absolute difference values corresponding to at least one picture template is smaller than a second preset threshold, judging that the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type.
According to the automatic image backup device and method, the image to be processed is subjected to edge contour processing, the image subjected to edge contour processing is matched with the image template library corresponding to the preset image backup type, and when the image subjected to edge contour processing is matched with the image template library corresponding to the preset image backup type, the image to be processed is uploaded to the server to be stored by the server, so that a user does not need to manually backup the important image.
Drawings
FIG. 1 is a schematic diagram of an alternative system architecture according to various embodiments of the present invention;
fig. 2 is a schematic diagram of a hardware structure of an alternative terminal according to various embodiments of the present invention;
FIG. 3 is a functional block diagram of an automatic image backup apparatus according to a first embodiment of the present invention;
FIG. 4 is a diagram illustrating an automatic picture backup control according to the present invention;
FIG. 5 is a schematic diagram of a picture backup type selection interface according to the present invention;
FIG. 6 is a functional block diagram of an automatic image backup apparatus according to a second embodiment of the present invention;
FIG. 7 is a schematic diagram of a detailed functional module of a matching module in a third embodiment of the automatic picture backup apparatus according to the present invention;
FIG. 8 is a flowchart illustrating a first embodiment of a method for automatically backing up pictures according to the present invention;
fig. 9 is a detailed flowchart of the matching step in the third embodiment of the automatic picture backup method according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A system architecture for implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
Specifically, as shown in fig. 1, the system architecture according to the embodiment includes a terminal and a server. The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a PAD (tablet computer), etc., and a fixed terminal such as a digital TV, a desktop computer, etc. The following embodiments are described by taking a terminal as a mobile phone as an example. The automatic picture backup device in each embodiment of the invention is realized based on the terminal. The server may be a cloud server.
The terminal carries out edge contour processing on the picture to be processed; matching the picture subjected to edge contour processing with a picture template library corresponding to a preset picture backup type; when the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type, uploading the picture to be processed to a server;
and when receiving the picture uploaded by the terminal, the server stores the picture. Optionally, the server stores the terminal identifier in association with the picture.
As an implementation scheme, the hardware structure of the terminal may be as shown in fig. 2.
Referring to fig. 2, the terminal may include a camera unit 110, a user input unit 120, a memory 130, a processor 140, and a communication bus 150, etc. Fig. 2 shows a terminal having various components, but it is to be understood that not all of the shown components are required to be implemented. More or fewer components may alternatively be implemented. The respective components of the terminal will be described in detail below.
The camera unit 110 may be a camera carried by the terminal, and can take pictures.
The user input unit 120 may receive a picture automatic backup instruction or the like input by a user.
The memory 130 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 130 may alternatively be a storage device separate from the processor 140. The memory 130, which is a computer storage medium, may store therein an automatic picture backup program, and may also store a plurality of preset picture backup types and a picture template library corresponding to each of the picture backup types.
The processor 140 may call the automatic picture backup program stored in the memory 130 and perform the following operations:
carrying out edge contour processing on the picture to be processed;
matching the picture subjected to edge contour processing with a picture template library corresponding to a preset picture backup type;
and when the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type, uploading the picture to be processed to a server so that the server stores the picture.
The processor 140 may also call the automatic picture backup program stored in the memory 130 and perform the following operations:
judging whether the definition of the matched picture to be processed reaches a preset definition or not;
and when the definition of the picture reaches a preset definition, the step of uploading the picture to be processed to a server is executed.
The processor 140 may also call the automatic picture backup program stored in the memory 130 and perform the following operations:
calculating the width of the contour in the to-be-processed picture after edge contour processing;
and when the width of the outline is greater than a second preset threshold value, judging that the definition of the picture to be processed does not reach the preset definition.
The processor 140 may also call the automatic picture backup program stored in the memory 130 and perform the following operations:
after the step of uploading the picture to be processed to the server, the method for automatically backing up the picture further comprises the following steps: and marking the locally stored picture which is uploaded completely.
The processor 140 may also call the automatic picture backup program stored in the memory 130 and perform the following operations:
respectively subtracting the picture subjected to edge contour processing and each picture template in a picture template library corresponding to a preset picture backup type to obtain a difference absolute value corresponding to each pixel point;
and when the sum of the absolute difference values corresponding to at least one picture template is smaller than a second preset threshold, judging that the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type.
Based on the system architecture and the hardware architecture, embodiments of the automatic picture backup device are provided.
Referring to fig. 3, fig. 3 is a functional module diagram of the automatic picture backup apparatus according to the first embodiment of the present invention. It should be emphasized that the functional block diagram shown in fig. 3 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art can easily add new functional blocks around the functional blocks of the automatic picture backup apparatus shown in fig. 3; the names of the function modules are self-defined names which are only used for assisting in understanding the program function blocks of the automatic picture backup device and are not used for limiting the technical scheme of the invention.
In this embodiment, an automatic image backup device is provided, which can be disposed on the terminal, and the terminal is taken as a mobile phone for explanation in this embodiment and the following embodiments. The automatic picture backup device comprises:
an edge contour processing module 210, configured to perform edge contour processing on a picture to be processed;
in this embodiment, the mobile phone may set a plurality of fixed times, and when the current time reaches the set fixed time, start edge contour processing on the picture to be processed, for example, the fixed time may be 23 points of every night, so that at 23 points of every night, the mobile phone will start edge contour processing on the picture to be processed automatically. Or, the mobile phone may detect the photographing operation in real time, may perform the photographing operation based on a camera application of the mobile phone, and may also perform the photographing operation based on applications such as WeChat and QQ of the mobile phone. When the shot picture is generated in the shooting operation, the edge contour processing is started to be performed on the picture to be processed. Or, the mobile phone can also detect whether the WIFI is connected currently in real time, and when the WIFI is connected to the mobile phone, the edge contour processing is started to be performed on the picture to be processed.
The picture to be processed may be a locally stored picture, and the picture may be taken by a camera, downloaded through a network, or received and stored by chat software.
In this embodiment, an outline extraction function in OpenCV may be used to perform edge outline processing on the picture to be processed, so as to obtain a binary image corresponding to the picture to be processed.
Optionally, the binary image may be subjected to smoothing, denoising, and the like, so as to obtain a clearer main body object contour in the picture to be processed.
The matching module 220 is configured to perform matching processing on the image subjected to edge contour processing and an image template library corresponding to a preset image backup type;
in this embodiment, the picture backup types may be classified according to the content of the picture, for example, the picture backup types may be classified into types of portrait, plant, animal, building, food, landscape, and text. A picture template library is preset for each picture backup type, and the picture template library comprises a plurality of picture templates. The user may preset the preset picture backup type. For example, if the user considers that the picture of the portrait type is an important picture, the user may set the preset picture backup type as the portrait type. If the user considers the pictures of the building type and the scene type as important pictures, the preset picture backup type can be set as the building type and the scene type.
Optionally, when receiving the automatic image backup instruction, the mobile phone may start the automatic image backup mode, that is, start edge contour processing on the image to be processed.
Optionally, a control or a button for receiving the automatic image backup instruction may be further provided, and when the control or the button is triggered, the automatic image backup instruction may be considered as being received. The present embodiment is described by taking a control as an example. As shown in fig. 4, fig. 4 is a schematic diagram of the automatic picture backup control according to the present invention, and when the user triggers the automatic picture backup control shown in fig. 4, the user can be considered as having received an automatic picture backup instruction, and then the automatic picture backup function is started.
Optionally, when the mobile phone receives the automatic image backup instruction, the mobile phone may automatically pop up an image backup type selection interface. Fig. 5 is a schematic diagram of a picture backup type selection interface according to the present invention, and fig. 5 shows six picture backup types, such as human figures, plants, animals, buildings, food, and scenery, for a user to select. The user can select one, two or more picture backup types, and the picture backup type selected by the user can be set as the preset picture backup type.
Optionally, the picture template in the picture template library may be a binary image. Similarity between the picture subjected to the contour processing and each picture template in the picture template library can be calculated, and when the similarity between at least one picture template and the picture subjected to the contour processing reaches a preset value, the picture subjected to the edge contour processing is considered to be matched with the picture template library corresponding to a preset picture backup type.
And the uploading module 230 is configured to upload the to-be-processed picture to a server when the picture subjected to edge contour processing matches a picture template library corresponding to a preset picture backup type, so that the server stores the picture.
In this embodiment, when the image subjected to edge contour processing is matched with the image template library corresponding to the preset image backup type, the currently processed image to be processed is considered as an important image considered by the user, and therefore, the image is uploaded to the server. Optionally, the terminal identifier may be uploaded to the server while the picture is uploaded, so that the server stores the picture in association with the terminal identifier.
In this embodiment, when the image subjected to the edge contour processing is not matched with the image template library corresponding to the preset image backup type, it is determined that the currently processed image to be processed is not an important image considered by the user, and therefore, the mobile phone does not need to upload the image.
Optionally, the picture to be processed is an unmarked picture stored locally. The automatic picture backup device further comprises a marking module, and the marking module is used for marking the pictures which are stored locally and are uploaded completely.
In this embodiment, the marking module may further perform marking processing on all the pictures subjected to matching processing. The processed pictures are matched pictures, including matched pictures and unmatched pictures. After the picture is uploaded to the server, the picture may be marked, for example, a mark that has been uploaded may be set. In the matching process, the picture with the judgment result that the picture template library corresponding to the preset picture backup type is not matched is marked to indicate that the picture does not accord with the preset picture backup type, so that the picture can be set as a non-uploading mark corresponding to the current preset picture backup type to indicate that the picture does not accord with the picture backup type corresponding to the non-uploading mark.
After the matched pictures are marked, when the preset time is reached again, all the pictures which are not marked and stored locally are scanned, and the pictures to be processed are the pictures which are not marked and stored locally.
It can be understood that after the user changes the preset picture backup type, the pictures to be processed are different, all the pictures marked as uploaded pictures are not taken as the pictures to be processed, for the pictures marked as not uploaded pictures, it is necessary to determine whether the picture backup type corresponding to the pictures marked as not uploaded pictures is consistent with the current preset picture backup type, and when the picture backup type is inconsistent, the picture is taken as the picture to be processed; if the two pictures are consistent, the picture is not taken as a picture to be processed.
The automatic picture backup device provided by the invention has the advantages that the edge contour processing is carried out on the picture to be processed, the picture subjected to the edge contour processing is matched with the picture template library corresponding to the preset picture backup type, and when the picture subjected to the edge contour processing is matched with the picture template library corresponding to the preset picture backup type, the picture to be processed is uploaded to the server so as to be stored by the server, so that a user does not need to manually backup the important picture.
Further, in order to improve the quality of the automatically backed-up picture, based on the first embodiment of the automatic picture backup apparatus of the present invention, the present invention further provides a second embodiment of the automatic picture backup apparatus, referring to fig. 6, where fig. 6 is a schematic diagram of functional modules of the second embodiment of the automatic picture backup apparatus of the present invention, and the automatic picture backup apparatus further includes:
the judging module 240 is configured to judge whether the definition of the matched to-be-processed picture reaches a preset definition;
when the determining module 240 determines that the definition of the picture reaches the preset definition, the uploading module 230 uploads the picture to be processed to a server.
In this embodiment, when performing automatic image backup, the definition of the image to be processed may be determined first, and when the definition of the image to be processed reaches the preset definition, the edge contour processing and the matching processing are performed on the image to be processed, and the image is uploaded when matching. The image processing method can also be used for carrying out edge contour processing and matching processing on the image to be processed, judging the definition of the image to be processed when the image to be processed is matched, and uploading the image when the definition of the image to be processed reaches the preset definition. In summary, the picture must be considered as an important picture considered by the user and uploaded under two conditions of matching and meeting the definition. When any one of the conditions cannot be met, the picture is not considered as an important picture by the user, and the picture is not uploaded. At this time, the picture may be subjected to the non-upload flag processing described above.
When the definition of the image is determined, the definition of the image can be directly calculated by adopting an image definition calculation function in OpenCV. Optionally, the following method may also be adopted: the determining module 240 is further configured to calculate a width of the outline in the to-be-processed picture after the edge outline processing, and determine that the definition of the to-be-processed picture does not reach a preset definition when the width of the outline is greater than a first preset threshold.
For example, a plurality of sampling segments may be selected from the contour line obtained after edge contour processing, and the width of each sampling segment may be calculated, where the width may be the number of pixel points. When the width of at least one sampling segment is greater than a first preset threshold value, the definition of the picture to be processed is judged not to reach the preset definition. Or an average value of the widths of the sampling sections can be calculated, and when the average value is greater than a first preset threshold value, the definition of the picture to be processed does not reach the preset definition.
In the embodiment, the definition of the picture is further determined before the picture is uploaded, so that the pictures uploaded to the server are all high-definition pictures, and the quality of the backup picture is effectively improved.
Further, in order to further improve the accuracy of image backup and make the backed-up image more suitable for the user's requirement, based on the first or second embodiment of the automatic image backup apparatus of the present invention, the present invention further provides a third embodiment of the automatic image backup apparatus, referring to fig. 7, fig. 7 is a detailed functional module diagram of a matching module in the third embodiment of the automatic image backup apparatus of the present invention, where the matching module 220 includes:
the subtraction processing unit 221 is configured to perform subtraction processing between pixel points at each corresponding position between the image subjected to the edge contour processing and each image template in the image template library corresponding to the preset image backup type, and obtain a difference absolute value corresponding to the pixel point at each position of the image template;
optionally, in order to further improve the accuracy of picture matching, the picture after edge contour processing may be subjected to operations such as enlarging, reducing, and/or rotating, and then subjected to subtraction processing with each picture template in the picture template library corresponding to the preset picture backup type.
During each subtraction operation, the absolute value of the difference value corresponding to each pixel point is obtained. For example, if the picture size is M × N, the absolute difference values corresponding to M × N pixel points are obtained.
The determining unit 222 is configured to determine that the picture subjected to edge contour processing matches with a picture template library corresponding to a preset picture backup type when a sum of absolute differences corresponding to at least one of the picture templates is smaller than a second preset threshold.
And summing the absolute values of the difference values corresponding to the M x N pixel points obtained in each subtraction processing operation, and comparing the sum with a second preset threshold value. And when the sum of the absolute values of the difference values obtained in at least one subtraction processing operation is less than a second preset threshold, the picture subjected to edge contour processing is considered to be matched with a picture template library corresponding to a preset picture backup type.
The present invention further provides an automatic picture backup method, which can be implemented based on the above terminal, and this embodiment and the following embodiments are described by taking a terminal as a mobile phone as an example. Referring to fig. 8, fig. 8 is a schematic flowchart of a first embodiment of an automatic image backup method according to the present invention, where the automatic image backup method includes:
step S10, performing edge contour processing on the picture to be processed;
in this embodiment, the mobile phone may set a plurality of fixed times, and when the current time reaches the set fixed time, start edge contour processing on the picture to be processed, for example, the fixed time may be 23 points of every night, so that at 23 points of every night, the mobile phone will start edge contour processing on the picture to be processed automatically. Or, the mobile phone may detect the photographing operation in real time, may perform the photographing operation based on a camera application of the mobile phone, and may also perform the photographing operation based on applications such as WeChat and QQ of the mobile phone. When the shot picture is generated in the shooting operation, the edge contour processing is started to be performed on the picture to be processed. Or, the mobile phone can also detect whether the WIFI is connected currently in real time, and when the WIFI is connected to the mobile phone, the edge contour processing is started to be performed on the picture to be processed.
The picture to be processed may be a locally stored picture, and the picture may be taken by a camera, downloaded through a network, or received and stored by chat software.
In this embodiment, an outline extraction function in OpenCV may be used to perform edge outline processing on the picture to be processed, so as to obtain a binary image corresponding to the picture to be processed.
Optionally, the binary image may be subjected to smoothing, denoising, and the like, so as to obtain a clearer main body object contour in the picture to be processed.
Step S20, matching the picture after edge contour processing with a picture template library corresponding to a preset picture backup type;
in this embodiment, the picture backup types may be classified according to the content of the picture, for example, the picture backup types may be classified into types of portrait, plant, animal, building, food, landscape, and text. A picture template library is preset for each picture backup type, and the picture template library comprises a plurality of picture templates. The user may preset the preset picture backup type. For example, if the user considers that the picture of the portrait type is an important picture, the user may set the preset picture backup type as the portrait type. If the user considers the pictures of the building type and the scene type as important pictures, the preset picture backup type can be set as the building type and the scene type.
Optionally, when receiving the automatic image backup instruction, the mobile phone may start the automatic image backup mode, that is, start edge contour processing on the image to be processed.
Optionally, a control or a button for receiving the automatic image backup instruction may be further provided, and when the control or the button is triggered, the automatic image backup instruction may be considered as being received. The present embodiment is described by taking a control as an example. As shown in fig. 4, when the user triggers the picture backup control shown in fig. 4, it is determined that the automatic picture backup instruction is received, and then the automatic picture backup function is started.
Optionally, when the mobile phone receives the automatic image backup instruction, the mobile phone may automatically pop up an image backup type selection interface. As shown in fig. 5, fig. 5 shows six picture backup types of human figures, plants, animals, buildings, foods, landscapes, etc. for the user to select. The user can select one, two or more picture backup types, and the picture backup type selected by the user can be set as the preset picture backup type.
Optionally, the picture template in the picture template library may be a binary image. Similarity between the picture subjected to the contour processing and each picture template in the picture template library can be calculated, and when the similarity between at least one picture template and the picture subjected to the contour processing reaches a preset value, the picture subjected to the edge contour processing is considered to be matched with the picture template library corresponding to a preset picture backup type.
And step S30, when the picture subjected to edge contour processing is matched with a picture template library corresponding to a preset picture backup type, uploading the picture to be processed to a server so that the server can store the picture.
In this embodiment, when the image subjected to edge contour processing is matched with the image template library corresponding to the preset image backup type, the currently processed image to be processed is considered as an important image considered by the user, and therefore, the image is uploaded to the server. Optionally, the terminal identifier may be uploaded to the server while the picture is uploaded, so that the server stores the picture in association with the terminal identifier.
In this embodiment, when the image subjected to the edge contour processing is not matched with the image template library corresponding to the preset image backup type, it is determined that the currently processed image to be processed is not an important image considered by the user, and therefore, the mobile phone does not need to upload the image.
Optionally, the picture to be processed is an unmarked picture stored locally. After the step of uploading the picture to be processed to the server, the method for automatically backing up the picture further comprises the following steps: and marking the locally stored picture which is uploaded completely.
In this embodiment, all the pictures subjected to the matching processing may be further subjected to the marking processing. The processed pictures are matched pictures, including matched pictures and unmatched pictures. After the picture is uploaded to the server, the picture may be marked, for example, a mark that has been uploaded may be set. In the matching process, the picture with the judgment result that the picture template library corresponding to the preset picture backup type is not matched is marked to indicate that the picture does not accord with the preset picture backup type, so that the picture can be set as a non-uploading mark corresponding to the current preset picture backup type to indicate that the picture does not accord with the picture backup type corresponding to the non-uploading mark.
After the matched pictures are marked, when the preset time is reached again, all the pictures which are not marked and stored locally are scanned, and the pictures to be processed are the pictures which are not marked and stored locally.
It can be understood that after the user changes the preset picture backup type, the pictures to be processed are different, all the pictures marked as uploaded pictures are not taken as the pictures to be processed, for the pictures marked as not uploaded pictures, it is necessary to determine whether the picture backup type corresponding to the pictures marked as not uploaded pictures is consistent with the current preset picture backup type, and when the picture backup type is inconsistent, the picture is taken as the picture to be processed; if the two pictures are consistent, the picture is not taken as a picture to be processed.
According to the automatic image backup method provided by the invention, the image to be processed is subjected to edge contour processing, the image subjected to edge contour processing is matched with the image template library corresponding to the preset image backup type, and when the image subjected to edge contour processing is matched with the image template library corresponding to the preset image backup type, the image to be processed is uploaded to the server so as to be stored by the server, so that a user does not need to manually backup important images.
Further, in order to improve the quality of the automatically backed-up picture, based on the first embodiment of the picture automatic backup method of the present invention, the present invention further provides a second embodiment of the picture automatic backup method, and the picture automatic backup apparatus further includes: the automatic picture backup method further comprises the following steps:
judging whether the definition of the matched picture to be processed reaches a preset definition or not;
and when the definition of the picture reaches a preset definition, the step of uploading the picture to be processed to a server is executed.
In this embodiment, when performing automatic image backup, the definition of the image to be processed may be determined first, and when the definition of the image to be processed reaches the preset definition, the edge contour processing and the matching processing are performed on the image to be processed, and the image is uploaded when matching. The image processing method can also be used for carrying out edge contour processing and matching processing on the image to be processed, judging the definition of the image to be processed when the image to be processed is matched, and uploading the image when the definition of the image to be processed reaches the preset definition. In summary, the picture must be considered as an important picture considered by the user and uploaded under two conditions of matching and meeting the definition. When any one of the conditions cannot be met, the picture is not considered as an important picture by the user, and the picture is not uploaded. At this time, the picture may be subjected to the non-upload flag processing described above.
When the definition of the image is determined, the definition of the image can be directly calculated by adopting an image definition calculation function in OpenCV. Optionally, the following method may also be adopted: the step of judging whether the definition of the matched picture to be processed reaches the preset definition comprises the following steps: calculating the width of the contour in the to-be-processed picture after edge contour processing; and when the width of the outline is greater than a first preset threshold value, judging that the definition of the picture to be processed does not reach the preset definition.
For example, a plurality of sampling segments may be selected from the contour line obtained after edge contour processing, and the width of each sampling segment may be calculated, where the width may be the number of pixel points. When the width of at least one sampling segment is greater than a first preset threshold value, the definition of the picture to be processed is judged not to reach the preset definition. Or an average value of the widths of the sampling sections can be calculated, and when the average value is greater than a first preset threshold value, the definition of the picture to be processed does not reach the preset definition.
In the embodiment, the definition of the picture is further determined before the picture is uploaded, so that the pictures uploaded to the server are all high-definition pictures, and the quality of the backup picture is effectively improved.
Further, in order to further improve the accuracy of picture backup and make the backed-up picture more in line with the needs of the user, based on the first or second embodiment of the automatic picture backup method of the present invention, the present invention further provides a third embodiment of the automatic picture backup method, referring to fig. 9, fig. 9 is a detailed flow diagram of the matching step in the third embodiment of the automatic picture backup method of the present invention, and step S20 includes:
step S21, subtraction processing is respectively carried out between pixel points of each corresponding position between the picture after edge contour processing and each picture template in a picture template library corresponding to a preset picture backup type, and difference absolute values corresponding to the pixel points of each position of the picture template are obtained;
optionally, in order to further improve the accuracy of picture matching, the picture after edge contour processing may be subjected to operations such as enlarging, reducing, and/or rotating, and then subjected to subtraction processing with each picture template in the picture template library corresponding to the preset picture backup type.
During each subtraction operation, the absolute value of the difference value corresponding to each pixel point is obtained. For example, if the picture size is M × N, the absolute difference values corresponding to M × N pixel points are obtained.
Step S22, when the sum of the absolute difference values corresponding to at least one of the picture templates is smaller than a second preset threshold, determining that the picture subjected to edge contour processing matches with a picture template library corresponding to a preset picture backup type.
And summing the absolute values of the difference values corresponding to the M x N pixel points obtained in each subtraction processing operation, and comparing the sum with a second preset threshold value. And when the sum of the absolute values of the difference values obtained in at least one subtraction processing operation is less than a second preset threshold, the picture subjected to edge contour processing is considered to be matched with a picture template library corresponding to a preset picture backup type.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An automatic picture backup device, comprising:
the edge contour processing module is used for carrying out edge contour processing on the picture to be processed when the current time reaches the set fixed time or the shooting operation is finished at the current time so as to obtain a binary image corresponding to the picture to be processed;
the matching module is used for matching the binary image obtained after the edge contour processing with a picture template library corresponding to a preset picture backup type, wherein the preset picture backup type can be preset by a user;
and the uploading module is used for uploading the picture to be processed to a server when the binary image obtained after the edge contour processing is matched with the picture template library corresponding to the preset picture backup type, so that the server stores the picture.
2. The automatic picture backup apparatus according to claim 1, wherein the automatic picture backup apparatus further comprises:
the judging module is used for judging whether the definition of the matched picture to be processed reaches the preset definition or not;
when the judging module judges that the definition of the picture reaches the preset definition, the uploading module uploads the picture to be processed to a server.
3. The automatic image backup device according to claim 2, wherein the determining module is further configured to calculate a width of an outline in the to-be-processed image after edge outline processing, and determine that the definition of the to-be-processed image does not reach a preset definition when the width of the outline is greater than a first preset threshold.
4. The automatic picture backup apparatus according to any one of claims 1 to 3, wherein the picture to be processed is a locally saved unmarked picture; the automatic picture backup device further comprises a marking module, and the marking module is used for marking the pictures which are stored locally and are uploaded completely.
5. The automatic picture backup apparatus according to any one of claims 1 to 3, wherein the matching module comprises:
the subtraction processing unit is used for respectively carrying out subtraction processing between pixel points of each corresponding position between the binary image obtained after the edge contour processing and each picture template in the picture template library corresponding to the preset picture backup type to obtain a difference absolute value corresponding to the pixel point of each position of the picture template;
and the judging unit is used for judging that the binary image obtained after the edge contour processing is matched with the picture template library corresponding to the preset picture backup type when the sum of the absolute values of the difference values corresponding to at least one picture template is smaller than a second preset threshold value.
6. An automatic picture backup method is characterized by comprising the following steps:
when the current time reaches the set fixed time or the shooting operation is finished at the current time, carrying out edge contour processing on the picture to be processed to obtain a binary image corresponding to the picture to be processed;
matching the binary image obtained after the edge contour processing with a picture template library corresponding to a preset picture backup type, wherein the preset picture backup type can be preset by a user;
and when the binary image obtained after the edge contour processing is matched with a picture template library corresponding to a preset picture backup type, uploading the picture to be processed to a server so that the server can store the picture.
7. The automatic picture backup method according to claim 6, wherein the automatic picture backup method further comprises:
judging whether the definition of the matched picture to be processed reaches a preset definition or not;
and when the definition of the picture reaches a preset definition, the step of uploading the picture to be processed to a server is executed.
8. The method for automatically backing up pictures as claimed in claim 7, wherein the step of determining whether the sharpness of the matched picture to be processed reaches a preset sharpness comprises:
calculating the width of the contour in the to-be-processed picture after edge contour processing;
and when the width of the outline is greater than a first preset threshold value, judging that the definition of the picture to be processed does not reach the preset definition.
9. The method for automatically backing up pictures according to any one of claims 6 to 8, wherein the pictures to be processed are locally saved unmarked pictures;
after the step of uploading the picture to be processed to the server, the method for automatically backing up the picture further comprises the following steps: and marking the locally stored picture which is uploaded completely.
10. The method for automatically backing up pictures according to any one of claims 6 to 8, wherein the step of matching the binary image obtained after the edge contour processing with a picture template library corresponding to a preset picture backup type comprises:
subtracting pixel points at corresponding positions between the binary image obtained after the edge contour processing and each picture template in a picture template library corresponding to a preset picture backup type to obtain a difference absolute value corresponding to the pixel point at each position of the picture template;
and when the sum of the absolute values of the difference values corresponding to at least one picture template is smaller than a second preset threshold, judging that the binary image obtained after edge contour processing is matched with a picture template library corresponding to a preset picture backup type.
CN201610107759.9A 2016-02-26 2016-02-26 Automatic picture backup device and method Active CN105701834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610107759.9A CN105701834B (en) 2016-02-26 2016-02-26 Automatic picture backup device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610107759.9A CN105701834B (en) 2016-02-26 2016-02-26 Automatic picture backup device and method

Publications (2)

Publication Number Publication Date
CN105701834A CN105701834A (en) 2016-06-22
CN105701834B true CN105701834B (en) 2020-07-10

Family

ID=56223295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610107759.9A Active CN105701834B (en) 2016-02-26 2016-02-26 Automatic picture backup device and method

Country Status (1)

Country Link
CN (1) CN105701834B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484226A (en) * 2016-09-27 2017-03-08 北京奇虎科技有限公司 The renewal method of calibration of icon and device
CN107291577A (en) * 2017-06-19 2017-10-24 腾讯科技(深圳)有限公司 file backup method, device and storage medium
CN109447938B (en) * 2017-08-31 2022-01-25 宁波方太厨具有限公司 Detection method and detection device for baking performance of oven
CN108021866A (en) * 2017-11-03 2018-05-11 百度在线网络技术(北京)有限公司 Photo management method, device, equipment and storage medium
CN108260242B (en) * 2018-01-10 2022-02-25 广东美的厨房电器制造有限公司 Microwave cooking equipment and protection control method and device thereof
CN111027578B (en) * 2018-10-09 2024-01-12 厦门雅迅网络股份有限公司 Method and device for preventing photo from being lost and replaced
WO2020113438A1 (en) * 2018-12-04 2020-06-11 深圳迈瑞生物医疗电子股份有限公司 Automatic backup method, device and computer storage medium
CN110262925B (en) * 2019-05-08 2024-01-30 平安科技(深圳)有限公司 Remote backup method, device, terminal equipment and medium for pictures

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605957A (en) * 2013-11-05 2014-02-26 天脉聚源(北京)传媒科技有限公司 Image identification method and device thereof
CN104270593A (en) * 2014-10-09 2015-01-07 厦门美图之家科技有限公司 Portable backup storage device suitable for shooting terminal
CN104657972A (en) * 2013-11-25 2015-05-27 北京大学 Ambiguity judging method and system of image block

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457973B (en) * 2012-06-01 2016-04-27 深圳市腾讯计算机系统有限公司 A kind of picture upload method, system, picture uploading client and the webserver

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605957A (en) * 2013-11-05 2014-02-26 天脉聚源(北京)传媒科技有限公司 Image identification method and device thereof
CN104657972A (en) * 2013-11-25 2015-05-27 北京大学 Ambiguity judging method and system of image block
CN104270593A (en) * 2014-10-09 2015-01-07 厦门美图之家科技有限公司 Portable backup storage device suitable for shooting terminal

Also Published As

Publication number Publication date
CN105701834A (en) 2016-06-22

Similar Documents

Publication Publication Date Title
CN105701834B (en) Automatic picture backup device and method
US10652455B2 (en) Guided video capture for item listings
EP3457683B1 (en) Dynamic generation of image of a scene based on removal of undesired object present in the scene
EP3125135A1 (en) Picture processing method and device
CN105320695B (en) Picture processing method and device
CN109729272B (en) Shooting control method, terminal device and computer readable storage medium
CN105005597A (en) Photograph sharing method and mobile terminal
CN108055459B (en) Shooting method based on rotary camera and related product
EP3226514A1 (en) Picture sharing method and apparatus, and terminal device
CN104580907A (en) Anti-shake photographing method and device
CN108174082B (en) Image shooting method and mobile terminal
CN104346157A (en) Picture processing method and device and terminal equipment
US20170053388A1 (en) Techniques for automatically correcting groups of images
CN103533212A (en) Image synthesizing method and apparatus
CN111787230A (en) Image display method and device and electronic equipment
CN106549903B (en) Method and device for setting head portrait of user
CN110727810A (en) Image processing method, image processing device, electronic equipment and storage medium
CN112926369A (en) Face image processing method and device, computer equipment and medium
CN110022396B (en) Photo processing method, device and computer readable storage medium
CN111567034A (en) Exposure compensation method, device and computer readable storage medium
CN116134828A (en) Photographing method, related equipment and computer readable storage medium
CN113766123B (en) Photographing beautifying method and terminal
CN111260739A (en) Picture processing method and device
CN106303402A (en) Presetting bit method to set up, call method and the device of monopod video camera
CN112714299B (en) Image display method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200612

Address after: Room 105-67309, No. 6, Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Applicant after: ZHUHAI DAHENGQIN TECHNOLOGY DEVELOPMENT Co.,Ltd.

Address before: 518057 Guangdong Province, Shenzhen high tech Zone of Nanshan District City, No. 9018 North Central Avenue's innovation building A, 6-8 layer, 10-11 layer, B layer, C District 6-10 District 6 floor

Applicant before: NUBIA TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant