Remaining storage amount processing method, photographing apparatus, and computer-readable storage mediumTechnical FieldThe embodiment of the invention relates to the field of unmanned aerial vehicles, in particular to a method for processing residual storage, shooting equipment and a computer-readable storage medium.
BackgroundThe shooting device in the prior art comprises a memory card, the memory card can be used for storing images or videos shot by the shooting device, and the shooting device can display the number of images or video time length which can be stored in the memory card.
However, the number of images or video time periods that can be stored in the remaining capacity of the memory card displayed by the camera is not accurate due to different scenes, different formats, and different resolutions when the camera takes images or videos.
Disclosure of Invention
The embodiment of the invention provides a method for processing residual memory capacity, a shooting device and a computer readable storage medium, which are used for improving the accuracy of the number of images or video duration which can be stored in the residual capacity of a memory card displayed by the shooting device.
A first aspect of an embodiment of the present invention provides a method for processing remaining storage, including:
acquiring parameter information of a current image shot by shooting equipment;
determining the capacity of a storage device occupied by the current image according to at least one historical image shot by the shooting equipment, wherein the parameter information of the historical image is matched with the parameter information of the current image;
determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image;
and displaying the number of images which can be stored in the current residual capacity of the storage device.
A second aspect of an embodiment of the present invention provides a method for processing remaining storage, including:
acquiring parameter information of a current video shot by shooting equipment;
determining the capacity of a storage device occupied by the current video in unit time according to at least one historical video shot by the shooting equipment, wherein the parameter information of the historical video is matched with the parameter information of the current video;
determining the video duration which can be stored by the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current video in unit time;
and displaying the video time length which can be stored by the current residual capacity of the storage device.
A third aspect of embodiments of the present invention is to provide a photographing apparatus including: a processor, a storage device and a display device;
the processor is configured to:
acquiring parameter information of a current image shot by shooting equipment;
determining the capacity of a storage device occupied by the current image according to at least one historical image shot by the shooting equipment, wherein the parameter information of the historical image is matched with the parameter information of the current image;
determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image;
and displaying the number of images which can be stored in the current residual capacity of the storage device through the display device.
A fourth aspect of embodiments of the present invention is to provide a photographing apparatus, including: a processor, a storage device and a display device;
the processor is configured to:
acquiring parameter information of a current video shot by shooting equipment;
determining the capacity of a storage device occupied by the current video in unit time according to at least one historical video shot by the shooting equipment, wherein the parameter information of the historical video is matched with the parameter information of the current video;
determining the video duration which can be stored by the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current video in unit time;
and displaying the video time length which can be stored by the current residual capacity of the storage device through the display device.
A fifth aspect of embodiments of the present invention is to provide a computer-readable storage medium, including: on which a computer program is stored which is executed by a processor to implement the method of the first or second aspect.
According to the method for processing the remaining storage amount, the shooting device and the computer readable storage medium provided by the embodiment, the parameter information of the current image shot by the shooting device is obtained, the capacity of the storage device occupied by the current image is determined according to the historical image matched with the parameter information of the current image, the number of images which can be stored in the remaining capacity is determined according to the current remaining capacity of the storage device and the capacity of the storage device occupied by the current image, and the capacity of the storage device occupied by the current image can be accurately calculated according to the historical image because the parameter information of the historical image is matched with the parameter information of the current image, so that the number of images which can be stored in the remaining storage of the memory card and are displayed by the shooting device is relatively accurate.
DrawingsIn order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of a remaining storage processing method according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario provided in an embodiment of the present invention;
fig. 3 is a flowchart of a remaining storage processing method according to another embodiment of the present invention;
fig. 4 is a flowchart of a remaining storage processing method according to another embodiment of the present invention;
fig. 5 is a flowchart of a remaining storage processing method according to another embodiment of the present invention;
fig. 6 is a structural diagram of a photographing apparatus provided in an embodiment of the present invention;
fig. 7 is a block diagram of a photographing apparatus according to another embodiment of the present invention.
Reference numerals:
20: an unmanned aerial vehicle; 21: a photographing device; 22: a holder;
23: a communication system; 24: a terminal device; 60: a photographing device;
61: a processor; 62: a storage device; 63: a display device;
64: a communication interface; 70: a photographing device; 71: a processor;
72: a storage device; 73: a display device; 74: and a communication interface.
Detailed DescriptionThe technical solutions in the embodiments of the present invention will be described clearly below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When a component is referred to as being "connected" to another component, it can be directly connected to the other component or intervening components may also be present.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
The embodiment of the invention provides a method for processing residual memory. Fig. 1 is a flowchart of a remaining storage processing method according to an embodiment of the present invention. As shown in fig. 1, the method in this embodiment may include:
and step S101, acquiring parameter information of a current image shot by the shooting equipment.
In this embodiment, shooting equipment can be carried on unmanned aerial vehicle, also can set up on handheld cloud platform, can also directly be held by the user. In other embodiments, the shooting device may also be a terminal device with a shooting function, and the terminal device may specifically be a user device such as a mobile phone, a tablet computer, and the like.
When the shooting device is in a shooting state, an image sensor in the shooting device can sense an image in real time, and the shooting device displays the image sensed by the image sensor on a display component such as a display screen so that a user can observe the image and adjust parameters of the shooting device to make the image clear.
In this embodiment, when the shooting device shoots a current image, a processor, such as an image processor, in the shooting device stores the current image in a storage device, such as a Memory Card, of the shooting device, where the Memory Card may be a Secure Digital Memory Card (sdcard). Meanwhile, the processor can also acquire the parameter information of the current image. Optionally, the parameter information of the current image includes at least one of: the format of the current image, the resolution of the current image and the scene corresponding to the current image. Optionally, the format of the current image may specifically be a format in which the current image is stored in sdcard, where the format includes at least one of: JPEG, TIFF, RAW, which are only schematically illustrated here, do not limit the specific format of the current image. The resolution of the current image refers to the density of pixel points in the current image, for example, the resolution of the current image may be a pixel value per unit length in the current image. The higher the resolution of the current image, the sharper the resolution of the current image. The scene corresponding to the current image comprises at least one of the following: a character scene, a landscape scene, a building scene, etc.
Step S102, according to at least one historical image shot by the shooting equipment, determining that the current image occupies the capacity of a storage device, wherein the parameter information of the historical image is matched with the parameter information of the current image.
The photographing apparatus may also photograph and store a plurality of history images before photographing a current image. After the processor in the shooting device stores the current image in the storage device of the shooting device, such as a memory card, the processor may search at least one history image matching the current image from a plurality of history images according to parameter information of the current image, such as at least one of format, resolution, and scene, optionally, the parameter information of the at least one history image matches the parameter information of the current image, and the parameter information of the history image includes at least one of: the format of the historical image, the resolution of the historical image and a scene corresponding to the historical image.
For example, the format of each history image in the at least one history image is consistent with the format of the current image, the resolution of each history image in the at least one history image is consistent with the resolution of the current image, and the scene corresponding to each history image in the at least one history image is consistent with the scene corresponding to the current image.
In this embodiment, the processor may determine that the current image occupies the capacity of the storage device according to at least one history image matched with the current image stored in the storage device. For example, the processor may determine that the current image occupies the capacity of the storage device based on an average capacity of the storage device occupied by at least one historical image stored in the storage device that matches the current image.
Specifically, the determining, according to at least one history image captured by the capturing device, that the current image occupies a capacity of a storage device includes: and determining the capacity of the storage device occupied by the current image according to the number of at least one historical image shot by the shooting equipment and the capacity of the storage device occupied by each historical image in the at least one historical image.
For example, the photographing apparatus photographs and stores the history image 1 at the history time t0, the history image 2 at the history time t1, the history image 3 at the history time t3, and the current image at the current time t 4. The history image 1, the history image 2, and the history image 3 are respectively matched with the current image, and the processor of the photographing apparatus may calculate an average capacity V1 occupied by the history image 1, the history image 2, and the history image 3 in the storage device, from a capacity V11 occupied by the history image 1 in the storage device, a capacity V12 occupied by the history image 2 in the storage device, and a capacity V13 occupied by the history image 3 in the storage device, where V1 is (V11+ V12+ V13)/3. Since the history image 1, the history image 2, and the history image 3 are respectively matched with the current image, the average capacity of the storage device occupied by the history image 1, the history image 2, and the history image 3 in the storage device is V1 as the capacity of the storage device occupied by the current image.
Step S103, determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image.
The processor can determine the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity Cap of the storage device and the capacity V1 of the current image occupying storage device, wherein the number of images is that Cap is divided by V1.
And step S104, displaying the number of images which can be stored in the current residual capacity of the storage device.
The processor, after determining the number of images that can be stored in the current remaining capacity of the storage device, displays the number of images on a display component of the photographing apparatus, such as a display screen, so that a user can control the number of shots of the current image.
In other embodiments, after determining the number of images that can be stored in the current remaining capacity of the storage device, the method further includes: and sending the number of images which can be stored in the current residual capacity of the storage device to a user terminal so that the user terminal displays the number of images which can be stored in the current residual capacity of the storage device.
As shown in fig. 2, theshooting device 21 is mounted on thedrone 20 through thecradle head 22, and after the processor in theshooting device 21 determines the number of images that can be stored in the current remaining capacity of the storage device, the number of images can be sent to theterminal device 24 on the ground through thecommunication system 23 of thedrone 20, and the user can control thedrone 20 to fly or control theshooting device 21 to shoot the images through theterminal device 24. When theterminal device 24 receives the number of images storable by the current remaining capacity of the storage means in the photographingdevice 21, the number of images is displayed on a display member such as a display screen of theterminal device 24 so that the user controls the photographing number of the current images.
Additionally, in some embodiments, the method further comprises: and when the current residual capacity of the storage device is smaller than a preset capacity value, determining that the number of images which can be stored by the current residual capacity of the storage device is 0.
For example, in order to avoid that the photographing apparatus or theterminal apparatus 24 displays the number of remaining images, but the storage device has no actual remaining capacity, a preset capacity value may be set, which may be the minimum capacity value noted C. When the processor in the photographing apparatus determines that the current remaining capacity of the storage device is less than the preset capacity value, it determines that the number of images that can be stored by the current remaining capacity of the storage device is 0, and at the same time, the photographing apparatus displays the number of images 0 on the display component of the photographing apparatus so that the user knows that the storage device has no remaining capacity. In addition, the shooting device can also send the image number 0 to a terminal device on the ground, and the terminal device displays the image number 0 on a display component of the terminal device.
According to the embodiment, the parameter information of the current image shot by the shooting equipment is obtained, the capacity of the storage device occupied by the current image is determined according to the historical image matched with the parameter information of the current image, the number of images which can be stored in the residual capacity is determined according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image, and the capacity of the storage device occupied by the current image can be accurately calculated according to the historical image due to the fact that the parameter information of the historical image is matched with the parameter information of the current image, so that the number of the images which can be stored in the memory card and are left in the memory card and displayed by the shooting equipment is accurate.
The embodiment of the invention provides a method for processing residual memory. Fig. 3 is a flowchart of a remaining storage processing method according to another embodiment of the present invention. As shown in fig. 3, on the basis of the embodiment shown in fig. 1, the method in this embodiment may further include:
step S301, receiving a shooting instruction.
After the processor of the shooting device calculates the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity Cap of the storage device and the capacity V1 of the storage device occupied by the current image, the user can continue to shoot images under the condition that the format, the resolution and the scene of the current image are not changed, and correspondingly, the shooting device can also receive the shooting instruction of the user.
And step S302, the number of images which can be stored in the current residual capacity of the storage device is decreased according to the shooting instruction.
In the present embodiment, the processor in the photographing apparatus decreases the number of images that can be stored in the current remaining capacity of the storage device by one every time a photographing instruction of the user is received, that is, the number of images that can be stored in the current remaining capacity of the storage device decreases as the photographing instruction increases. Meanwhile, the shooting device can display the reduced number of storable images on the display component, so that the number of storable images of the residual capacity of the storage device displayed on the display component is continuously reduced.
In addition, since the parameter information of the plurality of images continuously captured by the capturing device may not be completely consistent, or the parameter information of the plurality of images captured by the capturing device within the preset time may not be completely consistent, a certain accumulated error may occur in the process of decreasing the number of images that can be stored in the current remaining capacity of the storage device. To reduce or eliminate this cumulative error, this can be accomplished by several possible implementations as follows.
One possible implementation is: receiving a parameter switching instruction of the current image; the determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image comprises: and when a parameter switching instruction of the current image is received, determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image.
For example, the photographing apparatus photographs and stores a current image at a current time t4, and the processor of the photographing apparatus calculates the number of images that can be stored in the current remaining capacity of the storage device in the photographing apparatus from at least one history image matching the current image at the current time t4 to be 80. The processor of the photographing apparatus receives a photographing instruction at time t5, and subtracts 1 from the number of images 80 storable in the remaining capacity to obtain 79. The processor of the photographing apparatus receives a photographing instruction again at time t6, and subtracts 1 from the number 79 of images storable in the remaining capacity to obtain 78. At time t7, the processor receives a user instruction to switch the parameters of the current image, for example, to switch the scene of the current image, and at this time, the processor may re-determine the number of images that can be stored in the current remaining capacity of the storage device according to the remaining capacity of the storage device and the occupied capacity of the current image at time t7, for example, the number of images that can be stored in the re-calculated remaining capacity is 76, and when the scene switching of the current image is completed, the processor displays the number of images 76 that can be stored in the re-calculated remaining capacity on the display component. Although there is a jump from time 78 at t6 to time 76 at t7, the jump may reduce or eliminate the cumulative error that is formed during the decrementing of the number of images.
Another possible implementation is: receiving a shooting mode switching instruction; the determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image comprises: and when the shooting mode switching instruction is received, determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image.
For example, the processor calculates the number of images that can be stored in the current remaining capacity of the storage device at time t4 to be 80, subtracts 1 from the number of images 80 that can be stored in the remaining capacity at time t5 to obtain 79, and subtracts 1 from the number of images 79 that can be stored in the remaining capacity at time t6 to obtain 78. At time t7, when the processor receives a user's shooting mode switching instruction, for example, to switch the image shooting mode to a video shooting mode, the processor may re-determine the number of images that can be stored in the current remaining capacity of the storage device, for example, the number of images that can be stored in the re-calculated remaining capacity is 76, according to the remaining capacity of the storage device and the capacity of the storage device occupied by the current image at time t 7.
Yet another possible implementation is: receiving a user interface switching instruction; the determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image comprises: and when the user interface switching instruction is received, determining the number of images which can be stored in the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image.
For example, a terminal device on the ground is installed with an Application (APP) for controlling the shooting device, the APP includes a plurality of user interfaces, when a user switches the user interfaces, the terminal device can generate a user interface switching instruction and send the user interface switching instruction to the shooting device, and when a processor of the shooting device receives the user interface switching instruction, the number of images which can be stored in the current residual capacity of the storage device is redetermined according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image.
In this embodiment, when the shooting device receives a parameter switching instruction, a shooting mode switching instruction or a user interface switching instruction of a user for a current image, the number of images that can be stored in the current remaining capacity of the storage device is re-determined, which is only schematically illustrated here, and in other embodiments, the shooting device may also re-determine the number of images that can be stored in the current remaining capacity of the storage device when other switching instructions or other non-shooting instructions are received, so as to reduce or eliminate accumulated errors formed in the process of image number decreasing.
According to the embodiment, when the shooting equipment receives the shooting instruction of the user, the number of the images which can be stored in the current residual capacity of the storage device is reduced progressively, so that the number of the images which can be stored in the residual capacity is prevented from jumping when the user continuously shoots the images, and the user experience is improved. In addition, when a parameter switching instruction, a shooting mode switching instruction or a user interface switching instruction of a user for a current image is received through the shooting equipment, the number of images which can be stored in the current residual capacity of the storage device is determined again, so that accumulated errors formed in the process of decreasing the number of images are reduced or eliminated.
The embodiment of the invention provides a method for processing residual memory. Fig. 4 is a flowchart of a remaining storage processing method according to another embodiment of the present invention. As shown in fig. 4, the method in this embodiment may include:
and step S401, acquiring parameter information of the current video shot by the shooting equipment.
In this embodiment, when the shooting device shoots a current video, a processor, such as an image processor, in the shooting device stores the current video in a storage device, such as a Memory Card, of the shooting device, where the Memory Card may be a Secure Digital Memory Card (sdcard). Meanwhile, the processor can also acquire the parameter information of the current video. Optionally, the parameter information of the current video includes at least one of: the format of the current video, the resolution of the current video and the scene corresponding to the current video. Optionally, the format of the current video may specifically be a format in which the current video is stored in sdcard, where the format includes at least one of: MP4, MPG, AVI, WMV, FLV, SWF, which are only illustrative and do not limit the specific format of the current video. The scene corresponding to the current video comprises at least one of the following: a character scene, a landscape scene, a building scene, etc.
Step S402, according to at least one historical video shot by the shooting equipment, determining that the current video occupies the capacity of a storage device in unit time, wherein the parameter information of the historical video is matched with the parameter information of the current video.
The shooting device can also shoot and store a plurality of historical videos before shooting the current video. After the processor in the shooting device stores the current video in a storage device of the shooting device, such as a memory card, the processor may search at least one historical video matching the current video from a plurality of historical videos according to parameter information of the current video, such as at least one of format, resolution, and scene, optionally, the parameter information of the at least one historical video matches the parameter information of the current video, where the parameter information of the historical video includes at least one of: the format of the historical video, the resolution of the historical video and the scene corresponding to the historical video.
For example, the format of each historical video in the at least one historical video is consistent with the format of the current video, the resolution of each historical video in the at least one historical video is consistent with the resolution of the current video, and the scene corresponding to each historical video in the at least one historical video is consistent with the scene corresponding to the current video.
In this embodiment, the processor may determine that the current video occupies the capacity of the storage device according to at least one historical video matching the current video stored in the storage device. For example, the processor may determine that the current video occupies the capacity of the storage device based on an average capacity of at least one historical video stored in the storage device that matches the current video occupied in the storage device.
Specifically, the determining, according to at least one historical video captured by the capturing device, that the current video occupies a capacity of a storage device in a unit time includes: and determining the capacity of the storage device occupied by the current video in unit time according to the duration of at least one historical video shot by the shooting equipment and the capacity of the storage device occupied by each historical video in the at least one historical video.
For example, the photographing apparatus photographs and stores the history video 1 at the history time t0, the history video 2 at the history time t1, the history video 3 at the history time t3, and the current video at the current time t 4. The historical video 1, the historical video 2 and the historical video 3 are respectively matched with the current video, and the processor of the shooting device can determine the capacity V21 occupied by the historical video 1 in the storage device in unit time, for example, every second according to the duration of the historical video 1 and the capacity occupied by the historical video 1 in the storage device; determining the capacity V22 occupied by the historical video 2 in the storage device in unit time, for example, every second, according to the duration of the historical video 2 and the capacity occupied by the historical video 2 in the storage device; according to the duration of the historical video 3 and the occupied capacity of the historical video 3 in the storage device, the occupied capacity V23 of the historical video 3 in the storage device in unit time, for example, every second, is determined. Further, based on a capacity V21 occupied by the history video 1 per second in the unit time, a capacity V22 occupied by the history video 2 per second in the unit time in the storage device, and a capacity V23 occupied by the history video 3 per second in the unit time in the storage device, an average capacity V2 occupied by the history video 1, the history video 2, and the history video 3 per second in the storage device is calculated, and V2 is (V21+ V22+ V23)/3. Since the history video 1, the history video 2 and the history video 3 are respectively matched with the current video, the average capacity V2 occupied by the history video 1, the history video 2 and the history video 3 in the storage device in a unit time, for example, every second, can be used as the capacity of the storage device occupied by the current video in the unit time.
Step S403, determining a video duration that the current remaining capacity of the storage device can store according to the current remaining capacity of the storage device and the capacity of the storage device occupied by the current video in unit time.
The processor determines the video time length which can be stored by the current residual capacity of the storage device according to the current residual capacity Cap of the storage device and the capacity V2 occupied by the current video in unit time, wherein the video time length is Cap divided by V2.
And S404, displaying the video time length which can be stored in the current residual capacity of the storage device.
The processor determines the video time length which can be stored in the current residual capacity of the storage device, and then displays the video time length on a display component of the shooting device, such as a display screen, so that a user can control the shooting time length of the current video.
In other embodiments, after determining the video duration that the current remaining capacity of the storage device can store, the method further includes: and sending the video time length which can be stored by the current residual capacity of the storage device to a user terminal so that the user terminal displays the video time length which can be stored by the current residual capacity of the storage device.
As shown in fig. 2, theshooting device 21 is mounted on thedrone 20 through thecradle head 22, and after the processor in theshooting device 21 determines the video duration that the current remaining capacity of the storage device can store, the video duration can be sent to theterminal device 24 on the ground through thecommunication system 23 of thedrone 20, so that the user can control thedrone 20 to fly or control theshooting device 21 to shoot the video through theterminal device 24. When theterminal device 24 receives a video duration that can be stored in the storage means of the photographingdevice 21 at the present remaining capacity, the video duration is displayed on a display component of theterminal device 24, such as a display screen, so that the user controls the number of shots of the current video.
Additionally, in some embodiments, the method further comprises: and when the current residual capacity of the storage device is smaller than a preset capacity value, determining that the video time length which can be stored by the current residual capacity of the storage device is 0.
For example, in order to avoid that the shooting device or theterminal device 24 displays a remaining video duration, but the storage device has no actual remaining capacity, a preset capacity value may be set, which may be the minimum capacity value denoted C. When the processor in the shooting device determines that the current residual capacity of the storage device is smaller than the preset capacity value, the video time length which can be stored by the current residual capacity of the storage device is determined to be 0, and meanwhile, the shooting device displays the video time length 0 on a display component of the shooting device, so that a user knows that the storage device does not have the residual capacity. In addition, the shooting device can also send the video duration 0 to a terminal device on the ground, and the terminal device displays the video duration 0 on a display component of the terminal device.
According to the embodiment, the parameter information of the current video shot by the shooting device is obtained, the capacity of the storage device occupied by the current video in unit time is determined according to the historical video matched with the parameter information of the current video, the video duration capable of being stored by the residual capacity is determined according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current video in unit time, and the capacity of the storage device occupied by the current video in unit time can be accurately calculated according to the historical video due to the fact that the parameter information of the historical video is matched with the parameter information of the current video, so that the duration of the video capable of being stored by the memory card in the residual memory card displayed by the shooting device is accurate.
The embodiment of the invention provides a method for processing residual memory. Fig. 5 is a flowchart of a remaining storage processing method according to another embodiment of the present invention. As shown in fig. 5, on the basis of the embodiment shown in fig. 4, the method in this embodiment may include:
step S501, receiving a shooting instruction.
After the processor of the shooting device calculates the video duration that the current residual capacity of the storage device can store according to the current residual capacity Cap of the storage device and the capacity V2 of the storage device occupied by the current video in unit time, the user can continue shooting the video under the condition that the format, resolution and scene of the current video are not changed, and correspondingly, the shooting device can also receive the shooting instruction of the user.
And step S502, according to the shooting instruction, the video time length which can be stored in the current residual capacity of the storage device is decreased progressively.
In this embodiment, the processor in the shooting apparatus decreases the video duration storable by the current remaining capacity of the storage device by one second every time a shooting instruction by the user is received, that is, the video duration storable by the current remaining capacity of the storage device decreases as the shooting instruction increases. Meanwhile, the shooting device can display the degressive storable video time length on the display component, so that the storable video time length of the residual capacity of the storage device displayed on the display component is continuously degressive.
In addition, since the parameter information of the plurality of videos continuously shot by the shooting device may not be completely consistent, or the parameter information of the plurality of videos shot by the shooting device within the preset time may not be completely consistent, a certain accumulated error may occur in the process of decrementing the video duration that can be stored in the current remaining capacity of the storage device. To reduce or eliminate this cumulative error, this can be accomplished by several possible implementations as follows.
One possible implementation is: receiving a parameter switching instruction of the current video; the determining, according to the current remaining capacity of the storage device and the capacity of the storage device occupied by the current video in unit time, a video duration that can be stored in the current remaining capacity of the storage device includes: and when receiving the parameter switching instruction of the current video, determining the video duration which can be stored by the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current video in unit time.
For example, the shooting device shoots and stores a current video at a current time t4, and the processor of the shooting device calculates the video time length that the current remaining capacity of the storage device in the shooting device can store according to at least one historical video matched with the current video at the current time t4 to be 60 minutes. When the processor of the photographing apparatus receives a photographing instruction at time t5, the photographing apparatus continues to photograph the current video, and the duration of the video that can be stored in the remaining capacity of the storage device continuously decreases on a 60 minute basis during photographing of the current video. At time t6, the processor of the photographing apparatus receives a stop photographing instruction of the user and stops photographing. At time t7, the processor receives a user instruction for switching the parameters of the current video, for example, switching the scene of the current video, and at this time, the processor may re-determine the video duration that the current remaining capacity of the storage device can store according to the remaining capacity of the storage device and the capacity of the storage device occupied by the current video per unit time at time t7, so as to reduce or eliminate the accumulated error formed during the decreasing process of the video duration.
Another possible implementation is: receiving a shooting mode switching instruction; the determining, according to the current remaining capacity of the storage device and the capacity of the storage device occupied by the current video in unit time, a video duration that can be stored in the current remaining capacity of the storage device includes: and when the shooting mode switching instruction is received, determining the video duration which can be stored by the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current video in unit time.
For example, the shooting device shoots and stores a current video at a current time t4, and the processor of the shooting device calculates the video time length that the current remaining capacity of the storage device in the shooting device can store according to at least one historical video matched with the current video at the current time t4 to be 60 minutes. When the processor of the photographing apparatus receives a photographing instruction at time t5, the photographing apparatus continues to photograph the current video, and the duration of the video that can be stored in the remaining capacity of the storage device continuously decreases on a 60 minute basis during photographing of the current video. At time t6, the processor of the photographing apparatus receives a stop photographing instruction of the user and stops photographing. At time t7, when the processor receives a user's shooting mode switching instruction, for example, to switch the video shooting mode to the image shooting mode, the processor may re-determine the video duration that the current remaining capacity of the storage device can store according to the remaining capacity of the storage device and the capacity of the storage device occupied by the current video per unit time at time t7, so as to reduce or eliminate the accumulated error formed during the video duration decrement process.
Yet another possible implementation is: receiving a user interface switching instruction; the determining, according to the current remaining capacity of the storage device and the capacity of the storage device occupied by the current video in unit time, a video duration that can be stored in the current remaining capacity of the storage device includes: and when the user interface switching instruction is received, determining the video duration which can be stored by the current residual capacity of the storage device according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current video in unit time.
For example, a terminal device on the ground is installed with an Application (APP) for controlling the shooting device, the APP includes a plurality of user interfaces, when a user switches the user interfaces, the terminal device can generate a user interface switching instruction and send the user interface switching instruction to the shooting device, and when a processor of the shooting device receives the user interface switching instruction, the video duration that the current remaining capacity of the storage device can store is redetermined according to the current remaining capacity of the storage device and the capacity of the storage device occupied by the current video in unit time, so as to reduce or eliminate the accumulated error formed in the process of decreasing the video duration.
In this embodiment, when the shooting device receives a parameter switching instruction, a shooting mode switching instruction, or a user interface switching instruction for a current video from a user, it re-determines a video duration that the current remaining capacity of the storage device can store, which is only schematically illustrated here, and in other embodiments, the shooting device may also re-determine a video duration that the current remaining capacity of the storage device can store when another switching instruction or another non-shooting instruction is received, so as to reduce or eliminate an accumulated error formed in the process of decrementing the video duration.
In the embodiment, when the shooting device receives the shooting instruction of the user, the video time length which can be stored in the current residual capacity of the storage device is decreased progressively, so that the video time length jump which can be stored in the residual capacity when the user continuously shoots the video is avoided, and the user experience is improved. In addition, when a parameter switching instruction, a shooting mode switching instruction or a user interface switching instruction of a user for the current video is received through the shooting equipment, the video time length which can be stored in the current residual capacity of the storage device is determined again, so that the accumulated error formed in the process of decreasing the video time length is reduced or eliminated.
The embodiment of the invention provides shooting equipment. Fig. 6 is a structural diagram of a photographing apparatus according to an embodiment of the present invention, and as shown in fig. 6, a photographingapparatus 60 includes: aprocessor 61, astorage device 62 and adisplay device 63. Theprocessor 61 is configured to: acquiring parameter information of a current image shot by shooting equipment; determining that the current image occupies the capacity of astorage device 62 according to at least one history image shot by the shooting device, wherein the parameter information of the history image is matched with the parameter information of the current image; determining the number of images which can be stored in the current residual capacity of thestorage device 62 according to the current residual capacity of thestorage device 62 and the capacity of thestorage device 62 occupied by the current image; the number of images storable in the current remaining capacity of thestorage device 62 is displayed by thedisplay device 63.
Optionally, the parameter information of the current image includes at least one of: the format of the current image, the resolution of the current image and the scene corresponding to the current image.
Optionally, the parameter information of the historical image includes at least one of: the format of the historical image, the resolution of the historical image and a scene corresponding to the historical image.
Optionally, theshooting device 60 further includes: acommunication interface 64; thecommunication interface 64 is used for transmitting the number of images storable in the current remaining capacity of thestorage device 62 to the user terminal so that the user terminal displays the number of images storable in the current remaining capacity of thestorage device 62.
Optionally, theshooting device 60 further includes: acommunication interface 64; thecommunication interface 64 is used for receiving a shooting instruction; theprocessor 61 is further configured to: the number of images that can be stored in the current remaining capacity of thestorage device 62 is decremented according to the photographing instruction.
Optionally, theprocessor 61 is specifically configured to: and when receiving the parameter switching instruction of the current image, determining the number of images which can be stored in the current residual capacity of thestorage device 62 according to the current residual capacity of thestorage device 62 and the capacity of thestorage device 62 occupied by the current image.
Optionally, theprocessor 61 is specifically configured to: when the shooting mode switching instruction is received, the number of images which can be stored in the current residual capacity of thestorage device 62 is determined according to the current residual capacity of thestorage device 62 and the capacity of thestorage device 62 occupied by the current image.
Optionally, theprocessor 61 is specifically configured to: and when the user interface switching instruction is received, determining the number of images which can be stored in the current residual capacity of thestorage device 62 according to the current residual capacity of thestorage device 62 and the capacity of thestorage device 62 occupied by the current image.
Optionally, theprocessor 61 is specifically configured to: determining that the current image occupies the capacity of thestorage device 62 according to the number of the at least one historical image shot by the shooting device and the capacity of thestorage device 62 occupied by each historical image in the at least one historical image.
Optionally, theprocessor 61 is further configured to: when the current remaining capacity of thestorage device 62 is less than the preset capacity value, it is determined that the number of images that can be stored by the current remaining capacity of thestorage device 62 is 0.
The specific principle and implementation of the shooting device provided by the embodiment of the invention are similar to those of the embodiment shown in fig. 1, and are not described herein again.
According to the embodiment, the parameter information of the current image shot by the shooting equipment is obtained, the capacity of the storage device occupied by the current image is determined according to the historical image matched with the parameter information of the current image, the number of images which can be stored in the residual capacity is determined according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current image, and the capacity of the storage device occupied by the current image can be accurately calculated according to the historical image due to the fact that the parameter information of the historical image is matched with the parameter information of the current image, so that the number of the images which can be stored in the memory card and are left in the memory card and displayed by the shooting equipment is accurate.
The embodiment of the invention provides shooting equipment. Fig. 7 is a block diagram of a photographing apparatus according to another embodiment of the present invention, and as shown in fig. 7, the photographingapparatus 70 includes: aprocessor 71, astorage device 72, and adisplay device 73; theprocessor 71 is configured to: acquiring parameter information of a current video shot by shooting equipment; determining the capacity of astorage device 72 occupied by the current video in unit time according to at least one historical video shot by the shooting device, wherein the parameter information of the historical video is matched with the parameter information of the current video; determining the video duration which can be stored in the current residual capacity of thestorage device 72 according to the current residual capacity of thestorage device 72 and the capacity of thestorage device 72 occupied by the current video in unit time; the video time length that the current remaining capacity of thestorage device 72 can store is displayed by thedisplay device 73.
Optionally, the parameter information of the current video includes at least one of: the format of the current video, the resolution of the current video and the scene corresponding to the current video.
Optionally, the parameter information of the historical video includes at least one of: the format of the historical video, the resolution of the historical video and the scene corresponding to the historical video.
Optionally, theshooting device 70 further includes: acommunication interface 74; thecommunication interface 74 is used for: and sending the video time length which can be stored in the current residual capacity of thestorage device 72 to the user terminal so that the user terminal displays the video time length which can be stored in the current residual capacity of thestorage device 72.
Optionally, theshooting device 70 further includes: acommunication interface 74; thecommunication interface 74 is used for receiving a shooting instruction; theprocessor 71 is further configured to: and according to the shooting instruction, the video time length which can be stored in the current residual capacity of thestorage device 72 is decreased.
Optionally, theprocessor 71 is specifically configured to: when the parameter switching instruction of the current video is received, determining the video duration which can be stored in the current residual capacity of thestorage device 72 according to the current residual capacity of thestorage device 72 and the capacity of thestorage device 72 occupied by the current video in unit time.
Optionally, theprocessor 71 is specifically configured to: when the shooting mode switching instruction is received, the video time length which can be stored in the current residual capacity of thestorage device 72 is determined according to the current residual capacity of thestorage device 72 and the capacity of the storage device occupied by the current video in unit time.
Optionally, theprocessor 71 is specifically configured to: when the user interface switching instruction is received, determining the video duration which can be stored in the current residual capacity of thestorage device 72 according to the current residual capacity of thestorage device 72 and the capacity of the storage device occupied by the current video in unit time.
Optionally, theprocessor 71 is specifically configured to: and determining the capacity of the current video occupied storage device in unit time according to the duration of at least one historical video shot by the shooting device and the capacity of thestorage device 72 occupied by each historical video in the at least one historical video.
Optionally, theprocessor 71 is further configured to: when the current remaining capacity of thestorage device 72 is smaller than the preset capacity value, it is determined that the video time length that the current remaining capacity of thestorage device 72 can store is 0.
The specific principle and implementation of the shooting device provided by the embodiment of the present invention are similar to those of the embodiment shown in fig. 4, and are not described herein again.
According to the embodiment, the parameter information of the current video shot by the shooting device is obtained, the capacity of the storage device occupied by the current video in unit time is determined according to the historical video matched with the parameter information of the current video, the video duration capable of being stored by the residual capacity is determined according to the current residual capacity of the storage device and the capacity of the storage device occupied by the current video in unit time, and the capacity of the storage device occupied by the current video in unit time can be accurately calculated according to the historical video due to the fact that the parameter information of the historical video is matched with the parameter information of the current video, so that the duration of the video capable of being stored by the memory card in the residual memory card displayed by the shooting device is accurate.
In addition, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, the computer program being executed by a processor to implement the remaining storage amount processing method as described in the above embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.