Image data processing method and electronic device

By using two different queues to store user-triggered and automatically-triggered image data respectively during the mobile phone recording process, and reading them sequentially according to the collection time, the problem of out-of-order data transmission is solved and the integrity of image data and photo generation are ensured. accuracy.

CN116701675BActive Publication Date: 2024-09-24HONOR DEVICE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202210180659.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2024-09-24
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

During the recording process on the mobile phone, when the user triggers the photo button and the automatic photo shooting time is close, the image data is transmitted out of order in the storage queue, destroying the integrity of the image data and making it impossible to generate photos.

Method used

By using two different queues to store user-triggered collection data and automatically triggered collection data respectively during the recording process, and reading the image data sequentially according to the collection time, the orderliness and integrity of the data are ensured.

Benefits of technology

It realizes the orderly saving of image data triggered by users and automatic photos during the recording process, avoiding data storage chaos and ensuring the integrity of image data and the accuracy of generated photos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116701675B
    Figure CN116701675B
Patent Text Reader

Abstract

The present application provides an image data processing method and electronic device, which can orderly save image data collected by user triggering and image data collected by automatic triggering during recording, which is conducive to ensuring the integrity of image data. The method includes: acquiring image data, the image data is image data obtained by the camera during recording; if the image data is data collected by the camera based on user triggering, the image data is stored in a first queue; if the image data is data collected by the camera automatically triggered, the image data is stored in a second queue, and the first queue and the second queue are different queues.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to an image data processing method and electronic device. Background Art

[0002] Generally, the camera application of a mobile phone may include functions such as video recording and photo taking. The video recording function of the mobile phone can help users record a wonderful and unforgettable time, and the photo taking function of the mobile phone can help users record wonderful moments. During the video recording process, the mobile phone can support users to take photos by triggering the photo taking button during the video recording process, and can support users to view the taken photos in the camera application.

[0003] In order to improve the competitiveness of mobile phones, in addition to supporting users to take photos by triggering the photo button during video recording, mobile phones can also support users to automatically take photos during video recording to better meet different needs of users. However, in this case, the moment when the user triggers the photo button and the moment when the photo is automatically taken may be close. When the moment when the user triggers the photo button and the moment when the photo is automatically taken are close, the image data obtained in these two situations may be transmitted simultaneously during the process of being transmitted to the data storage queue, resulting in confusion of the data stored in the data storage queue, breaking the integrity of the image data, and thus failing to generate photos.

[0004] Therefore, there is an urgent need for a method for processing image data to ensure the integrity of the image data. Summary of the invention

[0005] The present application provides an image data processing method and electronic device, which can orderly save the data collected by user triggering and the data collected by automatic triggering during the video recording process, which is conducive to ensuring the integrity of the image data.

[0006] In a first aspect, the present application provides a method for processing image data, the method comprising: acquiring image data, the image data being image data obtained by a camera during a recording process; if the image data is data collected by the camera based on user triggering, the image data is stored in a first queue; if the image data is data collected by the camera automatically triggered, the image data is stored in a second queue, and the first queue and the second queue are different queues.

[0007] The electronic device may or may not include a camera, and this application does not limit this.

[0008] When the electronic device includes a camera, the electronic device can record videos through the camera, the camera can take photos during the recording process, and the electronic device can obtain image data through the camera.

[0009] In this case, the way in which the electronic device obtains image data is relatively simple and easy to implement.

[0010] When the electronic device does not include a camera, the data obtained by the camera during the video recording process needs to be transmitted to the electronic device, and the electronic device receives the image data from the camera.

[0011] In this case, the electronic equipment has a simple structure and low cost.

[0012] When the camera takes photos during recording, there are two triggering modes: one is user triggering, and the other is automatic triggering.

[0013] The first queue is used to store data collected by the camera based on user triggering. When the electronic device determines that the image data is data collected by the camera based on user triggering, the image data can be stored in the first queue.

[0014] The second queue is used to store data automatically triggered and collected by the camera. When the electronic device determines that the image data is data automatically triggered and collected by the camera, the image data can be stored in the second queue.

[0015] The first queue and the second queue are two different queues, that is, different queues are used to store the data collected by the camera based on user triggering and the data collected by the camera automatically triggered, respectively.

[0016] The image data processing method provided by the present application, during the recording process, stores the data collected by the camera based on user triggering and the data collected by the camera automatically triggered by different queues respectively, which can avoid the disorderly storage when storing image data, and can achieve the effect of orderly saving the data collected by user triggering and the data collected by automatically triggering, which is conducive to ensuring the integrity of the image data.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the above method also includes: determining whether the image data is associated with identification data, the identification data is used to indicate that the image data is data automatically triggered and collected by the camera; if the image data is associated with the identification data, determining that the image data is data automatically triggered and collected by the camera.

