Image processing method and apparatus, and electronic device
By splitting the image frames output by the camera module into the application processor and the image processing chip in the electronic device for image processing and post-processing respectively, the problem of poor image quality caused by direct processing on the AP side is solved, and a more efficient image processing effect is achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-04-02
AI Technical Summary
In existing technologies, the direct image processing performed by electronic devices on the AP side leads to poor output image quality.
Image frames output by the camera module are split between the application processor and the image processing chip for image processing and post-processing, respectively. After initial processing by the image processing chip, the application processor performs post-processing, ensuring that the same image frame is processed twice between the two.
The output image quality of electronic devices is improved by sharing the computing power of the AP and performing image processing twice, thereby improving image processing efficiency and quality.
Smart Images

Figure CN2025122213_02042026_PF_FP_ABST
Abstract
Description
Image processing method, device and electronic device
[0001] Cross-reference to Related Applications
[0002] The present application claims priority to Chinese Patent Application No. 202411344846.7, filed on September 25, 2024, the contents of which are incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application belongs to the technical field of image processing, and specifically relates to an image processing method, device and electronic device. BACKGROUND
[0004] With the rapid development of electronic technology, electronic devices have been widely applied, and the electronic devices can support the image function of the electronic devices through a camera module and an application processor (AP) to output an image.
[0005] At present, in an application scene such as a shooting business scene, an electronic device usually uses an AP to obtain one or more image frames output by a camera module, and performs image processing on the AP side based on the image frames to output an image. However, since this image processing mode directly performs image processing on the AP side, and the hardware on the AP side is of a general type and is usually not specially optimized for a certain application scene such as a shooting business scene, this image processing mode has the problem of poor output image quality. SUMMARY
[0006] The purpose of the embodiments of the present application is to provide an image processing method, device and electronic device, which solve the technical problem of poor output image quality existing in the image processing mode of directly performing image processing on the AP side, and can improve the output image quality of the electronic device.
[0007] In a first aspect, the embodiments of the present application provide an image processing method, executed by an electronic device, the electronic device comprising a camera module, an application processor and an image processing chip, and the method comprising:
[0008] The application processor receives N first image frames output by the camera module;
[0009] The image processing chip receives L second image frames output by the camera module; a third image frame is selected from the L second image frames; image processing is performed based on the third image frame to obtain a first processed image; first information is sent to the application processor; wherein the first information includes the first processed image and identification information of the third image frame, the N first image frames and the L second image frames are image frames output by two branches of the camera module in the same time period, and N and L are positive integers;
[0010] The application processor selects a fourth image frame identical to the third image frame from the N first image frames based on the identification information; and performs image post-processing on the first processed image based on the fourth image frame to obtain a second processed image.
[0011] In a second aspect, an embodiment of the present application provides an image processing device applied to an electronic device, the electronic device including a camera module, an application processor and an image processing chip, and the device includes:
[0012] A first receiving module is configured to receive N first image frames output by the camera module by the application processor;
[0013] A second receiving module is configured to receive L second image frames output by the camera module by the image processing chip; the N first image frames and the L second image frames are image frames output by two branches of the camera module in the same time period, and N and L are positive integers;
[0014] A first screening module is configured to select a third image frame from the L second image frames by the image processing chip;
[0015] An image processing module is configured to perform image processing based on the third image frame by the image processing chip to obtain a first processed image;
[0016] A first sending module is configured to send first information to the application processor by the image processing chip; wherein the first information includes the first processed image and identification information of the third image frame;
[0017] A second screening module is configured to select a fourth image frame identical to the third image frame from the N first image frames by the application processor based on the identification information;
[0018] An image post-processing module is configured to perform image post-processing on the first processed image based on the fourth image frame by the application processor to obtain a second processed image.
[0019] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory stores programs or instructions executable by the processor. When the programs or instructions are executed by the processor, the steps of the image processing method according to the first aspect are implemented.
[0020] In a fourth aspect, a readable storage medium is provided, which stores programs or instructions. When the programs or instructions are executed by a processor, the steps of the image processing method according to the first aspect are implemented.
[0021] In a fifth aspect, a chip is provided, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute programs or instructions, so as to implement the steps of the image processing method according to the first aspect.
[0022] In a sixth aspect, a computer program product is provided, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the steps of the image processing method according to the first aspect.
[0023] In the embodiments of the present application, the N first image frames branched and output by the camera module are received by the application processor; the L second image frames branched and output by the camera module in the same time period are received by the image processing chip; a third image frame is selected from the L second image frames; image processing is performed based on the third image frame to obtain a first processed image; the identification information of the first processed image and the third image frame is sent to the application processor; then the application processor selects a fourth image frame identical to the third image frame from the N first image frames based on the identification information of the third image frame; and image post-processing is performed on the first processed image based on the fourth image frame to obtain a second processed image. Since the image frames output by the camera module are processed by the image processing chip, and the first processed image is processed by the AP based on the same image frame as the image processing chip, the image processing effect can be improved by performing image processing twice based on the same image frame, so that the output image quality of the electronic device can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] FIG. 1 is a flowchart of an image processing method according to some embodiments of the present application;
[0025] FIG. 2 is a schematic diagram of the receiving process of image frames by the AP and the ASIC chip according to some embodiments of the present application;
[0026] FIG. 3 is a schematic diagram of the interaction process of image processing by the electronic device according to some embodiments of the present application;
[0027] FIG. 4 is a structural schematic diagram of an image processing apparatus provided by some embodiments of the present application;
[0028] FIG. 5 is a structural schematic diagram of an electronic device provided by some embodiments of the present application;
[0029] FIG. 6 is a hardware structural schematic diagram of an electronic device provided by some embodiments of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.
[0031] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", and the like are generally of a kind and are not limited in number, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.
[0032] The image processing method provided by the embodiments of the present application will be described in detail below in combination with the drawings, specific embodiments and application scenarios.
[0033] It should be noted that the image processing method of the embodiments of the present application is executed by an electronic device, and the electronic device includes a camera module, an application processor and an image processing chip.
[0034] The camera module can include an image sensor (Sensor), which can be a complementary metal oxide semiconductor (CMOS) Sensor. The camera module can perform image exposure through the CMOS Sensor to generate an image frame. Then, in some embodiments, the camera module can output the image frame to the AP and the image processing chip, respectively.
[0035] The image processing chip generally refers to an external chip or module for graphics processing in a mobile device or a computer. The image processing chip is usually used to provide additional graphics processing capability to improve the graphics performance of the device and process graphics-related tasks. In a mobile device, the image processing chip can be used to accelerate tasks such as games, video playback, graphics rendering, etc., to provide a smoother user experience. The image processing chip usually works in conjunction with the central processing unit (CPU) to share the load of graphics processing, thereby improving the performance and efficiency of the overall system.
[0036] In some embodiments, the image processing chip can be an application specific integrated circuit (ASIC) chip. In some embodiments, an external graphic processing unit (GPU) in a computer can also be considered as an image processing chip for processing complex graphics tasks such as three-dimensional (3D) modeling, video editing, etc. In some high-performance computers or game devices, users can also choose to install additional graphic processors to improve graphics performance.
[0037] The application processor (AP) is a super large scale integrated circuit that extends audio and video functions and special interfaces based on the central processing unit, and plays a role in operation and calling other functional components in an electronic device.
[0038] The AP can include an application processor system on chip (AP SoC) that plays a role in operation and calling other functional components in image processing of the electronic device. For example, the AP SoC can control the camera module to output image frames, and the AP SoC can also control the image processing chip to perform image processing based on the image frames output by the camera module to obtain first processed images.
[0039] In some embodiments, the AP can also include an image post-processing module that can perform image post-processing on the first processed images sent by the image processing chip based on the image frames output by the camera module to output images of the electronic device. In this way, the electronic device can realize image support capability through the camera module, the AP, and the image processing chip. In some embodiments, such as in a shooting business scenario, the electronic device can realize image shooting functions through the camera module, the AP, and the image processing chip.
[0040] In some embodiments, the electronic device can include an AP, a camera module, and an ASIC chip. The camera module can output image frames to the AP and the ASIC chip respectively through shunting, so that the AP and the ASIC chip perform image processing based on the image frames respectively, that is, through twice image processing, to improve the quality of the output image.
[0041] After receiving the image frames output by the camera module, the ASIC chip can perform image processing based on the image frames and send the obtained first processed image to the AP. Correspondingly, the AP can perform image post-processing on the first processed image based on the image frames output by the camera module to obtain a second processed image and output accordingly, realizing the image support capability.
[0042] Since the image frames output by the camera module are directly processed by the AP, this image processing method has a high demand for the computing power of the AP. However, the AP plays a role in computing and calling other functional components in the electronic device. Therefore, directly processing the image frames output by the camera module on the AP side in the related art also has the problem of image processing efficiency. In this embodiment, the ASIC chip first performs image processing based on the image frames output by the camera module and sends the obtained first processed image to the AP, and then the AP performs image post-processing on the first processed image based on the image frames output by the camera module. In this way, the ASIC chip can not only share the computing power of the AP for image processing and improve the image processing efficiency, but also can improve the output image quality of the electronic device through twice image processing.
[0043] It should be noted that, in the process of image processing of the electronic device, in order to ensure the image quality output by the electronic device, the image frames processed by the image processing chip are usually the same as the image frames used for image post-processing by the AP. The following will be described in detail.
[0044] FIG. 1 is a flowchart of an image processing method according to an embodiment of the present application. As shown in FIG. 1, the method includes the following steps:
[0045] In step 101, the application processor receives N first image frames output by the camera module.
[0046] In some embodiments, the first image frames can be image frames in a Mobile Industry Processor Interface (MIPI) data format. The application processor can communicate with the camera module through the MIPI protocol to realize the reception of the image frames output by the camera module by the application processor. The MIPI protocol is a set of standards formulated by the MIPI Alliance for inter-chip communication in mobile devices.
[0047] In some embodiments, during the working process of the CMOS Sensor of the camera module, the CMOS Sensor can continuously generate image frames, and can send the image frames to the application processor one by one, and the application processor can receive the image frames of the camera module through the MIPI protocol.
[0048] In some embodiments, the frame numbers of the N first image frames received by the application processor can be consecutive, for example, the N first image frames can be the 100th image frame to the 105th image frame of the camera module.
[0049] In some embodiments, during the process of receiving the image frames of the camera module by the application processor, due to the high load or abnormal situation of the application processor, the application processor can choose to discard some image frames, that is, not to receive the image frames, at this time, the N first image frames received by the application processor are discontinuous. For example, the camera module actually outputs the 100th image frame to the 105th image frame, and the N first image frames received by the application processor can be the 101st image frame, the 103rd image frame and the 105th image frame.
[0050] In some embodiments, the N first image frames can be received in the case that the camera module is started. In the case that the camera module is started, the camera module can send the image frames to the application processor one by one, and correspondingly, the application processor can receive one or more image frames output by the camera module for image processing. In some embodiments, the N first image frames can be received in the case that the electronic device receives a shooting input. The shooting input can be the input of the user to the shooting control for controlling the electronic device to shoot images. That is, in the case that the electronic device receives the shooting input, the electronic device can send a signal to the AP, and correspondingly, the AP can receive the image frames output by the camera module in the case that the electronic device receives the shooting input, to obtain the N first image frames.
[0051] It should be noted that the execution subject of this step can be the AP SoC in the AP, which can communicate with the camera module through the MIPI protocol to receive the N first image frames output by the camera module.
[0052] In step 102, the image processing chip receives L second image frames output by the camera module; selects a third image frame from the L second image frames; performs image processing based on the third image frame to obtain a first processed image; and sends first information to the application processor, wherein the first information includes the first processed image and the identification information of the third image frame, the N first image frames and the L second image frames are image frames output by two branches of the camera module in the same time period, and N and L are positive integers.
[0053] In some embodiments, the second image frame can be an image frame in MIPI data format. Wherein, the image processing chip can communicate with the camera module through the MIPI protocol to realize the receiving of the image frame output by the camera module by the image processing chip.
[0054] In some embodiments, during the working process of the CMOS Sensor of the camera module, the CMOS Sensor can continuously generate image frames, and can send the image frames to the image processing chip frame by frame, and the image processing chip can receive the image frames of the camera module through the MIPI protocol.
[0055] In some embodiments, the frame numbers of the L second image frames received by the image processing chip can be continuous, for example, the L second image frames can be the 99th image frame to the 106th image frame of the camera module.
[0056] In some embodiments, during the process of receiving the image frames of the camera module by the image processing chip, due to the high load or abnormal situation of the image processing chip, the image processing chip can choose to discard some image frames, that is, not to receive the image frames, at this time, the L second image frames received by the image processing chip are discontinuous. For example, the camera module actually outputs the 99th image frame to the 106th image frame, and the N first image frames received by the image processing chip can be the 99th image frame, the 101st image frame, the 103rd image frame to the 106th image frame.
[0057] In some embodiments, the L second image frames can be received under the condition that the camera module is started. Under the condition that the camera module is started, the camera module can send the image frames to the image processing chip frame by frame, and correspondingly, the image processing chip can receive one or more image frames output by the camera module for image processing. In some embodiments, the L second image frames can be received under the condition that the electronic device receives a shooting input. Under the condition that the electronic device receives the shooting input, the electronic device can signal the image processing chip, and correspondingly, the image processing chip can receive the image frames output by the camera module under the condition that the electronic device receives the shooting input to obtain the L second image frames.
[0058] In this embodiment, the output of the camera module can be split into two branches to output image frames of the camera module to the application processor and the image processing chip respectively. This way of splitting the output of the camera module into two branches is referred to as a same-source output mode. The image frames received by the application processor and the image processing chip can be the image frames output by the camera module through the same-source output mode, i.e., the N first image frames and the L second image frames are image frames output by the camera module in two branches in the same time period. Accordingly, the image processing chip and the AP can perform image processing based on the image frames output by the camera module in the same-source output mode in sequence, i.e., through two times of image processing, the purpose of improving the quality of the output image is achieved.
[0059] In an ideal case, the image frames received by the AP and the image processing chip should be the same, i.e., in an ideal case, the N first image frames and the L second image frames should be the same, and the N first image frames or the L second image frames are the image frames output by the camera module. However, the AP and the image processing chip can both discard some image frames due to their own conditions, for example, in the case of high load or detection of local abnormalities, the image frames are not received, which can cause the image frames received by the AP and the image processing chip and the number of image frames to be different, i.e., the N first image frames and the L second image frames are not completely the same, or N and L can be different.
[0060] For example, in the case where the electronic device receives a shooting input, the image frames output by the camera module are the 99th image frame to the 106th image frame, the AP selects to discard some image frames when receiving the image frames, resulting in that the N first image frames received are the 100th image frame to the 105th image frame, and the L second image frames received by the image processing chip are the 99th image frame to the 106th image frame.
[0061] In the case where the image processing chip receives the L second image frames, the image processing chip can randomly or under the control of the AP select third image frames from the L second image frames, the third image frames being used for image processing, and the number of the third image frames being at least one.
[0062] In some embodiments, the AP can send control information to the image processing chip to inform the selection strategy. For example, the selection strategy can include the number of image frames to be selected and a timestamp list, etc., and the timestamp of the third image frames selected by the image processing chip needs to be in the timestamp list.
[0063] In this step, the third image frames are selected from the L second image frames for image processing, which can reduce the amount of data for image processing and improve the efficiency of image processing.
[0064] In a case where the third image frame is screened, the image processing chip can perform image processing based on the third image frame to obtain a first processed image. The image processing performed by the image processing chip can include image transformation, image enhancement, image denoising, etc., and the image processing is used to improve the graphics performance of the electronic device.
[0065] Subsequently, the image processing chip can report the first processed image and identification information of the third image frame to the AP. The identification information of the third image frame can be a timestamp or a frame number of the third image frame, or the identification information of the third image frame can also be the image itself of the third image frame. Correspondingly, the AP SoC can receive the first information sent by the image processing chip, so that the AP SoC performs image frame matching based on the first information, which will be described in detail below.
[0066] In step 103, the application processor screens a fourth image frame identical to the third image frame from the N first image frames based on the identification information, and performs image post-processing on the first processed image based on the fourth image frame to obtain a second processed image.
[0067] The third image frame and the fourth image frame are the same image frames output by the camera module through the homologous output mode.
[0068] In some embodiments, the AP SoC in the AP can perform matching between the third image frame and the first image frame based on the identification information, so as to screen a fourth image frame identical to the third image frame from the N first image frames. The image frame used for image processing by the image processing chip is identical to the image frame used for image post-processing by the AP, so as to improve the image quality output by the electronic device.
[0069] In some embodiments, the identification information can be second timestamp information of the third image frame, and the second timestamp information can include timestamps of the third image frames. In this embodiment, since the image frames received by the AP and the image processing chip are output by the camera module through the homologous output mode, if the timestamps of the image frames received by the AP and the image processing chip are identical or similar in a case where the AP and the image processing chip are time-synchronized, it is considered that the two image frames are identical image frames. The identical or similar timestamps in the first timestamp information of the N first image frames can be matched from the first timestamp information by matching the timestamps in the first timestamp information with the timestamps in the second timestamp information of the third image frame, and the image frame corresponding to the timestamp is the fourth image frame identical to the third image frame.
[0070] In this embodiment, the AP and the image processing chip can record the time stamp of the received image frame when receiving the image frame output by the camera module. The recorded time stamp of the image frame can be the time stamp of the starting moment of the image frame, or the time stamp of the ending moment, and accordingly the time stamp of each first image frame and the time stamp of each second image frame can be obtained.
[0071] In some embodiments, the identification information can be the frame number of the third image frame, and the application processor can match the third image frame with the first image frame by frame number matching. For example, the image frame with the same frame number as the third image frame in the N first image frames is determined as the same image frame as the third image frame, and the fourth image frame is obtained.
[0072] In some embodiments, the identification information can also be the image itself of the third image frame, and the application processor can match the third image frame with the first image frame by image feature matching. That is, the application processor can obtain the image feature of the third image frame, and obtain the image feature of each image frame in the N first image frames. The image frame with the same image feature as the third image frame in the N first image frames is determined as the same image frame as the third image frame, and the fourth image frame is obtained.
[0073] In the case that the fourth image frame is obtained by AP SoC screening, the image post-processing module in the AP can perform image post-processing on the first processing image based on the fourth image frame to obtain the second processing image. The image post-processing can include secondary composition, noise reduction, sharpening and the like.
[0074] In some embodiments, the obtained second processing image can be output as a shooting image, which can improve the quality of the shooting image output by the electronic device in the shooting business scenario.
[0075] In this embodiment, the application processor receives N first image frames branched and output by the camera module, and the image processing chip receives L second image frames branched and output by the camera module in the same time period; a third image frame is selected from the L second image frames; image processing is performed based on the third image frame to obtain a first processed image; the first processed image and identification information of the third image frame are sent to the application processor; then the application processor selects a fourth image frame identical to the third image frame from the N first image frames based on the identification information of the third image frame; and performs image post-processing on the first processed image based on the fourth image frame to obtain a second processed image. Since the image processing chip performs image processing on the image frames output by the camera module, and the AP performs image post-processing on the first processed image based on the same image frame as the image processing chip, the image processing effect can be improved by performing twice image processing based on the same image frame, thereby improving the output image quality of the electronic device.
[0076] Alternatively, the matching of the third image frame and the first image frame can be performed in a timestamp matching manner, and this step 103 specifically includes:
[0077] The application processor selects an image frame with a timestamp matching the second timestamp information from the N first image frames based on the first timestamp information of the N first image frames and the second timestamp information of the third image frame, to obtain a fourth image frame;
[0078] The identification information includes the second timestamp information, the first timestamp information is a timestamp of the application processor receiving the N first image frames, and the second timestamp information is a timestamp of the image processing chip receiving the third image frame.
[0079] In this embodiment, the first timestamp information can include a timestamp of each first image frame, which can be represented in the form of a timestamp list, and the second timestamp information can also include a timestamp of each third image frame, which can also be represented in the form of a timestamp list.
[0080] In some embodiments, the image frame with a timestamp matching the second timestamp information can refer to an image frame identical to the timestamp of the third image frame, or a second target timestamp corresponding image frame, and the second target timestamp is very close to the timestamp of the third image frame.
[0081] In some embodiments, for example, in the case that the image processing chip and the AP are not time-synchronized, the timestamps of the image frames recorded by the image processing chip and the AP will be different, in which case, the AP can perform image frame matching according to a target difference recorded at the same time by the clock modules of the image processing chip and the AP.
[0082] For example, the fourth image frame whose timestamp matches the timestamp of the third image frame can be an image frame in the N first image frames, whose timestamp difference with the timestamp of the third image frame is within a preset range, and the preset range is determined based on the target difference value. For example, if the target value is 5 seconds, the preset range can be 4.95 seconds to 5.05 seconds. For another example, the AP can also correct the timestamp of the third image frame based on the time difference value, so as to achieve the purpose of time synchronization between the image processing chip and the AP, and then perform timestamp matching.
[0083] In some embodiments, the AP can compare each timestamp in the second timestamp information with the timestamps in the first timestamp information one by one to determine the difference therebetween, and determine the image frame corresponding to the timestamp in the N first image frames, whose absolute value of the difference is less than or equal to a preset threshold, as the fourth image frame.
[0084] In some embodiments, the AP can also compare each timestamp in the first timestamp information with the timestamps in the second timestamp information one by one to determine the difference therebetween, and determine the image frame corresponding to the timestamp in the N first image frames, whose absolute value of the difference is less than or equal to a preset threshold, as the fourth image frame.
[0085] In some embodiments, double traversal can also be used for image frame traversal. The first layer traversal is the N first image frames, and the timestamp of each first image frame is compared with the timestamp of a certain third image frame reported by the image processing chip. The second layer traversal is the timestamp of each third image frame reported by the image processing chip and the timestamp of the first image frame. In this way, the accuracy of image frame matching can be improved through double traversal.
[0086] In some embodiments, if the difference between the two timestamps is very small, such as less than or equal to a preset threshold, i.e., if ABS(AP_img_ts_i, ASIC_ts_j) <= K, the matching is successful. The AP can determine the first image frame as the fourth image frame, and the timestamp of the fourth image frame and the third image frame matched successfully can not participate in subsequent matching. If there is no successful matching, the next timestamp is used for comparison in the traversal. Wherein, K is a preset threshold, such as 3 milliseconds (ms), AP_img_ts_i is the i-th timestamp in the first timestamp information, i takes values of 0, 1, …, N, ASIC_ts_j is the j-th timestamp in the second timestamp information, j takes values of 0, 1, …, P, P is the number of third image frames, and ABS(x, y) represents the absolute value of the difference between x and y.
[0087] In some embodiments, the image processing chip is time-synchronized with the application processor, and the image frames are considered to be the same if the timestamps match, i.e., the timestamps are the same or close to each other. Optionally, the application processor filters, from the N first image frames, an image frame whose timestamp matches the timestamp in the second timestamp information, based on the first timestamp information of the N first image frames and the second timestamp information of the third image frame, to obtain a fourth image frame, including:
[0088] The application processor performs difference processing on the first target timestamp in the second timestamp information and each timestamp in the first timestamp information, where the first target timestamp is any timestamp in the second timestamp information.
[0089] The application processor determines, as the image frame whose timestamp matches the first target timestamp, an image frame corresponding to the second target timestamp in the N first image frames, to obtain the fourth image frame.
[0090] The second target timestamp is a timestamp in the first timestamp information that has an absolute value of difference from the first target timestamp less than or equal to a preset threshold.
[0091] The preset threshold can be set according to actual conditions. In general, the preset threshold is a value close to 0. In this case, if the absolute value of the difference between the two is less than or equal to the preset threshold, it can be determined that the timestamps are very close, and it can be determined that the image frames corresponding to the two are from the same image frame output by the camera module. This can improve the accuracy of timestamp matching.
[0092] In addition, the same timestamp matching can be performed for any third image frame. In this way, the fourth image frame that matches the timestamp of each third image frame can be matched from the N first image frames, thereby improving the accuracy of image frame matching and the output image quality of the electronic device.
[0093] In some embodiments, image frame matching can be performed through timestamp matching of image frames when the image processing chip is time-synchronized with the application processor. Before image frame matching, it is necessary to ensure that the clock modules of the image processing chip and the application processor are synchronized, and it is necessary to record the timestamps of the received image frames when the image processing chip is time-synchronized with the application processor.
[0094] Optionally, before step 101, the method further includes:
[0095] The application processor controls the image processing chip to be time-synchronized with the application processor.
[0096] In a case that the image processing chip and the application processor are time-synchronized, the application processor acquires first timestamp information of the received N first image frames, and the image processing chip acquires third timestamp information of the received L second image frames, the third timestamp information including the second timestamp information.
[0097] In some embodiments, the AP SoC can acquire a time difference value of the clock module of the image processing chip and the clock module of the AP, and can send a time synchronization request to the image processing chip, the time synchronization request including the time difference value. Accordingly, the image processing chip can correct the time of the clock module of the image processing chip based on the time difference value, so as to synchronize the time of the clock module of the image processing chip with the time of the clock module of the AP.
[0098] In some embodiments, the AP SoC can also control the image processing chip to be time-synchronized with the AP SoC by sending a pulse signal and a time synchronization request. Alternatively, the application processor controls the image processing chip to be time-synchronized with the application processor, including:
[0099] The application processor sends a pulse signal and a time synchronization request to the image processing chip, the time synchronization request including a first time at which the application processor sends the pulse signal.
[0100] The image processing chip acquires a second time at which the pulse signal is received in a case that the pulse signal is received, and is time-synchronized with the application processor based on a time difference between the first time and the second time.
[0101] The pulse signal can be a signal composed of a series of pulses, and the width and interval time of each pulse can be different. The time synchronization request can be used to control the image processing chip to be time-synchronized.
[0102] The sending time of the pulse signal can be before, at the same time as, or after the sending time of the time synchronization request. For example, the AP SoC can send the pulse signal to the image processing chip through an input output (IO) interface, and record the time at which the pulse signal is sent, i.e., the first time, as t1 through the clock module of the AP SoC. When the image processing chip receives the pulse signal, the image processing chip can record the time at which the pulse signal is received, i.e., the second time, as t2 through the clock module of the image processing chip.
[0103] Subsequently, the AP SoC can send a time synchronization request to the image processing chip through a protocol bus, and the time synchronization request can include the first time t1 at which the AP SoC sends the pulse signal.
[0104] After receiving the time synchronization request, the image processing chip can calculate the time difference value diff = t1-t2, that is, the time difference value between the clock module of the image processing chip and the clock module of the AP, then obtain the current time t3 of the clock module of the image processing chip, and calculate t3'=t3+diff, and set the time t3' to the clock module of the image processing chip to become the current time of the image processing chip, so that the time of the image processing chip and the AP is synchronized.
[0105] Correspondingly, the image processing chip can record the time stamp of the received second image frame in the case of time synchronization with the AP, and send the second time stamp information of the third image frame selected from the L second image frames to the AP.
[0106] In this embodiment, the image processing chip and the AP SoC are controlled to be time-synchronized by sending the pulse signal and the time synchronization request. Since the sending time of the pulse signal can be before, at the same time as, or after the sending of the time synchronization request, the control flow of the time synchronization of the AP is more flexible, and the receiving time of the pulse signal is recorded by the respective clock modules of the image processing chip and the AP, so that the time synchronization of the image processing chip and the AP is more accurate.
[0107] Correspondingly, in the case of time synchronization between the image processing chip and the AP, the time stamp of the received image frame can be recorded according to the respective clock modules. The recorded time stamp of the image frame can be the time stamp of the starting moment of the image frame, or the time stamp of the ending moment. Hereinafter, taking the recording of the time stamp of the starting moment of the image frame as an example, the receiving process of the image frame output by the camera module by the AP and the image processing chip is described.
[0108] In some embodiments, FIG. 2 is a schematic diagram of the receiving process of the image frame by the AP and the ASIC chip according to some embodiments of the present application. As shown in FIG. 2, the AP and the ASIC chip can simultaneously receive the image frame output by the camera module and record the time stamp of the starting moment of the receiving of the image frame by each of them, and the process is as follows:
[0109] Step 200: In the case that the electronic device starts the camera module, the camera module can output the image frame to the AP and the image processing chip frame by frame;
[0110] Step 201a: The AP receives the first image frame from the camera module;
[0111] Step 202a: The AP records the time stamp of the starting moment of the receiving of the first image frame every time a frame is received. Thus, the AP receives a total of N first image frames and obtains the first time stamp information.
[0112] Step 201b: while the AP receives the image frames output by the camera module, the ASIC chip also receives the image frames output by the camera module, that is, the data sources of the image streams received by the AP and the ASIC chip are the same, and are the camera module;
[0113] Step 202b: the ASIC chip records the time stamp of the starting time of receiving the second image frame every time a frame is received, so that the ASIC chip receives L second image frames, and records the time stamp of each image frame in the L second image frames, to obtain third time stamp information.
[0114] In this embodiment, the AP SoC can control the image processing chip to be time-synchronized with the AP. In the case of time synchronization, the clock modules for recording time stamps when the AP receives the first image frame and when the image processing chip receives the second image frame are synchronized. In this way, the image processing chip can record the time stamp of the received second image frame based on the clock module that is time-synchronized with the AP, so that the time stamps of the first image frame and the second image frame output by the same source are close, which can simplify the matching process of the AP regarding the time stamp, facilitate the AP to screen the fourth image frame with a time stamp matching the time stamp of the third image frame from the N first image frames, and improve the image matching accuracy and the output image quality of the electronic device.
[0115] In some embodiments, the AP can control the image processing chip to screen the third image frame from the L second image frames. Optionally, before screening the third image frame from the L second image frames, the method further includes:
[0116] The application processor sends the first time stamp information to the image processing chip;
[0117] The image processing chip screens the third image frame from the L second image frames, including:
[0118] The image processing chip screens the third image frame from the L second image frames based on the first time stamp information; wherein each time stamp in the second time stamp information of the third image frame is in the time stamp list of the first time stamp information.
[0119] The time stamp list can include all time stamps in the first time stamp information.
[0120] The AP SoC can send first timestamp information to the image processing chip to control the image processing chip to screen third image frames from the L second image frames, so that the timestamps of the screened third image frames are within the timestamp list of the first timestamp information. In this way, it can be ensured that the AP matches the same fourth image frame as the third image frame from the N first image frames, so that the image frame on which the image processing chip performs image processing is exactly the same as the image frame used by the AP to perform image post-processing, thereby greatly improving the output image quality of the electronic device.
[0121] The specific process of the image processing method of the embodiment is described in detail below with a specific example. FIG. 3 is an interaction flow diagram of an electronic device performing image processing according to some embodiments of the present application. As shown in FIG. 3, the electronic device can include a camera module, an AP, and an ASIC chip, and the interaction flow thereof is as follows:
[0122] Step 301: The AP SoC initiates time synchronization with the ASIC chip, so that the clock module of the ASIC chip is time-synchronized with the AP SoC.
[0123] Step 302: In the case that the camera module of the electronic device is started, the camera module outputs image frames frame by frame.
[0124] Step 303: In the case that the ASIC chip is time-synchronized with the AP SoC, the AP SoC receives N first image frames from the image frames output by the camera module and records first timestamp information of the received N first image frames; in some embodiments, the N first image frames are image frames output by the camera module within a time period in which the electronic device receives a shooting input.
[0125] Step 304: In the case that the ASIC chip is time-synchronized with the AP SoC, the ASIC chip receives L second image frames from the image frames output by the camera module and records third timestamp information of the received L second image frames.
[0126] Step 305: The ASIC chip can select a third image frame from the L second image frames, and generate a first processed image through image processing.
[0127] Step 306: The ASIC chip transmits second timestamp information of the selected third image frame to the AP SoC.
[0128] Step 307: The ASIC chip transmits the first processed image to the AP SoC.
[0129] Step 308: The AP SoC screens a fourth image frame with a timestamp matching the timestamp in the second timestamp information from the N first image frames cached by itself, and transmits the fourth image frame to an image post-processing module in the AP.
[0130] At step 309, the image post-processing module in the AP performs image post-processing on the first processed image based on the fourth image frame, and outputs a second processed image; in some embodiments, the second processed image is the captured image of the electronic device.
[0131] The image processing method provided in the embodiments of the present application can be executed by an image processing device. In the embodiments of the present application, the image processing device is taken as an example to illustrate the image processing device provided in the embodiments of the present application.
[0132] Referring to FIG. 4, FIG. 4 is a structural schematic diagram of an image processing device provided in the embodiments of the present application, which is applied to an electronic device including a camera module, an application processor and an image processing chip. The device includes:
[0133] The first receiving module 401 is configured to receive, by the application processor, N first image frames output by the camera module.
[0134] The second receiving module 402 is configured to receive, by the image processing chip, L second image frames output by the camera module; the N first image frames and the L second image frames are image frames output by two branches of the camera module in the same time period, and N and L are positive integers.
[0135] The first screening module 403 is configured to screen, by the image processing chip, a third image frame from the L second image frames.
[0136] The image processing module 404 is configured to perform, by the image processing chip, image processing based on the third image frame to obtain a first processed image.
[0137] The first sending module 405 is configured to send, by the image processing chip, first information to the application processor; the first information includes the first processed image and identification information of the third image frame.
[0138] The second screening module 406 is configured to screen, by the application processor, a fourth image frame identical to the third image frame from the N first image frames based on the identification information.
[0139] The image post-processing module 407 is configured to perform, by the application processor, image post-processing on the first processed image based on the fourth image frame to obtain a second processed image.
[0140] Optionally, the second screening module 406 includes:
[0141] The image screening unit is configured to screen, by the application processor, an image frame with a timestamp matching the timestamp in the second timestamp information from the N first image frames based on the first timestamp information of the N first image frames and the second timestamp information of the third image frame, to obtain the fourth image frame.
[0142] The identification information comprises second timestamp information, the first timestamp information is a timestamp of receiving the N first image frames by the application processor, and the second timestamp information is a timestamp of receiving the third image frame by the image processing chip.
[0143] Optionally, the device further comprises:
[0144] The control module is configured to control the image processing chip to be time-synchronized with the application processor.
[0145] The acquisition module is configured to, in the case that the image processing chip is time-synchronized with the application processor, acquire, by the application processor, the first timestamp information of the received N first image frames, and acquire, by the image processing chip, the third timestamp information of the received L second image frames, the third timestamp information comprising the second timestamp information.
[0146] Optionally, the control module is specifically configured to:
[0147] The application processor sends a pulse signal and a time synchronization request to the image processing chip, the time synchronization request comprising a first time at which the application processor sends the pulse signal.
[0148] The image processing chip acquires a receiving time of the pulse signal to obtain a second time in the case that the pulse signal is received, and performs time synchronization with the application processor based on a time difference between the first time and the second time.
[0149] Optionally, the device further comprises:
[0150] The second sending module is configured to send, by the application processor, the first timestamp information to the image processing chip.
[0151] The first screening module is configured to screen, by the image processing chip, the third image frame from the L second image frames based on the first timestamp information, wherein each timestamp in the second timestamp information of the third image frame is within a timestamp list of the first timestamp information.
[0152] Optionally, the image screening unit is specifically configured to:
[0153] The application processor performs difference processing on a first target timestamp in the second timestamp information and each timestamp in the first timestamp information, the first target timestamp being any timestamp in the second timestamp information.
[0154] The application processor determines an image frame corresponding to a second target timestamp in the N first image frames as an image frame with a timestamp matched with the first target timestamp to obtain a fourth image frame.
[0155] The second target timestamp is a timestamp in the first timestamp information, and an absolute value of a difference between the first target timestamp and the second target timestamp is less than or equal to a preset threshold.
[0156] In this embodiment, the application processor receives N first image frames output by one branch of the camera module; the image processing chip receives L second image frames output by another branch of the camera module in the same time period; a third image frame is selected from the L second image frames; image processing is performed based on the third image frame to obtain a first processed image; the first processed image and identification information of the third image frame are sent to the application processor; then the application processor selects a fourth image frame identical to the third image frame from the N first image frames based on the identification information of the third image frame; and image post-processing is performed on the first processed image based on the fourth image frame to obtain a second processed image. Since the image processing chip performs image processing on the image frames output by the camera module, and the application processor performs image post-processing on the first processed image based on the same image frame as the image processing chip, the image processing effect can be improved by performing image processing twice based on the same image frame, thereby improving the output image quality of the electronic device.
[0157] The image processing apparatus in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, and the embodiments of the present application are not limited in this regard.
[0158] The image processing apparatus in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.
[0159] The image processing apparatus provided in the embodiments of the present application can realize each process realized by the method embodiments of FIG. 1, and thus details are not repeated here.
[0160] Optionally, as shown in FIG. 5, the embodiments of the present application further provide an electronic device 500, which includes a processor 501 and a memory 502, and the memory 502 stores programs or instructions executable on the processor 501, and each step of the above image processing method embodiments is realized when the programs or instructions are executed by the processor 501, and the same technical effects can be achieved, and thus details are not repeated here.
[0161] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device described above.
[0162] FIG. 6 is a schematic diagram of a hardware structure of an electronic device for implementing the embodiments of the present application.
[0163] The electronic device 600 includes but is not limited to a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610, etc. The electronic device further includes a camera module, an application processor, and an image processing chip.
[0164] Those skilled in the art can understand that the electronic device 600 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 610 through a power management system, so as to realize the functions of power management, such as charging, discharging, and power consumption management, through the power management system. The electronic device structure shown in FIG. 6 does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown, or combine certain components, or different component arrangements, which are not repeated here.
[0165] The processor 610 is configured to:
[0166] The application processor receives N first image frames output by the camera module;
[0167] The image processing chip receives L second image frames output by the camera module, filters a third image frame from the L second image frames, performs image processing based on the third image frame to obtain a first processed image, and sends first information to the application processor, where the first information includes the first processed image and identification information of the third image frame, the N first image frames and the L second image frames are image frames output by two branches of the camera module in the same time period, and N and L are positive integers.
[0168] The application processor screens a fourth image frame same as the third image frame from the N first image frames based on the identification information; and performs image post-processing on the first processed image based on the fourth image frame to obtain a second processed image.
[0169] In this embodiment, the application processor receives N first image frames output by one branch of the camera module; and the image processing chip receives L second image frames output by another branch of the camera module in the same time period; and screens a third image frame from the L second image frames; performs image processing based on the third image frame to obtain a first processed image; and sends identification information of the first processed image and the third image frame to the application processor; then the application processor screens a fourth image frame same as the third image frame from the N first image frames based on the identification information of the third image frame; and performs image post-processing on the first processed image based on the fourth image frame to obtain a second processed image. Since the image processing chip performs image processing on the image frames output by the camera module in this embodiment, and the application processor performs image post-processing on the first processed image based on the same image frame as the image processing chip, twice image processing based on the same image frame can improve the image processing effect, thereby improving the output image quality of the electronic device.
[0170] Optionally, the processor 610 is further configured to:
[0171] The application processor screens an image frame with a timestamp matching the second timestamp information from the N first image frames based on the first timestamp information of the N first image frames and the second timestamp information of the third image frame to obtain a fourth image frame;
[0172] The identification information includes the second timestamp information, the first timestamp information is a timestamp of receiving the N first image frames by the application processor, and the second timestamp information is a timestamp of receiving the third image frame by the image processing chip.
[0173] Optionally, the processor 610 is further configured to:
[0174] The application processor controls the image processing chip and the application processor to be time-synchronized.
[0175] In the case that the image processing chip and the application processor are time-synchronized, the application processor acquires first timestamp information of the N first image frames received, and the image processing chip acquires third timestamp information of the L second image frames received, the third timestamp information including the second timestamp information.
[0176] Optionally, the processor 610 is further configured to:
[0177] The application processor sends a pulse signal and a time synchronization request to the image processing chip, the time synchronization request including a first time at which the application processor sends the pulse signal;
[0178] The image processing chip, upon receiving the pulse signal, acquires a receiving time of the pulse signal, obtaining a second time; and performs time synchronization setting with the application processor based on a time difference between the first time and the second time.
[0179] Optionally, the processor 610 is further configured to:
[0180] The application processor sends first timestamp information to the image processing chip;
[0181] The image processing chip filters a third image frame from the L second image frames based on the first timestamp information; wherein each timestamp in the second timestamp information of the third image frame is within a timestamp list of the first timestamp information.
[0182] Optionally, the processor 610 is further configured to:
[0183] The application processor performs difference processing on a first target timestamp in the second timestamp information and each timestamp in the first timestamp information, the first target timestamp being any timestamp in the second timestamp information;
[0184] The application processor determines an image frame corresponding to a second target timestamp in the N first image frames as an image frame in which the timestamp matches the first target timestamp, obtaining a fourth image frame;
[0185] The second target timestamp is a timestamp in the first timestamp information that has an absolute value of difference with the first target timestamp less than or equal to a preset threshold.
[0186] It should be understood that in the embodiments of the present application, the input unit 604 can include a graphics processor (GPU) 6041 and a microphone 6042. The graphics processor 6041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 can include a display panel 6061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 can include a touch detection device and a touch controller. The other input devices 6072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, and the like, which are not described here in detail.
[0187] The memory 609 can be used to store software programs and various data. The memory 609 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 609 can include a volatile memory or a non-volatile memory, or the memory 609 can include both a volatile memory and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 609 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0188] The processor 610 can include one or more processing units; in some embodiments, the processor 610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 610.
[0189] The embodiments of the present application also provide a readable storage medium, and the readable storage medium stores programs or instructions, which are executed by a processor to realize various processes of the above-mentioned image processing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0190] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0191] The embodiment of the present application further provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions to realize the processes of the above image processing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0192] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system level chip, a system chip, a chip system or a system on chip, etc.
[0193] The embodiment of the present application provides a computer program product, which is stored in a storage medium, and is executed by at least one processor to realize the processes of the above image processing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0194] It should be noted that in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in the opposite order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.
[0195] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of software and a necessary general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product in essence or in the form of a part that contributes to the prior art, which is stored in a storage medium (such as a ROM / RAM, a magnetic disc, an optical disc), and includes a plurality of instructions for causing an electronic device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0196] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.
Claims
1. An image processing method, executed by an electronic device, the electronic device comprising a camera module, an application processor and an image processing chip, the method comprising: receiving, by the application processor, N first image frames output by the camera module; receiving, by the image processing chip, L second image frames output by the camera module; selecting a third image frame from the L second image frames; performing image processing based on the third image frame to obtain a first processed image; sending first information to the application processor; wherein the first information comprises the first processed image and identification information of the third image frame, the N first image frames and the L second image frames are image frames output by two branches of the camera module in the same time period, and N and L are positive integers; selecting, by the application processor based on the identification information, a fourth image frame identical to the third image frame from the N first image frames; performing image post-processing on the first processed image based on the fourth image frame to obtain a second processed image.
2. The method of claim 1, wherein, The application processor selects a fourth image frame identical to the third image frame from the N first image frames based on the identification information, comprising: selecting, by the application processor based on first timestamp information of the N first image frames and second timestamp information of the third image frame, an image frame with a timestamp matching the timestamp in the second timestamp information from the N first image frames to obtain the fourth image frame; wherein the identification information comprises the second timestamp information, the first timestamp information is a timestamp of receiving the N first image frames by the application processor, and the second timestamp information is a timestamp of receiving the third image frame by the image processing chip.
3. The method of claim 2, wherein, Before the application processor receives the N first image frames output by the camera module, the method further comprises: controlling, by the application processor, the image processing chip and the application processor to be time-synchronized; under the condition that the image processing chip and the application processor are time-synchronized, obtaining, by the application processor, first timestamp information of the N first image frames received, and obtaining, by the image processing chip, third timestamp information of the L second image frames received, the third timestamp information comprising the second timestamp information.
4. The method of claim 3, wherein, The application processor controls the image processing chip and the application processor to be time-synchronized, comprising: sending, by the application processor, a pulse signal and a time synchronization request to the image processing chip, the time synchronization request comprising a first time at which the application processor sends the pulse signal; under the condition that the image processing chip receives the pulse signal, obtaining, by the image processing chip, a second time at which the pulse signal is received; and performing time synchronization setting with the application processor based on a time difference between the first time and the second time.
5. The method of claim 2, wherein, Before the image processing chip selects a third image frame from the L second image frames, the method further comprises: sending, by the application processor, the first timestamp information to the image processing chip; The image processing chip screens third image frames from the L second image frames, including: The image processing chip screens third image frames from the L second image frames based on the first timestamp information; wherein each timestamp in the second timestamp information of the third image frame is within the timestamp list of the first timestamp information.
6. The method of claim 2, wherein, The application processor screens image frames with timestamps matching the timestamps in the second timestamp information from the N first image frames based on the first timestamp information of the N first image frames and the second timestamp information of the third image frame, to obtain the fourth image frame, including: The application processor performs difference processing on a first target timestamp in the second timestamp information and each timestamp in the first timestamp information, wherein the first target timestamp is any timestamp in the second timestamp information; The application processor determines an image frame corresponding to a second target timestamp in the N first image frames as an image frame with a timestamp matching the first target timestamp, to obtain the fourth image frame; The second target timestamp is a timestamp in the first timestamp information with an absolute value of a difference from the first target timestamp less than or equal to a preset threshold.
7. An image processing apparatus applied to an electronic device, the electronic device including a camera module, an application processor and an image processing chip, the apparatus including: A first receiving module for the application processor to receive N first image frames output by the camera module; A second receiving module for the image processing chip to receive L second image frames output by the camera module; the N first image frames and the L second image frames are image frames output by two branches of the camera module in the same time period, and N and L are positive integers; A first screening module for the image processing chip to screen third image frames from the L second image frames; An image processing module for the image processing chip to perform image processing based on the third image frames to obtain a first processed image; A first sending module for the image processing chip to send first information to the application processor; wherein the first information includes the first processed image and identification information of the third image frames; A second screening module for the application processor to screen a fourth image frame identical to the third image frame from the N first image frames based on the identification information; An image post-processing module for the application processor to perform image post-processing on the first processed image based on the fourth image frame to obtain a second processed image.
8. The apparatus of claim 7, wherein, The second screening module includes: An image screening unit for the application processor to screen image frames with timestamps matching timestamps in the second timestamp information from the N first image frames based on first timestamp information of the N first image frames and second timestamp information of the third image frame, to obtain the fourth image frame; The identification information includes the second timestamp information, the first timestamp information is a timestamp of receiving the N first image frames by the application processor, and the second timestamp information is a timestamp of receiving the third image frame by the image processing chip.
9. The apparatus of claim 8, further comprising: a control module configured to control the image processing chip to be time-synchronized with the application processor; an acquisition module configured to, in a case where the image processing chip is time-synchronized with the application processor, acquire, by the application processor, first timestamp information of the N received first image frames, and acquire, by the image processing chip, third timestamp information of the L received second image frames, the third timestamp information including the second timestamp information.
10. The apparatus of claim 9, wherein, The control module is specifically configured to: send, by the application processor, a pulse signal and a time synchronization request to the image processing chip, the time synchronization request including a first time at which the application processor sends the pulse signal; acquire, by the image processing chip, a receiving time of the pulse signal to obtain a second time, in a case where the pulse signal is received; perform time synchronization with the application processor based on a time difference between the first time and the second time.
11. The apparatus of claim 8, further comprising: a second sending module configured to send, by the application processor, the first timestamp information to the image processing chip; The first screening module is specifically configured to screen, by the image processing chip, a third image frame from the L second image frames based on the first timestamp information, wherein each timestamp in second timestamp information of the third image frame is within a timestamp list of the first timestamp information.
12. The apparatus of claim 8, wherein, The image screening unit is specifically configured to: perform, by the application processor, difference processing on a first target timestamp in the second timestamp information and each timestamp in the first timestamp information, the first target timestamp being any timestamp in the second timestamp information; determine, by the application processor, an image frame corresponding to a second target timestamp in the N first image frames as an image frame with a timestamp matching the first target timestamp to obtain the fourth image frame; wherein the second target timestamp is a timestamp in the first timestamp information that has an absolute value of a difference with the first target timestamp less than or equal to a preset threshold.
13. An electronic device comprising a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions being executed by the processor to implement the steps of the image processing method of any one of claims 1-6.
14. A readable storage medium, the readable storage medium storing programs or instructions, the programs or instructions being executed by a processor to implement the steps of the image processing method of any one of claims 1-6.
15. A chip comprising a processor and a communication interface, the communication interface and the processor coupled, the processor configured to run a program or instructions to implement the steps of the image processing method of any one of claims 1-6.
16. A computer program product stored in a storage medium, the program product executed by at least one processor to implement the steps of the image processing method of any one of claims 1-6.
Citation Information
Patent Citations
Image generation method, application processor AP and third party image processing chip
CN108012084A
Image processing method, mobile terminal and computer readable storage medium
CN108076287A
Image processing method and system, medium, chip and structural optoelectronic equipment
CN111669482A
Image processing method and device, electronic equipment and storage medium
CN113744139A
Image processing method and device and electronic equipment
CN119211688A