Image processing method and device, computer equipment, readable storage medium and product

By identifying pixel types in image processing and performing target detection when conditions are met, and combining information from adjacent frames for fusion output, the inefficiency caused by the computational complexity of optical flow methods is solved, achieving efficient image processing and system operation.

CN121616612APending Publication Date: 2026-03-06CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511746713.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-03-06

Smart Images

  • Figure CN121616612A_ABST
    Figure CN121616612A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, computer equipment, a readable storage medium and a product, and relates to the technical field of image processing. Comprising the following steps: acquiring a plurality of to-be-processed image frames; for each image frame, performing type identification on each pixel point in the image frame to obtain a respective pixel point type of each pixel point; under the condition that the image frame meets the target detection condition, performing target detection on the image frame to obtain a first detection result of the image frame; determining an adjacent historical image frame of the image frame, and if the adjacent historical image frame is not subjected to target detection, obtaining a second detection result of a previous image frame of the adjacent historical image frame; determining a target detection result of the adjacent historical image frame based on the first detection result, the second detection result and the type of each pixel point; and performing image processing on the adjacent historical image frames according to the target detection result, and obtaining and outputting the processed adjacent historical image frames. By adopting the method, the image processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the rapid development of image processing, virtual background technology has been widely used. The core of this technology lies in separating the person from the background through portrait segmentation and replacing it with a specified virtual background. The final visual effect depends not only on the accuracy of single-frame segmentation but also on post-processing, which optimizes the segmentation results of consecutive video frames to ensure smoothness and stability between frames.

[0003] Currently, most common post-processing methods use optical flow for inter-frame tracking and correlation. Although this method can effectively improve the coherence of virtual backgrounds, it is computationally complex and resource-intensive. When it is used in conjunction with a similarly time-consuming portrait segmentation model, the huge amount of computation will lead to low system efficiency, resulting in low image processing efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide an image processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve image processing efficiency in response to the above-mentioned technical problems.

[0005] In a first aspect, this application provides an image processing method, comprising:

[0006] Acquire multiple image frames to be processed;

[0007] For each image frame, the type of each pixel in the image frame is identified to obtain the pixel type of each pixel.

[0008] If the image frame meets the target detection conditions, target detection is performed on the image frame to obtain the first detection result of the image frame;

[0009] Determine the adjacent historical image frames of the image frame. If no target detection was performed on the adjacent historical image frames, then obtain the second detection result of the previous image frame of the adjacent historical image frame.

[0010] Based on the first detection result, the second detection result, and the type of each pixel, determine the target detection result of adjacent historical image frames;

[0011] Based on the target detection results, image processing is performed on adjacent historical image frames to obtain and output the processed adjacent historical image frames.

[0012] In one embodiment, the image processing method further includes:

[0013] If target detection has been performed on adjacent historical image frames, then the third detection result of the adjacent historical image frames is obtained;

[0014] Based on the third detection result and the type of each pixel, the first detection result is updated to obtain the updated first detection result. The updated first detection result is used to perform image processing on the image frame when the image frame is an adjacent historical image frame.

[0015] In one embodiment, the image processing method further includes:

[0016] If an image frame does not meet the target detection conditions, determine the adjacent historical image frames of the image frame;

[0017] Obtain the third detection result of adjacent historical image frames;

[0018] Based on the third detection result, image processing is performed on adjacent historical image frames to obtain and output the processed adjacent historical image frames.

[0019] In one embodiment, type identification is performed on each pixel in the image frame to obtain the pixel type of each pixel, including:

[0020] For each pixel in an image frame, when there are associated pixels in adjacent historical image frames, motion analysis is performed between the pixel and the associated pixels to obtain pixel motion information.

[0021] Based on pixel motion information, determine the pixel type information of the pixel.

[0022] In one embodiment, based on the first detection result, the second detection result, and the type of each pixel, the target detection result of adjacent historical image frames is determined, including:

[0023] Based on the type of each pixel, determine the detection weights of the first and second detection results respectively.

[0024] Based on each detection weight, the first detection result and the second detection result are weighted and summed to obtain the target detection result of adjacent historical image frames.

[0025] In one embodiment, the image processing method further includes:

[0026] Obtain the sequence number of the image frame among multiple image frames;

[0027] If the sequence number is within the preset sequence number range, then the image frame is determined to meet the target detection conditions.

[0028] Secondly, this application also provides an image processing apparatus, comprising:

[0029] The image acquisition module is used to acquire multiple image frames to be processed;

[0030] The pixel type recognition module is used to identify the type of each pixel in each image frame and obtain the pixel type of each pixel.

[0031] The first detection result acquisition module is used to perform target detection on the image frame when the image frame meets the target detection conditions, and obtain the first detection result of the image frame.

[0032] The second detection result acquisition module is used to determine the adjacent historical image frames of the image frame. If no target detection is performed on the adjacent historical image frame, the second detection result of the previous image frame of the adjacent historical image frame is acquired.

[0033] The target detection result generation module is used to determine the target detection results of adjacent historical image frames based on the first detection result, the second detection result, and the type of each pixel.

[0034] The image output module is used to process adjacent historical image frames based on the target detection results, and to obtain and output the processed adjacent historical image frames.

[0035] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0036] Acquire multiple image frames to be processed;

[0037] For each image frame, the type of each pixel in the image frame is identified to obtain the pixel type of each pixel.

[0038] If the image frame meets the target detection conditions, target detection is performed on the image frame to obtain the first detection result of the image frame;