[0018] The image data processing method provided by the present application is that during the video recording process, the electronic device adds the function of automatically triggering the camera to take pictures on the basis of supporting the user to trigger the picture taking function. The original method of storing data may not be changed. Only in the original method, the data automatically triggered and collected is associated with identification data, and the data is stored in a second queue different from the first queue based on the identification data. This can avoid the situation of disorderly storage when storing image data, and can achieve the effect of orderly saving the data triggered by the user and the data triggered by the automatic collection, which is conducive to ensuring the integrity of the image data.

[0019] In combination with the first aspect, in certain implementation methods of the first aspect, the above-mentioned acquisition of image data includes: detecting whether the image captured by the camera meets the conditions for automatically triggering photo taking during the camera's recording process; when the image data captured by the camera meets the conditions for automatically triggering photo taking, generating image data based on the image captured by the camera, and generating identification data associated with the image data.

[0020] In combination with the first aspect, in some implementations of the first aspect, the method further includes: reading first image data in the first queue or the second queue to generate a first image.

[0021] The storage mechanism of the first queue or the second queue is first-in-first-out, that is, the image data stored first is read first.

[0022] The first queue and the second queue both store image data, and the electronic device can determine the queue for reading the image data according to the chronological order of the image data acquisition time.

[0023] The first image data is the image data with the earliest acquisition time in the two queues, and the electronic device can read the first image data to generate a first image.

[0024] The image data processing method provided by the present application determines the queue for reading the image data according to the order of the image data acquisition time in the first queue and the second queue, which is conducive to ensuring the orderliness of the read data.

[0025] In combination with the first aspect, in certain implementations of the first aspect, each image data in the first queue and the second queue includes start time information, image information and end time information; the above method also includes: after reading the start time information, image information and end time information in the first image data from the queue where the first image data is located, reading the second image data in the first queue or the second queue to generate a second image.

[0026] After reading the end time information of the first image data, the electronic device re-determines the second image data according to the acquisition time of the image data in the first queue and the second queue, and generates a second image according to the second image data.

[0027] The image data processing method provided in the present application reads image data by completing the reading of all information of the image data before reading the next image data, which can improve the accuracy of subsequent image generation and is also conducive to ensuring the orderliness of data processing.

[0028] In combination with the first aspect, in certain implementations of the first aspect, the above-mentioned reading of the second image data in the first queue or the second queue to generate the second image includes: obtaining the acquisition time of the first image data in the first queue to obtain the first time information; obtaining the acquisition time of the first image data in the second queue to obtain the second time information; comparing the time sequence of the first time information and the second time information; if the first time information is earlier than the second time information, reading the first image data in the first queue as the second image data to generate the second image; if the second time information is earlier than the first time information, reading the first image data in the second queue as the second image data to generate the second image.

[0029] In a second aspect, the present application provides an electronic device, comprising: an acquisition module and a processing module. The acquisition module is used to acquire image data, the image data being image data obtained by a camera during a video recording process; the processing module is used to store the image data in a first queue if the image data is data collected by the camera based on user triggering; and if the image data is data collected by the camera automatically triggered, the image data is stored in a second queue, and the first queue and the second queue are different queues.

[0030] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned processing module is also used to: determine whether the image data is associated with identification data, the identification data is used to indicate that the image data is data automatically triggered and collected by the camera; if the image data is associated with the identification data, it is determined that the image data is data automatically triggered and collected by the camera.

[0031] In combination with the second aspect, in certain implementation methods of the second aspect, the above-mentioned processing module is also used to: detect whether the image captured by the camera meets the conditions for automatically triggering photo taking during the camera recording process; when the image data collected by the camera meets the conditions for automatically triggering photo taking, generate image data based on the image captured by the camera, and generate identification data associated with the image data.

[0032] In combination with the second aspect, in some implementations of the second aspect, the acquisition module is further used to: read the first image data in the first queue or the second queue to generate the first image.

[0033] In combination with the second aspect, in certain implementations of the second aspect, each image data in the first queue and the second queue includes start time information, image information and end time information; the above-mentioned acquisition module is also used to: after reading the start time information, image information and end time information in the first image data from the queue where the first image data is located, read the second image data in the first queue or the second queue to generate a second image.

[0034] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned acquisition module is also used to: acquire the acquisition time of the first image data in the first queue to obtain the first time information; acquire the acquisition time of the first image data in the second queue to obtain the second time information; the processing module is also used to: compare the time sequence of the first time information and the second time information; the acquisition module is also used to: if the first time information is earlier than the second time information, read the first image data in the first queue as the second image data to generate the second image; if the second time information is earlier than the first time information, read the first image data in the second queue as the second image data to generate the second image.

[0035] In a third aspect, the present application provides an electronic device, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect. Optionally, the electronic device also includes a memory. Optionally, the electronic device also includes a communication interface, and the processor is coupled to the communication interface.

[0036] In a fourth aspect, the present application provides a processor, comprising: an input circuit, an output circuit and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect above.

[0037] In the specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.

[0038] In a fifth aspect, the present application provides a processing device, including a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.

[0039] Optionally, there are one or more processors and one or more memories.

[0040] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0041] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.

[0042] It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.

