Image processing method and apparatus therefor

By detecting jagged areas in the image after TV deinterlacing and performing low-pass filtering, the problem of poor display caused by jagged lines was solved, and the image clarity and effect were improved.

CN116320204BActive Publication Date: 2026-04-10UNISOC CHONGQING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNISOC CHONGQING TECH CO LTD
Filing Date
2022-12-28
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

After TV deinterlacing, jagged lines appear in the image, resulting in poor display quality. Existing filtering processes cause the overall image to become blurry, resulting in poor processing quality.

Method used

By detecting target regions in the image to be processed that meet the jagged edge condition, and performing low-pass filtering on these regions, the processed region of the image to be processed is determined, and thus the processed image is determined.

Benefits of technology

It improves the clarity of image processing, ensures the clarity of non-aliased areas, and improves the display effect of jagged areas, thereby enhancing the overall processing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116320204B_ABST
    Figure CN116320204B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method and device, which are applied to the field of image processing. The method comprises: determining a target region satisfying a jaggy condition in a to-be-processed image; determining a to-be-processed region corresponding to the target region in the to-be-processed image; performing low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region; and obtaining a processed image corresponding to the to-be-processed image according to the processed region. After detecting the image region satisfying the jaggy condition in the to-be-processed image, the image region satisfying the jaggy condition is processed, so that the processed picture is clearer and the processing effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to an image processing method and device thereof. BACKGROUND

[0002] With the development of communication technology, the interlaced television is gradually popularized. In order to watch the television program normally on the interlaced television, the television can process the interlaced and non-interlaced two videos, the interlaced video refers to the video composed of interlaced field signals, for example, the interlaced video is composed of two scanning field signals, two scanning field signals constitute each image frame of the video, and each scanning field signal includes half of the number of horizontal lines in an image frame, for example, one scanning field signal includes all odd lines and the other scanning field signal includes all even lines. The non-interlaced video refers to the video composed of progressive signals. The process of converting the received interlaced video into non-interlaced video by the television is called de-interlacing. At present, in the de-interlacing process of the television, for the moving object, the video including the jaggies is obtained after de-interlacing processing, and the display effect is not good. Generally, the television processes the video including the jaggies by filtering, and this processing method makes the processed picture more blurred and the processing effect is not good.

[0003] Therefore, how to process the image after de-interlacing to improve the processing effect is a technical problem to be solved at present. SUMMARY

[0004] The present application discloses an image processing method and device thereof, by detecting the image area satisfying the jaggies condition in the image to be processed, and processing the image area satisfying the jaggies condition, so that the processed picture is clearer and the processing effect is improved.

[0005] In a first aspect, the present application provides an image processing method, the method comprising: determining a target area satisfying a jaggies condition in an image to be processed; determining a to-be-processed area corresponding to the target area in the image to be processed; performing low-pass filtering processing on the to-be-processed area to obtain a processed area corresponding to the to-be-processed area; and determining a processed image corresponding to the image to be processed according to the processed area.

[0006] In the embodiment of the present application, the target region satisfying the sawtooth condition is determined in the to-be-processed image, and then the corresponding to-be-processed region of the target region is determined. After the to-be-processed region is determined, low-pass filtering processing is performed on the to-be-processed region to obtain the processed region corresponding to the to-be-processed region. Finally, the processed image corresponding to the to-be-processed image is determined according to the processed region. In this way, the image region satisfying the sawtooth condition can be detected in the to-be-processed image first, and only the image region satisfying the sawtooth condition is processed, so that the image in other regions is relatively clear, and the image region satisfying the sawtooth condition is processed, thereby improving the overall processing effect of the to-be-processed image.

[0007] In an optional implementation, the to-be-processed image includes a first pixel point, a second pixel point, a third pixel point, and a fourth pixel point. The first pixel point is a pixel point corresponding to a first pixel value. The second pixel point is a pixel point corresponding to a second pixel value. The third pixel point is a pixel point corresponding to a third pixel value. The fourth pixel point is a pixel point corresponding to a fourth pixel value. The target region satisfying the sawtooth condition is determined in the to-be-processed image, including: in a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than a target threshold, determining that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region. In the embodiment of the present application, whether there is an image region with horizontal sawtooth lines can be determined by the pixel values of four different pixel points in the to-be-processed image. The four pixel points can be used as a detection window, so that multiple target regions in the to-be-processed image can be determined and further processed, thereby avoiding the originally clear image region without horizontal sawtooth lines from being blurred by low-pass filtering processing, and improving the processing effect.

[0008] In an optional implementation, the target region satisfying the sawtooth condition is determined in the to-be-processed image, including: receiving an external input signal indicating a first mode, and determining that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region in a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than the target threshold. In the embodiment of the present application, in addition to judging according to the pixel values of the pixel points in the window, the received external input signal can also be used to jointly determine whether there is an image region with horizontal sawtooth lines, thereby improving the accuracy of the judgment, and the processing effect can be improved for different to-be-processed images, so that the display effect of the processed image is better.

[0009] In an optional implementation, the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are four adjacent pixel points in the same column in the image to be processed. In the embodiments of the present application, the pixel points in the image region in which the image to be processed includes the horizontal sawtooth line can be the pixel points in the same column in the image, that is, the detection window can be determined column by column, so as to improve the accuracy of the determination and improve the effect of the image processing.

[0010] In an optional implementation, the image to be processed further includes a fifth pixel point, a sixth pixel point, a seventh pixel point, and an eighth pixel point, the fifth pixel point is a pixel point corresponding to a fifth pixel value, the sixth pixel point is a pixel point corresponding to a sixth pixel value, the seventh pixel point is a pixel point corresponding to a seventh pixel value, and the eighth pixel point is a pixel point corresponding to an eighth pixel value; the method further includes: in a case where the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold, and the difference between the fifth pixel value and the sixth pixel value, the difference between the sixth pixel value and the seventh pixel value, and the difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold, determining that a region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point is the target region; the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point are four adjacent pixel points in the same column in the image to be processed, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point. In the embodiments of the present application, in addition to the four pixel points corresponding to the pixel values, the pixel values corresponding to other pixel points, that is, the pixel values corresponding to four pixel points adjacent to the four pixel points or eight pixel points can be used to jointly determine, that is, the window for the determination can be increased, and then different images to be processed can be determined and processed, so as to improve the processing effect and improve the display effect.

[0011] In an optional implementation, the determining, in the to-be-processed image, the to-be-processed region corresponding to the target region includes: obtaining a first preset parameter and a second preset parameter; determining the parameter corresponding to the first mode according to the correspondence between the input mode and the parameter; determining the first to-be-processed region according to the first preset parameter and the parameter corresponding to the first mode; obtaining the action range information corresponding to the second preset parameter, and determining the second to-be-processed region according to the action range information; and determining the first to-be-processed region and the second to-be-processed region as the to-be-processed region corresponding to the target region, where the to-be-processed region includes the target region. In the embodiments of the present application, the to-be-processed region can be a window region determined as a horizontal sawtooth line, and can also include other regions. Specifically, the to-be-processed region can be determined according to the preset parameters in the plurality of registers in the electronic device, and then only the to-be-processed region determined is subjected to low-pass filtering processing, so that the overall clarity of the processed image can be improved, thereby improving the processing effect.

[0012] In an optional implementation, the low-pass filtering processing on the to-be-processed region to obtain the processed region corresponding to the to-be-processed region includes: processing the pixel point corresponding to the second pixel value according to the first pixel value, the second pixel value, the third pixel value, and a pixel parameter, where the pixel parameter is determined according to the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value. In the embodiments of the present application, in the process of low-pass filtering processing on the to-be-processed region, the electronic device can process the pixel value corresponding to the pixel point according to the pixel values corresponding to the adjacent pixel points, so as to update the pixel value of the pixel point, complete the low-pass filtering processing, and then obtain the processed image, thereby improving the display effect of the to-be-processed image.

[0013] In a second aspect, the embodiments of the present application provide an image processing apparatus, which includes: a determination unit configured to determine a target region satisfying a sawtooth condition in a to-be-processed image; the determination unit is further configured to determine a to-be-processed region corresponding to the target region in the to-be-processed image; a processing unit configured to perform low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region; and the determination unit is further configured to determine a processed image corresponding to the to-be-processed image according to the processed region.

[0014] In a possible implementation, the to-be-processed image includes a first pixel point, a second pixel point, a third pixel point, and a fourth pixel point, the first pixel point is a pixel point corresponding to a first pixel value, the second pixel point is a pixel point corresponding to a second pixel value, the third pixel point is a pixel point corresponding to a third pixel value, and the fourth pixel point is a pixel point corresponding to a fourth pixel value; and the determining unit is configured to determine a target region satisfying a sawtooth condition in the to-be-processed image, and specifically configured to: when a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than a target threshold, determine that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0015] In a possible implementation, the determining unit is configured to determine a target region satisfying a sawtooth condition in the to-be-processed image, and specifically configured to: receive an external input signal indicating a first mode, and when a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than the target threshold, determine that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0016] In a possible implementation, the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are four adjacent pixel points in a same column in the to-be-processed image.

[0017] In a possible implementation, the to-be-processed image further includes a fifth pixel point, a sixth pixel point, a seventh pixel point, and an eighth pixel point, the fifth pixel point is a pixel point corresponding to a fifth pixel value, the sixth pixel point is a pixel point corresponding to a sixth pixel value, the seventh pixel point is a pixel point corresponding to a seventh pixel value, and the eighth pixel point is a pixel point corresponding to an eighth pixel value; the determining unit is further configured to: in a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than the target threshold, and a difference between the fifth pixel value and the sixth pixel value, a difference between the sixth pixel value and the seventh pixel value, and a difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold, determine that a region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point is the target region; the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point are four adjacent pixel points in a same column in the to-be-processed image, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point.