[0039] Determine the adjacent historical image frames of the image frame. If no target detection was performed on the adjacent historical image frames, then obtain the second detection result of the previous image frame of the adjacent historical image frame.

[0040] Based on the first detection result, the second detection result, and the type of each pixel, determine the target detection result of adjacent historical image frames;

[0041] Based on the target detection results, image processing is performed on adjacent historical image frames to obtain and output the processed adjacent historical image frames.

[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0043] Acquire multiple image frames to be processed;

[0044] For each image frame, the type of each pixel in the image frame is identified to obtain the pixel type of each pixel.

[0045] If the image frame meets the target detection conditions, target detection is performed on the image frame to obtain the first detection result of the image frame;

[0046] Determine the adjacent historical image frames of the image frame. If no target detection was performed on the adjacent historical image frames, then obtain the second detection result of the previous image frame of the adjacent historical image frame.

[0047] Based on the first detection result, the second detection result, and the type of each pixel, determine the target detection result of adjacent historical image frames;

[0048] Based on the target detection results, image processing is performed on adjacent historical image frames to obtain and output the processed adjacent historical image frames.

[0049] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0050] Acquire multiple image frames to be processed;

[0051] For each image frame, the type of each pixel in the image frame is identified to obtain the pixel type of each pixel.

[0052] If the image frame meets the target detection conditions, target detection is performed on the image frame to obtain the first detection result of the image frame;

[0053] Determine the adjacent historical image frames of the image frame. If no target detection was performed on the adjacent historical image frames, then obtain the second detection result of the previous image frame of the adjacent historical image frame.

[0054] Based on the first detection result, the second detection result, and the type of each pixel, determine the target detection result of adjacent historical image frames;

[0055] Based on the target detection results, image processing is performed on adjacent historical image frames to obtain and output the processed adjacent historical image frames.

[0056] The aforementioned image processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product firstly identify the type of each pixel in each image frame and perform target detection only on the current frame when the target detection conditions are met. This avoids high computational load processing for every frame, significantly reducing computational complexity and laying the foundation for improved overall operating efficiency. Secondly, for adjacent historical image frames where target detection has not been performed, the detection results of the previous image frame are obtained and combined with the detection results of the current frame and pixel type information to generate the target detection result for that historical image frame. This process effectively utilizes the correlation information between preceding and following frames, accurately fitting the detection content of the missing frame, saving computational power while ensuring the continuity and stability of the visual effect. Finally, an output strategy with a one-frame delay is adopted, and image processing and output are performed on the historical image frames based on the fitted target detection results. In summary, this solution, through the synergistic effect of conditional detection, inter-frame information fusion, and delayed output mechanism, achieves the effect of significantly reducing the system's computational burden and improving system operating efficiency while ensuring image display quality. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is an application environment diagram of an image processing method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating an image processing method in one embodiment;

[0060] Figure 3 This is a schematic diagram of an image processing system in a specific embodiment;

[0061] Figure 4 This is a flowchart illustrating an image processing method in a specific embodiment;

[0062] Figure 5 This is a structural block diagram of an image processing device in one embodiment;

[0063] Figure 6 This is an internal structural diagram of a computer device in one embodiment;

[0064] Figure 7 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0066] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0067] The image processing method provided in this application embodiment can be applied to, for example... Figure 1 The image processing system shown includes a terminal 102 and a server 104, which communicate via a network. The terminal 102 acquires and uploads multiple image frames to be processed, and receives and displays processed image frames. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart TVs, smart in-vehicle devices, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104, as the processing core of the system, executes the image processing flow. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. A data storage system can be used to store the data that the server 104 needs to process. It can be integrated on the server 104 or placed in the cloud or on other network servers.

[0068] Specifically, server 104 acquires multiple image frames from terminal 102; for each image frame, server 104 performs type recognition on each pixel to obtain the pixel type of each pixel; if the image frame meets the target detection conditions, target detection is performed on the image frame to obtain the first detection result of the image frame; adjacent historical image frames are determined; if no target detection is performed on the adjacent historical image frames, the second detection result of the previous image frame of the adjacent historical image frame is acquired; based on the first detection result, the second detection result, and the pixel type, the target detection result of the adjacent historical image frames is determined; image processing is performed on the adjacent historical image frames according to the target detection result, and the processed adjacent historical image frames are sent to terminal 102 for display.

[0069] In one exemplary embodiment, such as Figure 2 As shown, an image processing method is provided, which is applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0070] Step S202: Obtain multiple image frames to be processed.

[0071] An image frame refers to a static image unit at a single point in time during a video, dynamic image, or continuous imaging process.

[0072] For example, the server continuously captures video data in real time at a fixed frame rate (e.g., 30 frames per second), with each captured frame being a single frame. After acquiring the original image frames, the server can sequentially perform preprocessing on each frame, such as resizing and normalization. Resizing refers to scaling the original high-resolution image to a fixed size to reduce computation and improve image processing speed. Normalization refers to normalizing the pixel values ​​of the image from the integer range of 0 to 255 to the floating-point range of 0 to 1. This operation helps improve the convergence speed and stability of subsequent models.

[0073] Step S204: For each image frame, perform type identification on each pixel in the image frame to obtain the pixel type of each pixel.

[0074] Among them, pixel type refers to the classification of pixels based on their motion characteristics between consecutive frames. In this embodiment, it is mainly divided into three categories: fixed points, moving points, and unassociated points. Fixed points are pixels that do not move in position between consecutive frames. Moving points are pixels that move in position between consecutive frames. Unassociated points are pixels that cannot find a stable and reliable correspondence between consecutive frames. This is usually due to occlusion, rapid movement, or sudden changes in lighting, which cause pixel tracking failure.