[0043] The processing device in the fifth aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0044] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect described above.

[0045] In a seventh aspect, the present application provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a schematic diagram of a mobile phone video recording;

[0047] Figure 2 A schematic block diagram of transferring photos to the camera application for a mobile phone;

[0048] Figure 3 A schematic diagram of storing image data provided by an embodiment of the present application;

[0049] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0050] Figure 5 A schematic flow chart of an image data processing method provided in an embodiment of the present application;

[0051] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application;

[0052] Figure 7 A schematic block diagram of an electronic device provided in an embodiment of the present application;

[0053] Figure 8 A schematic block diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0055] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first queue and the second queue are to distinguish different queues, and their order is not limited. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit them to be different.

[0056] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0057] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0058] Generally, the camera application of a mobile phone may include functions such as video recording and photo taking. The video recording function of the mobile phone can help users record a wonderful and unforgettable time, and the photo taking function of the mobile phone can help users record wonderful moments. During the video recording process, the mobile phone can support users to take photos by triggering the photo taking button during the video recording process, and can support users to view the taken photos in the camera application.

[0059] For example, Figure 1 FIG. 2 shows a schematic diagram of a mobile phone recording. Figure 1 As shown, Figure 1 The a interface in the figure is the interface before the mobile phone records video. The video has not started at this time, so the duration of the video displayed in the interface is 00:00:00, and 00:00:00 is used to represent 0 hours, 0 minutes, and 0 seconds. The interface also displays an icon 101 for starting recording and a flip icon 102. The user can start recording by clicking the icon 101 for starting recording, and can switch the camera for recording by clicking the flip icon 102. In addition, the lower left corner of the interface also displays thumbnails of historical pictures or videos, that is, thumbnails of pictures obtained by the user through the camera application's photo function or thumbnails of videos obtained through the camera application's video function before this.

[0060] exist Figure 1 In the a interface in , when the mobile phone detects that the user triggers the control corresponding to the icon 101 for starting recording, the recording starts through the camera of the mobile phone, such as Figure 1 As shown in the b interface. Figure 1 In the b interface, an icon 103 for ending the video recording and a camera button 104 are displayed. The user can end the video recording by clicking the icon 103 for ending the video recording, and can take a photo during the video recording by clicking the camera button 104. The timer starts after the mobile phone starts recording. Figure 1 The duration of the video in interface b is 00:00:01, where 00:00:01 indicates that 1 second of video has been recorded.

[0061] During the recording process, when the mobile phone detects that the user has triggered the control corresponding to the photo button 104, the mobile phone camera can be used to take a photo and transmit the photo to the camera application for the user to view. Figure 1 In the c interface. Figure 1 As shown in the c interface in FIG. 1 , a thumbnail of the video obtained by recording can be displayed in the lower left corner of the interface. The user can view the video obtained by recording by clicking the thumbnail in the lower left corner of the interface, and can also swipe left on the video viewing interface to view the photos taken during the recording process.

[0062] The mobile phone may take a picture using the camera of the mobile phone to obtain the picture, and transmit the picture to the camera application program, which may include multiple steps. Figure 2 FIG. 1 shows a schematic block diagram of a mobile phone transferring photos to a camera application. Figure 2 As shown, the mobile phone takes a photo through the camera to obtain image data, and sends the image data to the frame selection module. Correspondingly, the frame selection module receives the image data, selects frames according to the image data, obtains multiple frame data, and adds a start signal and an end signal, wherein the multiple frame data are used to generate an image. The frame selection module can send the start signal, multiple frame data, and the end signal to the data storage queue in sequence, and correspondingly, the data storage queue receives the data sent by the frame selection module. The data storage queue may include multiple storage spaces, and the multiple storage spaces are used to store the received data. As shown Figure 2 As shown, multiple frame data may include 4 frame data, namely frame 1, frame 2, frame 3 and frame 4. The frame selection module can send the start signal, frame 1, frame 2, frame 3, frame 4 and end signal to the data storage queue in sequence. The data storage queue receives these data and stores them in the storage space in the order of receipt.

[0063] The working mechanism of the data storage queue is first-in first-out, and the start signal, frame 1, frame 2, frame 3, frame 4 and end signal can be sent to the multi-frame fusion algorithm module in sequence according to this working mechanism. The multi-frame fusion algorithm module can receive these data, and when the start signal is detected, multiple frame data (i.e., frame 1, frame 2, frame 3 and frame 4) are fused to obtain a photo, and the photo is sent to the data callback module. Correspondingly, the data callback module receives the photo and sends the photo to the camera application.

[0064] In order to improve the competitiveness of mobile phones, in addition to supporting users to take photos by triggering a photo button during video recording, mobile phones can also support automatic photo taking during video recording to better meet different needs of users.