[0018] In a possible implementation, the determining unit is configured to determine a to-be-processed region corresponding to the target region in the to-be-processed image, and specifically configured to: obtain a first preset parameter and a second preset parameter; determine a parameter corresponding to the first mode according to a correspondence between an input mode and a parameter; determine a first to-be-processed region according to the first preset parameter and the parameter corresponding to the first mode; obtain action range information corresponding to the second preset parameter, and determine a second to-be-processed region according to the action range information; and determine the first to-be-processed region and the second to-be-processed region as the to-be-processed region corresponding to the target region, where the to-be-processed region includes the target region.

[0019] In a possible implementation, the processing unit is configured to perform low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region, and specifically configured to: process a pixel point corresponding to the second pixel value according to the first pixel value, the second pixel value, the third pixel value, and a pixel parameter; the pixel parameter is determined according to the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value.

[0020] In a third aspect, an image processing apparatus is provided, including a processor; the processor is configured to execute the method in the first aspect.

[0021] In a fourth aspect, an embodiment of the present application provides a chip, comprising a memory and a processor, wherein the memory stores a computer program, the computer program comprises program instructions, and the processor is configured to execute the program instructions to implement the method in the first aspect.

[0022] In a fifth aspect, an embodiment of the present application provides a chip module, comprising a communication interface and a chip, wherein the communication interface is configured to perform internal communication of the chip module or to perform communication between the chip module and an external device, and the chip is configured to execute the method in the first aspect.

[0023] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program comprises program instructions, and the program instructions, when executed, cause the method in the first aspect to be implemented.

[0024] In a seventh aspect, an embodiment of the present application provides a computer program product comprising a computer program or instructions, which, when executed on a computer, cause the computer to execute the method in the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 FIG. 1 is a schematic diagram of an architecture of an image processing system according to an embodiment of the present application.

[0026] Figure 2 FIG. 2 is a schematic diagram of a processing effect of an image processing method according to an embodiment of the present application.

[0027] Figure 3 FIG. 3 is a schematic diagram of a flow of an image processing method according to an embodiment of the present application.

[0028] Figure 4 FIG. 4 is a schematic diagram of an image for determining a target region and a to-be-processed region in a to-be-processed image according to an embodiment of the present application.

[0029] Figure 5 FIG. 5 is another schematic diagram of an image for determining a target region and a to-be-processed region in a to-be-processed image according to an embodiment of the present application.

[0030] Figure 6 FIG. 6 is still another schematic diagram of an image for determining a target region and a to-be-processed region in a to-be-processed image according to an embodiment of the present application.

[0031] Figure 7 FIG. 7 is yet another schematic diagram of an image for determining a target region and a to-be-processed region in a to-be-processed image according to an embodiment of the present application.

[0032] Figure 8 FIG. 8 is a schematic diagram of an image for low-pass filtering according to an embodiment of the present application.

[0033] Figure 9 This is another schematic image of a low-pass filter provided in an embodiment of this application.

[0034] Figure 10 This is a schematic diagram illustrating the processing effect of an image processing method provided in an embodiment of this application.

[0035] Figure 11 This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application.

[0036] Figure 12 This is a schematic diagram of another image processing device provided in an embodiment of this application;

[0037] Figure 13 This is a schematic diagram of the structure of a chip module provided in an embodiment of this application. Detailed Implementation

[0038] It should be understood that the terms "first," "second," etc., used in the embodiments of this application are used to distinguish different objects, not to describe a specific order. "At least one" in the embodiments of this application refers to one or more, and "multiple" refers to two or more. "And / or" in the embodiments of this application describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. A and B can be singular or plural. The character " / " can indicate that the preceding and following related objects have an "or" relationship.

[0039] In the embodiments of this application, "at least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent the following seven cases: a, b, c, a and b, a and c, b and c, a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements. Furthermore, in the embodiments of this application, "not less than" means "greater than" or "equal to".

[0040] First, before providing a more detailed description of the embodiments of this application, the nouns and terms used in the embodiments of this application are explained to facilitate understanding by those skilled in the art. The nouns and terms used in the embodiments of this application are subject to the following interpretations:

[0041] 1. Pixel

[0042] Pixels, also known as pixel points, are the small squares into which an image is divided. Each small square is called a pixel point. A computer represents the entire image by indicating the position, color, brightness, and other information of these pixel points. Pixels refer to the small squares that make up an image. Each small square has a specific position and assigned color value. The color and position of the small squares determine the appearance of the image. Pixels can be considered as indivisible units or elements in an image. Indivisible means that a pixel cannot be further divided into smaller units or elements. It exists as a small square of a single color. Each raster image contains a certain number of pixels, which determine the size of the image on the screen.

[0043] In the present application, the image to be processed includes a plurality of pixel points. At least one pixel point constitutes an image region that satisfies the jaggy condition. The image region can exhibit jaggy lines. Similarly, at least one pixel point constitutes a region to be processed.

[0044] 2. Pixel value

[0045] A pixel value is a value assigned by a computer when an original image is digitized. It represents the average brightness information of a small square of the original image, or the average reflection (transmission) density information of the small square. When a digital image is converted into a halftone image, the dot area rate (dot percentage) is directly related to the pixel value (gray value) of the digital image. That is, the dot size represents the average brightness information of a small square of the original image.

[0046] In the present application, the image to be processed includes a plurality of pixel points. Each pixel point corresponds to a pixel value. Whether the image to be processed includes a target region can be determined based on the pixel values of the plurality of pixel points in the image to be processed. The target region can be an image region composed of a plurality of pixel points that satisfy the jaggy condition.

[0047] 3. De-interlacing

[0048] De-interlacing, also known as de-interlace or inverse interlacing, is a method of converting interlaced (interlace) video signals into progressive (progressive scan) video signals. Interlaced and progressive are two different video formats, such as 1080P or 1080I. When an electronic device receives an I video, it needs to perform de-interlacing to convert it into a progressive scan signal for playback.

[0049] In the present application, the image to be processed can be obtained by deinterlacing. Since the image to be processed can include moving objects, the image to be processed obtained by deinterlacing can include sawtooth stripes, and the display effect is poor. If the entire image is filtered, the entire image can become blurred, and the processing effect is poor.

[0050] 4. Current Frame

[0051] The current frame refers to the image to be deinterlaced. Since the video includes a plurality of continuous image frames, the plurality of image frames can be processed in sequence to obtain a deinterlaced video.

[0052] In the present application, the plurality of continuous image frames in the video are processed in sequence to obtain a deinterlaced video. Each image frame in the deinterlaced video can be an image to be processed. The deinterlaced video can be detected to determine whether a target region satisfying a sawtooth condition exists, and then processed.

[0053] 5. Previous Frame

[0054] Since the video to be processed includes a plurality of continuous image frames, the plurality of image frames can be processed in sequence. The previous frame of the current frame can be a previous frame.

[0055] In the present application, each image frame in the deinterlaced video is an image to be processed. Each image frame can be detected to determine whether a target region satisfying a sawtooth condition exists. Before the current frame is processed as an image to be processed, the previous frame can be processed as an image to be processed.

[0056] 6. Mesh filter

[0057] Filtering is a basic operation in signal and image processing. The purpose is to selectively extract certain aspects of the image, for example, filtering can remove noise in the image, extract useful visual features, etc. That is, under the condition of retaining as much image detail as possible, the noise of the target image is suppressed, which is an indispensable operation in image preprocessing. The processing effect will directly affect the effectiveness and reliability of subsequent image processing and analysis.

[0058] In the present application, the target region in the to-be-processed image that satisfies the sawtooth condition can be processed by a filter, for example, low-pass filtering, to obtain a processed region corresponding to the to-be-processed region, and then a processed image can be obtained to eliminate the horizontal sawtooth lines generated after deinterlacing, so that the picture after deinterlacing is good-looking and the image after deinterlacing is clear.

[0059] The image processing system related to the embodiments of the present application is introduced as follows. Please refer to Figure 1 , Figure 1 is a system architecture diagram of an image processing system provided by the embodiments of the present application. The image processing system can include a first electronic device 100 and a second electronic device 200.

[0060] It should be noted that the image processing system can include but is not limited to two electronic devices, Figure 1 The number and form of the devices shown are used for example and do not constitute a limitation on the embodiments of the present application. In actual applications, more than two electronic devices can be included. Figure 1 The image processing system shown is described by taking two electronic devices (the first electronic device 100 and the second electronic device 200) as an example. The first electronic device 100 and the second electronic device 200 can communicate directly or indirectly. The first electronic device 100 can be an electronic device that deinterlaces a to-be-processed image, and then the to-be-processed image can be sent to the second electronic device 200 for detection and further filtering processing. For example, it is detected whether the to-be-processed image includes a target region that satisfies the sawtooth condition. If it does, low-pass filtering can be performed on the to-be-processed region corresponding to the target region.

[0061] The electronic device (e.g., the first electronic device 100 and the second electronic device 200) can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, or the like, but is not limited thereto. The electronic device (e.g., the first electronic device 100 and the second electronic device 200) can also be a server, for example, can be a standalone physical server, can be a server cluster or a distributed system composed of multiple physical servers, can be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms. It should be noted that the electronic device (e.g., the first electronic device 100 and the second electronic device 200) can provide de-interlacing processing and image processing functions, and optionally, the electronic device (e.g., the first electronic device 100 and the second electronic device 200) is an electronic device with a video playback function. The first electronic device 100 and the second electronic device 200 can be the same electronic device or different electronic devices, and the present application does not limit the same.