[0075] For example, after preprocessing, the image frames will enter the optical flow tracing module for pixel type identification. Specifically, the server first determines whether the current frame is the first frame. If it is, the server initializes the parameters of the optical flow tracing module, such as initializing the window size, memory, and tracking parameters. After parameter initialization, the server treats the first frame as a key frame for mandatory object detection, calls the object detection model to perform object detection, and obtains the object detection result for the first frame. To ensure the normal start of subsequent inter-frame fitting processes, the server initializes a virtual previous frame, i.e., frame 0, setting its detection result to be the same as the first frame's detection result, and also pointing its input image to the first frame's image data. Next, based on the first frame's detection result, the server performs post-processing on the first frame image, such as edge smoothing and size scaling, and then merges it with the virtual background image data to generate and output the final virtual background image. The virtual background image data is an image or video clip obtained by the server from a pre-set material library or through a method specified by the user in real time.

[0076] If the current frame is not the first frame, the server first processes the current frame and the previous frame into grayscale images, resulting in two grayscale images. Then, optical flow tracing is used to calculate the optical flow field between these two grayscale images. The optical flow field is a vector field that precisely describes the direction and distance of motion of each pixel in the image from the previous frame to the current frame. Based on the calculated optical flow vector, each pixel is classified: pixels with motion vector amplitudes close to zero or below a preset threshold, or pixels that are tracked and whose positions have not changed, are marked as stationary; pixels with significant motion vector amplitudes, or pixels that are tracked and whose positions have changed, are marked as moving points; and pixels for which the optical flow tracing algorithm cannot calculate a reliable motion vector are marked as unassociated points. Thus, the server assigns a clear motion type attribute to each pixel, providing a basis for subsequent inter-frame fitting and result correction.

[0077] Step S206: If the image frame meets the target detection conditions, target detection is performed on the image frame to obtain the first detection result of the image frame.

[0078] In this embodiment, the target detection condition specifically refers to a frame dropping strategy. The core of this strategy is to intermittently execute computationally intensive target detection processes to significantly reduce the system's computational load. Specifically, the server presets a fixed detection interval N, where N is an integer greater than 1, for example, N=3. The current image frame is considered to meet the target detection condition if and only if the frame number n of the current image frame is not divisible by N, and the target detection model is invoked to perform target detection on it. For example, target detection is performed on frames 1, 2, 4, and 5, while frames 3, 6, and 9 are defined as discarded frames and no target detection is performed. Of course, the value of the fixed interval N can be adjusted according to the performance requirements of the actual application scenario. Furthermore, those skilled in the art will understand that the target detection condition is not limited to a fixed frame dropping interval and can be extended to an adaptive dynamic strategy, such as dynamically deciding whether to skip target detection in the current frame based on the system's real-time computational load, the intensity of motion of people in the image, or the complexity of the image content. This embodiment does not limit the specific implementation of the target detection conditions, as long as it can selectively perform target detection to reduce the amount of computation and provide a basis for judgment on the detection results of subsequent frame-based fitting of discarded frames.

[0079] In this embodiment, object detection specifically refers to portrait segmentation. Its goal is to identify all pixels in an image that belong to the human body, generate a segmentation mask, and thus achieve accurate separation of the foreground portrait from the background. It should be noted that although this embodiment describes portrait segmentation as a typical application scenario, it is also applicable to other scenarios requiring pixel-level or region-level object recognition and tracking, such as vehicle segmentation and specific object segmentation. Any application that balances computational load and output stability through intermittent detection and inter-frame information fusion falls within the scope of this application. The first detection result is the raw detection data directly output after the current image frame is predicted by the object detection module. This includes, but is not limited to, at least one of the following: raw segmentation weights, foreground / background classification maps, etc. The segmentation weight is a matrix corresponding to the input image size. Each value in the matrix is ​​a floating-point number between 0 and 1, or a probability value, representing the confidence that the corresponding pixel belongs to the foreground object (such as a portrait). For example, a value of 1 indicates that the pixel is definitely foreground, 0 indicates that it is definitely background, and 0.5 indicates that it cannot be determined.

[0080] For example, when the server determines that the current image frame meets the preset target detection conditions, it will trigger the portrait segmentation module to perform target detection on the frame. Specifically, the server will input the pre-processed image frame into a pre-trained target detection model. This model will extract and analyze the image features layer by layer, and finally output the probability value of each pixel belonging to the foreground portrait. These probability values ​​together constitute the first detection result of the frame, i.e., the original segmentation weights.

[0081] Step S208: Determine the adjacent historical image frames of the image frame. If no target detection is performed on the adjacent historical image frames, obtain the second detection result of the previous image frame of the adjacent historical image frame.

[0082] The adjacent historical image frame refers to the frame preceding the current image frame. Assuming the current frame is frame n, then the adjacent historical image frame is frame (n-1). The second detection result refers to the detection result of the preceding image frame of the adjacent historical image frame after correction or fitting. Again, taking frame n as an example, the preceding image frame of its adjacent historical image frame (frame (n-1)) is frame (n-2).

[0083] For example, since this embodiment uses a one-frame delay output strategy, when facing the current frame, the server should ultimately output the previous frame image, i.e., the adjacent historical image frame. Therefore, the server will determine the adjacent historical image frames of the current image frame and check whether they were marked as discarded frames in the previous processing flow because they did not meet the target detection conditions, and thus no target detection was performed. If it is determined that no target detection was performed, the server will retrieve the detection result obtained from the previous image frame after correction or fitting processing from the cache, i.e., the second detection result.