[0065] For example, the mobile phone can add a camera active trigger function during the video recording process. Figure 2 In the process shown, the mobile phone will also add a scene detection algorithm to detect whether the current scene is worth taking a photo. Specifically, during the recording process, the mobile phone can use the scene detection algorithm to analyze the video preview stream in real time to determine whether the current scene is worth taking a photo. If the trigger condition is met, the mobile phone will actively obtain image data from the frame selection module and send it to the multi-frame fusion algorithm module to obtain a photo.

[0066] During the recording process, the mobile phone can support users to take photos by triggering the photo button, and can also support automatic photo taking. There is a high probability that the time when the user triggers the photo button and the time when the photo is automatically taken are close. In the case that the time when the user triggers the photo button and the time when the photo is automatically taken are close, the image data obtained in these two cases will be transmitted to the data storage queue at the same time, resulting in confusion of the data stored in the data storage queue, breaking the integrity of the image data used to generate the photo, and causing abnormal processing of the multi-frame fusion algorithm, and the failure to generate the photo.

[0067] For example, Figure 3 FIG. 1 shows a schematic diagram of storing image data. Figure 3 As shown, the frame selection module in the mobile phone first sends the image data obtained when the user triggers the photo button to the data storage queue. The image data obtained when the user triggers the photo button includes a start signal, frame 1, frame 2, frame 3, frame 4 and an end signal. When the data storage queue transmits to frame 3, the scene detection algorithm detects that the current scene has the meaning of taking a photo, and the frame selection module transmits the image data obtained by automatic photography to the data storage queue. The image data obtained by automatic photography may include a start signal*, frame 1*, frame 2*, frame 3* and an end signal*. The image data obtained when the user triggers the photo button has not yet been transmitted. The time point of frame 3 is the same as the time point of the start signal*. The data storage queue will be confused when storing data. The start signal* may be stored first and then frame 1*. Subsequently, frame 1* may be stored and then frame 4 and the end signal may be stored, causing the data storage queue to store data in disorder, thereby breaking the integrity of the image data used to generate the photo.

[0068] In view of this, an embodiment of the present application provides an image data processing method and electronic device, which can orderly save image data taken by the user triggering the photo button and image data taken automatically during the video recording process, which is conducive to ensuring the integrity of the image data.

[0069] The image data processing method provided in the embodiment of the present application can be applied to electronic devices, for example, the above-mentioned mobile phone. In addition, the electronic device involved in the embodiment of the present application can also be a tablet computer, a personal computer (PC), a wearable electronic device such as a smart watch, and can also be various teaching auxiliary tools (such as learning machines, early education machines), smart toys, portable robots, personal digital assistants (PDA), augmented reality (AR) equipment, virtual reality (VR) equipment, etc.

[0070] In order to better understand the embodiments of the present application, the hardware structure of the electronic device of the embodiments of the present application is introduced below. Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0071] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.

[0072] Optionally, the above-mentioned sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0073] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0074] The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.

[0075] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge an electronic device, and can also be used to transfer data between an electronic device and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0076] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .

[0077] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0078] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Antennas in electronic devices can be used to cover single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.

[0079] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0080] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.

[0081] The electronic device realizes the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.

[0082] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0083] The electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0084] The camera 193 is used to capture still images or videos. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0085] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0086] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.

[0087] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, and the application processor.

[0088] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The electronic device can listen to music or listen to hands-free calls through the speaker 170A. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0089] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. The air pressure sensor 180C is used to measure the air pressure. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in all directions (generally three axes). The distance sensor 180F is used to measure the distance. The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor 180L is used to sense the brightness of the ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect the temperature. The touch sensor 180K is also called a "touch device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The bone conduction sensor 180M can obtain a vibration signal.

[0090] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key. It may also be a touch key. The electronic device may receive key input and generate key signal input related to user settings and function control of the electronic device. The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0091] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The layered architecture may adopt an Android system, an iOS system, or other operating systems, which are not limited in the present application.

[0092] Figure 5 FIG. 5 is a schematic diagram of a method 500 for processing image data provided in an embodiment of the present application. The method can be applied to an electronic device. The hardware structure diagram of the electronic device can be as follows: Figure 4 As shown, but the present application embodiment does not limit this. The method 500 can be applied to the above Figure 1 The scenario shown is not limited to this embodiment of the present application.

[0093] The method 500 may include the following steps:

[0094] S501, obtaining image data, where the image data is image data obtained by a camera during a video recording process.

[0095] The electronic device may or may not include a camera, and this is not limited in the embodiments of the present application.

[0096] When the electronic device includes a camera, the electronic device can record videos through the camera, the camera can take photos during the recording process, and the electronic device can obtain image data through the camera.

[0097] In this case, the way in which the electronic device obtains image data is relatively simple and easy to implement.

[0098] When the electronic device does not include a camera, the data obtained by the camera during the video recording process needs to be transmitted to the electronic device, and the electronic device receives the image data from the camera.

[0099] In this case, the electronic equipment has a simple structure and low cost.

[0100] When the camera takes photos during recording, there are two triggering modes: one is user triggering, and the other is automatic triggering.

[0101] S502: If the image data is data collected by the camera based on user triggering, the image data is stored in a first queue.