[0062] In the de-interlacing process, the electronic device obtains a video including a jagged image area for a moving object after de-interlacing, and the display effect is not good. Generally, the electronic device can perform global filtering processing on each image in the de-interlaced video, and the obtained processed image is relatively blurred, the processing effect is not good, and the viewing of the video is affected. For details, please refer to Figure 2 , Figure 2 is a processing effect diagram of an image processing method. As shown in Figure 2 , Figure 2 the left image is a clear image, and the image has not been subjected to global low-pass filtering processing, Figure 2 the right image is an image subjected to global low-pass filtering processing, and the font of the letter at the edge of the letter "S" becomes blurred, as shown in Figure 2 the image area in the white box in the left and right images, thereby affecting the viewing of the image.

[0063] In the embodiments of the present application, the electronic device (such as the first electronic device 100 or the second electronic device 200) can determine a target region satisfying the sawtooth condition in the to-be-processed image, and determine a to-be-processed region corresponding to the target region. Then, the electronic device (such as the first electronic device 100 or the second electronic device 200) can perform low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region, and determine a processed image corresponding to the to-be-processed image according to the processed region. As can be seen, the electronic device (such as the first electronic device 100 or the second electronic device 200) can first detect an image region satisfying the sawtooth condition in the to-be-processed image, and then only process the image region satisfying the sawtooth condition, so as to ensure that the image in other regions is relatively clear, and the image region satisfying the sawtooth condition is processed, thereby improving the overall processing effect of the to-be-processed image.

[0064] Based on the above image processing system, the embodiments of the present application provide an image processing method, and the transmission method of the channel of the embodiments of the present application can be Figure 1 The first electronic device 100 in the image processing system shown in the above image processing system is implemented, or can be implemented by a chip in the first electronic device 100, and can also be implemented by a chip in the second electronic device 200. Figure 1 The second electronic device 200 in the image processing system shown in the above image processing system is implemented, or can be implemented by a chip in the second electronic device 200. Figure 1 The image processing method involved in the image processing system shown in the above image processing system can be referred to Figure 3 , Figure 3 is a flow diagram of an image processing method provided by the embodiments of the present application. The image processing method can include the following steps S301-S304, and in the embodiments of the present application, S can represent Step (Step):

[0065] S301, in a to-be-processed image, a target region satisfying a sawtooth condition is determined.

[0066] In the embodiments of the present application, the to-be-processed image is an image frame of a video obtained after deinterlacing of an interlaced video, and the to-be-processed image includes a target region satisfying a sawtooth condition. The sawtooth condition can be that there is an image region displaying a "horizontal sawtooth line" in the to-be-processed image. The target region is an image region satisfying the sawtooth condition, that is, an image region displaying a "horizontal sawtooth line" in the to-be-processed image. The electronic device can process the to-be-processed image satisfying the sawtooth condition in the to-be-processed image, reduce the influence of the image displaying a "horizontal sawtooth line", and also ensure the clarity of the image.

[0067] The electronic device includes four registers, each storing four preset parameters: algorithm parameter En, scope parameters N and Ver, and threshold parameter th2. Among these four parameters, algorithm parameter En refers to the algorithm type used to detect target regions in the image to be processed that meet the jagged edge condition. It should be noted that different algorithms have different focuses, and the electronic device can determine the algorithm parameters based on the image to be processed, thereby determining the algorithm used to detect the target region. Scope parameter N (the first preset parameter) determines the horizontal processing range of the scope, equivalent to the left-right extension range. Scope parameter Ver (the second preset parameter) determines the vertical processing range of the scope, equivalent to the up-down extension range, for example, it can be the pixels above and below a pixel in the target region. Threshold parameter th2 is used to judge the target region in the image to be processed based on the pixel value corresponding to each pixel and the threshold parameter th2, equivalent to the threshold value used to judge the horizontal jagged lines. It should be noted that the four preset parameters stored in the registers are parameters automatically obtained by the electronic device from the deinterlaced image to be processed, and are known parameters.

[0068] The electronic device can also receive external input signals (motion), which indicate the mode of the electronic device, such as high motion, medium motion, or low motion. High motion, medium motion, and low motion each indicate a mode of the image to be processed. Different modes correspond to different parameters i, and thus the determined processing area may also be different. It should be noted that the external input signal (motion) is a signal received by the electronic device from an external source, and it only indicates a mode. This mode is equivalent to indicating the focus of image processing, or it is a mode detected by the electronic device based on the image to be processed, which can then be used to determine whether a target region satisfying the aliasing condition is included or to determine the region to be processed.

[0069] In a possible implementation, the electronic device determines a target region that satisfies the sawtooth condition in a to-be-processed image in the case of an algorithm parameter En=1. Specifically, the to-be-processed image includes a first pixel point, a second pixel point, a third pixel point, and a fourth pixel point, the first pixel point is a pixel point corresponding to a first pixel value, the second pixel point is a pixel point corresponding to a second pixel value, the third pixel point is a pixel point corresponding to a third pixel value, and the fourth pixel point is a pixel point corresponding to a fourth pixel value. In the case where the electronic device determines that the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than a target threshold, it is determined that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is a target region. Specifically, the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are adjacent pixel points in the same column, and the four pixel points can be a window for detecting whether the to-be-processed image satisfies the sawtooth condition.

[0070] In the case where the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold, it can be determined that the region formed by the four pixel points is a target region, that is, the sawtooth condition is satisfied. For details, please refer to Figure 4 , Figure 4 is an image diagram provided by the embodiment of the present application for determining a target region and a to-be-processed region in a to-be-processed image, as shown in Figure 4 , the region for detecting whether the sawtooth condition is satisfied can be a region including a pixel point A, a pixel point B, a pixel point C, and a pixel point D, and further including a pixel point Y, a pixel point Z, and a pixel point E in the column of pixel points. Taking the pixel point A, the pixel point B, the pixel point C, and the pixel point D as the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point, the pixel values of the pixel point A, the pixel point B, the pixel point C, and the pixel point D are represented by A, B, C, and D, that is, the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value. As shown in Figure 4 , in the case of En=1, (A-B>th2)&(C-B>th2)&(C-D>th2)||(B-A>th2)&(B-C>th2)&(D-C>th2)=1, it is determined that the pixel point A, the pixel point B, the pixel point C, and the pixel point D are a target region that satisfies the sawtooth condition, and the image region has a horizontal sawtooth line, as shown in Figure 4 , the dark gray square region.

[0071] In another possible implementation, in addition to the first pixel value, the second pixel value, the third pixel value and the fourth pixel value corresponding to the first pixel point, the second pixel point, the third pixel point and the fourth pixel point, the determination of the target region satisfying the sawtooth condition in the image to be processed can also be determined together with an external input signal (motion). Specifically, the electronic device can receive an external input signal indicating a first mode, and when the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than a target threshold, the region formed by the first pixel point, the second pixel point, the third pixel point and the fourth pixel point is determined as the target region. The first mode can be high motion or medium motion of the external input signal (motion), which can be determined according to the value of En. For example, when En=2, in addition to the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value being greater than the target threshold, the external input signal is also used to indicate the first mode, i.e., high motion or medium motion.

[0072] As shown in Figure 4 , still taking the pixel point A, the pixel point B, the pixel point C and the pixel point D as the first pixel point, the second pixel point, the third pixel point and the fourth pixel point, and A, B, C, D representing the pixel values of the pixel point A, the pixel point B, the pixel point C and the pixel point D, i.e., the first pixel value, the second pixel value, the third pixel value and the fourth pixel value. When En=2, whether the target region satisfying the sawtooth condition is the region including the pixel point A, the pixel point B, the pixel point C and the pixel point D can be determined in addition to satisfying the condition (A-B>th2)&(C-B>th2)&(C-D>th2)||(B-A>th2)&(B-C>th2)&(D-C>th2)=1, the external input signal (motion) also needs to satisfy high motion or medium motion, for example, high motion. At this time, the region formed by the pixel point A, the pixel point B, the pixel point C and the pixel point D is determined as the target region.

[0073] In yet another possible implementation, when judging the target region that meets the sawtooth condition, it can be judged that the external input signal (motion) is in a determined mode when it is judged that the differences between the first pixel value and the second pixel value, the second pixel value and the third pixel value, and the third pixel value and the fourth pixel value are all greater than a target threshold. For example, if the external input signal (motion) is high motion, it is determined that the region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region. Figure 4 As shown in FIG. 8, still taking the pixel point A, the pixel point B, the pixel point C, and the pixel point D as the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point, the pixel values of the pixel point A, the pixel point B, the pixel point C, and the pixel point D are represented by A, B, C, and D, i.e., the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value. Figure 4 As shown in FIG. 8, when En=3, the target region that needs to be detected whether it meets the sawtooth condition can be that, in addition to meeting the condition (A-B>th2)&(C-B>th2)&(C-D>th2)||(B-A>th2)&(B-C>th2)&(D-C>th2)=1, it also needs to meet that the external input signal (motion) is high motion. At this time, it is determined that the region formed by the pixel point A, the pixel point B, the pixel point C, and the pixel point D is the target region.

[0074] It should be noted that the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point can be four adjacent pixel points in the same column in the image to be processed. As shown in FIG. 9, the pixel point A, the pixel point B, the pixel point C, and the pixel point D in the same column are four adjacent pixel points. Figure 4

[0075] ​In a further possible implementation manner, when the target region satisfying the jaggy condition in the image to be processed is determined, in addition to being determined according to the pixel values of the first pixel point, the second pixel point, the third pixel point and the fourth pixel point, the pixel values of the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point can also be used for the determination. Specifically, the image to be processed further includes the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point, the fifth pixel point is a pixel point corresponding to a fifth pixel value, the sixth pixel point is a pixel point corresponding to a sixth pixel value, the seventh pixel point is a pixel point corresponding to a seventh pixel value, and the eighth pixel point is a pixel point corresponding to an eighth pixel value; in a case where the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold, and the difference between the fifth pixel value and the sixth pixel value, the difference between the sixth pixel value and the seventh pixel value, and the difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold, it is determined that the region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point is the target region.

