Detailed Description
Referring to fig. 1, fig. 1 is a flowchart of a first embodiment of a method for automatically deleting photos, which includes the following steps:
and S101, the terminal acquires a picture, and the picture is obtained by GPS positioning shooting.
The terminal can acquire the photo through the camera thereof, and simultaneously acquire the GPS positioning information. The GPS positioning information can be acquired by a GPS circuit carried by the terminal. The GPS circuit can be automatically started when the camera is started at the terminal to take a picture. The terminal controls the camera to acquire the photo to generate the photo file, and controls the GPS circuit to acquire the GPS positioning information and add the GPS positioning information into the photo file, such as an attribute data segment of the photo file.
In a specific application, the terminal is located in the southern mountain region of Shenzhen, Guangdong province, China, and is in an open state at the moment, and a user can take a picture by using a camera of the terminal under the operation of the user. And the GPS circuit is utilized to carry out GPS positioning while photographing, and GPS positioning information is obtained. The terminal adds the GPS positioning information to the attribute data section of the photo file. In addition, the terminal may display GPS positioning information on a map of a screen to display a place where the user is located. For example, the GPS positioning information is longitude and latitude (22.53,113.95), and the terminal is displayed as Shenzhen Nanshan district Dachong according to the GPS positioning information. If the terminal does not move, the GPS positioning information is carried in the photo file obtained by subsequent photographing.
S102: and judging whether the number of the photos with the same GPS positioning information is larger than a threshold value.
The terminal judges the number of the stored photo files regularly or irregularly, if the total number of the photo files exceeds a certain number, the storage space needs to be arranged, the number of the photo files of the same GPS positioning information is automatically identified, and whether the number of the photo files of the same GPS positioning information exceeds a threshold value is judged. If there is a case where the number of photo files of the same GPS positioning information exceeds the threshold value, the process proceeds to step S103. For example, the photo files in which the GPS positioning information in the attribute data segment of each photo file is Shenzhen nan shan Dachong are checked first, and whether the number of the photo files is greater than a threshold is determined, where the threshold may be set by the user, and the threshold is set by default of the system when the user does not set the threshold, such as setting the number of the photo files to 5, 3, or 8.
S103: if greater than a threshold, deleting at least a portion of the photograph.
And if the number of the photo files of the same GPS positioning information exceeds a threshold value, the terminal deletes at least part of the photo files. For example, if the number of the photo files with the GPS positioning information of shenzhen nan shan maing is greater than 5, parts, such as 2, 3, etc., are deleted from the 5 photo files, and the deleted number may be defined by the user or set by default in the system. The deleting mode can be that the garbage can is put in or the garbage can is completely deleted.
In order to avoid the mistaken deletion, the terminal automatically associates the deleted photo file with the cloud album to generate a recycle bin folder, and if the mistaken deletion occurs, the user can restore the deleted photo file from the cloud album recycle bin folder to the original photo file.
According to the scheme, the terminal acquires the photo files with the same GPS positioning information and judges whether the number of the photo files is larger than the threshold value, and if the number of the photo files is larger than the threshold value, at least part of the photo files are deleted. The terminal automatically deletes part of the photo files, the current situation that the photo files are deleted only after the internal memory is full is improved, the problem that the photo files occupy unreasonable space is solved, and the efficiency of searching the photos by the user in the future is improved.
Referring to fig. 2, fig. 2 is a flowchart of a second embodiment of the method for automatically deleting photos, which includes the following steps:
s201, the terminal obtains a photo, and the photo is obtained through GPS positioning shooting.
The terminal can acquire a picture by connecting the camera, and acquire the GPS positioning information at the same time of acquiring the picture by connecting the camera. The GPS positioning information may be acquired by a GPS circuit of the camera or acquired by a GPS circuit of the terminal itself. The GPS circuit may be automatically turned on when the terminal is connected to the camera for taking a picture. The terminal controls the camera to acquire the photo to generate the photo file, and controls the GPS circuit to acquire the GPS positioning information and add the GPS positioning information into the photo file, such as an attribute data segment of the photo file.
S202: judging whether the number of the photos with the same GPS positioning information is greater than a threshold value;
the terminal can identify the GPS positioning information of the photo files when the photo files are shot, judge the number of the photo files with the same GPS positioning information and judge whether the number of the photo files with the same GPS positioning information exceeds a threshold value. If there is a case where the number of photo files of the same GPS positioning information exceeds the threshold value, the process proceeds to step S203. The threshold value can be set by the user, or by default in the case that the user does not define the threshold value, such as setting to 2, 4, or 6 sheets.
S203: and if the picture composition ratio is larger than the threshold value, judging whether the picture composition ratio of the picture meets the composition requirement.
And if the number of the photo files of the same GPS positioning information exceeds the threshold value, the terminal judges whether the composition of the photo files meets the composition requirement or not according to the composition proportion of the photo files. The composition requirement can be set by the user self-definition, and the default setting of the system is used under the condition that the user does not set, such as the default trisection composition of the system or the distance between the top and the bottom of the focusing body and the frame, so as to judge whether the photo file meets the composition requirement.
And (3) trisection patterning: the picture is horizontally drawn at 1/3 and 2/3 positions, vertically drawn at 1/3 and 2/3 positions, and then the shot object is placed at the position of the intersection point as much as possible. As shown in fig. 3. The terminal judges whether the picture file meets the composition requirement according to whether the shooting object in the picture file is placed at the position of the intersection point, if the shooting object is placed at the position of the intersection point, the terminal judges that the picture file meets the composition requirement, if the shooting object deviates from the position of the intersection point, the terminal judges that the picture file does not meet the composition requirement, and step S204 is executed.
The distance between the top and the bottom of the focusing body and the frame directly influences the composition proportion of the picture, and the top of the focusing body is required to keep a distance of 20cm from the frame and the bottom of the focusing body is required to keep a distance of 10cm from the frame in good picture composition. If the distance between the top of the focusing body and the frame is 20cm and the distance between the bottom of the focusing body and the frame is 10cm, the terminal judges that the picture file meets the composition requirement, and if the distance between the top of the focusing body and the frame is 20cm or the distance between the bottom of the focusing body and the frame is 10cm, the terminal judges that the picture file does not meet the composition requirement, and step S204 is executed.
S204: and if the composition requirement is not met, deleting at least part of the photos which do not meet the composition requirement.
If there is a case of a photo file that does not meet the composition requirements, the terminal deletes at least a part of the photo file. The number of deletions may also be defined by the user or set by default. For example, 3, 5, or 6 sheets are set to be deleted. The deleting mode can be that the garbage can is put in or the garbage can is completely deleted.
In order to avoid the mistaken deletion, the terminal automatically associates the deleted photo file with the cloud album to generate a recycle bin folder, and if the mistaken deletion occurs, the user can restore the deleted photo file from the cloud album recycle bin folder to the original photo file.
According to the scheme, the terminal judges whether the picture file meets the composition requirement or not according to the composition proportion when the number of the pictures is larger than the threshold value by acquiring the pictures with the same GPS information, and deletes at least part of the pictures which do not meet the requirement. The method comprises the steps of arranging photo files shot at the same place, judging whether the photos meet composition requirements or not according to the composition proportion, deleting partial photos which do not meet the composition requirements, deleting unsatisfactory photos, storing the satisfactory photos, improving the current situation that the photos are deleted only after the internal memory is full of memory, solving the problem that the photos occupy unreasonable space, and improving the efficiency of searching the photos by users in the future.
Referring to fig. 4, fig. 4 is a flowchart of a third embodiment of the method for automatically deleting photos according to the present invention, which includes the following steps:
s301, the terminal obtains a photo, and the photo is obtained through GPS positioning shooting.
The terminal can acquire the photo through the data line, and simultaneously acquire the GPS positioning information when acquiring the photo through the data line. The GPS positioning information can be identified by the GPS circuit of the terminal itself. The GPS circuit may be automatically turned on when the terminal is connected to the data line. The terminal controls the GPS circuit to identify the GPS positioning information while controlling the data line to acquire the photo to generate the photo file, and adds the GPS positioning information into the photo file, such as an attribute data segment of the photo file.
S302: and judging whether the number of the photos with the same GPS positioning information is larger than a threshold value.
The terminal can identify the GPS positioning information of the photo files when acquiring the photo files, judge the number of the photo files of the same GPS positioning information and judge whether the number of the photo files of the same GPS positioning information exceeds a threshold value. If there is a case where the number of photo files of the same GPS positioning information exceeds the threshold value, the process proceeds to step S303. The threshold value can be set by the user self-definition, and the system defaults in the case that the user does not set the threshold value.
S303: and if the picture composition ratio is larger than the threshold value, judging whether the picture composition ratio of the picture meets the composition requirement.
And if the number of the photo files of the same GPS positioning information exceeds the threshold value, the terminal judges whether the composition of the photo files meets the composition requirement or not according to the composition proportion of the photo files. The composition requirement can be set by the user or the default setting of the system, such as the user setting the diagonal composition to judge whether the photo file meets the composition requirement.
The diagonal line composition refers to a composition method of placing a photographic subject on a diagonal line. If the shooting object is on the diagonal line, the terminal judges that the composition meets the composition requirement; if the shooting object in the photo file is not on the diagonal line, the terminal determines that the composition ratio of the photo file does not meet the composition requirement, and further determines that the photo file does not meet the preset condition, step S305 is executed, if the composition ratio cannot be determined, the terminal determines that whether the composition requirement is met, and step S304 is executed.
S304: and if the picture composition requirement cannot be judged to be met, judging whether the shooting time of the picture is within the preset time.
And if the photo file cannot be judged according to the composition requirement, judging by the terminal according to the shooting time of the photo file. And if the shooting time of the photo file is within the preset time, the terminal judges that the photo file meets the preset condition. If the photographing time of the photo file is not within the preset time period, step S305 is performed. The preset time can be set by the user, and the preset time is set by default in the case that the user does not set the preset time, such as the preset time period is 16-19 pm.
The pictures are taken at certain time, and the light intensity of the pictures is different at different times within one day. The different shooting time basically determines the light intensity, and the light intensity is necessarily related to the quality of the picture. As shown in fig. 5, fig. 5 shows the number of shots taken during a day versus time. In FIG. 5, a distinct peak occurs at 17-19 PM. In the time period, the light is soft, the brightness is enough, and the glare is not excessive. Therefore, the light intensity of the photo file taken in the time period is just proper. In addition, the satisfaction of people with photos taken at different times is different, and a survey shows that the satisfaction of people with photos taken also has a relationship with the time of the photos taken, as shown in fig. 6, which shows that the photos taken during the day have a relationship with the satisfaction, and 2 peaks appear at points 3-5 and 16-17 respectively. The reason is that the light rays at 3-5 points in the morning are sharp and have direct feeling, and the shot pictures have stimulating effect on the visual effect under the condition; the 16-17 point light is warm and has a diffuse feeling, in which case the picture taken visually gives an abnormally warm and pleasant feeling. And (4) comprehensively shooting light and satisfaction, wherein the time interval of the high-quality pictures preset by the terminal is [16-19 ]. And the terminal judges that the shooting time of the photo file is within the time interval [16-19] and the preset time is met. If the photographing time of the photo file deviates from the time interval [16-19], it is determined that the preset time is not met, and it is further determined that the preset condition is not met, step S305 is performed.
S305: and according to the degree of non-conformity with the preset conditions, sequentially deleting the photos which are not in conformity with the preset conditions from the least to the least until the rest of the photos meet the preset conditions.
According to the judgment of the composition proportion or the preset time, the terminal judges the photo files which do not meet the composition requirement or the preset time as not meeting the preset condition, sorts the photo files according to the condition from the condition which does not meet the preset condition to the condition which meets the preset condition, and deletes the photo files from the condition which does not meet the preset condition until the number of the residual photo files meets the preset condition. The number of remaining photo files may be set by user customization or by default by the system if not set by the user, such as 10%, 30%, or 60% remaining, for example.
In order to avoid the mistaken deletion, the terminal automatically associates the deleted photo file with the cloud album to generate a recycle bin folder, and if the mistaken deletion occurs, the user can restore the deleted photo file from the cloud album recycle bin folder to the original photo file.
According to the scheme, the terminal judges whether the picture files meet the composition requirements or not according to the composition proportion when the number of the pictures is larger than the threshold value by judging the picture files with the same GPS positioning information, judges whether the picture files meet the composition requirements or not by judging the shooting time of the picture files if the composition proportion cannot be judged, judges that the pictures do not meet the preset conditions if the picture files do not meet the preset time, and deletes the pictures which do not meet the preset conditions in sequence from the time which do not meet the preset conditions most, until the remaining pictures meet the preset conditions. When the photo album is arranged at the terminal, photo album files are sequenced according to whether preset conditions are met or not, and the photos which are not met with the preset conditions are deleted, so that the optimal photo files are stored, the unsatisfactory photo files are deleted, the current situation that the photos are deleted only when the memory is full of the photos is improved, the problem that the photos occupy unreasonable space is solved, and the efficiency of searching the photos by a user in the future is improved.
Referring to fig. 7, fig. 7 is a block diagram of a terminal for automatically deleting photos according to a first embodiment of the present invention, including:
the shooting module 100: the system is used for acquiring photos, and the photos are obtained by GPS positioning shooting;
the shooting module 100 is used for acquiring a photo, and the shooting module 100 may acquire the photo through a camera, and acquire the GPS positioning information while acquiring the photo through the camera. The GPS positioning information can be acquired by a GPS circuit carried by the terminal. The GPS circuit can be automatically started when the camera is started at the terminal to take a picture. The terminal controls the camera to acquire the photo to generate the photo file, and controls the GPS circuit to acquire the GPS positioning information and add the GPS positioning information into the photo file, such as an attribute data segment of the photo file.
The first determining module 210: the device is used for judging whether the number of the photos with the same GPS positioning information is larger than a threshold value;
the first determining module 210 determines the number of the stored photo files periodically or aperiodically, if the number of the photo files exceeds a certain number and the storage space needs to be arranged, the number of the photo files of the same GPS positioning information is automatically identified, and the first determining module 210 determines whether the number of the photo files of the same GPS positioning information exceeds a threshold. When the first determining module 210 determines that the threshold is exceeded, the information is transmitted to the deleting module 300. The threshold value can be set by the user, and is set by default in the case that the user does not set the threshold value, for example, the user can set the threshold value to 4, 6 or 7 sheets by self-definition, etc.
The deletion module 300: for deleting at least part of the photograph if greater than a threshold.
When the first determining module 210 determines that the number of the photo files exceeds the threshold, the information is transmitted to the deleting module 300, and the deleting module 300 receives the information to delete at least a part of the photo files. The number of photo files deleted may also be defined by the user or set by default by the system. The deleting mode can be that the garbage can is put in or the garbage can is completely deleted.
In order to avoid the mistaken deletion, the terminal automatically associates the photo file deleted by the deletion module 300 with the cloud album to generate a recycle bin folder, and if the photo file deleted by the terminal is deleted by mistake, the user can restore the original photo file from the cloud album recycle bin folder.
In the scheme, the terminal acquires the photo files with the same GPS positioning information through the acquisition module, when the first judgment module 210 judges that the number of the photo files exceeds the threshold value, the information is transmitted to the deletion module 300, and the deletion module 300 receives the information to delete at least part of the photo files. The terminal automatically deletes part of the photo files, the current situation that the photo files are deleted only after the internal memory is full is improved, the problem that the photo files occupy unreasonable space is solved, and the efficiency of searching the photos by the user in the future is improved.
Referring to fig. 8, fig. 8 is a block diagram of a third embodiment of a terminal for automatically deleting photos according to the present invention, including:
the shooting module 100: the system is used for acquiring photos, and the photos are obtained by GPS positioning shooting;
the shooting module 100 is used for acquiring a photo, and the shooting module 100 can acquire the photo by connecting with a camera, and acquire the photo by connecting with the camera and acquire the GPS positioning information at the same time. The GPS positioning information can be acquired by a GPS circuit carried by the terminal. The GPS circuit can be automatically started when the camera is started at the terminal to take a picture. The terminal controls the GPS circuit to acquire GPS positioning information while controlling the camera to acquire the photo to generate the photo file, and adds the GPS positioning information to the photo file, such as to an attribute data segment of the photo file.
The first determining module 210: and the method is used for judging whether the number of the photo files with the same GPS positioning information is larger than a threshold value.
The first determining module 210 may obtain the photo file taken by the photographing module 100 and identify the GPS positioning information of the photo file at the same time, determine the number of photo files of the same GPS positioning information, and determine whether the number of photo files of the same GPS positioning information exceeds a threshold. When the determination result of the first determining module 210 exceeds the threshold, the information is transmitted to the second determining module 220. The threshold value can be set by the user self-definition, and the system defaults in the case that the user does not set the threshold value.
The second determination module 220: and the method is particularly used for judging whether the composition proportion of the photo meets the composition requirement of the trisection method or whether the position of the focusing body in the photo is within the set range of the photo.
When the determination result of the first determining module 210 exceeds the threshold, the information is transmitted to the second determining module 220. The second determining module 220 determines whether the composition of the photo file meets the composition requirement according to the composition proportion of the photo file. The composition requirement can be set by the user self-definition, and the default setting of the system is used under the condition that the user does not set, such as the default trisection composition of the system or the distance between the top and the bottom of the focusing body and the frame, so as to judge whether the photo file meets the composition requirement.
The second determining module 220 is configured to determine whether the picture file meets the composition requirement by a trisection composition method or by a distance between the top and the bottom of the focus or a distance between the top and the frame of the focus and the bottom, and transmit information to the deleting module 300 when the second determining module 220 determines that the picture file does not meet the composition requirement according to the trisection composition method or by a distance between the top and the bottom of the focus.
When the second determining module 220 performs composition according to the trisection method or cannot determine whether the photo file meets the composition requirement according to the distance between the top and the bottom of the focus body, the information is transmitted to the third determining module 230.
Judging that the picture composition meets the picture composition requirement according to a trisection method, wherein the picture composition means that a shot object in a picture file is at the intersection point position; the judgment of meeting the composition requirement according to the distance between the top of the focusing body and the frame and the bottom means that the distance between the top and the frame is 20cm, and the distance between the bottom and the frame is 10 cm.
The third determining module 230: and is configured to determine whether the shooting time of the photo is within a predetermined time when the second determining module 220 cannot determine whether the composition requirement is met.
When the second determining module 220 performs composition according to the trisection method or cannot determine whether the photo file meets the composition requirement according to the distance between the top of the focal body and the frame and the bottom of the focal body, the third determining module 230 determines according to the shooting time of the photo file. And determines that the picture file photographed within the preset time is in accordance with the preset condition, and the picture not photographed within the preset time is not in accordance with the preset bar, and transmits information to the deletion module 300 when the third determination module 230 determines that the picture file is not in accordance with the preset condition.
The preset time may be set by the user's own definition, and by a system default in case the user has no setting, such as a system default preset time interval [16-19 ].
The deletion module 300: specifically, the method is used for sequentially deleting the photos which do not meet the preset condition from the most non-meeting state to the extent of not meeting the preset condition until the remaining photos meet the preset condition.
If the result of the second determination module 220 or the determination module 230 is negative, the terminal sorts the photo files according to the degree of meeting the predetermined condition and according to the degree of not meeting the predetermined condition until meeting the predetermined condition, and the deletion module 300 deletes the photo files in order from the photo files that do not meet the predetermined condition until the number of the remaining photo files meets the predetermined condition. The number of the remaining photo files can be set by the user, or by default if the user does not set the number, such as 5, 10, or 20 remaining photos, etc. The deleting mode can be that the garbage can is put in or the garbage can is completely deleted.
In order to avoid the mistaken deletion, the terminal automatically associates the photo file deleted by the deletion module 300 with the cloud album to generate a recycle bin folder, and if the photo file deleted by the terminal is deleted by mistake, the user can restore the original photo file from the cloud album recycle bin folder.
In the above scheme, the terminal obtains the photo files with the same GPS positioning information through the obtaining module, and determines whether the number of the photo files is greater than the threshold value through the first determining module 210, if so, the second determining module 220 determines whether the composition ratio of the photo files meets the requirement, and if not, determines that the composition ratio does not meet the preset condition. If the second determining module 220 cannot determine the picture, the third determining module 230 determines the picture taking time, determines that the picture not taken within the preset time does not meet the preset condition, and deletes 300 the picture that does not meet the preset condition through the deleting module. Photos which do not accord with composition requirements and are not shot within preset time in the same place in the photo album are sorted, and the photos which do not accord with the requirements at all are sequentially deleted, so that unsatisfactory photo files are deleted, the optimal photo files are stored, the current situation that a user is cleaned after the mobile phone photo album is full is improved, the problem that the photos occupy unreasonable space is solved, and the efficiency of searching the photos by the user in the future is improved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and it should be noted that, for those skilled in the art, many variations and modifications can be made without departing from the spirit of the present invention, and these modifications and modifications all fall within the scope of the present invention.