[0102] The first queue may also be referred to as a first storage queue or a first data storage queue, which is not limited in the embodiments of the present application.

[0103] The first queue is used to store data collected by the camera based on user triggering. When the electronic device determines that the image data is data collected by the camera based on user triggering, the image data can be stored in the first queue.

[0104] S503: If the image data is data automatically triggered and collected by the camera, the image data is stored in a second queue, and the first queue and the second queue are different queues.

[0105] The second queue may also be referred to as a second storage queue or a second data storage queue, which is not limited in the embodiments of the present application.

[0106] The second queue is used to store data automatically triggered and collected by the camera. When the electronic device determines that the image data is data automatically triggered and collected by the camera, the image data can be stored in the second queue.

[0107] The first queue and the second queue are two different queues, that is, different queues are used to store the data collected by the camera based on user triggering and the data collected by the camera automatically triggered, respectively.

[0108] The image data processing method provided in the embodiment of the present application, during the recording process, stores the data collected by the camera based on user triggering and the data collected by the camera automatically triggered by different queues respectively, which can avoid the disorderly storage when storing image data, and can achieve the effect of orderly saving the data collected by user triggering and the data collected by automatically triggering, which is conducive to ensuring the integrity of the image data.

[0109] As an optional embodiment, the electronic device may use identification data to distinguish between data collected by the camera based on user triggering and data collected by the camera automatically triggering. In this case, there are multiple possible implementations.

[0110] In a first possible implementation manner, data collected by the camera based on user triggering is not associated with identification data, and data collected by the camera automatically triggered is associated with identification data, and the identification data is used to indicate automatic triggering.

[0111] Identification data may also be referred to as identification or identification information, which is not limited in the embodiments of the present application.

[0112] Specifically, the electronic device can determine whether the image data is associated with identification data; if the image data is associated with identification data, the electronic device can determine that the image data is data automatically triggered and collected by the camera. Correspondingly, if the image data is not associated with identification data, the electronic device can determine that the image data is data collected by the camera based on user triggering.

[0113] Under this implementation method, during the video recording process, the electronic device adds the function of automatically triggering the camera to take pictures on the basis of supporting the user-triggered photo-taking function. The original method of storing data may not be changed. Only in the original method, identification data is associated with the data automatically triggered and collected, and based on the identification data, it is stored in a second queue different from the first queue. This can avoid disorderly storage when storing image data, and can achieve the effect of orderly saving the data triggered by the user and the data triggered by the automatic collection, which is conducive to ensuring the integrity of the image data.

[0114] In a second possible implementation, the camera associates first identification data with data collected based on user triggering, and associates second identification data with data collected by the camera automatically triggered. The first identification data is used to indicate user triggering, and the second identification data is used to indicate automatic triggering.

[0115] Specifically, the electronic device can detect identification data associated with image data; if the image data is associated with the first identification data, the electronic device can determine that the image data is data collected by the camera based on user triggering, and accordingly, if the image data is associated with the second identification data, the electronic device can determine that the image data is data collected by the camera automatically triggered.

[0116] Under this implementation mode, during the recording process, the electronic device can support user-triggered photo-taking functions and automatically triggered photo-taking functions, and associate different identification data with image data acquired based on different photo-taking methods to store them in different queues. This can avoid disorderly storage when storing image data, and can achieve the effect of orderly saving data collected by user triggering and data collected by automatically triggering, which is conducive to ensuring the integrity of the image data.

[0117] In a third possible implementation, the camera associates identification data with data collected based on user triggering, and data collected by the camera automatically triggered is not associated with identification data, and the identification data is used to indicate user triggering.

[0118] Under this implementation method, during the video recording process, the electronic device adds a function of automatically triggering the camera to take pictures on the basis of supporting the user-triggered photo-taking function. In order to distinguish image data acquired based on different photo-taking methods, identification data is associated with the image data acquired based on the original method and stored in the first queue. A storage queue, i.e., a second queue, is added for the image data acquired by the newly added method. Storing it in the second queue can avoid disorderly storage when storing image data, and can achieve the effect of orderly saving data triggered by users and data automatically triggered, which is conducive to ensuring the integrity of the image data.

[0119] As an optional embodiment, the above S501, obtaining image data, may include: detecting whether the image captured by the camera meets the conditions for automatically triggering photo taking during the camera recording process; when the image data captured by the camera meets the conditions for automatically triggering photo taking, generating image data based on the image captured by the camera, and generating identification data associated with the image data.

[0120] The automatic photo-taking triggering condition may adopt the automatic photo-taking triggering condition involved in the existing method, and the embodiment of the present application is not limited to this.

[0121] When the image data collected by the camera meets the conditions for automatically triggering a photo, the electronic device can collect images through the camera and obtain image data, and at the same time generate identification data associated with the image data, where the identification data is used to indicate automatic triggering.

[0122] The identification data can also be understood as data used to indicate that the image data is automatically triggered and collected by the camera, which is not limited in the embodiments of the present application.