[0076] In the case of En=4, the electronic device can take the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point as the window for judging the target region of the jaggy condition, and then determine whether the first pixel point, the second pixel point, the third pixel point and the fourth pixel point satisfy the jaggy condition according to the first pixel point, the second pixel point, the third pixel point and the fourth pixel point respectively, and whether the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point satisfy the jaggy condition according to the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point respectively, and then determine whether the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point are the target region satisfying the jaggy condition according to the determination results of the two. It should be noted that the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point are four adjacent pixel points in the same column in the image to be processed, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point. The column in which the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point are located can be adjacent to the column in which the first pixel point, the second pixel point, the third pixel point and the fourth pixel point are located, for example, the column can be left adjacent, or the column can be right adjacent, or the column can be both left and right adjacent.

[0077] Please refer to Figure 5 , Figure 5 is another image schematic diagram provided by the embodiment of the present application for determining the target region and the region to be processed in the image to be processed, as shown in Figure 5As shown in the figure, the region for detecting whether the sawtooth condition is met can be the region including the pixel point A, the pixel point B, the pixel point C, and the pixel point D, and the region of the pixel point An, the pixel point Bn, the pixel point Cn, and the pixel point Dn, and / or the region of the pixel point Ap, the pixel point Bp, the pixel point Cp, and the pixel point Dp. Taking the pixel point A, the pixel point B, the pixel point C, and the pixel point D as the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point, the pixel point An, the pixel point Bn, the pixel point Cn, and the pixel point Dn, and / or the pixel point Ap, the pixel point Bp, the pixel point Cp, and the pixel point Dp as the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point as an example, A, B, C, D represent the pixel values of the pixel point A, the pixel point B, the pixel point C, and the pixel point D, An, Bn, Cn, Dn represent the pixel values of the pixel point An, the pixel point Bn, the pixel point Cn, and the pixel point Dn, and Ap, Bp, Cp, Dp represent the pixel values of the pixel point Ap, the pixel point Bp, the pixel point Cp, and the pixel point Dp. Then as Figure 5 shown, when En=4, (A-B>th2)&(C-B>th2)&(C-D>th2)||(B-A>th2)&(B-C>th2)&(D-C>th2)=1, and (Ap-Bp>th2)&(Cp-Bp>th2)&(Cp-Dp>th2)||(Bp-Ap>th2)&(Bp-Cp>th2)&(Dp-Cp>th2)=1, and (An-Bn>th2)&(Cn-Bn>th2)&(Cn-Dn>th2)||(Bn-An>th2)&(Bn-Cn>th2)&(Dn-Cn>th2)=1, it is determined that the pixel point A, the pixel point B, the pixel point C, and the pixel point D, the pixel point An, the pixel point Bn, the pixel point Cn, and the pixel point Dn, and the pixel point Ap, the pixel point Bp, the pixel point Cp, and the pixel point Dp are the target region meeting the sawtooth condition.

[0078] Optionally, please refer to Figure 6 , Figure 6 is another image schematic diagram provided by the embodiment of the present application for determining the target region and the to-be-processed region in the to-be-processed image, as shown in the figure Figure 6 , the region for detecting whether the sawtooth condition is met can be the region including the pixel point A, the pixel point B, the pixel point C, and the pixel point D, and the region of the pixel point Y, the pixel point Z, the pixel point E in this column of pixel points. Taking the pixel point A, the pixel point B, the pixel point C, and the pixel point D as the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point as an example, A, B, C, D represent the pixel values of the pixel point A, the pixel point B, the pixel point C, and the pixel point D, i.e., the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value. Then asFigure 5 As shown, in the case that the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold value, and an external input signal indicating the first mode is received, such as high motion or medium motion, it is determined that the region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region. That is, in the case that (A-B>th2)&(C-B>th2)&(C-D>th2)||(B-A>th2)&(B-C>th2)&(D-C>th2)=1, and the external input signal (motion) is high motion or medium motion, it is determined that the pixel point A, the pixel point B, the pixel point C, and the pixel point D are the target region satisfying the sawtooth condition, such as Figure 5 the medium gray square region.

[0079] Similarly, please refer to Figure 7 , Figure 7 is another image schematic diagram provided by the embodiment of the present application for determining the target region and the to-be-processed region in the to-be-processed image. Taking the pixel point A, the pixel point B, the pixel point C, and the pixel point D as the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point, and taking A, B, C, D to represent the pixel values of the pixel point A, the pixel point B, the pixel point C, and the pixel point D, that is, the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value. When En=6, if (A-B>th2)&(C-B>th2)&(C-D>th2)||(B-A>th2)&(B-C>th2)&(D-C>th2)=1, it is determined that the region formed by the pixel point A, the pixel point B, the pixel point C, and the pixel point D is the target region.

[0080] It should be noted that, although En=5 and En=6 in the to-be-processed image determine the target region satisfying the sawtooth condition, which is the same as the determination of the target region satisfying the sawtooth condition in the to-be-processed image when En=2, the other preset parameters are not exactly the same when En=5 and En=6, and thus the to-be-processed region determined according to the target region is also different. In the processing process, the image region that may be subjected to low-pass filtering when En=5 and En=6 is not the same as the image region that may be subjected to low-pass filtering when En=2, and only the way of determining whether there is a target region of horizontal sawtooth line is the same. Further, the electronic device can determine the to-be-processed region corresponding to the target region according to the preset parameters.

[0081] S302, in the to-be-processed image, the to-be-processed region corresponding to the target region is determined.

[0082] In the embodiments of the present application, the to-be-processed region is a region that needs to be processed by low-pass filtering. It can be understood that if the to-be-processed image is processed by low-pass filtering globally, the definition of the entire image will be reduced. In the present application, the to-be-processed region corresponding to the target region is determined, which can ensure the definition while processing the image region including the horizontal sawtooth line, thereby improving the processing effect and the display effect.

[0083] In a possible implementation, when En=1, the preset parameter values can be N=4, i=1, and Ver=0, as shown in the left side of FIG. 7. Figure 4 As shown in the left side of FIG. 7, in a case where the target region satisfying the sawtooth condition in the to-be-processed image is an image region composed of pixel point A, pixel point B, pixel point C, and pixel point D, N / i pixel points adjacent to the left and right of the pixel point B can be determined as the to-be-processed region (including the pixel point B, that is, 2N / i+1 pixel points in the row where the pixel point B is located are the to-be-processed region), and the pixel points processed by low-pass filtering can be the light gray blocks shown in the left side of FIG. 7. Figure 4 As shown in the left side of FIG. 7, in a case where the target region satisfying the sawtooth condition in the to-be-processed image is an image region composed of pixel point A, pixel point B, pixel point C, and pixel point D, N / i pixel points adjacent to the left and right of the pixel point B can be determined as the to-be-processed region (including the pixel point B, that is, 2N / i+1 pixel points in the row where the pixel point B is located are the to-be-processed region), and the pixel points processed by low-pass filtering can be the light gray blocks shown in the left side of FIG. 7. Figure 4 As shown in the right side of FIG. 7, in a case where the target region satisfying the sawtooth condition in the to-be-processed image is an image region composed of pixel point A, pixel point B, pixel point C, and pixel point D, N / i pixel points adjacent to the left and right of the pixel point B can be determined as the first to-be-processed region, that is, 2N / i+1 pixel points in the row where the pixel point B is located are the first to-be-processed region, and 3 rows of pixel points adjacent to the upper side and 2 rows of pixel points adjacent to the lower side of the pixel point B are determined as the second to-be-processed region, and then the first to-be-processed region and the second to-be-processed region are determined as the to-be-processed region corresponding to the target region.

[0084] In another possible implementation, when En=2, the preset parameter values can be N=4, i=1, and Ver=0, as shown in the left side of FIG. 8. Figure 4 As shown in the left side of FIG. 8, N / i pixel points adjacent to the left and right of the pixel point B can be determined as the to-be-processed region (including the pixel point B, that is, 2N / i+1 pixel points in the row where the pixel point B is located are the to-be-processed region), and the pixel points processed by low-pass filtering can still be the light gray blocks shown in the left side of FIG. 8. Figure 4 As shown in the left side of FIG. 8, N / i pixel points adjacent to the left and right of the pixel point B can be determined as the to-be-processed region (including the pixel point B, that is, 2N / i+1 pixel points in the row where the pixel point B is located are the to-be-processed region), and the pixel points processed by low-pass filtering can still be the light gray blocks shown in the left side of FIG. 8. Figure 4As shown on the right side, the N / i pixel points adjacent to the pixel point B on the left and right sides can be determined as the first to-be-processed region, that is, the 2N / i+1 pixel points in the same row as the pixel point B are determined as the first to-be-processed region, and the three rows of pixel points adjacent to the pixel point B above and the two rows of pixel points adjacent to the pixel point B below are determined as the second to-be-processed region, and then the first to-be-processed region and the second to-be-processed region are determined as the to-be-processed region corresponding to the target region, as shown on the right side of the light gray block. Figure 4 As shown on the right side of the light gray block.

[0085] In another possible implementation, when En=3, the preset parameters can have values of N=4, i=1, and Ver=0. As shown on the left side, the electronic device can determine the 2N / i+1 pixel points in the same row as the pixel point B (including the pixel point B, that is, including the target region) as the to-be-processed region. Figure 4 As shown on the left side, the electronic device can determine the 2N / i+1 pixel points in the same row as the pixel point B (including the pixel point B, that is, including the target region) as the to-be-processed region. Figure 4 As shown on the left side of the light gray block. When En=3, the preset parameters can have values of N=4, i=1, and Ver=1. The 2N / i+1 pixel points in the same row as the pixel point B are determined as the first to-be-processed region, and the three rows of pixel points adjacent to the pixel point B above and the two rows of pixel points adjacent to the pixel point B below are determined as the second to-be-processed region, and then the first to-be-processed region and the second to-be-processed region are determined as the to-be-processed region corresponding to the target region, as shown on the right side of the light gray block. Figure 4 As shown on the right side of the light gray block.