[0084] In some embodiments, the server can identify whether adjacent historical image frames are discarded frames using various flexible criteria. For example, if the remainder when the frame number n of the current image frame is divided by a preset interval N is zero, then the adjacent historical image frame (the (n-1)th frame) can be determined to be a discarded frame; conversely, if the remainder is not zero, then the adjacent historical image frame can be determined not to be a discarded frame, and it has undergone target detection. In addition, the server can also determine this by querying the frame status flags maintained for each frame. Frame status flags can be divided into discarded frames and predicted frames, with predicted frames being the frames for target detection. The server can also directly query the frame buffer to verify whether the original detection result of the frame exists. The above methods can be used independently or in combination to provide accurate and reliable criteria for subsequent inter-frame fitting.

[0085] Step S210: Based on the first detection result, the second detection result, and the type of each pixel, determine the target detection result of adjacent historical image frames.

[0086] The target detection result refers to the final detection result of adjacent historical image frames obtained by weighted fusion and motion compensation based on the first detection result, the second detection result, and the type of each pixel. It includes, but is not limited to, at least one of the fitted segmentation weights of adjacent historical image frames and the segmentation mask after smoothing.

[0087] For example, when an adjacent historical image frame is a discarded frame, since no target detection was performed on the discarded frame, the server cannot use its detection results to correct the detection result of the current frame. Therefore, the original detection result of the current frame is directly used as its final detection result. Simultaneously, the server utilizes the obtained tracking association information of the preceding and following frames of adjacent historical image frames, including the tracking association information T from frame (n-2) to frame (n-1). n-1 And the tracking association information T from frame (n-1) to frame n. n By combining the detection results of previous and subsequent frames with specific fitting rules, adjacent historical image frames can be reconstructed to generate corresponding detection results. This effectively maintains the temporal stability and visual coherence of image output while avoiding additional computational overhead.

[0088] Step S212: Perform image processing on adjacent historical image frames based on the target detection results to obtain and output the processed adjacent historical image frames.

[0089] In this embodiment, image processing specifically refers to the virtual background fusion operation, which involves using the obtained target detection results to fuse the target region (such as the human figure region) in the original image frame with a specified virtual background image. The processed adjacent historical image frames refer to the final output image after the virtual background replacement has been completed, where the background has been replaced with the specified virtual background image while the foreground target is preserved.

[0090] For example, after obtaining the target detection result through fitting, the server can post-process it, such as using Gaussian blur for edge smoothing and scaling it back to the original image frame size. Then, using a one-frame delayed output strategy, the processed detection result (e.g., segmentation weights) is used as fusion coefficients. Through weighted fusion, the original targets from adjacent historical image frames are pixel-level synthesized with the virtual background image, ultimately generating and outputting the virtual background image of the adjacent historical image frames. In this way, the delayed output provides a one-frame time window for image processing, thereby maintaining image output quality and stability while reducing computational load and improving operational efficiency.

[0091] In this embodiment, the system first identifies the type of each pixel in each image frame and performs target detection only on the current frame when the target detection conditions are met. This avoids high computational load processing for each frame, significantly reducing computation and laying the foundation for improved overall operating efficiency. Secondly, for adjacent historical image frames where target detection was not performed, the system obtains the detection result of the previous image frame and combines it with the detection result of the current frame and pixel type information to generate the target detection result for that historical image frame. This process effectively utilizes the correlation information between preceding and following frames, accurately fitting the detection content of the missing frame, saving computational power while ensuring the continuity and stability of the visual effect. Finally, a one-frame delay output strategy is adopted, and image processing and output are performed on the historical image frames based on the fitted target detection result. In summary, this embodiment, through the synergistic effect of conditional detection, inter-frame information fusion, and delayed output mechanisms, achieves the effect of significantly reducing the system's computational burden and improving system operating efficiency while ensuring image display quality.

[0092] In an exemplary embodiment, the image processing method further includes: if target detection has been performed on adjacent historical image frames, obtaining a third detection result of the adjacent historical image frames; updating the first detection result based on the third detection result and the type of each pixel to obtain an updated first detection result, wherein the updated first detection result is used to perform image processing on the image frame when the image frame is an adjacent historical image frame.

[0093] The third detection result refers to the target detection result of adjacent historical image frames after correction. The updated first detection result refers to the result obtained by correcting the original first detection result of the current image frame based on the third detection result.

[0094] For example, when the server determines that an adjacent historical image frame is a prediction frame, meaning that target detection has already been performed on the adjacent historical image frame, it will obtain its corrected detection result as the third detection result. Subsequently, based on the third detection result and the pixel type information of the current frame, the server corrects and updates the first detection result of the current frame, obtaining the corrected and updated first detection result. During the correction and update process, the server traverses each pixel of the current frame and dynamically adjusts the fusion weight according to its type marked by the optical flow tracing method. That is, for pixels marked as stationary points, a higher weight, such as 0.7, is assigned to the third detection result to maintain the stability of the detection result; for pixels marked as moving points, the weight is dynamically allocated according to the confidence of the detection results of the preceding and following frames. Through the weighted fusion mechanism based on motion features, edge flickering and jitter in the inter-frame detection results can be effectively suppressed. The updated first detection result will be cached by the server and will participate in its own image processing in subsequent processing when this frame is used as an adjacent historical image frame of other frames.