[0123] The process of acquiring image data and storing image data is described in detail above. The process of generating an image based on the stored image data will be described in detail below.

[0124] The image data processing method 500 provided in the embodiment of the present application may further include: reading the first image data in the first queue or the second queue to generate a first image.

[0125] The storage mechanism of the first queue or the second queue is first-in-first-out, that is, the image data stored first is read first.

[0126] The first queue and the second queue both store image data, and the electronic device can determine the queue for reading the image data according to the chronological order of the image data acquisition time.

[0127] The first image data is the image data with the earliest acquisition time in the two queues, and the electronic device can read the first image data to generate a first image.

[0128] The image data processing method provided in the embodiment of the present application determines the queue for reading image data according to the order of image data acquisition time in the first queue and the second queue, which is conducive to ensuring the orderliness of reading data.

[0129] As an optional embodiment, each image data in the first queue and the second queue includes start time information, image information and end time information; the process of the electronic device generating a first image based on the first image data may include: after reading the start time information, image information and end time information in the first image data from the queue where the first image data is located, reading the second image data in the first queue or the second queue to generate a second image.

[0130] The start time information may also be referred to as a start signal, the image information may also be referred to as multiple frames of data, and the end time information may also be referred to as an end signal, which is not limited in the embodiments of the present application.

[0131] After reading the end time information of the first image data, the electronic device re-determines the second image data according to the acquisition time of the image data in the first queue and the second queue, and generates a second image according to the second image data.

[0132] It should be understood that the method for the electronic device to generate the second image based on the second image data is the same as the method for generating the first image, and will not be described in detail here.

[0133] The image data processing method provided in the embodiment of the present application reads image data by completing the reading of all information of the image data before reading the next image data. This can improve the accuracy of subsequent image generation and is also conducive to ensuring the orderliness of data processing.

[0134] Optionally, the above-mentioned reading of the second image data in the first queue or the second queue to generate the second image may include: obtaining the acquisition time of the first image data in the first queue to obtain the first time information; obtaining the acquisition time of the first image data in the second queue to obtain the second time information; comparing the time sequence of the first time information and the second time information; if the first time information is earlier than the second time information, reading the first image data in the first queue as the second image data to generate the second image; if the second time information is earlier than the first time information, reading the first image data in the second queue as the second image data to generate the second image.

[0135] The first image data in the first queue is the earliest stored in the first queue, and the first image data in the second queue is the earliest stored in the second queue. According to the first-in-first-out principle, the electronic device can read the first image data in the first queue or the first image data in the second queue.

[0136] The electronic device may determine a queue for reading the second image data according to a chronological order of acquisition times of the first image data in the first queue and the first image data in the second queue.

[0137] Specifically, the first time information corresponds to the acquisition time of the first image data in the first queue, and the second time information corresponds to the acquisition time of the first image data in the second queue. The electronic device can compare the time sequence of the first time information and the second time information to determine the queue for reading the second image data.

[0138] It should be understood that the acquisition time of the first image data in the first queue may be the moment when the user triggers the photo-taking, and the acquisition time of the first image data in the second queue may be the moment when the camera automatically triggers the photo-taking.

[0139] If the first time information is earlier than the second time information, that is, the acquisition time of the first image data in the first queue is earlier than the acquisition time of the first image data in the second queue, the electronic device reads the first image data in the first queue as the second image data to generate a second image.

[0140] If the second time information is earlier than the first time information, that is, the acquisition time of the first image data in the second queue is earlier than the acquisition time of the first image data in the first queue, the electronic device reads the first image data in the second queue as the second image data to generate a second image.

[0141] In addition, if the first time information is the same as the second time information, the image data is read according to a preset priority.

[0142] Exemplarily, if the preset priority is that the priority of the first queue is higher than the priority of the second queue, the electronic device reads the first image data of the first queue. If the preset priority is that the priority of the second queue is higher than the priority of the first queue, the electronic device reads the first image data of the second queue.

[0143] An embodiment of the present application also provides an electronic device, and the method for processing image data provided in the embodiment of the present application can be applied to the electronic device. Figure 6 A schematic block diagram of an electronic device is shown. Figure 6 As shown, the electronic device may include a camera, a frame selection module, a camera processing engine, and a camera application. The camera processing engine may include a processing module and a data callback module. The processing module includes a data processing submodule and a multi-frame fusion algorithm module. The data processing submodule includes an active photo management module, a scene detection algorithm module, a first queue, a second queue, and a state machine.

[0144] The scene detection algorithm is used to: when the image in the camera recording process meets the automatic triggering photo conditions, control the camera to capture the image, and control the active photo management module to associate the identification data with the image data collected for automatic triggering.

[0145] The camera is used for recording video, and during the recording process, it can collect image data based on user triggering and automatic triggering, and send the collected image data to the frame selection module.

[0146] The frame selection module is used to: receive image data from the camera, select frames based on the image data, obtain multiple frame data, and add a start signal and an end signal, wherein the multiple frame data are used to generate an image (or photo), and send the start signal, multiple frame data and end signal to the first queue or the second queue.