[0086] It should be noted that, as shown in the to-be-processed region determined in Figure 5 Although the ways of judging the target region satisfying the jagged condition in the to-be-processed image are different when En=1, En=2, and En=3, the electronic device determines the same region of the to-be-processed image according to the first preset parameter, such as the above N, the second preset parameter, such as the above Ver, and the corresponding relationship between the input mode and the parameter to determine the parameter corresponding to the first mode, such as the above i. It can be understood that when the preset parameters in the register of the electronic device are the same, the to-be-processed region corresponding to the target region can be the same.

[0087] In another possible implementation, when En=4, the preset parameters can have values of N=4, i=1, and Ver=0. As shown on the left side, the electronic device can determine the 2N / i+1 pixel points in the same row as the pixel point B (including the pixel point B, that is, including the target region) as the to-be-processed region. Figure 5 As shown on the left side, the electronic device can determine the 2N / i+1 pixel points in the same row as the pixel point B (including the pixel point B, that is, including the target region) as the to-be-processed region. Figure 5The light gray block on the left side shows. When En=4, the preset parameter values can be N=4, i=1, and Ver=1. The 2N / i+1 pixel points in the row where the pixel point B, the pixel point Bp, and the pixel point Bn are located are the first to-be-processed region. The 3 rows of pixel points adjacent above the pixel point B, the pixel point Bp, and the pixel point Bn and the 2 rows of pixel points adjacent below the pixel point B, the pixel point Bp, and the pixel point Bn are determined as the second to-be-processed region. Then, the first to-be-processed region and the second to-be-processed region are determined as the to-be-processed region corresponding to the target region, as shown in the light gray block on the right side. Figure 6 The light gray block on the right side shows.

[0088] In yet another possible implementation, when En=5, the preset parameter values can be N=4, i=2, and Ver=0, as shown on the left side. Figure 6 The electronic device can determine the 2N / i+3 pixel points in the row where the pixel point B (including the pixel point B, that is, including the target region) is located as the to-be-processed region, that is, as shown in the light gray block on the left side. Figure 6 The N / i+1 pixel points to the left of the pixel point B and the N / i+1 pixel points to the right of the pixel point B, and the pixel point B itself. When En=5, the preset parameter values can be N=4, i=2, and Ver=1. The 2N / i+3 pixel points in the row where the pixel point B is located are the first to-be-processed region. The 3 rows of pixel points adjacent above the pixel point B and the 2 rows of pixel points adjacent below the pixel point B are determined as the second to-be-processed region. Then, the first to-be-processed region and the second to-be-processed region are determined as the to-be-processed region corresponding to the target region, as shown in the light gray block on the right side. Figure 7 The light gray block on the right side shows.

[0089] In yet another possible implementation, when En=6, the preset parameter values can be N=4, i=4, and Ver=0, as shown on the left side. Figure 7 The electronic device can determine the 2N / i+3 pixel points in the row where the pixel point B (including the pixel point B, that is, including the target region) is located as the to-be-processed region, that is, as shown in the light gray block on the left side. Figure 7 The light gray block on the left side shows. When En=6, the preset parameter values can be N=4, i=4, and Ver=1. The 2N / i+3 pixel points in the row where the pixel point B is located are the first to-be-processed region. The 3 rows of pixel points adjacent above the pixel point B and the 2 rows of pixel points adjacent below the pixel point B are determined as the second to-be-processed region. Then, the first to-be-processed region and the second to-be-processed region are determined as the to-be-processed region corresponding to the target region, as shown in the light gray block on the right side. Figure 8 The light gray block on the right side shows.

[0090] After the electronic device determines the to-be-processed region corresponding to the target region in the to-be-processed image, the electronic device can perform low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region.

[0091] S303, performing low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region.

[0092] In the embodiment of the present application, the low-pass filtering processing is processing for removing high-frequency components in the image, and can be used to smooth the image region, for example, can be used to smooth the image region of the horizontal sawtooth line. The processed region corresponding to the to-be-processed region can refer to the processed region obtained by performing low-pass filtering processing on the to-be-processed region in the to-be-processed image, wherein the pixel values of each pixel point in the to-be-processed region are changed, and the region formed by each pixel point after updating the pixel value is the processed region corresponding to the to-be-processed region.

[0093] In a possible implementation, the electronic device can process the pixel point corresponding to the second pixel value according to the first pixel value, the second pixel value, the third pixel value, and the pixel parameter to obtain a processed region, wherein the second pixel value of the second pixel point in the processed region is changed. In the embodiment of the present application, the pixel parameter can be a calculated parameter, and the pixel parameter is a parameter determined according to the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value. The parameter is a certain parameter of the low-pass filtering processing. It can be understood that the parameter in the low-pass filter provided in the embodiment of the present application is determined according to the pixel values of the adjacent pixel points in the same column.

[0094] Please refer to Figure 8 , Figure 8 for another image diagram of low-pass filtering provided in the embodiment of the present application, as shown in Figure 8 , x, y, z, a, b, c, d, e, and f are pixel points, which can be pixel points in the same column. In the calculation of the pixel parameter, xy can represent the absolute value of the difference between the pixel value of pixel point x and the pixel value of pixel point y, xz can represent the absolute value of the difference between the pixel value of pixel point x and the pixel value of pixel point z, and so on. In Figure 8 , the combination of the pixel points is the absolute value of the difference between the pixel values of two pixel points, such as xz, za, ab, bc, cd, de, ef, xz, ya, zb, ac, bd, ce, and df shown in Figure 9 .

[0095] Further, please refer to Figure 9 , Figure 9 for another image diagram of low-pass filtering provided in the embodiment of the present application, as shown in Figure 9 , the upper part is a flow of determining the pixel parameter of low-pass filtering, as shown in Figure 9The 6 pixel parameters, i.e., alpha1-6, are shown as examples. For example, the value of alpha1 can be comb_mult_pl + 512 = (comb_diff_l - Threshold) * Slope + 512 = (xy + yz + za + xz + ya - Threshold) * Slope + 512.

[0096] The value of alpha2 can be comb_mult_p2 + 512 = (comb_diff_2 - Threshold) * Slope + 512 = (yz + za + ab + ya + zb - Threshold) * Slope + 512.

[0097] The value of alpha3 can be comb_mult_p3 + 512 = (comb_diff_3 - Threshold) * Slope + 512 = (za + ab + bc + zb + ac - Threshold) * Slope + 512.

[0098] The value of alpha4 can be comb_mult_p4 + 512 = (comb_diff_4 - Threshold) * Slope + 512 = (ab + bc + cd + ac + bd - Threshold) * Slope + 512.

[0099] The value of alpha5 can be comb_mult_p4 + 512 = (comb_diff_5 - Threshold) * Slope + 512 = (bc + cd + de + bd + ce - Threshold) * Slope + 512.

[0100] The value of alpha6 can be comb_mult_p4 + 512 = (comb_diff_6 - Threshold) * Slope + 512 = (cd + de + ef + ce + df - Threshold) * Slope + 512.

[0101] Wherein, the above-mentioned Threshold and Slope are register setting values, which are fixed values. For example, the result of the pixel point y passing through the low-pass filter is shown in Equation 1:

[0102]

[0103] The result of the pixel point z passing through the low-pass filter is shown in Equation 2:

[0104]

[0105] The result of the low-pass filter for the pixel point a is shown in equation 3.

[0106]

[0107] The result of the low-pass filter for the pixel point b is shown in equation 4.

[0108]

[0109] The result of the low-pass filter for the pixel point c is shown in equation 5.

[0110]

[0111] The result of the low-pass filter for the pixel point d is shown in equation 6.

[0112]

[0113] The result of the low-pass filter for the pixel point e is shown in equation 7.

[0114]

[0115] Optionally, for the pixel point y and the pixel point e, the pixel parameter alpha can be a fixed value, for example, the pixel parameter corresponding to the pixel point y is alpha1, and the pixel parameter corresponding to the pixel point e is alpha6. For the pixel point z, the formula of the pixel point can be flexibly determined, for example, Figure 10 In the pixel points x, y, z, a, b, c, d, e, and f in a column, the pixel point z-d is taken as an example, the electronic device can determine whether the pixel point z satisfies (Y-Z>th2)&(A-Z>th2)&(A-B>th2)||(Z-Y>th2)&(Z-A>th2)&(B-A>th2)=1, if yes, the pixel parameter corresponding to the pixel point z is alpha2, if no, the pixel parameter corresponding to the pixel point z is alpha1. Similarly, for the pixel point a, the electronic device can determine whether the pixel point a satisfies (Z-A>th2)&(B-A>th2)&(B-C>th2)||(A-Z>th2)&(A-B>th2)&(C-B>th2)=1, if yes, the pixel parameter corresponding to the pixel point a is alpha3, if no, the pixel parameter corresponding to the pixel point a is alpha2. It can be understood that, for example, the pixel point a, the value of the pixel parameter alpha can be determined according to the pixel values of the four pixel points adjacent to the pixel point a, that is, the pixel point z, the pixel point b, and the pixel point c, which meet the trend of “high-low-high-low” or “low-high-low-high”, so as to obtain the result after the low-pass filter processing.

[0116] S304, determining a processed image corresponding to the to-be-processed image according to the processed region.