[0095] In this embodiment, by performing cross-correction based on pixel motion characteristics on the detection results of consecutive prediction frames, edge flickering and jitter are significantly suppressed, thereby ensuring the continuity and stability of image output while reducing the amount of computation.

[0096] In an exemplary embodiment, the image processing method further includes: determining adjacent historical image frames when the image frame does not meet the target detection conditions; obtaining a third detection result of the adjacent historical image frames; performing image processing on the adjacent historical image frames based on the third detection result to obtain and output the processed adjacent historical image frames.

[0097] For example, if the current image frame does not meet the target detection conditions, it means that the current image frame is a discarded frame. In this case, the server will skip the step of performing target detection on it and directly determine its adjacent historical image frame, i.e., the previous frame. It will then retrieve the third detection result of the adjacent historical image frame from the cache, which is the corrected detection result. Subsequently, the server will directly perform image processing on the adjacent historical image frame based on this third detection result, including post-processing operations such as edge smoothing and size restoration. Finally, it will generate and output the processed adjacent historical image frame through weighted fusion. The core of this processing path is to make full use of the temporal consistency characteristics of the video sequence. When the system determines that there is no need to generate a new detection result for the current discarded frame, it will directly use the optimized historical frame detection data for output, thereby ensuring the continuity of processing while minimizing the consumption of computing resources.

[0098] In an exemplary embodiment, type identification is performed on each pixel in the image frame to obtain the pixel type of each pixel, including: for each pixel in the image frame, when there are associated pixels of the pixel in the adjacent historical image frames of the image frame, motion analysis is performed between the pixel and the associated pixels to obtain pixel motion information; based on the pixel motion information, pixel type information of the pixel is determined.

[0099] In this context, associated pixels refer to the pixel positions in adjacent historical image frames that correspond to the pixels in the current frame, determined by motion tracking algorithms such as optical flow tracking. Pixel motion information includes, but is not limited to, the pixel's motion vector and motion state feature data, where the motion vector represents the magnitude and direction of the pixel's displacement.

[0100] For example, for each pixel in the current image frame, the server obtains the coordinates of its associated pixels in adjacent historical image frames through the optical flow tracking module. When a valid association exists, the server calculates the motion vector between the two points, including the displacement magnitude and direction components, and analyzes the stability of the motion in the time domain. Based on the above motion information, a multi-level threshold determination strategy is adopted. That is, when the displacement is lower than the stationary threshold, it can be marked as a stationary point; when the displacement exceeds the motion threshold and the motion direction is consistent, it can be marked as a moving point. For pixels for which the optical flow tracking algorithm cannot calculate a reliable motion vector, such as pixels with displacement between the stationary and motion thresholds or pixels with unstable motion patterns, they are marked as unassociated points. Here, the stationary threshold is an upper limit value, defining the maximum value of the motion magnitude of a pixel considered stationary or without significant motion, and the motion threshold is a lower limit value, defining the minimum value of the motion magnitude of a pixel considered to have undergone significant motion. By accurately quantifying the motion characteristics of each pixel, a reliable weight allocation basis is provided for subsequent inter-frame fusion.

[0101] In an exemplary embodiment, determining the target detection result of adjacent historical image frames based on the first detection result, the second detection result, and the type of each pixel includes: determining the detection weights of the first detection result and the second detection result based on the type of each pixel; and performing a weighted summation of the first detection result and the second detection result according to the detection weights to obtain the target detection result of adjacent historical image frames.

[0102] The detection weight refers to the influence coefficient assigned to the first and second detection results during the fusion process. This coefficient is dynamically determined based on the pixel type and reflects the degree of trust in different detection results. Weighted summation is a data fusion method where the first and second detection results are multiplied by their respective detection weights and then summed to obtain the final target detection result.

[0103] For example, when performing inter-frame fusion, the server first traverses all pixels in adjacent historical image frames and uses the optical flow tracking information from the previous and next frames to perform multipath fitting. For successfully tracked pixels, weights are dynamically assigned based on their motion characteristics in two tracking operations. Specifically, if a pixel is stationary in an adjacent historical image frame, the detection result of the previous image frame is prioritized, with the first detection result of the current image frame as secondary, thus assigning higher weight to the second detection result. If a pixel is stationary in the current image frame but not in an adjacent historical image frame, the first detection result of the current image frame is prioritized, with the detection result of the previous image frame as secondary. If a pixel is a moving point in both the adjacent historical image frame and the current image frame, the average of the detection results from the preceding and following frames is used. If a pixel is tracked in an adjacent historical image frame but not in the current image frame, the detection result of the previous image frame is prioritized. If a pixel is not tracked in an adjacent historical image frame but is tracked in the current image frame, the detection result of the current image frame is prioritized. If a pixel is not tracked in either the preceding or following frame, tracking information cannot be used, but its position information can be used, i.e., an averaging strategy based on coordinates is employed. Finally, based on the dynamically allocated detection weights, the first and second detection results are weighted and summed to obtain the target detection results of adjacent historical image frames.

[0104] In this embodiment, a fine-grained weight allocation mechanism is used to achieve high-precision reconstruction of the discarded frame detection results, ensuring visual coherence and stability while maintaining computational efficiency.

[0105] In an exemplary embodiment, the image processing method further includes: obtaining the sequence number of the image frame among multiple image frames; if the sequence number is within a preset sequence number range, then determining that the image frame meets the target detection conditions.