[0147] The active photo management module is used to associate identification data with the image data that is automatically triggered and collected.

[0148] The state machine is used to control the output of image data of the first queue and the second queue according to the order of the acquisition time of the image data in the first queue and the second queue, and when the image data of one of the first queue or the second queue is output before the end signal is received, the state machine controls the other queue to prevent it from outputting data.

[0149] Exemplarily, when the acquisition time of the first image data of the first queue is earlier than the acquisition time of the first image data of the second queue, the state machine controls the first image data of the first queue to be output first, and before the image data of the first queue is output to the end signal, the state machine controls the second queue not to output image data.

[0150] In addition, when the acquisition time of the first image data in the first queue and the second queue is the same, the state machine can control the output of the image data of the first queue and the second queue according to a preset priority.

[0151] The multi-frame fusion algorithm module is used to read the image data of the first queue or the second queue, fuse multiple frame data in the image data to obtain an image, and send the image to the data callback module.

[0152] The data callback module is used to receive the image from the multi-frame fusion algorithm module and send the image to the camera application.

[0153] The camera application is used to: Display images from the data callback module.

[0154] The electronic device provided in the embodiment of the present application can store image data acquired based on different methods through different queues, which is conducive to ensuring the integrity of data processing. At the same time, using a state machine to control the output of image data in the queue is conducive to ensuring the orderliness of data processing.

[0155] The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0156] Combined with the above Figures 1 to 6 , describes in detail the image data processing method provided by the embodiment of the present application, and will now be combined with Figure 7 and Figure 8 , describe in detail the electronic device provided by the embodiments of the present application.

[0157] The embodiment of the present application provides an electronic device 700, which includes: an acquisition module 710 and a processing module 720. The acquisition module 710 is used to: acquire image data, which is image data obtained by the camera during the recording process; the processing module 720 is used to: if the image data is data collected by the camera based on user triggering, then store the image data in a first queue; and if the image data is data collected by the camera automatically triggered, then store the image data in a second queue, and the first queue and the second queue are different queues.

[0158] Optionally, the processing module 720 is further used to determine whether the image data is associated with identification data, the identification data being used to indicate that the image data is data automatically triggered and collected by the camera; if the image data is associated with the identification data, determining that the image data is data automatically triggered and collected by the camera.

[0159] Optionally, the above-mentioned processing module 720 is also used to: detect whether the image collected by the camera meets the conditions for automatically triggering photo shooting during the camera recording process; when the image data collected by the camera meets the conditions for automatically triggering photo shooting, generate image data according to the image collected by the camera, and generate identification data associated with the image data.

[0160] Optionally, the acquisition module 710 is further configured to: read the first image data in the first queue or the second queue to generate a first image.

[0161] Optionally, each image data in the first queue and the second queue includes start time information, image information and end time information; the above-mentioned acquisition module 710 is also used to: after reading the start time information, image information and end time information in the first image data from the queue where the first image data is located, read the second image data in the first queue or the second queue to generate a second image.

[0162] Optionally, the acquisition module 710 is also used to: acquire the acquisition time of the first image data in the first queue to obtain the first time information; acquire the acquisition time of the first image data in the second queue to obtain the second time information; the processing module is also used to: compare the time sequence of the first time information and the second time information; the acquisition module 710 is also used to: if the first time information is earlier than the second time information, read the first image data in the first queue as the second image data to generate the second image; if the second time information is earlier than the first time information, read the first image data in the second queue as the second image data to generate the second image.

[0163] It should be understood that the electronic device 700 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a proprietary processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit, and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the electronic device 700 may be specifically an electronic device in the above-mentioned method embodiment, or the function of the electronic device in the above-mentioned method embodiment may be integrated in the electronic device 700, and the electronic device 700 may be used to execute the various processes and / or steps corresponding to the electronic device in the above-mentioned method embodiment, and to avoid repetition, it will not be repeated here.

[0164] The electronic device 700 has the function of implementing the corresponding steps executed by the electronic device in the above method embodiment; the above functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0165] In the embodiments of the present application, Figure 7 The electronic device 700 may also be a chip or a chip system, such as a system on chip (SoC).

[0166] Figure 8 8 is a schematic block diagram of another electronic device 800 provided in an embodiment of the present application. The electronic device 800 includes a processor 810, a communication interface 820, and a memory 830. The processor 810, the communication interface 820, and the memory 830 communicate with each other through an internal connection path, the memory 830 is used to store instructions, and the processor 810 is used to execute the instructions stored in the memory 830 to control the communication interface 820 to send signals and / or receive signals.

[0167] It should be understood that the electronic device 800 can be specifically an electronic device in the above method embodiment, or the function of the electronic device in the above method embodiment can be integrated in the electronic device 800, and the electronic device 800 can be used to execute the various steps and / or processes corresponding to the electronic device in the above method embodiment. Optionally, the memory 830 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 810 can be used to execute instructions stored in the memory, and when the processor executes the instruction, the processor can execute the various steps and / or processes corresponding to the electronic device in the above method embodiment.