[0117] In the embodiment of the present application, the processed image is an image obtained after processing the image, which can be an image with updated pixel values for the same pixel points, for example, a processed image corresponding to the to-be-processed image, i.e., an image obtained after updating the pixel values of the pixel points in the partial image region in the to-be-processed image. The pixel points in the partial image region can be the pixel points in the to-be-processed region, which are updated from the original pixel values to the pixel values after low-pass filtering.

[0118] In a possible implementation, the electronic device can process the to-be-processed region to obtain a processed region, which is the pixel value of the pixel points in the to-be-processed region after low-pass filtering. Then, the pixel value of the unprocessed pixel points and the updated pixel value of the pixel points are determined as the processed image corresponding to the to-be-processed image, i.e., in the processed image, the pixel value of the pixel points such as "horizontal sawtooth lines" has been updated, which can reduce the impact of "horizontal sawtooth lines" on image display while ensuring clear image.

[0119] Please refer to Figure 10 , Figure 10 is a processing effect diagram of an image processing method provided by the embodiment of the present application. As shown in Figure 10 the left side is a to-be-processed image, Figure 10 the right side is a processed image, in Figure 10 the left side, there is a target region satisfying the sawtooth condition, and in Figure 10 the right side, the to-be-processed region corresponding to the target region has been processed by low-pass filtering, so that the image region satisfying the sawtooth condition is smoothed, while the clarity of other regions does not change, so that the overall processing clarity remains unchanged, for example Figure 2 the white circle part of the letter "S" on the right side is compared with Figure 10 the letter "S" on the right side, Figure 11 the clarity of the edge region of the letter "S" does not change.

[0120] In the embodiment of the present application, the target region satisfying the jaggy condition is determined in the image to be processed, and then the corresponding to-be-processed region of the target region is determined. After the to-be-processed region is determined, low-pass filtering processing is performed on the to-be-processed region to obtain the processed region corresponding to the to-be-processed region. Finally, the processed image corresponding to the image to be processed is determined according to the processed region. In this way, the image region satisfying the jaggy condition can be detected in the image to be processed first, and only the image region satisfying the jaggy condition is processed, so that the image in other regions is relatively clear, and the image region satisfying the jaggy condition is processed, thereby improving the overall processing effect of the image to be processed.

[0121] Please refer to Figure 11 , Figure 11 is a structural schematic diagram of an image processing apparatus provided by the embodiment of the present application. As shown in Figures 3-10 , the image processing apparatus 1100 includes a determination unit 1101 and a processing unit 1102. The image processing apparatus 1100 can perform the related steps of the terminal device in the foregoing method embodiment. Wherein:

[0122] The determination unit 1101 is configured to determine a target region satisfying a jaggy condition in an image to be processed.

[0123] The determination unit 1101 is further configured to determine a to-be-processed region corresponding to the target region in the image to be processed.

[0124] The processing unit 1102 is configured to perform low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region.

[0125] The determination unit 1101 is further configured to determine a processed image corresponding to the image to be processed according to the processed region.

[0126] In a possible implementation, the image to be processed includes a first pixel point, a second pixel point, a third pixel point, and a fourth pixel point. The first pixel point is a pixel point corresponding to a first pixel value, the second pixel point is a pixel point corresponding to a second pixel value, the third pixel point is a pixel point corresponding to a third pixel value, and the fourth pixel point is a pixel point corresponding to a fourth pixel value. The determination unit 1101 is configured to determine a target region satisfying a jaggy condition in an image to be processed, and specifically configured to:

[0127] In a case where the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than a target threshold, it is determined that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0128] In a possible implementation, the determination unit 1101 is configured to determine a target region satisfying a sawtooth condition in the image to be processed, and specifically configured to:

[0129] In a possible implementation, the determination unit 1101 is configured to determine the target region in the image to be processed, and specifically configured to:

[0130] In a possible implementation, the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are adjacent four pixel points in the same column in the image to be processed.

[0131] In a possible implementation, the image to be processed further includes a fifth pixel point, a sixth pixel point, a seventh pixel point, and an eighth pixel point, the fifth pixel point is a pixel point corresponding to a fifth pixel value, the sixth pixel point is a pixel point corresponding to a sixth pixel value, the seventh pixel point is a pixel point corresponding to a seventh pixel value, and the eighth pixel point is a pixel point corresponding to an eighth pixel value; the determination unit 1101 is further configured to determine a region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point as the target region when the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold, and the difference between the fifth pixel value and the sixth pixel value, the difference between the sixth pixel value and the seventh pixel value, and the difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold.

[0132]

[0133] In a possible implementation, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point are adjacent four pixel points in the same column in the image to be processed, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point.

[0134] In a possible implementation, the determination unit 1101 is configured to determine a target region corresponding to the target region in the image to be processed, and specifically configured to:

[0135] obtain a first preset parameter and a second preset parameter. ​

[0136] The parameters corresponding to the first mode are determined based on the correspondence between the input mode and the parameters.

[0137] Based on the first preset parameters and the parameters corresponding to the first mode, the first region to be processed is determined;

[0138] Obtain the scope information corresponding to the second preset parameter, and determine the second region to be processed based on the scope information.

[0139] The first and second regions to be processed are defined as the regions to be processed corresponding to the target region, and the regions to be processed include the target region.

[0140] In one possible implementation, the processing unit 1102 is used to perform low-pass filtering on the region to be processed to obtain a processed region corresponding to the region to be processed, specifically for:

[0141] The pixel corresponding to the second pixel value is processed based on the first pixel value, the second pixel value, the third pixel value, and the pixel parameters.

[0142] The aforementioned pixel parameters are determined based on the aforementioned first pixel value, second pixel value, third pixel value, and fourth pixel value.

[0143] Specifically, in this case, the operations performed by the determining unit 1101 and the processing unit 1102 can be referred to the above. Figures 3-10 The corresponding embodiments include a description of the electronic devices.

[0144] The image processing device 1100 can also be used to achieve Figure 11 Other functions of the electronic device in the corresponding embodiments will not be described in detail here. Based on the same inventive concept, the principle and beneficial effects of the image processing device 1100 provided in the embodiments of this application in solving the problem are similar to the principle and beneficial effects of the electronic device in the method embodiments of this application in solving the problem. For the sake of brevity, the principle and beneficial effects of the method implementation can be referred to.

[0145] According to the embodiments of this application, Figure 12The various units in the image processing apparatus shown can be combined into one or several other units respectively or all, or some of them can be further split into multiple units with smaller functions to form, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units are divided based on logical functions. In actual applications, the functions of a unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the image processing apparatus 1100 can also include other units, which can also be assisted by other units in actual applications, and can be implemented by multiple units.

[0146] The image processing apparatus described above can be, for example, a chip or a chip module. As for each device and product described in the above embodiments, each module contained therein can be a software module, a hardware module, or part of a software module and part of a hardware module. For example, for each device and product applied to or integrated into a chip, each module contained therein can be implemented in the form of hardware such as a circuit, or at least part of the modules can be implemented in the form of a software program running on a processor integrated in the chip, and the remaining (if any) part of the modules can be implemented in the form of hardware such as a circuit; for each device and product applied to or integrated into a chip module, each module contained therein can be implemented in the form of hardware such as a circuit, and different modules can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least part of the modules can be implemented in the form of a software program running on a processor integrated in the chip module, and the remaining (if any) part of the modules can be implemented in the form of hardware such as a circuit; for each device and product applied to or integrated into a terminal, each module contained therein can be implemented in the form of hardware such as a circuit, and different modules can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the electronic device, or at least part of the modules can be implemented in the form of a software program running on a processor integrated in the terminal, and the remaining (if any) part of the modules can be implemented in the form of hardware such as a circuit.

[0147] In the embodiment of the present application, the target region satisfying the jaggy condition is determined in the image to be processed, and then the corresponding to-be-processed region of the target region is determined. After the to-be-processed region is determined, low-pass filtering processing is performed on the to-be-processed region to obtain the processed region corresponding to the to-be-processed region. Finally, the processed image corresponding to the image to be processed is determined according to the processed region. In this way, the image region satisfying the jaggy condition can be detected in the image to be processed first, and only the image region satisfying the jaggy condition is processed, so that the image in other regions is relatively clear, and the image region satisfying the jaggy condition is processed, thereby improving the overall processing effect of the image to be processed.

[0148] Please refer to Figure 12 , Figure 12 is another image processing apparatus provided by the embodiment of the present application. The image processing apparatus can be used to realize the functions of the image processing apparatus in the above-mentioned method embodiment. The image processing apparatus 1200 can include a processor 1201 and a transceiver 1202. Optionally, the image processing apparatus 1200 can further include a memory 1203. The processor 1201, the transceiver 1202 and the memory 1203 can be connected through a bus 1204 or other means. The bus is represented by a thick line in the figure, and the connection mode between other components is only schematically illustrated and is not limited. The bus can be divided into an address bus, a data bus and a control bus. For convenience, only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus. Figure 12 Figures 3-10 The coupling in the embodiment of the present application is indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information interaction between devices, units or modules. The specific connection medium between the processor 1201 and the memory 1203 in the embodiment of the present application is not limited.

[0149] The memory 1203 can include read-only memory and random access memory, and provide instructions and data for the processor 1201. A part of the memory 1203 can also include non-volatile random access memory.

[0150] The memory 1203 can include read-only memory and random access memory, and provide instructions and data for the processor 1201. A part of the memory 1203 can also include non-volatile random access memory.

[0151] ​The processor 1201 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor, and optionally, the processor 1201 can also be any conventional processor.

[0152] The processor 1201 is configured to invoke the program instructions stored in the memory 1203 to perform the following steps:

[0153] In the image to be processed, a target region satisfying a sawtooth condition is determined.

[0154] In the image to be processed, a target region satisfying a sawtooth condition is determined.

[0155] The target region is subjected to low-pass filtering to obtain a processed region corresponding to the target region.

[0156] According to the processed region, a processed image corresponding to the image to be processed is determined.

