Image Processing Method, Image Processing Apparatus, Electronic Device, and Storage Medium
By updating static identification marks and interpolated data, the problem of unclear static identification gaps is solved, the visual effect of image processing is improved, the static identification is avoided, and the video image quality is improved.
Patent Information
- Application Number
- CN202010705370.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-21
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2040-07-21
AI Technical Summary
In image processing, motion compensation at the static identification gap results in irregular interpolation data, resulting in unclear static identification gap in the video image, reducing visual effects.
By obtaining the static identification marks of the pixel points to be interpolated, the marks are updated based on the ATM Flag distribution in the neighborhood, the interpolated data is determined and motion compensation is performed, the consistency of the static identification gap is optimized, and the static identification is avoided from flying out.
It improves the visual quality of video images, avoids unclear static marking gaps and flying out, and enhances the image display effect.
Smart Images

Figure CN113962854B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular, to an image processing method, an image processing apparatus, an electronic device, and a non-transitory computer storage medium. Background Art
[0002] A static logo can be a logo that remains static for a period of time in a video stream, such as a station logo, lines, subtitles, etc. Whether a logo is a static logo depends on edge detection information and the distribution information of motion vectors.
[0003] In image processing technology, motion compensation is a method for describing the difference between adjacent frame images. Specifically, it describes how each small block in the previous frame moves to a certain position in the current frame. This method is often used by video compression / video codecs to reduce spatial redundancy in a video sequence. It can also be used for deinterlacing and motion interpolation operations.
[0004] For static logos, when performing motion compensation, since it is difficult to accurately obtain the motion vectors at the gaps between multiple adjacent static logos, for the motion compensation at the gaps of static logos, the data at the zero vector position may be used, or unilateral data or bilateral fusion data may be used. Therefore, the interpolated data obtained at the gaps between multiple static logos is very irregular, and finally, the gaps of the static logos in the presented image give a very dirty feeling, reducing the visual effect of the final video. Summary of the Invention
[0005] The present invention aims to at least solve one of the technical problems existing in the prior art. To this end, an object of the present invention is to provide an image processing method, which can alleviate the problem of unclean gaps in static logos and improve the visual effect of the final video image.
[0006] A second object of the present invention is to provide a non-transitory computer storage medium.
[0007] A third object of the present invention is to provide an image processing apparatus.
[0008] A fourth object of the present invention is to provide an electronic device.
[0009] To achieve the above object, the image processing method according to the first aspect embodiment of the present invention includes: obtaining a first static identification marker of an interpolation pixel point to be interpolated, and obtaining second static identification markers of each pixel point in a preset neighborhood of the interpolation pixel point to be interpolated; determining the marker types in the first static identification marker and the second static identification markers and the quantities corresponding to various marker types; obtaining a third static identification marker of the interpolation pixel point to be interpolated according to the marker types and the quantities corresponding to various marker types; obtaining interpolation data of the interpolation pixel point to be interpolated according to the third static identification marker of the interpolation pixel point to be interpolated, and performing motion compensation on the interpolation pixel point to be interpolated according to the interpolation data.
[0010] According to the image processing method of the embodiment of the present invention, the ATM Flag of the interpolation pixel point to be interpolated is updated based on the ATM Flag distribution in the neighborhood of the interpolation pixel point to be interpolated, so that the ATM Flag of the interpolation pixel point to be interpolated is more inclined to the majority, thereby improving the consistency of the ATM Flag in this area, optimizing the ATM Flag confusion phenomenon caused by the motion vector, and avoiding the phenomenon that the static identification gap is not clean; and, obtaining interpolation data according to the updated third static identification marker of the interpolation pixel point to be interpolated and performing motion compensation can avoid the phenomenon that the static identification in the video image flies out, and improve the quality of the final video image.
[0011] In some embodiments, determining the third static identification marker of the interpolation pixel point to be interpolated according to the marker types and the quantities corresponding to various marker types includes: removing the static identification markers pointing to the static identification itself in the marker types; determining the marker type with the largest quantity in the marker types; using the marker type with the largest quantity as the third static identification marker of the interpolation pixel point to be interpolated, so that the static identification markers in the neighborhood of the interpolation pixel point to be interpolated can be more consistent and avoid the phenomenon that the static identification gap is not clean.
[0012] In some embodiments, obtaining the interpolation data corresponding to the interpolation pixel point to be interpolated according to the third static identification marker of the interpolation pixel point to be interpolated includes: when the third static identification marker is a first type of marker, obtaining the interpolation data corresponding to the interpolation pixel point to be interpolated according to the first motion vector corresponding to the interpolation pixel point to be interpolated in the current frame image and the second motion vector corresponding to the interpolation pixel point to be interpolated in the previous frame image; wherein, the first type of marker is that both the first motion vector and the second motion vector point to the background image.
[0013] In some embodiments, obtaining interpolation data corresponding to the to-be-interpolated pixel points according to the third pointing static identification mark of the to-be-interpolated pixel points includes: the third pointing static identification mark is a second type of mark, and using the motion vector pointing to the background image as the interpolation data of the to-be-interpolated pixel points; wherein, the second type of mark is that any one of the first motion vector and the second motion vector points to the background image and the other points to the static identification, the first motion vector is the motion vector corresponding to the to-be-interpolated pixel point in the current frame image, and the second motion vector is the motion vector corresponding to the to-be-interpolated pixel point in the previous frame image.
[0014] In some embodiments, obtaining interpolation data corresponding to the to-be-interpolated pixel points according to the third pointing static identification mark of the to-be-interpolated pixel points includes: the third pointing static identification mark is a third type of mark, and using the zero vector as the interpolation data of the to-be-interpolated pixel points; wherein, the third type of mark is that both the first motion vector and the second motion vector point to the static identification, the first motion vector is the motion vector corresponding to the to-be-interpolated pixel point in the current frame image, and the second motion vector is the motion vector corresponding to the to-be-interpolated pixel point in the previous frame image.
[0015] In some embodiments, obtaining interpolation data corresponding to the to-be-interpolated pixel points according to the third pointing static identification mark of the to-be-interpolated pixel points includes: the third pointing static identification mark is a fourth type of mark, and using the zero vector as the interpolation data of the to-be-interpolated pixel points; wherein, the fourth type of mark corresponds to the to-be-interpolated pixel point being a static identification.
[0016] In some embodiments, the graphics processing method further includes: feathering the result after motion compensation of the to-be-interpolated pixel points, so that the boundaries of different ATM Flag regions are more gentle and smooth, and reducing the visual aliasing phenomenon.
[0017] In some embodiments, feathering the result after motion compensation of the to-be-interpolated pixel points includes: counting the number of pixel points that use the zero vector as interpolation data among the to-be-interpolated pixel points and the pixel points in the preset area; generating a weight coefficient according to the number of pixel points that use the zero vector as interpolation data and the total number of pixel points in the preset area; fusing the result after motion compensation of the to-be-interpolated pixel points with the pixel values of the pixel points that use the zero vector as the interpolation data according to the weight coefficient.
[0018] A non-transitory computer storage medium according to an embodiment of the second aspect of the present invention, on which a computer program is stored, and when the computer program is executed, the image processing method is implemented.
[0019] To achieve the above object, the image processing apparatus according to the third aspect of the present invention includes: a processor; and a memory communicatively connected to the processor; wherein, instructions executable by the processor are stored in the memory, and when the instructions are executed by the processor, the above-mentioned image processing method is implemented.
[0020] According to the image processing apparatus of the embodiment of the present invention, by executing the image processing method of the above embodiment, the problem of dirt between static identifiers can be solved and the phenomenon of static identifiers flying out can be avoided.
[0021] To achieve the above object, the electronic device according to the fourth aspect of the present invention includes: an image display device and the above-mentioned image processing apparatus, and the image processing apparatus is connected to the image display device.
[0022] According to the electronic device of the embodiment of the present invention, by adopting the image processing apparatus of the above embodiment, the image processing apparatus determines a new ATM Flag, i.e., a third pointing static identifier mark, of the to-be-interpolated pixel point according to the ATM Flag distribution in the neighborhood of the to-be-interpolated pixel point, which can improve the consistency of the ATM Flag, avoid the phenomenon that the static identifier gap in the video image appears unclean, and by determining the interpolation data according to the third pointing static identifier mark and performing motion optimization compensation, the visual effect of static identifiers flying out can be avoided, thereby improving the quality of the video image presented by the image display device.
[0023] The additional aspects and advantages of the present invention will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present invention. Description of the Drawings
[0024] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, wherein:
[0025] Figure 1 is a flowchart of an image processing method according to an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of determining the third pointing static identifier mark of the to-be-interpolated pixel point according to an embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of feathering the motion compensation result of the to-be-interpolated pixel point according to an embodiment of the present invention;
[0028] Figure 4 is a block diagram of an image processing apparatus according to an embodiment of the present invention;
[0029] Figure 5It is a block diagram of an electronic device according to an embodiment of the present invention. Detailed implementation manners
[0030] Embodiments of the present invention will be described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention will be described in detail below.
[0031] In image processing, for the detection of static identifiers, there are some problems. For example, due to incomplete protection of static identifiers, the static identifiers themselves look damaged; for another example, due to misdetecting the correct picture quality content in the video sequence as a static logo, there is a misjudgment of the static identifier; for another example, when performing motion compensation, the interpolation data between static identifiers is irregular, resulting in an unclean appearance of the gaps between static identifiers. These problems will all reduce the quality of the finally presented video image to a certain extent.
[0032] In the case where there is no breakage or misjudgment in static identifier detection, when performing motion estimation and motion compensation, due to the problem of uncleanliness between static identifiers during interpolation calculation, the embodiments of the present invention propose an image processing method. This image processing method can alleviate the problem of dirt between static identifiers, making the video bitstream after MEMC (Motion Estimate Motion Compensation) processing more comfortable for the human eye in the final playback effect.
[0033] Next, refer to Figures 1 - 3 Describe an image processing method according to an embodiment of the present invention.
[0034] Figure 1 It is a flowchart of an image processing method according to an embodiment of the present invention. As Figure 1 shown, the image processing method of the embodiment of the present invention includes at least steps S1 - S4, and each step is as follows.
[0035] Step S1, obtain a first static identifier mark pointing to the pixel point to be interpolated, and obtain second static identifier marks of each pixel point in the preset neighborhood of the pixel point to be interpolated.
[0036] In the embodiment, each pixel point to be interpolated can obtain its static identifier mark (Aim-To-Mask Flag, ATM Flag) based on the motion vector according to the corresponding positions of the previous frame image and the current frame image. Therefore, the ATM Flag of the pixel point can indicate whether the motion vector at the corresponding position of the previous frame image points to the background image or the static identifier, and indicate whether the motion vector of this pixel point in the current frame image points to the background image or the static identifier.
[0037] In some embodiments, different types of static identification markers can be defined according to the motion vector directivity of the corresponding positions in the previous frame image and the current frame image of the pixel to be interpolated. For example, four types of static identification markers can be set, and the meaning of each type is as follows:
[0038] ATM Flag = 0 indicates that the motion vectors of the previous frame image corresponding to the pixel to be interpolated and the current frame image corresponding to the pixel to be interpolated both point to the normal background image;
[0039] ATM Flag = 1 indicates that among the motion vectors of the previous frame image corresponding to the pixel to be interpolated and the current frame image corresponding to the pixel to be interpolated, one side of the motion vector points to the static identification area and the other side points to the normal background image;
[0040] ATM Flag = 2 indicates that the motion vectors of the previous frame image corresponding to the pixel to be interpolated and the current frame image corresponding to the pixel to be interpolated both point to the static identification area;
[0041] ATM Flag = 3 indicates that the pixel to be interpolated itself is a static identification.
[0042] The above only gives an example of dividing into four types of static identification markers, and the classification and the meaning of each classification can also be defined according to needs.
[0043] In the embodiments of the present invention, it can be defaulted that the static identification detection has been performed on the video bitstream, and the initial static identification marker of each pixel has been obtained. To solve the problem of dirty static identification gaps during interpolation, the ATM Flags in the neighborhood such as N×M around the pixel to be interpolated (including the pixel to be interpolated itself) are used as the entire reference set, and an aggregation voting strategy is adopted to generate a new ATM Flag of the pixel to be interpolated, that is, the third static identification marker, specifically in the following steps S2 and S3.
[0044] Step S2, determine the marker types in the first static identification marker and the second static identification marker and the quantity corresponding to each marker type.
[0045] Since the motion vectors within the preset neighborhood around the pixel to be interpolated, for example, are difficult to be accurate and have poor consistency, if motion compensation interpolation is directly performed based on the ATM Flag of the pixel to be interpolated, the data in the compensation area around the static logo will be very chaotic, and some of the interpolated data will be very abrupt visually. This is the direct reason for the appearance of artifacts in the static logo area. Therefore, in the embodiments of the present invention, the ATM Flags of the pixels within the preset neighborhood of the current pixel to be interpolated are used as a reference set, and the types of flags that appear, such as the four types mentioned above, and the number of each type of flag are counted. For example, the number of occurrences of Flag = 1 or Flag = 2 or Flag = 3 or Flag = 0 is counted, and then the interpolation data of the pixel to be interpolated is determined based on the statistical results.
[0046] Step S3: Obtain the third static logo flag of the pixel to be interpolated according to the type of flag and the number of each type of flag.
[0047] In the embodiment, if the ATM Flag indicates that the pixel to be interpolated itself is a static logo, then this ATM Flag is meaningless, and when determining the new ATM Flag of the new pixel to be interpolated, this ATM Flag is excluded.
[0048] Specifically, the static logo flags pointing to the static logo itself are removed from the type of flags; the type of flag with the largest number is determined; and the type of flag with the largest number is used as the new static logo flag of the pixel to be interpolated, that is, the third static logo flag.
[0049] For example, Figure 2 FIG. is a schematic diagram for determining the third static logo flag of the pixel to be interpolated according to an embodiment of the present invention. As Figure 2 shown, where Pre represents the previous frame image, Cur represents the current frame image, the grid P between Pre and Cur represents interpolation between Pre and Cur, Z_data represents a zero vector, Mask represents a static logo, and Cur pixel represents the pixel to be interpolated. The static logo flags of the pixel to be interpolated and the pixels in its neighborhood N×M (N = M = 5 in the figure) are shown in the grid P. The types of static logo flags included in the grid are counted, such as Flag = 0, Flag = 1, Flag = 2, and Flag = 3 mentioned above, and the number of each type is counted. Among them, Flag = 3 is meaningless and is excluded, and the number of Flag = 2 is the largest. Then, the static logo flag of the pixel to be interpolated is updated to Flag = 2. That is, a vote is taken on the ATM Flags of the pixel to be interpolated and its surrounding neighborhood, and the type with the largest number of votes determines the final new ATM Flag of the pixel to be interpolated.
[0050] Through the above method, the third pointing static identification mark of the pixel point to be interpolated can be determined, which can make the pointing static identification marks between static identifications more consistent, optimize the problem of ATM Flag confusion caused by motion vectors, and thus improve the visual effect after video image motion estimation and motion compensation. However, there will be an uneven phenomenon between different pointing static identification mark regions, resulting in obvious jagged phenomena at the boundaries of different regions. Therefore, the method of this embodiment of the present invention performs motion optimization compensation, that is, step S4 is executed.
[0051] Step S4: Obtain the interpolation data corresponding to the pixel point to be interpolated according to the third pointing static identification mark of the pixel point to be interpolated, and perform motion compensation on the pixel point to be interpolated according to the interpolation data.
[0052] In the embodiment, the interpolation data of the pixel point to be interpolated can be selected according to the directivity of the motion vector in the previous frame image and the directivity of the motion vector at the corresponding position in the current frame image, that is, the interpolation data is determined according to the third pointing static identification mark of the pixel point to be interpolated.
[0053] For example, if the third pointing static identification mark is a first type of mark, the interpolation data corresponding to the position of the pixel point to be interpolated is obtained according to the first motion vector of the pixel point to be interpolated in the current frame image and the second motion vector at the position corresponding to the pixel point to be interpolated in the previous frame image; wherein, the first type of mark is that both the first motion vector and the second motion vector point to the background image. For example, ATM Flag = 0 mentioned above, and at this time, normal motion compensation is performed. For example, the average value of the pixel value at the corresponding position in the previous frame image and the pixel value at the corresponding position in the current frame image is taken as the interpolation of the pixel point to be interpolated.
[0054] For another example, if the third pointing static identification mark is a second type of mark, and the second type of mark is that any one of the first motion vector and the second motion vector points to the background image and the other points to the static identification, the first motion vector is the motion vector of the pixel point to be interpolated in the current frame image, and the second motion vector is the motion vector at the corresponding pixel point to be interpolated in the previous frame image, then the motion vector pointing to the background image is used as the interpolation data corresponding to the pixel point to be interpolated. For example, ATM Flag = 1, that is, the unilateral motion vector of the pixel point to be interpolated points to the static identification, and the other side points to the normal background image, then the pixel value pointing to the normal background image is selected as the interpolation of the pixel point to be interpolated.
[0055] For another example, the third-pointing static identifier is marked as a third type of marker. The third type of marker means that both the first motion vector and the second motion vector point to the static identifier. Here, the first motion vector is the motion vector corresponding to the pixel point to be interpolated in the current frame image, and the second motion vector is the motion vector corresponding to the pixel point to be interpolated in the previous frame image. Then, a zero vector is used as the interpolation data for the corresponding pixel point to be interpolated. That is, both sides of the pixel point to be interpolated point to the static identifier, for example, ATM Flag = 2. As Figure 2 shown, at this time, the pixel point to be interpolated selects a zero vector as the interpolation.
[0056] For another example, the third-pointing static identifier is marked as a fourth type of marker. The fourth type of marker corresponds to the pixel point to be interpolated being a static identifier. Then, a zero vector is used as the interpolation data for the corresponding pixel point to be interpolated.
[0057] In short, when performing motion optimization compensation on the pixel point to be interpolated according to the third-pointing static identifier marker, the main principle is: if the pixel point to be interpolated is a static identifier, that is, ATM Flag = 3 or ATM Flag = 2, then directly select two frames of zero vector data for interpolation; if the ATM Flag of the pixel point to be interpolated is 1, then select the data pointing to the normal background image for interpolation; if the ATM Flag of the pixel point to be interpolated is 0, then perform bilateral interpolation normally.
[0058] Through the motion optimization compensation of the above embodiments, it is possible to avoid the hollow in the static identifier area, prevent the pixel points of the static identifier itself from going to the background, and present the phenomenon of the static identifier flying out, and solve the problem that the image between static identifiers is visually dirty due to the messy compensation data.
[0059] Furthermore, in the real video bitstream, the boundary of the static identifier is not so perfect. If it is close to the static identifier, it will also cause the phenomenon that the static identifier is not fully protected, resulting in the flying out of abnormal points. Therefore, in order to avoid the flying out of the static identifier, which may cause overprotection of the static identifier, some pixel points of the background image above, below, left, and right of the static identifier are also protected, resulting in the phenomenon of halation of the static identifier. In addition, except that the pixel point to be interpolated itself is a static identifier, as mentioned above, since the pointing static identifier marker for the pixel point to be interpolated is updated, the consistency of ATM Flag between static identifiers is improved, but at the same time, there is also a problem that the boundary of the interpolation area when ATM Flag is 0 is not smooth with the interpolation areas of other ATM Flags, and there is a sawtooth phenomenon visually.
[0060] To solve the above further problems, in the motion estimation and motion compensation method of the embodiments of the present invention, the result after motion compensation of the pixel point to be interpolated is also feathered, so that the boundary transition between different ATM Flag regions is more gentle and smooth, reducing the sawtooth phenomenon visually.
[0061] In an embodiment, when feathering the result of motion compensation for an interpolated pixel, the number of pixels with zero vectors as interpolation data, i.e., the number of pixels with ATM Flag = 2 and ATM Flag = 3, is counted within the interpolated pixel and its preset neighborhood, such as an N×M neighborhood; a weight coefficient is generated based on the number of pixels with zero vectors as interpolation data and the total number of pixels within the preset neighborhood; and the result of motion compensation for the interpolated pixel is fused with the pixel values of the pixels with zero vectors as interpolation data according to the weight coefficient.
[0062] For example, Figure 3 The figure shows a schematic diagram of feathering fusion according to an embodiment of the present invention. As Figure 3 shown, where Mask is a static identification point and Cur pixel represents the interpolated pixel. The number of pixels belonging to ATM Flag = 2 and ATM Flag = 3, such as Mask points, within the neighborhood of the interpolated pixel is counted. Based on this counted number and the total number of pixels within this neighborhood, the weight coefficient of the pixels belonging to ATM Flag = 2 and ATM Flag = 3 is obtained. Based on this weight coefficient, the actual interpolation result of the current interpolated pixel is fused with the pixel values at the positions interpolated with zero vectors within its neighborhood, which can make the feathering excessive at the region boundary and achieve a soft and non-smooth effect.
[0063] It can be known that as Figure 3 shown, for pixels farther away from the region belonging to ATM Flag = 2 and ATM Flag = 3, interpolation is still performed using the interpolation data determined above. And as the number of static identification pixels within the neighborhood of the interpolated pixel increases, the weight of interpolation with zero vector values becomes larger, thus achieving a transition effect.
[0064] Generally speaking, for the problem that the visual perception between static identifications is not clean due to overly chaotic ATM Flags between static identifications in the image processing method of the embodiments of the present invention, the embodiments of the present invention update the ATM Flag of the interpolated pixel based on the ATM Flag distribution within the neighborhood of the interpolated pixel, making the ATM Flag of the interpolated pixel more tend to the majority, thereby improving the consistency of the ATM Flag in this region and the image quality of the region between static identifications; and, by obtaining interpolation data according to the third pointing static identification mark of the updated interpolated pixel and performing motion compensation, the phenomenon of static identifications flying out can be avoided; and, by feathering the motion compensation result of the interpolated pixel, the sawtooth and halo phenomena at the boundary of static identifications can be improved.
[0065] In a second aspect embodiment of the present invention, a non-transitory computer storage medium is further proposed, on which a computer program is stored. When the computer program is executed, the image processing method of the above embodiment can be implemented.
[0066] In a third aspect embodiment of the present invention, an image processing apparatus is further proposed. As Figure 4 shown in the block diagram of the image processing apparatus according to an embodiment of the present invention, the image processing apparatus 10 includes a processor 11 and a memory 12 communicatively connected to the processor 11. Among them, instructions executable by the processor 11 are stored in the memory 12. When the instructions are executed by the processor 11, the image processing method of the above embodiment is implemented.
[0067] When the logical instructions in the above-mentioned memory 12 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0068] As a computer-readable storage medium, the memory 12 can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of the present invention. The processor 11 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 12, that is, implements the image processing method in the above method embodiments.
[0069] The memory 12 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 12 may include a high-speed random access memory and may also include a non-volatile memory.
[0070] The technical solution of the embodiment of the present invention can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions for causing a computer device or an image processing device to execute all or part of the steps of the method described in the embodiment of the present invention. The foregoing storage medium may be a non-transitory storage medium, for example, including: a variety of media that can store program codes such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, or may also be a transient storage medium.
[0071] In a fourth aspect embodiment of the present invention, an electronic device is further proposed. In the embodiment, the electronic device may include some devices including image processing and image display, such as a television, a projector, etc.
[0072] As Figure 5As shown, the electronic device 100 according to an embodiment of the present invention includes an image display device 20 and the image processing device 10 of the above embodiment. The image processing device 10 is connected to the image display device 20. The image processing device 10 processes the video image to be displayed. Specifically, it can execute the image processing method of the above embodiment, and transmits the processed video image to the image display device 20 frame by frame. The image display device 20 is used to display the video image.
[0073] For the electronic device 100 according to an embodiment of the present invention, the image processing device 10 of the above embodiment is adopted. By determining the new ATM Flag of the pixel point to be interpolated, that is, the third pointing static identification mark, according to the ATM Flag distribution in the neighborhood of the pixel point to be interpolated, the consistency of the ATM Flag can be improved, and the visual feeling of unclean static identification gaps can be avoided. And by determining the interpolation data according to the third pointing static identification mark and performing motion optimization compensation, the visual effect of static identification flying out can be avoided, thereby improving the quality of the video image presented by the image display device 20.
[0074] In the description of this specification, the descriptions referring to terms such as "an embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example.
[0075] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the present invention is defined by the claims and their equivalents.
Claims
1. An image processing method, characterized in that, Including: Obtaining a first pointing static identification marker of an interpolation pixel to be interpolated, and obtaining second pointing static identification markers of each pixel within a preset neighborhood of the interpolation pixel to be interpolated; Determining the marker types in the first pointing static identification marker and the second pointing static identification markers and the quantities corresponding to various marker types; Obtaining a third pointing static identification marker of the interpolation pixel to be interpolated according to the marker types and the quantities corresponding to various marker types, including: determining the marker type with the largest quantity among the marker types, and using the marker type with the largest quantity as the third pointing static identification marker of the interpolation pixel to be interpolated; Obtaining interpolation data of the interpolation pixel to be interpolated according to the marker type of the third pointing static identification marker of the interpolation pixel to be interpolated, and performing motion compensation on the interpolation pixel to be interpolated according to the interpolation data; Wherein, the pointing static identification marker of a pixel is used to indicate whether the motion vector of the corresponding pixel position in the previous frame image points to the background image or the static identification and to indicate whether the motion vector of the pixel in the current frame image points to the background image or the static identification.
2. The image processing method according to claim 1, wherein Before determining the marker type with the largest quantity among the marker types, the image processing method further includes: Removing the pointing static identification markers in the marker types that point to the static identification itself.
3. The image processing method according to claim 1, characterized in that, Obtaining interpolation data corresponding to the interpolation pixel to be interpolated according to the third pointing static identification marker of the interpolation pixel to be interpolated, including: When the third pointing static identification marker is a first type of marker, obtaining the interpolation data of the interpolation pixel to be interpolated according to a first motion vector corresponding to the interpolation pixel to be interpolated in the current frame image and a second motion vector corresponding to the interpolation pixel to be interpolated in the previous frame image; Wherein, the first type of marker is that both the first motion vector and the second motion vector point to the background image.
4. The image processing method according to claim 1, wherein Obtaining interpolation data corresponding to the interpolation pixel to be interpolated according to the third pointing static identification marker of the interpolation pixel to be interpolated, including: When the third pointing static identification marker is a second type of marker, using the motion vector pointing to the background image as the interpolation data of the interpolation pixel to be interpolated; Wherein, the second type of marker is that any one of the first motion vector and the second motion vector points to the background image and the other points to the static identification, the first motion vector is the motion vector corresponding to the interpolation pixel to be interpolated in the current frame image, and the second motion vector is the motion vector corresponding to the interpolation pixel to be interpolated in the previous frame image.
5. The image processing method according to claim 1, characterized in that Obtaining interpolation data corresponding to the interpolation pixel to be interpolated according to the third pointing static identification marker of the interpolation pixel to be interpolated, including: When the third pointing static identification marker is a third type of marker, using the zero vector as the interpolation data of the interpolation pixel to be interpolated; Wherein, the third type of marker is that both the first motion vector and the second motion vector point to the static identification, the first motion vector is the motion vector corresponding to the interpolation pixel to be interpolated in the current frame image, and the second motion vector is the motion vector corresponding to the interpolation pixel to be interpolated in the previous frame image.
6. The image processing method according to claim 1, wherein Obtaining interpolation data corresponding to the interpolation pixel to be interpolated according to the third pointing static identification marker of the interpolation pixel to be interpolated, including: The third pointing static identifier is marked as a fourth type of identifier, and a zero vector is used as the interpolation data of the pixel point to be interpolated; Among them, the fourth type of identifier corresponds to the pixel point to be interpolated as a static identifier.
7. The image processing method according to claim 5 or 6, characterized in that The image processing method further includes: feathering the result after motion compensation of the pixel point to be interpolated.
8. The image processing method according to claim 7, wherein Feathering the result after motion compensation of the pixel point to be interpolated includes: Counting the number of pixel points that use a zero vector as interpolation data among the pixel point to be interpolated and in a preset area; Generating a weight coefficient according to the number of pixel points that use the zero vector as interpolation data and the total number of pixel points in the preset area; Fusing the result after motion compensation of the pixel point to be interpolated with the pixel values of the pixel points that use a zero vector as the interpolation data according to the weight coefficient.
9. A non-transitory computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the image processing method according to any one of claims 1-8.
10. An image processing apparatus, characterized in that, Including: A processor; A memory communicatively connected to the processor; Among them, instructions executable by the processor are stored in the memory, and when the instructions are executed by the processor, the image processing method according to any one of claims 1-8 is implemented.
11. An electronic device, characterized in that, Including an image display device and the image processing device according to claim 10, and the image processing device is connected to the image display device.
Citation Information
Patent Citations
FSR determination method and electronic equipment
CN111031265A