[0168] It should be understood that in the embodiment of the present application, the processor 810 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0169] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0170] The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method corresponding to the electronic device in the above method embodiment.

[0171] The present application also provides a chip system, which is used to support the electronic device in the above method embodiment to implement the functions shown in the embodiment of the present application.

[0172] The present application also provides a computer program product, which includes a computer program (also referred to as code or instruction). When the computer program runs on a computer, the computer can execute the method corresponding to the electronic device shown in the above method embodiment.

[0173] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0174] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0175] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0178] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0179] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for processing image data, characterized in that: include: Acquire image data, where the image data is image data obtained by taking a photo with a camera during a video recording process; If the image data is data collected by the camera based on user triggering, storing the image data in a first queue; If the image data is data automatically triggered and collected by the camera, the image data is stored in a second queue, and the first queue and the second queue are different queues; The method further comprises: Read the first image data in the first queue or the second queue to generate a first image; wherein the first image data is the image data with the earliest acquisition time in the first queue and the second queue; if the time of acquiring the image data of the first queue and the second queue is the same, read the image data according to the preset queue priority.

2. The method according to claim 1, characterized in that The method further comprises: Determining whether the image data is associated with identification data, the identification data being used to indicate that the image data is data automatically triggered and collected by the camera; If the image data is associated with the identification data, it is determined that the image data is data automatically triggered and collected by the camera.

3. The method according to claim 1 or 2, characterized in that: The acquiring of image data comprises: During the video recording process of the camera, detecting whether the image captured by the camera meets the automatic triggering photo taking condition; When the image captured by the camera meets the automatic triggering photographing condition, the image data is generated according to the image captured by the camera, and identification data associated with the image data is generated.

4. The method according to claim 1 or 2, characterized in that: Each image data in the first queue and the second queue includes start time information, image information and end time information; The method further comprises: After the start time information, image information and end time information in the first image data are read from the queue where the first image data is located, the second image data in the first queue or the second queue is read to generate a second image.

5. The method according to claim 4, characterized in that The reading the second image data in the first queue or the second queue to generate a second image includes: Acquire the acquisition time of the first image data in the first queue to obtain first time information; Acquire the acquisition time of the first image data in the second queue to obtain second time information; Comparing the time sequence of the first time information and the second time information; If the first time information is earlier than the second time information, reading the first image data in the first queue as the second image data to generate the second image; If the second time information is earlier than the first time information, the first image data in the second queue is read as the second image data to generate the second image.

6. An electronic device, characterized in that: include: An acquisition module is used to acquire image data, wherein the image data is image data obtained by taking pictures by a camera during a video recording process; a processing module, configured to store the image data in a first queue if the image data is data collected by the camera based on user triggering; as well as, If the image data is data automatically triggered and collected by the camera, the image data is stored in a second queue, and the first queue and the second queue are different queues; The acquisition module is also used for: Read the first image data in the first queue or the second queue to generate a first image; wherein the first image data is the image data with the earliest acquisition time in the first queue and the second queue; if the time of acquiring the image data of the first queue and the second queue is the same, read the image data according to the preset queue priority.

7. The electronic device according to claim 6, characterized in that: The processing module is also used for: Determining whether the image data is associated with identification data, the identification data being used to indicate that the image data is data automatically triggered and collected by the camera; If the image data is associated with the identification data, it is determined that the image data is data automatically triggered and collected by the camera.

8. The electronic device according to claim 6 or 7, characterized in that: The processing module is also used for: During the video recording process of the camera, detecting whether the image captured by the camera meets the automatic triggering photo taking condition; When the image data collected by the camera meets the automatic triggering photographing condition, the image data is generated according to the image collected by the camera, and identification data associated with the image data is generated.

9. The electronic device according to claim 6 or 7, characterized in that: Each image data in the first queue and the second queue includes start time information, image information and end time information; The acquisition module is also used for: After the start time information, image information and end time information in the first image data are read from the queue where the first image data is located, the second image data in the first queue or the second queue is read to generate a second image.

10. The electronic device according to claim 9, characterized in that: The acquisition module is also used for: Acquire the acquisition time of the first image data in the first queue to obtain first time information; Acquire the acquisition time of the first image data in the second queue to obtain second time information; The processing module is also used for: Comparing the time sequence of the first time information and the second time information; The acquisition module is also used for: If the first time information is earlier than the second time information, reading the first image data in the first queue as the second image data to generate the second image; If the second time information is earlier than the first time information, the first image data in the second queue is read as the second image data to generate the second image.

11. An electronic device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the electronic device executes the method as claimed in any one of claims 1 to 5.

12. A chip system, characterized in that: It comprises: a processor, used to call and run a computer program from a memory, so that a device equipped with the chip system implements the method as claimed in any one of claims 1 to 5.

13. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 5.

14. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Image data processing method and electronic device

    WO2023160138A1