[0157] In a possible implementation, the image to be processed includes a first pixel point, a second pixel point, a third pixel point and a fourth pixel point, the first pixel point is a pixel point corresponding to a first pixel value, the second pixel point is a pixel point corresponding to a second pixel value, the third pixel point is a pixel point corresponding to a third pixel value, and the fourth pixel point is a pixel point corresponding to a fourth pixel value; the processor 1201 is configured to invoke the program instructions stored in the memory 1203 to determine, in the image to be processed, a target region satisfying a sawtooth condition, and specifically configured to perform the following steps:

[0158] When the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than a target threshold, it is determined that a region formed by the first pixel point, the second pixel point, the third pixel point and the fourth pixel point is the target region.

[0159] In a possible implementation, the processor 1201 is configured to invoke program instructions stored in the memory 1203 to determine a target region that satisfies a jaggy condition in a to-be-processed image, and specifically configured to perform the following steps:

[0160] In a case where the received external input signal indicates the first mode, and the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold, it is determined that the region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0161] In a possible implementation, the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are four adjacent pixel points in the same column in the to-be-processed image.

[0162] In a possible implementation, the to-be-processed image further includes a fifth pixel point, a sixth pixel point, a seventh pixel point, and an eighth pixel point, the fifth pixel point is a pixel point corresponding to a fifth pixel value, the sixth pixel point is a pixel point corresponding to a sixth pixel value, the seventh pixel point is a pixel point corresponding to a seventh pixel value, and the eighth pixel point is a pixel point corresponding to an eighth pixel value; the processor 1201 is configured to invoke program instructions stored in the memory 1203 to further perform the following steps:

[0163] In a case where the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold;

[0164] and the difference between the fifth pixel value and the sixth pixel value, the difference between the sixth pixel value and the seventh pixel value, and the difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold, it is determined that the region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point is the target region.

[0165] In a possible implementation, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point are four adjacent pixel points in the same column in the to-be-processed image, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point.

[0166] In a possible implementation, the processor 1201 is configured to invoke program instructions stored in the memory 1203 to determine the to-be-processed region corresponding to the target region in the to-be-processed image, and specifically configured to perform the following steps:

[0167] obtain the first preset parameter and the second preset parameter;

[0168] determine the parameter corresponding to the first mode according to the correspondence between the input mode and the parameter;

[0169] determine the first to-be-processed region according to the first preset parameter and the parameter corresponding to the first mode;

[0170] obtain the action range information corresponding to the second preset parameter, and determine the second to-be-processed region according to the action range information;

[0171] determine the first to-be-processed region and the second to-be-processed region as the to-be-processed region corresponding to the target region, and the to-be-processed region includes the target region.

[0172] In a possible implementation, the processor 1201 is configured to invoke program instructions stored in the memory 1203 to perform low-pass filtering processing on the to-be-processed region to obtain the processed region corresponding to the to-be-processed region, and specifically configured to perform the following steps:

[0173] process the pixel point corresponding to the second pixel value according to the first pixel value, the second pixel value, the third pixel value, and the pixel parameter;

[0174] The pixel parameter is determined according to the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value.

[0175] In the embodiments of the present application, the method provided by the embodiments of the present application can be implemented by running a computer program (including program codes) capable of executing each step involved in the corresponding method shown in the embodiments of the present application on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access memory (RAM), and a read-only memory (ROM). Figures 3-10 The computer program can be recorded on a computer readable recording medium, and loaded into the computing device through the computer readable recording medium, and run in the computing device.

[0176] Based on the same inventive concept, the principles and beneficial effects of the image processing device provided in the embodiments of the present application for solving problems are similar to those of the image processing device in the method embodiments of the present application. For brevity, the principles and beneficial effects of the method embodiments are not described again here.

[0177] The foregoing image processing apparatus (such as the image processing apparatus 1100, the image processing apparatus 1200) may, for example, be a chip or a chip module.

[0178] The chip may perform the steps of the foregoing method embodiments.

[0179] The chip is configured to perform the following steps: determining a target region satisfying a jaggy condition in a to-be-processed image; determining a to-be-processed region corresponding to the target region in the to-be-processed image; performing low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region; and determining a processed image corresponding to the to-be-processed image according to the processed region.

[0180] In a possible implementation, the to-be-processed image includes a first pixel point, a second pixel point, a third pixel point, and a fourth pixel point, the first pixel point is a pixel point corresponding to a first pixel value, the second pixel point is a pixel point corresponding to a second pixel value, the third pixel point is a pixel point corresponding to a third pixel value, and the fourth pixel point is a pixel point corresponding to a fourth pixel value; and the chip is configured to determine a target region satisfying a jaggy condition in a to-be-processed image, and specifically configured to perform the following steps: in a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than a target threshold, determining that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0181] In a possible implementation, the chip is configured to determine a target region satisfying a jaggy condition in a to-be-processed image, and specifically configured to perform the following steps: receiving an external input signal indicating a first mode, and in a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than the target threshold, determining that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0182] In a possible implementation, the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are four adjacent pixel points in a same column in the to-be-processed image.

[0183] In a possible implementation, the to-be-processed image further includes a fifth pixel point, a sixth pixel point, a seventh pixel point, and an eighth pixel point, the fifth pixel point is a pixel point corresponding to a fifth pixel value, the sixth pixel point is a pixel point corresponding to a sixth pixel value, the seventh pixel point is a pixel point corresponding to a seventh pixel value, and the eighth pixel point is a pixel point corresponding to an eighth pixel value; and the chip is further configured to: in a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than the target threshold, and a difference between the fifth pixel value and the sixth pixel value, a difference between the sixth pixel value and the seventh pixel value, and a difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold, determine that a region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point is the target region; and the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point are four adjacent pixel points in a same column in the to-be-processed image, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point.

[0184] In a possible implementation, the chip is configured to determine a to-be-processed region corresponding to the target region in the to-be-processed image, and specifically configured to: obtain a first preset parameter and a second preset parameter; determine a parameter corresponding to the first mode according to a correspondence between an input mode and a parameter; determine a first to-be-processed region according to the first preset parameter and the parameter corresponding to the first mode; obtain action range information corresponding to the second preset parameter, and determine a second to-be-processed region according to the action range information; and determine the first to-be-processed region and the second to-be-processed region as the to-be-processed region corresponding to the target region, where the to-be-processed region includes the target region.

[0185] In a possible implementation, the chip is configured to perform low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region, and specifically configured to: process a pixel point corresponding to the second pixel value according to the first pixel value, the second pixel value, the third pixel value, and a pixel parameter; and the pixel parameter is determined according to the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value.

[0186] Specifically, in this case, the operations performed by the chip can refer to the descriptions of the above Figure 13 corresponding embodiments about the electronic device.

[0187] In a possible implementation, the chip includes at least one processor, at least one first memory, and at least one second memory; the at least one first memory and the at least one processor are connected through a line, the first memory stores a computer program, the computer program includes program instructions, and the processor is configured to execute the program instructions to implement the image processing method in the embodiment of the application; the at least one second memory and the at least one processor are connected through a line, and the second memory stores data required to be stored in the method embodiment.

[0188] For each device, product, and module included in the device and the product applied to or integrated into the chip, each module can be implemented in a hardware manner such as a circuit, or at least part of the modules can be implemented in a software program manner, the software program runs on a processor integrated in the chip, and the remaining (if any) part of the modules can be implemented in a hardware manner such as a circuit.

[0189] Based on the same inventive concept, the principle and beneficial effects of the chip provided in the embodiment of the application in solving problems are similar to those of the electronic device in the method embodiment in solving problems, and the principles and beneficial effects of the method implementation can be referred to. For brevity, the description is not repeated here.

[0190] Please refer to Figure 13 , Figure 1 is a structural schematic diagram of a module device provided in the embodiment of the application. The module device 1300 can perform the related steps of the electronic device in the method embodiment. The module device 1300 includes a communication module 1301, a power supply module 1302, a storage module 1303, and a chip module 1304.

[0191] The communication module 1301 is configured to perform internal communication of the module device or communication between the module device and an external device. The power supply module 1302 is configured to provide power for the module device. The storage module 1303 is configured to store data and instructions. The chip module 1304 is configured to perform the following steps.

[0192] In the to-be-processed image, a target region satisfying a sawtooth condition is determined. In the to-be-processed image, a to-be-processed region corresponding to the target region is determined. The to-be-processed region is subjected to low-pass filtering processing to obtain a processed region corresponding to the to-be-processed region. According to the processed region, a processed image corresponding to the to-be-processed image is determined.

[0193] In a possible implementation, the to-be-processed image includes a first pixel point, a second pixel point, a third pixel point, and a fourth pixel point, the first pixel point is a pixel point corresponding to a first pixel value, the second pixel point is a pixel point corresponding to a second pixel value, the chip module 1304 is configured to make the third pixel point a pixel point corresponding to a third pixel value, and the fourth pixel point is a pixel point corresponding to a fourth pixel value; and the chip module 1304 is configured to determine a target region that satisfies a sawtooth condition in the to-be-processed image, and specifically configured to perform the following steps:

[0194] In a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than a target threshold, the chip module 1304 is configured to determine that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0195] In a possible implementation, the chip module 1304 is configured to determine a target region that satisfies a sawtooth condition in the to-be-processed image, and specifically configured to perform the following steps:

[0196] In a case where the chip module 1304 receives an external input signal indicating the first mode, and a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than the target threshold, the chip module 1304 is configured to determine that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

[0197] In a possible implementation, the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are four adjacent pixel points in a same column in the to-be-processed image.