[0106] The sequence number, or frame number, refers to the temporal position of an image frame in the video stream, typically an integer sequence starting from 1 and incrementing. The preset sequence range is a pre-defined set of one or more consecutive or discrete sequences used to define the specific frame positions for which object detection needs to be performed.

[0107] For example, the server maintains a frame sequence counter, assigning a unique sequence number to each received image frame. The preset configuration stores conditional rules for object detection, which can take various forms: including but not limited to discrete sequence sets such as {1,2,4,5}, periodic patterns such as detecting every 3 frames, or other mathematical relationships. By matching the current frame sequence number with a preset sequence range, the system can flexibly control the timing of object detection, thus eliminating the need to perform object detection on all image frames and significantly reducing computational load.

[0108] In one specific embodiment, a virtual background for video conferencing is used as an example for detailed explanation. A virtual background for video conferencing is a feature based on human face segmentation technology that allows users to replace the actual environmental background during video conferences with a specified image, video, or blur effect as the background.

[0109] Figure 3 The diagram illustrates the modules of the image processing system, including an image data processing module, an optical flow tracing module, a human face segmentation (i.e., target detection) module, a segmentation result processing module, and a result output module. The image data processing module acquires real-time video stream data, sequentially performing resizing, normalization, and other processing operations on each frame of the video stream to obtain the target image, and records the current frame number n. The optical flow tracing module receives the grayscale images of the current frame (frame n) and the previous frame (frame n-1), and uses optical flow tracing to track and associate the preceding and following frames. All pixels in the current frame are classified and labeled: points that are tracked and associated but whose positions remain unchanged are marked as stationary points; points that are tracked and associated but whose positions change are marked as moving points; and points that are not tracked and associated are marked as unassociated points. The portrait segmentation module determines whether to perform portrait segmentation prediction on the current image frame according to a preset frame dropping interval. The frame dropping interval is set to 3, meaning one frame is discarded every 3 frames. If the frame number n of the current frame is divisible by 3, the current frame is defined as a discarded frame, and the portrait segmentation prediction process is not performed. Otherwise, it is defined as a prediction frame, the portrait segmentation prediction process is performed, and the portrait segmentation prediction result is output. The segmentation result processing module is used to correct or fit the portrait segmentation result of the current frame or the previous frame based on the tracking correlation information of the optical flow tracking module and the segmentation result of the portrait segmentation module, and outputs the corrected portrait segmentation result or the fitted portrait segmentation result. The result output module is used to display the result by delaying it by one frame. That is, when the nth frame is input, the processing result of the n-1th frame is output. For the cached or newly fitted segmentation result of the n-1th frame, Gaussian blur is used for edge smoothing and size scaling. The processed segmentation result is used as a weight to perform weighted fusion of the image data of the previous frame (n-1th frame) and the virtual background image data, and the virtual background fusion result of the previous frame (n-1th frame) is output. The modules are connected and work together to achieve the goal of significantly improving operating efficiency while maintaining the stability of the virtual background effect.

[0110] Figure 4 This diagram illustrates the specific flow of an image processing method, including the following steps:

[0111] S101: Acquire real-time video conference image data, perform preprocessing actions such as size adjustment and normalization on each frame of the video stream to obtain the target image, and record the frame number n of the current image frame;

[0112] S102: Determine if n is equal to 1. If yes, proceed to step S201; otherwise, proceed to both S202 and S302.

[0113] S201: Initialize the parameters for the optical flow method, then proceed to S301;

[0114] S202: Perform grayscale processing on the nth frame image to obtain the grayscale image G. n ;

[0115] S203: Use optical flow tracing to process the grayscale image G of the (n-1)th frame. n-1 and the grayscale image G of the nth frame n Tracking was performed to obtain the tracking-related information T. n ;

[0116] S204: Classify and label all pixels in the nth frame. Mark the points that are tracked and associated and whose positions remain unchanged as stationary points. Mark the points that are tracked and associated and whose positions change as moving points. Mark the points that are not tracked and associated as unassociated points. Proceed to S401.

[0117] S301: Use the human portrait segmentation model to predict the first frame image, obtain the segmentation weight S1 of the first frame image, define the adjusted human portrait segmentation result of the 0th frame as R0 = S1, define the input image of the 0th frame as M0 = M1, and enter S501.

[0118] S302: Determine whether the current image frame number n is divisible by 3. If n is divisible by 3, the current frame will not be subject to the human image segmentation prediction process and will be defined as a discard frame. Proceed to S304. If n is not divisible by 3, the current frame will be defined as a prediction frame. Proceed to S303.

[0119] S303: Use a human face segmentation model to predict the nth frame image and obtain the segmentation weights S for the nth frame image. n Enter S401;

[0120] S304: Buffer the corrected segmentation weight R of frame n-1. n-1 Enter S501;

[0121] S401: Determine whether the remainder when the current image frame number n is divided by 3 is 1. If it is not 1, proceed to S402; otherwise, proceed to S403.

[0122] S402: The remainder when the current image frame number n is divided by 3 is not 1, indicating that both frame n and frame (n-1) are predicted frames. At this point, the segmentation result of frame (n-1) and tracking information can be used to correct the segmentation result of frame n. This correction reduces edge flicker and increases stability. The correction process is as follows: Traverse all pixels P in frame n and update and adjust the segmentation result of point P, i.e.:

[0123]

[0124] in, Let P be the corrected segmentation weight in the nth frame. Let P be the corrected segmentation weight of the associated pixels in the (n-1)th frame. The original segmentation weights for point P in the nth frame are: , The weighting coefficients related to the attributes of point P are determined according to the following strategy;

