CN-117376571-B - Image processing method, electronic device, and computer storage medium
Abstract
The disclosure provides an image processing method, which comprises the steps of dividing a static area and a suspected motion area from an image frame to be processed, determining motion vector information of each pixel in the suspected motion area, dividing each pixel into a motion pixel and a static pixel according to the motion vector information of each pixel, marking the static state of the static pixel and all pixels in the static area, marking the motion state of the motion pixel and the corresponding motion vector information, and performing video encoding and decoding processing on the marked image frame to be processed. The motion estimation time is shortened, the image processing efficiency is improved, bandwidth resources are saved, and the video transmission pressure is relieved. The disclosure also provides an electronic device and a computer storage medium.
Inventors
- YOU JING
- CHEN JIE
- KONG DEHUI
- XU KE
Assignees
- 深圳市中兴微电子技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20220630
Claims (8)
- 1. An image processing method, the method comprising: dividing a static area and a suspected motion area from an image frame to be processed; determining motion vector information of each pixel in the suspected motion area, and dividing each pixel into a motion pixel and a static pixel according to the motion vector information of each pixel; Marking the static state of the static pixels and all pixels in the static region, and marking the motion state and the corresponding motion vector information of the motion pixels; performing video encoding and decoding processing on the marked image frames to be processed; the static area comprises a background area and a static target area, the suspected motion area comprises a motion target area, and the step of dividing the static area and the suspected motion area from the image frame to be processed comprises the following steps: dividing the image frame to be processed into a foreground region and a background region; Identifying objects in each of the foreground regions; dividing each foreground region into a static target region and a moving target region according to targets in each foreground region; dividing each pixel into a motion pixel and a still pixel according to the motion vector information of each pixel comprises: And determining pixels which meet preset conditions in the pixels as the static pixels and determining pixels except the static pixels in the pixels as the motion pixels, wherein the preset conditions comprise that motion vector information is zero and the frame difference between a to-be-processed image frame where the pixels are positioned and a reference frame is smaller than a preset threshold value.
- 2. The method of claim 1, wherein determining motion vector information for each pixel in the suspected motion region comprises: Dividing the suspected motion area into a plurality of macro blocks which are not overlapped with each other; for each macro block, determining a matching block of the current macro block from a reference frame corresponding to the current macro block; And determining the motion vector information of all pixels in each macro block according to each macro block and the matching block of each macro block.
- 3. The method of claim 2, wherein determining motion vector information for all pixels in each of the macroblocks based on each of the macroblocks and the matching blocks for each of the macroblocks comprises: and for each macro block, determining a geometric coordinate difference value between the center point of the matching block of the current macro block and the center point of the current macro block, and taking the geometric coordinate difference value as motion vector information of all pixels in the current macro block.
- 4. The method of claim 1, wherein the dividing each of the foreground regions into a stationary target region and a moving target region according to the targets in each of the foreground regions comprises: For any one of the targets in any one of the foreground regions, when detecting that motion exists in the current target, determining a preset range region taking the current target as a center in the current foreground region as the motion target region; and determining the regions except the moving target region in each foreground region as the static target region.
- 5. The method of any of claims 1-3, wherein the dividing the stationary region and the suspected motion region from the image frames to be processed comprises: Determining a frame difference between each of the image frames to be processed and a corresponding reference frame; and dividing each image frame to be processed into the static area and the suspected motion area according to each frame difference.
- 6. The method of claim 5, wherein the dividing each of the image frames to be processed into the stationary region and the suspected motion region according to each of the frame differences comprises: And determining the image frames to be processed with the frame difference larger than or equal to a preset dynamic and static judgment threshold value as the suspected motion area, and determining the image frames to be processed with the frame difference smaller than the preset dynamic and static judgment threshold value as the static area.
- 7. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the image processing method of any of claims 1-6.
- 8. A computer storage medium having stored thereon a computer program, wherein the program when executed implements the image processing method according to any of claims 1-6.
Description
Image processing method, electronic device, and computer storage medium Technical Field The present invention relates to the field of image processing technologies, and in particular, to an image processing method, an electronic device, and a computer storage medium. Background Motion estimation (Motion Estimation) is a widely used technique in video coding and video processing (e.g., deinterlacing). In conventional video coding and decoding techniques, motion estimation is usually performed based on a partition Prediction Unit (PU), and the partition PU is usually directly partitioned according to position information, so that a problem of low accuracy of motion estimation of the PU inevitably occurs when motion estimation is performed. In addition, the conventional video coding and decoding technology generally adopts global motion estimation, so that the global motion estimation is long in time consumption, larger bandwidth support is required, and in addition, the video quality and the video resolution are continuously improved, so that the requirement on bandwidth is larger. Disclosure of Invention The present disclosure addresses the above-described deficiencies of the prior art by providing an image processing method, an electronic device, and a computer storage medium. In a first aspect, an embodiment of the present disclosure provides an image processing method, including: dividing a static area and a suspected motion area from an image frame to be processed; determining motion vector information of each pixel in the suspected motion area, and dividing each pixel into a motion pixel and a static pixel according to the motion vector information of each pixel; Marking the static state of the static pixels and all pixels in the static region, and marking the motion state and the corresponding motion vector information of the motion pixels; And carrying out video encoding and decoding processing on the marked image frames to be processed. In some embodiments, the determining the motion vector information for each pixel in the suspected motion region includes: Dividing the suspected motion area into a plurality of macro blocks which are not overlapped with each other; for each macro block, determining a matching block of the current macro block from a reference frame corresponding to the current macro block; And determining the motion vector information of all pixels in each macro block according to each macro block and the matching block of each macro block. In some embodiments, the determining the motion vector information of all pixels in each of the macro blocks according to each of the macro blocks and the matching blocks of each of the macro blocks includes: and for each macro block, determining a geometric coordinate difference value between the center point of the matching block of the current macro block and the center point of the current macro block, and taking the geometric coordinate difference value as motion vector information of all pixels in the current macro block. In some embodiments, dividing the pixels into motion pixels and still pixels according to the motion vector information of the pixels comprises: And determining pixels which meet preset conditions in the pixels as the static pixels and determining pixels except the static pixels in the pixels as the motion pixels, wherein the preset conditions comprise that motion vector information is zero and the frame difference between a to-be-processed image frame where the pixels are positioned and a reference frame is smaller than a preset threshold value. In some embodiments, the stationary region comprises a background region and a stationary target region, the suspected motion region comprises a motion target region, and the partitioning of the stationary region and the suspected motion region from the image frame to be processed comprises: dividing the image frame to be processed into a foreground region and a background region; Identifying objects in each of the foreground regions; And dividing each foreground region into a static target region and a moving target region according to the targets in each foreground region. In some embodiments, the dividing each of the foreground regions into a stationary target region and a moving target region according to the targets in each of the foreground regions comprises: For any one of the targets in any one of the foreground regions, when detecting that motion exists in the current target, determining a preset range region taking the current target as a center in the current foreground region as the motion target region; and determining the regions except the moving target region in each foreground region as the static target region. In some embodiments, the number of the image frames to be processed is a plurality, and the dividing the stationary region and the suspected motion region from the image frames to be processed comprises: Determining a frame difference between each of the ima