[0198] In a possible implementation, the to-be-processed image further includes a fifth pixel point, a sixth pixel point, a seventh pixel point, and an eighth pixel point, the fifth pixel point is a pixel point corresponding to a fifth pixel value, the sixth pixel point is a pixel point corresponding to a sixth pixel value, the seventh pixel point is a pixel point corresponding to a seventh pixel value, and the eighth pixel point is a pixel point corresponding to an eighth pixel value; and the chip module 1304 is further configured to perform the following steps:

[0199] In a case where a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than the target threshold;

[0200] and the difference between the fifth pixel value and the sixth pixel value, the difference between the sixth pixel value and the seventh pixel value, and the difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold, it is determined that a region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point is the target region;

[0201] The fifth pixel point, the sixth pixel point, the seventh pixel point, and the eighth pixel point are four adjacent pixel points in the same column in the image to be processed, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point.

[0202] In a possible implementation, the chip module 1304 is configured to determine a target region corresponding to the target region in the image to be processed, and specifically configured to perform the following steps:

[0203] obtain a first preset parameter and a second preset parameter;

[0204] determine the parameter corresponding to the first mode according to the correspondence between the input mode and the parameter;

[0205] determine a first target region according to the first preset parameter and the parameter corresponding to the first mode;

[0206] obtain the action range information corresponding to the second preset parameter, and determine a second target region according to the action range information;

[0207] determine the first target region and the second target region as the target region corresponding to the target region, and the target region includes the target region.

[0208] In a possible implementation, the chip module 1304 is configured to perform low-pass filtering processing on the target region to obtain a processed region corresponding to the target region, and specifically configured to perform the following steps:

[0209] process a pixel point corresponding to the second pixel value according to the first pixel value, the second pixel value, the third pixel value, and a pixel parameter;

[0210] The pixel parameter is determined according to the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value.

[0211] For each device, product applied to or integrated into the chip module, each module contained therein can be realized in the form of hardware such as a circuit, different modules can be located in the same component (such as a chip, a circuit module, etc.) or different components of the chip module, or at least part of the modules can be realized in the form of a software program running on a processor integrated in the chip module, and the remaining (if any) part of the modules can be realized in the form of hardware such as a circuit.

[0212] In the embodiment of the present application, by determining the target region satisfying the jaggy condition in the to-be-processed image, the corresponding to-be-processed region of the target region can be determined, low-pass filtering processing can be performed on the to-be-processed region after the to-be-processed region is determined, the processed region corresponding to the to-be-processed region is obtained, and finally, the processed image corresponding to the to-be-processed image is determined according to the processed region. Therefore, the image region satisfying the jaggy condition can be detected in the to-be-processed image first, and only the image region satisfying the jaggy condition is processed, so that the image in other regions can be ensured to be clear, the image region satisfying the jaggy condition is processed, and thus the overall processing effect of the to-be-processed image is improved.

[0213] The embodiment of the present application also provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program includes one or more program instructions, and the one or more program instructions are suitable for being loaded by an electronic device and executing the method provided in the above method embodiment.

[0214] The embodiment of the present application also provides a computer program product containing a computer program or instruction, when the computer program or instruction runs on a computer, the computer program or instruction makes the computer execute the method provided in the above method embodiment.

[0215] The embodiment of the present application also provides an image processing system, which can include ​ the electronic device (the first electronic device 100 and the second electronic device 200) in the image processing system.

[0216] It should be noted that, for each of the above-mentioned method embodiments, in order to simply describe, each of the above-mentioned method embodiments is described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0217] It should be noted that, for each of the above-mentioned method embodiments, in order to simply describe, each of the above-mentioned method embodiments is described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0218] The steps in the method embodiments of the present application can be adjusted in sequence, combined and deleted according to actual needs.

[0219] The modules in the device embodiments of the present application can be combined, divided and deleted according to actual needs.

[0220] Those of ordinary skill in the art can understand that all or part of the steps of the various methods of the above-mentioned embodiments can be completed by program instructions and related hardware. The program instructions can be stored in a computer-readable storage medium, and the computer-readable storage medium can include a flash disk, a ROM, a RAM, a magnetic disk or an optical disk, etc.

[0221] The above disclosure is only one embodiment of the present application, and only part of the embodiments of the present application, and cannot be used to limit the scope of the present application.

Claims

1. An image processing method, characterized by, Comprise: In the image to be processed, determine the target area that meets the sawtooth condition; In the image to be processed, determine the target area corresponding to the target area to be processed, comprising: obtaining a first preset parameter and a second preset parameter; determine the parameter corresponding to the first mode according to the corresponding relationship between the input mode and the parameter; determine the first to-be-processed area according to the first preset parameter and the parameter corresponding to the first mode; obtain the action range information corresponding to the second preset parameter, and determine the second to-be-processed area according to the action range information; the first to-be-processed area and the second to-be-processed area are determined as the target area corresponding to the to-be-processed area, and the to-be-processed area includes the target area; the first preset parameter is used to determine the horizontal processing range of the action range, and the second preset parameter is used to determine the vertical processing range of the action range; Low-pass filter processing is performed on the to-be-processed area to obtain the processed area corresponding to the to-be-processed area; According to the processed area, determine the processed image corresponding to the to-be-processed image; The to-be-processed image includes first pixel points, second pixel points, third pixel points and fourth pixel points, the first pixel points are pixel points corresponding to the first pixel value, the second pixel points are pixel points corresponding to the second pixel value, the third pixel points are pixel points corresponding to the third pixel value, and the fourth pixel points are pixel points corresponding to the fourth pixel value; the first pixel points, the second pixel points, the third pixel points and the fourth pixel points are four adjacent pixel points in the same column in the to-be-processed image; the method comprises: In the case that the external input signal indicating the first mode is received, and the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold, it is determined that the area formed by the first pixel point, the second pixel point, the third pixel point and the fourth pixel point is the target area.

2. The method of claim 1, wherein, The to-be-processed image also includes fifth pixel points, sixth pixel points, seventh pixel points and eighth pixel points, the fifth pixel points are pixel points corresponding to the fifth pixel value, the sixth pixel points are pixel points corresponding to the sixth pixel value, the seventh pixel points are pixel points corresponding to the seventh pixel value, and the eighth pixel points are pixel points corresponding to the eighth pixel value; the method further comprises: In the case that the difference between the first pixel value and the second pixel value, the difference between the second pixel value and the third pixel value, and the difference between the third pixel value and the fourth pixel value are all greater than the target threshold, and the difference between the fifth pixel value and the sixth pixel value, the difference between the sixth pixel value and the seventh pixel value, and the difference between the seventh pixel value and the eighth pixel value are all greater than the target threshold, it is determined that the region formed by the first pixel point, the second pixel point, the third pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point is the target region; The fifth pixel point, the sixth pixel point, the seventh pixel point and the eighth pixel point are four adjacent pixel points in the same column in the image to be processed, the fifth pixel point is adjacent to the first pixel point, the sixth pixel point is adjacent to the second pixel point, the seventh pixel point is adjacent to the third pixel point, and the eighth pixel point is adjacent to the fourth pixel point.

3. The method of claim 1, wherein, The low-pass filtering processing on the to-be-processed region includes: processing the pixel point corresponding to the second pixel value according to the first pixel value, the second pixel value, the third pixel value and a pixel parameter; The pixel parameter is determined according to the first pixel value, the second pixel value, the third pixel value and the fourth pixel value.

4. An image processing apparatus characterized by comprising: The method comprises: The determination unit is configured to determine a target region satisfying a sawtooth condition in an image to be processed. The determination unit is further configured to determine a to-be-processed region corresponding to the target region in the image to be processed, including: obtaining a first preset parameter and a second preset parameter; determining a parameter corresponding to a first mode according to a correspondence between an input mode and a parameter; determining a first to-be-processed region according to the first preset parameter and the parameter corresponding to the first mode; obtaining action range information corresponding to the second preset parameter, and determining a second to-be-processed region according to the action range information; determining the first to-be-processed region and the second to-be-processed region as the to-be-processed region corresponding to the target region, and the to-be-processed region includes the target region; the first preset parameter is used to determine a horizontal processing range of an action range, and the second preset parameter is used to determine a vertical processing range of the action range; The processing unit is configured to perform low-pass filtering processing on the to-be-processed region to obtain a processed region corresponding to the to-be-processed region. The determination unit is further configured to determine a processed image corresponding to the image to be processed according to the processed region. The to-be-processed image includes a first pixel point, a second pixel point, a third pixel point, and a fourth pixel point, the first pixel point is a pixel point corresponding to a first pixel value, the second pixel point is a pixel point corresponding to a second pixel value, the third pixel point is a pixel point corresponding to a third pixel value, and the fourth pixel point is a pixel point corresponding to a fourth pixel value; the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are four adjacent pixel points in the same column in the to-be-processed image; the determination unit is specifically configured to, in a case where an external input signal indicating the first mode is received, and a difference between the first pixel value and the second pixel value, a difference between the second pixel value and the third pixel value, and a difference between the third pixel value and the fourth pixel value are all greater than a target threshold, determine that a region formed by the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point is the target region.

5. An image processing apparatus characterized by comprising: comprise a processor; The processor is configured to perform the method of any one of claims 1-3.

6. A chip, characterized by comprise a memory and a processor, the memory storing a computer program, the computer program comprising program instructions, and the processor being configured to execute the program instructions to implement the method of any one of claims 1-3.

7. A chip module, characterized by The chip module comprises a communication interface and a chip, wherein: the communication interface is configured to perform internal communication of the chip module, or to perform communication between the chip module and an external device; and the chip is configured to perform the method of any one of claims 1-3.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program comprising program instructions, and the program instructions being executed to cause the method of any one of claims 1-3 to be performed.

Citation Information

Patent Citations

  • Jaggy mitigation processing device and jaggy mitigation processing method

    JP2012043049A

  • Suppression of sawtooth artifacts in an interlace-to-progressive converted signal

    US5625421A