[0125] S4021: When point P is a fixed point, the segmentation result of frame (n-1) is used as the primary value, and the segmentation result of frame n is used as the secondary value. This ensures the stability of the segmentation results before and after the fixed point and reduces flickering. , ;

[0126] S4022: When point P is a moving point, the weighting coefficients are determined according to the following priority:

[0127] S40221: When or If the segmentation result of frame n is relatively certain, then the segmentation result of frame n should be the primary factor, and the segmentation result of frame (n-1) should be the secondary factor. , Enter S501;

[0128] S40222: When or If the segmentation result of frame n has low certainty, it means that the segmentation result of frame (n-1) has relatively high certainty. Therefore, the segmentation result of frame (n-1) should be the primary factor, and the segmentation result of frame n should be the secondary factor. , Enter S501;

[0129] S40223: When the determinism of the segmentation results of the (n-1)th frame and the nth frame is not high, then set... , Enter S501;

[0130] S4023: When point P is an unassociated point, the segmentation result of the nth frame is taken as the primary factor, i.e. , ;

[0131] S403: The remainder when the current image frame number n is divided by 3 is 1, indicating that the nth frame is a prediction frame and the (n-1)th frame is a discarded frame. Since the discarded frame did not undergo the human image segmentation prediction process, it cannot be corrected using the segmentation result and tracking information of the (n-1)th frame as in S402. Therefore, the corrected segmentation result of the nth frame is directly set to its original segmentation result, i.e., R. n = S n The tracking association information (T) of the frames before and after the (n-1)th frame (the discarded frame) has been obtained. n-1 and T n ) and prediction results of preceding and following frames (R n-2 and R n Therefore, the segmentation result of the (n-1)th frame can be fitted as follows: traverse all pixels P of the (n-1)th frame, and use the two tracking association information T... n-1 (Tracking information from frame n-2 to frame n-1) and T n The segmentation results of point P are fitted using tracking information from frame (n-1) to frame n, i.e.:

[0132]

[0133] in, The corrected segmentation result for the (n-2)th frame in the cache. This is the original segmentation result for the nth frame. , Determined by the following rules;

[0134] S4031: When point P is at T n-1 and T n If both tracking points are tracked, the tracking information from both tracking points can be fully utilized, and the weighting coefficients can be determined according to the following priorities. , ;

[0135] S40311: When point P is at T n-1 When the associated information contains a fixed point, the segmentation result of frame (n-2) is used as the primary reference, and the segmentation result of frame n is used as the secondary reference. , Enter S501;

[0136] S40312: When point P is at T n When the associated information is a fixed point and point P is in T n-1 When the associated information is not a fixed point, the segmentation result of frame n is the primary factor, and the segmentation result of frame (n-2) is the secondary factor. , Enter S501;

[0137] S40313: When point P is at Tn-1 and T n When all the associated information consists of moving points, the average value of the segmentation results from the preceding and following frames is taken. , Enter S501;

[0138] S4032: When point P is at T n-1 Being tracked up in T n When it was not tracked, The segmentation result of the associated points of point P in the (n-2)th frame will completely determine the outcome. , ,Right now Enter S501;

[0139] S4033: When point P is at T n Being tracked up in T n-1 When it was not tracked, The segmentation result of the associated points of point P in the nth frame will completely determine the outcome. , ,Right now Enter S501;

[0140] S4034: Point P is at T n-1 and T n If none of the points are tracked, the tracking information cannot be used, but the position information can be used. The associated points of point P in the (n-2)th frame and the associated points in the nth frame are replaced by pixels at the same coordinates. , Enter S501;

[0141] S501: Segmentation weight R for the buffered or newly fitted (n-1)th frame. n-1 Gaussian blur is used for edge smoothing.

[0142] S502: Scale the smoothed segmentation weights back to the original image size, and use a weighted fusion method to fuse the original input image M of frame n-1. n-1 And the virtual background image B, the specific fusion method is as follows: traverse the input image M of frame n-1. n-1 The pixel value at the corresponding position after merging all pixels P is:

[0143]

[0144] in, Let P be the segmentation weight after correction in the (n-1)th frame. For the (n-1)th frame, the original input image M n-1 The pixel value at point P, Let P be the pixel value of the virtual background image B at point P. Cache the nth frame image M.n The grayscale image G of the nth frame n The segmentation weight R of the nth frame image after adjustment n (Cache R when n is divisible by 3) n-1 Tracking related information T n ;

[0145] S503: Output the virtual background blending result of the (n-1)th frame.

[0146] This embodiment achieves the effect of significantly reducing the system's computational burden and improving the system's operating efficiency while ensuring the image display effect through the synergistic effect of condition detection, inter-frame information fusion and delayed output mechanism.

[0147] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0148] Based on the same inventive concept, this application also provides an image processing apparatus for implementing the image processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more image processing apparatus embodiments provided below can be found in the limitations of the image processing method described above, and will not be repeated here.

[0149] In one exemplary embodiment, such as Figure 5 As shown, an image processing apparatus is provided, comprising:

[0150] Image acquisition module 502 is used to acquire multiple image frames to be processed;

[0151] The pixel type recognition module 504 is used to perform type recognition on each pixel in each image frame to obtain the pixel type of each pixel.

[0152] The first detection result acquisition module 506 is used to perform target detection on the image frame when the image frame meets the target detection conditions, and obtain the first detection result of the image frame.

[0153] The second detection result acquisition module 508 is used to determine the adjacent historical image frames of the image frame. If no target detection is performed on the adjacent historical image frame, the second detection result of the previous image frame of the adjacent historical image frame is acquired.

[0154] The target detection result generation module 510 is used to determine the target detection results of adjacent historical image frames based on the first detection result, the second detection result, and the type of each pixel.

[0155] The image output module 512 is used to perform image processing on adjacent historical image frames based on the target detection results, and to obtain and output the processed adjacent historical image frames.

[0156] In one embodiment, the device is further configured to:

[0157] If target detection has been performed on adjacent historical image frames, then the third detection result of the adjacent historical image frames is obtained;

[0158] Based on the third detection result and the type of each pixel, the first detection result is updated to obtain the updated first detection result. The updated first detection result is used to perform image processing on the image frame when the image frame is an adjacent historical image frame.

[0159] In one embodiment, the device is further configured to:

[0160] If an image frame does not meet the target detection conditions, determine the adjacent historical image frames of the image frame;

[0161] Obtain the third detection result of adjacent historical image frames;

[0162] Based on the third detection result, image processing is performed on adjacent historical image frames to obtain and output the processed adjacent historical image frames.

[0163] In one embodiment, the pixel type recognition module 504 is further configured to:

[0164] For each pixel in an image frame, when there are associated pixels in adjacent historical image frames, motion analysis is performed between the pixel and the associated pixels to obtain pixel motion information.

[0165] Based on pixel motion information, determine the pixel type information of the pixel.

[0166] In one embodiment, the target detection result generation module 510 is further configured to:

[0167] Based on the type of each pixel, determine the detection weights of the first and second detection results respectively.

[0168] Based on each detection weight, the first detection result and the second detection result are weighted and summed to obtain the target detection result of adjacent historical image frames.

[0169] In one embodiment, the device is further configured to:

[0170] Obtain the sequence number of the image frame among multiple image frames;

[0171] If the sequence number is within the preset sequence number range, then the image frame is determined to meet the target detection conditions.

[0172] Each module in the aforementioned image processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0173] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores image processing data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an image processing method.

[0174] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an image processing method.

[0175] Those skilled in the art will understand that Figure 6 or Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0176] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0177] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0178] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0180] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0181] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0182] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An image processing method, characterized by, The method comprises: acquiring a plurality of image frames to be processed; for each of the image frames, performing type identification on each pixel point in the image frame to obtain a pixel point type of each of the pixel points; in a case where the image frame meets a target detection condition, performing target detection on the image frame to obtain a first detection result of the image frame; determining a neighboring historical image frame of the image frame, and if the neighboring historical image frame has not been subjected to target detection, acquiring a second detection result of a previous image frame of the neighboring historical image frame; based on the first detection result, the second detection result and the pixel point types of each of the pixel points, determining a target detection result of the neighboring historical image frame; performing image processing on the neighboring historical image frame according to the target detection result to obtain and output a processed neighboring historical image frame.

2. The method of claim 1, wherein, The method further comprises: if the neighboring historical image frame has been subjected to target detection, acquiring a third detection result of the neighboring historical image frame; based on the third detection result and the pixel point types of each of the pixel points, updating the first detection result to obtain an updated first detection result, wherein the updated first detection result is used to perform image processing on the image frame in a case where the image frame serves as a neighboring historical image frame.

3. The method of claim 1, wherein, The method further comprises: in a case where the image frame does not meet the target detection condition, determining a neighboring historical image frame of the image frame; acquiring a third detection result of the neighboring historical image frame; based on the third detection result, performing image processing on the neighboring historical image frame to obtain and output a processed neighboring historical image frame.

4. The method of claim 1, wherein, The type identification on each of the pixel points in the image frame to obtain a pixel point type of each of the pixel points comprises: for each of the pixel points in the image frame, when there is an associated pixel point of the pixel point in a neighboring historical image frame of the image frame, performing motion analysis between the pixel point and the associated pixel point to obtain pixel point motion information; based on the pixel point motion information, determining pixel point type information of the pixel point.

5. The method of claim 1, wherein, The determination of the target detection result of the neighboring historical image frame based on the first detection result, the second detection result and the pixel point types of each of the pixel points comprises: based on the pixel point types of each of the pixel points, determining a detection weight of each of the first detection result and the second detection result; according to the detection weights of each of the pixel points, performing weighted summation on the first detection result and the second detection result to obtain the target detection result of the neighboring historical image frame.

6. The method of claim 1, wherein, The method further comprises: acquiring an arrangement serial number of the image frame in the plurality of image frames; if the arrangement serial number is within a preset serial number range, determining that the image frame meets the target detection condition.

7. An image processing apparatus characterized by comprising: The device comprises: an image acquisition module configured to acquire a plurality of image frames to be processed; a pixel point type identification module configured to, for each of the image frames, perform type identification on each pixel point in the image frame to obtain a pixel point type of each of the pixel points; The first detection result acquisition module is configured to perform target detection on the image frame to obtain a first detection result of the image frame if the image frame meets a target detection condition. The second detection result acquisition module is configured to determine a neighboring historical image frame of the image frame, and acquire a second detection result of a previous image frame of the neighboring historical image frame if the neighboring historical image frame has not been subjected to target detection. The target detection result generation module is configured to determine a target detection result of the neighboring historical image frame based on the first detection result, the second detection result, and each pixel point type. The image output module is configured to perform image processing on the neighboring historical image frame according to the target detection result, to obtain and output a processed neighboring historical image frame.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.