Video image enhancement method and device based on neural network and electronic equipment

By performing data preprocessing and neural network processing on the images from the front-end device, the problem of achieving efficient real-time video image processing on devices with limited computing resources was solved, enabling the deployment of lightweight models and improving image quality.

CN118429202BActive Publication Date: 2026-11-20HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410346660.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2026-11-20
Estimated Expiration
2044-03-25

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve efficient real-time video image processing on devices with limited computing resources, especially in reducing the processing performance requirements of neural networks while maintaining image quality.

Method used

By performing data preprocessing on the images from the front-end device, including block partitioning and pixel filling, the image resolution is reduced, and AI processing is performed using neural networks to generate images suitable for storage or display, thus enabling lightweight model deployment.

Benefits of technology

It reduces the processing performance requirements of neural networks, improves processing efficiency, meets the real-time processing needs of edge devices, and facilitates the deployment of lightweight models and the improvement of image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118429202B_ABST
    Figure CN118429202B_ABST
Patent Text Reader

Abstract

The application provides a neural network-based video image enhancement method and device and electronic equipment, the method comprising: acquiring a first image of a front-end device; the first image comprising at least two types of images; performing data preprocessing on the first image to obtain a second image; using a neural network to perform AI processing on the second image to obtain a third image; wherein the third image is used for storage or display, the number of types of the third image is less than or equal to the number of types of the first image, and the resolution of the third image is equal to or greater than the resolution of the same type of image in the first image, at least one of the number of types of the third image and the number of types of the first image and the resolution of the third image and the resolution of the same type of image in the first image is different. The method can realize neural network-based video image enhancement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image post-processing technology, and in particular to a video image enhancement method, apparatus and electronic device based on neural networks. Background Technology

[0002] Neural networks (NNs) are complex network systems formed by a large number of simple processing units (called neurons) that are widely interconnected. They are highly complex nonlinear dynamic learning systems.

[0003] Image post-processing refers to further processing of image data after encoding, transmission, and decoding, including decompression distortion, noise reduction, and super-resolution, which is usually used to improve the subjective quality of images. Summary of the Invention

[0004] In view of this, this application provides a video image enhancement method, apparatus, and electronic device based on neural networks.

[0005] Specifically, this application is implemented through the following technical solution:

[0006] According to a first aspect of the embodiments of this application, a video image enhancement method based on a neural network is provided, comprising:

[0007] Acquire a first image from the front-end device; the first image includes at least two types of images;

[0008] The first image is preprocessed to obtain a second image; wherein the resolution of the second image is equal to or less than the resolution of the first image, and the number of the second images is greater than or equal to the number of the first images;

[0009] Using a neural network, the second image is processed by AI to obtain a third image; wherein the third image is used for storage or display, the number of types of the third image is less than or equal to the number of types of the first image, and the resolution of the third image is equal to or greater than the resolution of the same type of image in the first image, and at least one of the following is different: the number of types of the third image is different from the number of types of the first image, and the resolution of the third image is different from the resolution of the same type of image in the first image.

[0010] According to a second aspect of the embodiments of this application, a video image enhancement device based on a neural network is provided, comprising:

[0011] An acquisition unit is used to acquire a first image from a front-end device; the first image includes at least two types of images.

[0012] A first processing unit is configured to perform data preprocessing on the first image to obtain a second image; wherein the resolution of the second image is equal to or less than the resolution of the first image, and the number of the second images is greater than or equal to the number of the first images;

[0013] The second processing unit is used to perform AI processing on the second image using a neural network to obtain a third image; wherein the third image is used for storage or display, the number of types of the third image is less than or equal to the number of types of the first image, and the resolution of the third image is equal to or greater than the resolution of the same type of image in the first image, and at least one of the number of types of the third image and the number of types of the first image, and the resolution of the third image and the resolution of the same type of image in the first image is different.

[0014] According to a third aspect of the present application, an electronic device is provided, including a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor being configured to execute the machine-executable instructions to implement the method provided in the first aspect.

[0015] According to a fourth aspect of the embodiments of this application, a machine-readable storage medium is provided, wherein machine-executable instructions are stored therein, and when the machine-executable instructions are executed by a processor, the method provided in the first aspect is implemented.

[0016] According to a fifth aspect of the embodiments of this application, an intelligent device is provided, comprising: a processor, a memory, and a display screen, wherein the memory stores machine-executable instructions executable by the processor, the processor is configured to execute the machine-executable instructions to implement the method provided in the first aspect, and the intelligent device is further configured to display the third image.

[0017] The video image enhancement method based on neural networks in this application involves preprocessing a first image acquired from a front-end device to obtain a second image, and then using a neural network to perform AI processing on the second image to obtain a third image. The third image has a number of image types less than or equal to the number of image types in the first image, and its resolution is equal to or greater than the resolution of similar images in the first image. Furthermore, at least one of the following is different: the number of image types in the third image is different from the number of image types in the second image, and the resolution of the third image is different from the resolution of similar images in the first image. This achieves video image enhancement based on neural networks. In addition, since data preprocessing can support a reduction in image resolution, the resolution of the image data input to the neural network for processing can be reduced. This reduces the processing performance requirements of the neural network and improves its processing efficiency, providing technical support for lightweight model implementation and facilitating model deployment on edge devices. Attached Figure Description

[0018] Figure 1 This is a schematic flowchart of an exemplary embodiment of the present application providing an image enhancement method based on a neural network;

[0019] Figure 2 This is a schematic diagram of the overall process of a video image enhancement scheme based on a neural network provided in an exemplary embodiment of this application;

[0020] Figure 3 This is a schematic diagram illustrating an implementation of data preprocessing provided in an exemplary embodiment of this application;

[0021] Figure 4 This is a schematic diagram illustrating a non-edge block filling implementation provided in an exemplary embodiment of this application;

[0022] Figure 5 This is a schematic diagram illustrating an edge block filling implementation provided in an exemplary embodiment of this application;

[0023] Figure 6 This is a schematic diagram illustrating an implementation of AI processing provided in an exemplary embodiment of this application;

[0024] Figure 7 This is a schematic diagram illustrating another implementation of AI processing provided in an exemplary embodiment of this application;

[0025] Figure 8 This is a schematic diagram illustrating the implementation of image storage provided in an exemplary embodiment of this application;

[0026] Figure 9 This is a schematic diagram illustrating another implementation of AI processing provided in an exemplary embodiment of this application;

[0027] Figure 10 This is a schematic diagram illustrating the implementation of a combined embodiment of AI processing provided in an exemplary embodiment of this application;

[0028] Figure 11 This is a schematic diagram of the structure of an image enhancement device based on a neural network provided in an exemplary embodiment of this application;

[0029] Figure 12 This is a schematic diagram of the hardware structure of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation

[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0031] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0032] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, some terms involved in the embodiments of this application will be explained below.

[0033] 1. Edge AI: Edge AI refers to deploying AI models on edge devices, such as smart terminals (e.g., smartphones or smart set-top boxes), smart conference screens, and AI computing boards (computing boards with AI processing capabilities). This method of performing AI model inference on edge devices helps to perform real-time data processing or decision-making at the data source or in a location "close" to the data, thereby reducing the latency of data transmission between local and cloud environments and lowering network bandwidth requirements.

[0034] For example, to meet the need to deploy AI models on edge devices, it is necessary to develop lightweight, efficient AI models that can adapt to devices with limited computing resources or latency-sensitive tasks.

[0035] 2. Lightweight: Lightweight refers to a neural network model that requires relatively low computational and memory usage during inference while still maintaining a certain level of model performance. Typically, careful design and optimization of the neural network model are needed to obtain a lightweight model that meets performance requirements, allowing for deployment in environments with limited computing resources, such as mobile or embedded devices.

[0036] 3. Post-processing: Video image post-processing refers to further processing of video image data after encoding, transmission, and decoding. This includes decompression, noise reduction, and super-resolution. Post-processing can be implemented through software or hardware devices and is typically used to improve subjective quality.

[0037] 4. Real-time processing: Real-time processing refers to the process where the input data to the network model is transmitted in a streaming manner. Upon receiving the data, the model immediately performs calculations and inferences, and outputs the corresponding inference results within a short time. Real-time processing requires the model to have low latency in inference, enabling it to complete the processing of input data within a limited time.

[0038] For example, for video streaming data, real-time processing typically requires the model to have an inference speed of at least 24 FPS (frames per second).

[0039] 5. Image Tile Partitioning: Tile partitioning divides an image into relatively small rectangular regions, each of which can be processed independently. The purpose of tile partitioning is to allow parallel processing, thereby improving system efficiency.

[0040] To make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions of the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0041] Please see Figure 1 This is a flowchart illustrating an image enhancement method based on a neural network provided in an embodiment of this application, as shown below. Figure 1 As shown, Figure 1 As shown, this neural network-based image enhancement method may include the following steps:

[0042] It should be noted that the neural network-based image enhancement method provided in this application embodiment can be applied to edge devices, such as smart terminals (e.g., smartphones or smart set-top boxes), smart conference screens, smart displays, command displays, AI computing boards (computing boards with AI processing capabilities), etc.

[0043] Step S100: Obtain the first image from the front-end device; wherein the first image includes at least two types of images.

[0044] For example, the front-end device may include, but is not limited to, a camera, tablet, mobile phone or laptop.

[0045] The video image (which may be referred to as the first image) of the front-end device may include, but is not limited to, images captured by the front-end device with image acquisition function, or video images obtained by the front-end device with image display function and screen recording (or screen capture) function through screen recording (or screen capture).

[0046] For example, the first image may include a chroma image and a luminance image; or, the first image may include at least two of a red (R) channel image, a green (G) channel image, and a blue (B) image.

[0047] For example, at least one of the above at least two types of images can be used to generate the same type of output image, while the other images can be used as auxiliary information to enhance the image quality of the output image.

[0048] For example, assuming the second image includes a chroma image and a luminance image, the final output image can be a chroma image, and the luminance image can serve as auxiliary information to enhance the image quality of the chroma image (the final chroma image can be called a chroma image with enhanced color gamut).

[0049] Step S110: Perform data preprocessing on the first image to obtain the second image; wherein the resolution of the second image is equal to or less than the resolution of the first image, and the number of second images is greater than or equal to the number of first images.

[0050] In this embodiment of the application, considering that the first image obtained from the front-end device may not be suitable image data for neural network processing, in order to improve the processing performance of the neural network on image data, the first image can be preprocessed to obtain image data that is more suitable for neural network processing.

[0051] Accordingly, the acquired first image can be preprocessed to obtain preprocessed image data (which can be called the second image).

[0052] For example, data preprocessing of the first image may include, but is not limited to, one or more of the following: reducing the resolution of the first image, performing color space conversion on the first image (e.g., converting the first image from a color space that does not meet the requirements of the neural network to a color space that does meet the requirements of the neural network), and adjusting the pixel value distribution of the first image.

[0053] For example, the resolution of the second image is equal to or less than the resolution of the first image, and the number of second images is greater than or equal to the number of first images.

[0054] For example, the second image includes at least two types of images.

[0055] For example, the second image includes the same number of image types as the first image.

[0056] Step S120: Using a neural network, perform AI processing on the second image to obtain a third image; wherein the third image is used for storage or display, the number of types of the third image is less than or equal to the number of types of the first image, and the resolution of the third image is equal to or greater than the resolution of the same type of image in the first image, and at least one of the number of types of the third image and the number of types of the first image, and the resolution of the third image and the resolution of the same type of image in the first image is different.

[0057] In this embodiment of the application, the second image obtained through data preprocessing can be processed by a neural network to achieve image enhancement and obtain an output image (referred to as the third image in this document) for storage or display.

[0058] For example, the image enhancement described above includes at least color gamut enhancement.

[0059] For example, the third image may include at least one type of image, and the resolution of the third image is equal to or greater than the resolution of the same type of image in the first image.

[0060] For example, assuming the third image includes a luminance image, the resolution of the luminance image in the third image is equal to or greater than the resolution of the luminance image in the first image.

[0061] For example, assuming the third image includes an R channel image, the resolution of the R channel image in the third image is equal to or greater than the resolution of the R channel image in the first image.

[0062] For example, the number of types of the third image is different from the number of types of the first image, and the resolution of the third image is different from the resolution of similar images in the first image, at least one of the following:

[0063] That is, the number of types in the third image is less than the number of types in the first image, and / or, the resolution of the third image is greater than the resolution of similar images in the first image.

[0064] It can be seen that, in Figure 1 In the illustrated method, a second image is obtained by preprocessing the first image acquired from the front-end device. Then, a third image is obtained by using a neural network to perform AI processing on the second image. The number of image types in the third image is less than or equal to the number of image types in the first image, and the resolution of the third image is equal to or greater than the resolution of similar images in the first image. At least one of the following is different: the number of image types in the third image is different from the number of image types in the second image, and the resolution of the third image is different from the resolution of similar images in the first image. This achieves video image enhancement based on a neural network. Furthermore, since data preprocessing can support a reduction in image resolution, the resolution of the image data input to the neural network for processing can be reduced. This reduces the processing performance requirements of the neural network and improves its processing efficiency, providing technical support for lightweight model implementation and facilitating model deployment on edge devices.

[0065] In some embodiments, the above-described data preprocessing of the first image to obtain the second image may include:

[0066] The first image is divided into blocks to obtain multiple image blocks;

[0067] The outer edges of the image blocks are filled with pixels to obtain the second image.

[0068] For example, in order to improve the image processing efficiency of neural networks, the resolution of individual images (image blocks) can be reduced by dividing the image into blocks, thereby improving the image processing efficiency of neural networks.

[0069] Furthermore, considering that after dividing an image into blocks, the image blocks need to be reassembled into a complete image when the image is finally displayed, and the processing paths for edge pixels and non-edge pixels are different when the neural network processes the image, if the image blocks obtained from the block division are directly input into the neural network for processing, the edges of each image block will not be smooth enough when the processed image blocks are stitched together to obtain a complete image, resulting in obvious seams and affecting the image display effect.

[0070] Therefore, in order to avoid obvious seams at the stitching position when image blocks are stitched into a complete image, which would reduce image quality, pixel filling can be applied to the outer edge of the image blocks.

[0071] Accordingly, during the data preprocessing of the first image, the first image can be divided into blocks to obtain multiple image blocks, and the outer edges of the image blocks can be filled with pixels to obtain the second image.

[0072] By dividing an image into blocks, a large-resolution image can be divided into multiple smaller-resolution images. When using neural networks for image processing, this reduces the processing performance requirements of the neural network and improves its processing efficiency. This provides technical support for a more lightweight model implementation, making it easier to deploy the model on edge devices. Consequently, it can improve the processing efficiency of edge devices and meet the real-time processing requirements of large-resolution images in display and control services.

[0073] In one example, for a non-edge block, the pixel value of the filled region is the pixel value of that region in the first image; where a non-edge block is an image block that does not include the boundary of the first image.

[0074] In one example, for an edge block, the pixel values ​​of the filled area on the image boundary side are the pixel values ​​of the image boundary, while the pixel values ​​of the filled area on the non-image boundary side are the pixel values ​​of that area in the first image.

[0075] For example, in order to optimize the image quality of the stitched image, the pixel values ​​in the original image can be used as much as possible during the filling process of the image blocks.

[0076] Accordingly, for image blocks that do not include the boundaries of the first image (which may be called non-edge blocks), the pixel values ​​of the fillable region can be the pixel values ​​of that region in the first image.

[0077] For an image patch (which may be called an edge patch) that includes the boundary of the first image, the pixel value of the filled area on the image boundary side is the pixel value of the image boundary, and the pixel value of the filled area on the non-image boundary side is the pixel value of that area in the first image.

[0078] It should be noted that the block size when dividing the image into blocks, and the fill size when filling the image blocks with pixels, can be configured according to actual needs, but it is necessary to ensure that the resolution of the image block after filling is less than the resolution of the original image.

[0079] In some embodiments, the above-described AI processing of the second image using a neural network may include:

[0080] The second image is transformed to obtain the image transformation result, which includes a fourth image; wherein the resolution of the fourth image is equal to or less than the resolution of the second image, and the number of fourth images is greater than or equal to the number of second images;

[0081] The fourth image is processed using a neural network to obtain the third image.

[0082] For example, in order to further improve the image processing efficiency of neural networks, the second image obtained through data preprocessing can be transformed before being processed by the neural network to obtain the image transformation result.

[0083] For example, the resolution of the input image to a neural network can be reduced through image transformation to improve the processing efficiency of the neural network.

[0084] It should be noted that, unlike block partitioning, in the implementation scheme of reducing image resolution by image transformation, the positional relationship between pixels can be changed, and the pixel values ​​in the image can also change.

[0085] Accordingly, after obtaining the second image in the manner described above, image transformation can be performed on the second image to obtain the image transformation result.

[0086] For example, the image transformation result may include the image after image transformation processing (which may be called the fourth image), and the fourth image may be processed using a neural network to obtain the third image.

[0087] For example, a pre-configured transformation formula can be used to perform image transformation on the second image.

[0088] For example, the image transformation methods may differ for different types of images included in the second image.

[0089] For example, suppose that the second image obtained after data preprocessing includes a green channel image (type 1), a red channel image (type 2), and a blue channel image (type 3). In the image transformation, different image transformation methods are used for the three types of images. After transformation, there should be at least one green channel image with a resolution equal to or less than the resolution of the input green channel image, at least one red channel image with a resolution equal to or less than the resolution of the input red channel image, and at least one blue channel image with a resolution equal to or less than the resolution of the input blue channel image.

[0090] The output of the neural network contains at least one type of image data, which can be a green channel image (type 1) with a resolution equal to or greater than the resolution of type 1 in the preprocessed data, a red channel image (type 2) with a resolution equal to or greater than the resolution of type 2 in the preprocessed data, or a blue channel image (type 3) with a resolution equal to or greater than the resolution of type 3 in the preprocessed data.

[0091] In one example, the image transformation result may also include the target calculation result, which is used to enhance the fourth image;

[0092] The above-mentioned use of a neural network to process the fourth image to obtain the third image may include:

[0093] Using a neural network, the fourth image is enhanced based on the target calculation result to obtain the third image.

[0094] For example, in order to achieve model lightweighting, during the image transformation of the second image, not only can the amount of data processed by the model be reduced by lowering the image resolution, but also some calculations required by the model to achieve image enhancement can be performed in advance, and the calculation results (referred to as target calculation results in this paper) can be used as input data into the model. Thus, the model can obtain the corresponding calculation results without performing related calculation processing.

[0095] For example, edge calculations can be performed on the image input to the model beforehand to obtain the edge calculation results, and then the edge calculation results can be used as the input to the model.

[0096] Accordingly, the image transformation result of the second image can include not only the fourth image, but also the target calculation result.

[0097] After completing the image transformation, a neural network can be used to enhance the fourth image based on the target calculation result, thus obtaining the third image.

[0098] For example, in the embodiments of this application, the resolution of the image input into the neural network is reduced by data preprocessing and image transformation, thereby reducing the processing performance requirements of the neural network model and improving the image processing efficiency of the neural network model, providing technical support for a more lightweight model implementation and facilitating the deployment of the model on edge devices.

[0099] Furthermore, by performing image transformations, some calculations required for image enhancement can be performed in advance, and the calculation results (i.e., the target calculation results mentioned above) can be used as input data into the model. As a result, the model can obtain the corresponding calculation results without performing related calculations, which can also reduce the processing performance requirements of the neural network model and improve the image processing efficiency of the neural network model, providing technical support for a more lightweight model implementation.

[0100] In some embodiments, the second image includes a luminance image and a chrominance image;

[0101] The above-mentioned AI processing of the second image using neural networks may include:

[0102] Based on the luminance image in the second image, a neural network is used to perform image enhancement processing on the chrominance image in the second image to obtain the enhanced chrominance image.

[0103] For example, considering that image data from a front-end device typically needs to be compressed before being displayed on a display device, and that compression can cause distortion, in order to optimize the display effect, the image can be decompressed and distorted before being displayed.

[0104] For example, the second image obtained by processing in the above manner may include a luminance image and a chrominance image. During the AI ​​processing, based on the luminance image included in the second image, a neural network can be used to perform image enhancement processing on the chrominance image in the second image to obtain an enhanced chrominance image, thereby achieving color gamut enhancement for video images and restoring image distortion caused by compression.

[0105] In some embodiments, a second image corresponds to an image block obtained by dividing a first image into blocks;

[0106] The above-mentioned AI processing of the second image using neural networks may include:

[0107] The second images are enhanced using a neural network, and the enhanced second images are output. The resolution of the enhanced second images is consistent with the resolution of the image blocks obtained by dividing the first image into blocks. Based on the width of each image block, the storage start address of each image block, and the storage span, the serial image data corresponding to each enhanced second image is stored in the same designated storage device. The pixel values ​​in the same image are arranged in the designated storage device in order from left to right and from top to bottom according to the pixel position.

[0108] For example, if the image has been divided into blocks before AI processing, during the storage of image data, the pixel values ​​of each image block in the storage device can be arranged in the same order as the pixel values ​​in the image before block division, so as to improve the display efficiency when displaying images based on stored image data.

[0109] Accordingly, for the second image obtained from data preprocessing, a neural network can be used to enhance each second image (each image block can correspond to a second image) to obtain the enhanced second image.

[0110] For example, the resolution of the enhanced second image is consistent with the resolution of the image blocks obtained by dividing the first image into blocks.

[0111] During the storage of the serial image data corresponding to each enhanced second image, the serial image data corresponding to each enhanced second image can be stored in the same designated storage device according to the width of each image block, the storage start address of each image block, and the storage span, so that the pixel values ​​in the same image are arranged in the designated storage device in the order of pixel position from left to right and from top to bottom.

[0112] In one example, the second image is obtained by padding the image patches with pixels outside the boundaries.

[0113] The above-mentioned enhancement processing of each second image using a neural network and outputting the enhanced second image may include:

[0114] The second images are enhanced using a neural network, and the pixel values ​​of the filled regions in each second image are removed to obtain the enhanced second images.

[0115] For example, considering that the processing paths for edge pixels and non-edge pixels are different when a neural network processes an image, if the image blocks obtained by block division are directly input into the neural network for processing, when the processed image blocks are stitched together to obtain a complete image, the edge positions of each image block will not be smooth enough, and there will be obvious stitching seams, which will affect the image display effect.

[0116] Therefore, in order to avoid obvious seams at the stitching position when image blocks are stitched into a complete image, which would reduce image quality, pixel filling can be applied to the outer edge of the image blocks.

[0117] When the second image is obtained by filling the outer edges of image blocks with pixels, the pixels filled on the outer edges can be processed together during the enhancement of the second image using a neural network. After processing, the pixel values ​​of each filled area of ​​the second image can be removed during the image output process so that the resolution of the enhanced image block is consistent with the resolution of the image block obtained by block division.

[0118] In one example, storing the serial image data corresponding to each enhanced second image to the same designated storage device based on the width of each image block, the storage start address of each image block, and the storage span can include:

[0119] For any enhanced second image block, the serial image data corresponding to the enhanced second image is stored according to the storage start address of the image block corresponding to the enhanced second image;

[0120] When the number of pixel values ​​stored each time is consistent with the width of the image block, the storage span is added to the current storage starting address of the image block to obtain a new storage starting address. The remaining pixel values ​​in the serial image data corresponding to the enhanced second image are then stored according to the new storage starting address until all pixel values ​​have been stored.

[0121] The storage span is consistent with the width of the image before block partitioning, and the starting address of the image block is determined based on the position of the top-left pixel value of the image block in the image before block partitioning.

[0122] For example, in order to arrange the pixel values ​​in the same image in a specified storage device according to the pixel position from left to right and from top to bottom, during the storage of the serial image data corresponding to each enhanced second image, the storage start address of each image block can be determined according to the position of the pixel value of the upper left corner of each image block in the image before block division.

[0123] For example, for image block i and image block j (assuming image block j follows image block i, and the image blocks are ordered from left to right and from top to bottom), the starting storage address of image block j is equal to the starting storage address of image block i, the width of image block i, and the width of the image blocks between image block i and image block j (if any).

[0124] For example, suppose an image is divided into image block 1 and image block 2, then the starting address of image block 2 is the sum of the width of image block 1.

[0125] Assuming the image block is divided into image block 1 to image block 4 (arranged in order from left to right and from top to bottom), then the starting address of the storage of image block 4 = the starting address of the storage of image block 1 + the width of image block 1 + the width of image block 2 + the width of image block 3 = the starting address of the storage of image block 2 + the width of image block 2 + the width of image block 3 = the starting address of the storage of image block 3 + the width of image block 3.

[0126] In addition, to ensure that the pixel values ​​in the same row of the image before block partitioning are in continuous position in the storage space, a storage span can be set according to the width of the image before block partitioning. During the storage of serial image data corresponding to any image block, when storing a number of pixel values ​​that are consistent with the width of the image block, a new storage starting address needs to be determined according to the current storage starting address of the image block and the storage span.

[0127] Accordingly, during the storage of serial image data corresponding to each enhanced second image, for any enhanced second image, the serial image data corresponding to the enhanced second image can be stored according to the storage start address of the image block corresponding to the enhanced second image; when the number of pixel values ​​stored each time is consistent with the width of the image block, the storage span is added to the current storage start address of the image block to obtain a new storage start address, and the remaining pixel values ​​in the serial image data corresponding to the enhanced second image are stored according to the new storage start address until all pixel values ​​are stored.

[0128] In some embodiments, the above-described data preprocessing of the first image to obtain the second image may include:

[0129] According to the first strategy, the pixel value distribution of the first image is adjusted to obtain the second image; wherein, the pixel value distribution adjustment includes pixel value scaling and / or offset;

[0130] The above-mentioned use of neural networks to perform AI processing on the second image to obtain the third image may include:

[0131] The second image is enhanced using a neural network to obtain the fifth image;

[0132] According to the second strategy, the pixel value distribution of the fifth image is adjusted; wherein the adjustment direction of the second strategy is opposite to that of the first strategy.

[0133] For example, considering that the pixel value range of the image data obtained by the front-end device in the actual scenario may differ from the pixel value range that the neural network supports processing, in order to avoid abnormal image data processing by the neural network, the pixel value distribution of the image data of the front-end device can be adjusted during the data preprocessing process of the image data of the front-end device.

[0134] For example, the image data of the front-end device is usually an 8-bit image with pixel values ​​ranging from 0 to 255. However, the neural network may not be compatible with the data distribution of 0 to 255 and needs to be scaled to 0 to 1, or offset to -127 to 128.

[0135] Accordingly, for the first image obtained from the front-end device, the pixel value distribution of the first image can be adjusted according to a preset strategy (which can be called the first strategy) to obtain the second image.

[0136] For example, pixel value distribution adjustment may include pixel value scaling and / or offsetting.

[0137] For example, in the process of using a neural network to perform AI processing on the second image, the neural network can be used to enhance the second image to obtain an enhanced image (which can be called the fifth image), and the pixel value distribution of the fifth image can be adjusted according to the second strategy to obtain the second image.

[0138] For example, the adjustment direction of the second strategy is opposite to that of the first strategy.

[0139] For example, assuming the first strategy includes offsetting the pixel value by -127, shifting the pixel value range from 0 to 255 by -127 to 128, then the second strategy may include offsetting the pixel value by 127, restoring the pixel value range from -127 to 128 back to 0 to 255.

[0140] For example, suppose the first strategy includes shrinking the range of pixel values ​​from 0 to 255 to 0 to 1 (i.e., the scaling direction is shrinking and the scaling scale is 255, which can also be called normalization), then the second strategy may include expanding the range of pixel values ​​from 0 to 1 to 0 to 255 (i.e., the scaling direction is expanding and the scaling scale is 255, which can also be called anti-normalization).

[0141] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, the technical solutions provided in the embodiments of this application are described below with reference to specific examples.

[0142] Example 1

[0143] like Figure 2 The diagram shown is a schematic representation of the overall process of a video image enhancement scheme based on a neural network, as provided in an embodiment of this application. Figure 2 As shown, the acquired front-end data stream (video image data from the front-end device) can be preprocessed and processed by AI to obtain enhanced image data for storage / display.

[0144] For example, the AI ​​processing steps should include necessary configuration information to control the selection or judgment of AI processing.

[0145] For example, the AI ​​processing includes at least one convolutional neural network model, which contains at least one convolutional layer and one activation layer.

[0146] For example, the input to the AI ​​processing step is preprocessed image data, which should include at least two classes (or three channels) of image data, such as luminance (Luma) data and chroma (Chroma) data, or red (R) channel data, green (G) channel data and blue (B) channel data.

[0147] For example, the output of the AI ​​processing step is image data for display or storage. This data should contain at least one class (or one channel) of image data, which may be luminance (Luma) data, chroma (Chroma) data, red channel (R) data, green channel (G) data, or blue channel (B) data, and the resolution of the output image data should be equal to or greater than the resolution of its corresponding input image data.

[0148] For example, if the output of the AI ​​processing step is luminance (Luma) data, its resolution should be equal to or greater than its input luminance (Luma) data; or if the output is green (G) channel data, its resolution should be equal to or greater than its input green (G) channel data.

[0149] For example, the data preprocessing step should have the necessary configuration information to control the selection or judgment in that step.

[0150] For example, the input to the data preprocessing step is the image data obtained from the front end, which should contain at least two types (or three channels) of image data, which can be luminance (Luma) data and chroma (Chroma) data, or red (R) channel data, green (G) channel data and blue (B) channel data.

[0151] The specific implementations of data preprocessing and AI processing are explained below.

[0152] 1. Data preprocessing

[0153] 1.1 Example 2

[0154] Data preprocessing for the front-end data stream can include color space conversion.

[0155] For example, the color space of the image data in the front-end data stream may be different from the color space required by the AI ​​processing steps. Therefore, it is necessary to perform color space transformation on the image data obtained from the front end.

[0156] For example, the number of images and the image resolution are the same before and after the color space transformation, and the configuration information includes at least the color space transformation formula.

[0157] For example, the RGB color space image data obtained from the front end can be transformed into YUV color space image data according to a formula, or the YUV color space image data obtained from the front end can be transformed into RGB color space data according to a formula.

[0158] 1.2, Example 3

[0159] Data preprocessing of the front-end data stream can include pixel value distribution adjustment.

[0160] For example, the pixel value distribution of the front-end data stream may be different from the pixel value distribution required by the AI ​​processing steps. Therefore, the pixel value distribution of the image data obtained by the front end needs to be adjusted.

[0161] For example, the pixel value distribution of the image data obtained from the front end can be scaled or shifted.

[0162] For example, the number of images and the image resolution are the same before and after the image pixel value conversion.

[0163] For example, the pixel value distribution adjustment configuration information includes at least a conversion formula.

[0164] For example, the conversion formula can be:

[0165] X2 = scale * X1 + offset

[0166] Where X2 is the converted pixel value, X1 is the original pixel value, scale is the scaling factor, and offset is the offset.

[0167] For example, the pixel value distribution of the image data obtained by the front end can be scaled from 0 to 255 to 0 to 1, or the pixel value distribution of the image data obtained by the front end can be shifted from 0 to 255 to -127 to 128.

[0168] 1.3, Example 4

[0169] Data preprocessing of the front-end data stream can include compressed encoding for transmission.

[0170] For example, such as Figure 3 As shown, the image data acquired by the front end can be compressed and encoded, and then transmitted to the storage / display end. When the storage / display end receives the compressed and encoded image data, it can decode the image data and send it to the AI ​​processing step.

[0171] For example, the number of images and the image resolution should remain the same before and after image encoding and decoding.

[0172] For example, the configuration information should include at least one video or image encoding standard, such as H.264, H.265, or JPEG.

[0173] 1.4, Example 5

[0174] For example, data preprocessing of the front-end data stream may include image tile partitioning (which may be called block partitioning).

[0175] For example, the image data obtained from the front end is divided into blocks to obtain several square or rectangular image blocks as output.

[0176] For example, an image patch includes edge patches and non-edge patches; wherein, an edge patch is an image patch containing the boundary of the image before partitioning, and a non-edge patch is an image patch not containing the boundary of the image before partitioning.

[0177] It should be noted that if the number of image blocks is one, the resolution of the images before and after the division should be the same.

[0178] For example, when there are multiple image blocks, the area around these blocks should be padded with pixels. The size of the padded area is specified by the input configuration information, and the resolution of the padded blocks should be smaller than the resolution of the original image.

[0179] For example, the configuration information includes at least the partition size and the padding size.

[0180] For example, such as Figure 4 As shown, for non-edge blocks, the pixel values ​​of the filled area should be the pixel values ​​of the original image in that area.

[0181] For example, such as Figure 5 As shown, for edge blocks, the pixel values ​​of the image boundary-filled region are the pixel values ​​of that boundary, while the pixel values ​​of the non-image boundary-filled region are the pixel values ​​of the original image in that region.

[0182] It should be noted that, in the embodiments of this application, the above data preprocessing embodiments can be combined to form new embodiments according to actual needs.

[0183] For example, combining Embodiment 2 and Embodiment 3 yields a new embodiment, namely, performing color space conversion and pixel value distribution adjustment on the front-end data stream.

[0184] The combination of Example 2 and Example 5 yields a new example, which involves color space conversion and tile division of the front-end data stream.

[0185] The combination of Examples 2, 3, and 5 yields a new example, which involves color space conversion, pixel value distribution adjustment, and tile division of the front-end data stream.

[0186] 2. AI processing

[0187] Example 6

[0188] For example, AI processing may include image transformation processing.

[0189] For example, such as Figure 6 As shown, the input data is transformed into an image and then fed into a neural network model (also known as an AI model) for processing. The output data is the image data used for storage or display.

[0190] For example, the configuration information includes at least information constraining the image transformation.

[0191] For example, in image transformation processing, the input image (i.e., the output data of data preprocessing (which can be called preprocessing data)) includes at least two types of image data.

[0192] For example, in image transformation processing, the resolution of the output image is equal to or less than the resolution of the input image, and the number of output images is equal to or greater than the number of input images.

[0193] For example, in image transformation processing, the transformation formula is given by the configuration file, and different data transformations are used for different types of image data.

[0194] For example, in AI model processing, the input image (i.e. the image transformation output image) includes at least two types of image data.

[0195] In AI model processing, the output image must include at least one type of image data, and the resolution of the output image must be equal to or greater than the resolution of the preprocessed data.

[0196] For example, suppose the preprocessing data includes a green channel image (type 1), a red channel image (type 2), and a blue channel image (type 3). In the image transformation, different image transformation methods are used for the three types of images. After transformation, there should be at least one green channel image with a resolution equal to or less than the resolution of the input green channel image, at least one red channel image with a resolution equal to or less than the resolution of the input red channel image, and at least one blue channel image with a resolution equal to or less than the resolution of the input blue channel image.

[0197] For example, the output of the AI ​​model contains at least one type of image data, which may be a green channel image (first type) with a resolution equal to or greater than the resolution of the first type in the preprocessed data, or a red channel image (second type) with a resolution equal to or greater than the resolution of the second type in the preprocessed data, or a blue channel image (third type) with a resolution equal to or greater than the resolution of the third type in the preprocessed data.

[0198] Example 7

[0199] For example, AI processing may include image storage processing.

[0200] For example, such as Figure 7 As shown, the input data is processed by the AI ​​model and then sent to the image storage step for further processing. The output data is the image data used for storage.

[0201] like Figure 7 As shown, assume the input data includes serial image data of N image blocks (image block A, image block B, ..., image block N), where the serial image data of image block A is A1A1…A1A2A2…A2…AhAh…Ah (where A1 is the data of the first row of image block A, and Ah is the data of the h-th row of image block A (h is the height of image block A, the same below), the serial image data of image block B is B1B1…B1B2B2…B2…BhBh…Bh, and the serial image data of image block A of image block N is N1N1…N1N2N2…N2…NhNh…Nh. After the above input data is enhanced by an AI model (as shown in the convolutional neural network model), the enhanced serial image data is output.

[0202] The image storage / display module can store the enhanced serial image data corresponding to each image block to the same designated storage device (as shown in the figure) according to the specified storage rules.

[0203] Assuming that each image block is arranged horizontally, the storage order of the serial image data of each image block in the storage / display device is as follows: A1 A1…A1 B1B1…B1…N1N1…N1 A2A2…A2B2B2…B2…N2N2…N2…AhAh…Ah BhBh…Bh NhNh…Nh, that is, after storing the first row of data of each image block in sequence, the second row of data of each image block is stored in sequence, and so on, and finally the nth row of data of each image block is stored in sequence (in the image data stored in the storage / display device, the pixel values ​​of each image are arranged in the order of the pixel position in the original image from left to right and from top to bottom).

[0204] For example, the configuration information includes at least the span information of the constrained image storage and the starting address of the storage.

[0205] For example, the AI ​​model includes at least one convolutional neural network model, which includes at least one convolutional layer and one activation layer.

[0206] For example, in an AI model, the input data includes at least two types of image data.

[0207] For example, in an AI model, the output image includes at least one type of image data, and the resolution of the output image is equal to or greater than the resolution of the preprocessed data.

[0208] For example, in the image storage step, the input data (i.e., the output data of the AI ​​model) is a serial image data stream. The image storage step rearranges the serial image data stream according to certain rules and stores it on a medium (such as a hard disk) for easy access and reading by subsequent display devices.

[0209] For example, in the image storage step, the output data is image data arranged according to certain rules, and the processing method (arrangement rules) is constrained by configuration information.

[0210] For example, the configuration information should at least include storage span information and storage start address.

[0211] like Figure 8 As shown, suppose the image is divided into two tiles. These two tiles are first processed by the AI ​​model, and then stored on the medium through the image storage step. The AI ​​model contains two convolutional neural network models, which process the two tiles respectively.

[0212] Assume the width of tile A is w A The starting address for storage is add. A The width of Tile B is w B The starting address for storage is add. B The storage span is stride, and it satisfies addB =add A +w A stride = w A +w B The specific storage method is as follows:

[0213] When storing tile A, start from the storage address: add A Initially, store one row of data for tile A each time (w A (one data item), then store the starting address add A Adding the stride, we obtain the new starting address for storage, and then continue storing the next row of data for tileA (w A (h rows of data) until h rows are stored (h is the height of the tile);

[0214] When storing tile B, start from the starting address: add B Initially, store one row of data from tile B each time (w B (one data item), then store the starting address add B Adding the stride, we obtain the new starting address for storage, and then continue storing the next row of data for tile B (w B (data), until h rows are stored.

[0215] Using the storage method described above, the two tiles divided in the preprocessing can be reassembled into the image before division (the size and shape of the image are restored to what they were before division, but the image data has already been processed by the AI ​​model).

[0216] like Figure 8 As shown, the serial image data corresponding to tile A is A1A1…A1A2A2…A2…AhAh…Ah, and the serial image data corresponding to tile B is B1B1…B1B2B2…B2…BhBh…Bh.

[0217] After the convolutional neural network model 1 enhances the serial image data of tileA, it can store it in a specified storage device. The storage rule is as follows: data is stored according to the initial storage address. After storing one row of data, the storage span is added to the current storage starting address to obtain a new storage starting address. Then, the next row of data is stored until all data is stored.

[0218] After enhancing the serial image data of tileB using convolutional neural network model 2, the data can be stored in the same designated storage device. The storage rule is as follows: data is stored according to the initial storage address. After storing one row of data, the storage span is added to the current storage starting address to obtain a new storage starting address. Then, the next row of data is stored until all data is stored.

[0219] The image data stored in the above manner is arranged in the following order in the specified storage device: A1A1…A1B1B1…B1A2A2…A2B2B2…B2…AhAh…Ah B2…BhBh…Bh.

[0220] It should be noted that the above only shows the storage method for two tiles, but by configuring the specific storage address and storage span, this method can also be easily extended to the case of storing multiple tiles. The specific implementation will not be elaborated here.

[0221] 2.3, Example 8

[0222] For example, AI processing may include image display processing.

[0223] like Figure 9 As shown, the input data is processed by the AI ​​model and then sent to the image display step for further processing. The output data is the image data used for display.

[0224] For example, the configuration information includes at least information on changing the image pixel value scale and shifting the image pixel value offset.

[0225] For example, in AI model processing, the input data includes at least two types of image data.

[0226] For example, in AI model processing, the output image includes at least one type of image data, and the resolution of the output image is equal to or greater than the resolution of the preprocessed data.

[0227] For example, in image display processing, the input image (i.e., the output data of the AI ​​model) includes at least one type of image data.

[0228] For example, in image display processing, the output data is image data (e.g., an 8-bit image) for the display device, and the processing method is constrained by configuration information.

[0229] For example, different types of image data can be processed in different ways.

[0230] For example, the configuration information should at least contain information constraining image display processing.

[0231] For example, the AI ​​model outputs data in the range of -0.5 to 0.5. The configuration information includes two parameters: Scale = 255 and Offset = 128. The pixel value distribution of the image data output after image display processing can be restored to 0 to 255.

[0232] It should be noted that, in the embodiments of this application, the above AI processing embodiments can be combined to form new embodiments according to actual needs.

[0233] For example, such as Figure 10 As shown, embodiments six to eight can be combined to obtain new embodiments. In these embodiments, the preprocessed data can be processed by image transformation, image storage, and image display in the manner described in embodiments six to eight.

[0234] The method provided in this application has been described above. The apparatus provided in this application is described below:

[0235] Please see Figure 11 This is a schematic diagram of the structure of a video image enhancement device based on a neural network provided in an embodiment of this application, as shown below. Figure 11 As shown, the neural network-based video image enhancement device may include:

[0236] The acquisition unit 1110 is used to acquire a first image from the front-end device; the first image includes at least two types of images.

[0237] The first processing unit 1120 is used to perform data preprocessing on the first image to obtain a second image; wherein the resolution of the second image is equal to or less than the resolution of the first image, and the number of the second images is greater than or equal to the number of the first images;

[0238] The second processing unit 1130 is used to perform AI processing on the second image using a neural network to obtain a third image; wherein the third image is used for storage or display, the number of types of the third image is less than or equal to the number of types of the first image, and the resolution of the third image is equal to or greater than the resolution of the same type of image in the first image, and at least one of the number of types of the third image and the number of types of the first image, and the resolution of the third image and the resolution of the same type of image in the first image is different.

[0239] In some embodiments, the first processing unit 1120 performs data preprocessing on the first image to obtain a second image, including:

[0240] The first image is divided into blocks to obtain multiple image blocks;

[0241] The outer edge of the image block is filled with pixels to obtain the second image.

[0242] In some embodiments, for non-edge blocks, the pixel value of the filled region is the pixel value of that region in the first image; wherein, a non-edge block is an image block that does not include the boundary of the first image;

[0243] And / or,

[0244] For edge blocks, the pixel values ​​of the filled region on the image boundary side are the pixel values ​​of the image boundary, and the pixel values ​​of the filled region on the non-image boundary side are the pixel values ​​of that region in the first image.

[0245] In some embodiments, the second processing unit 1130 utilizes a neural network to perform AI processing on the second image, including:

[0246] The second image is transformed to obtain an image transformation result, which includes a fourth image; wherein the resolution of the fourth image is equal to or less than the resolution of the second image, and the number of fourth images is greater than or equal to the number of second images;

[0247] The fourth image is processed using a neural network to obtain the third image.

[0248] In some embodiments, the image transformation result further includes a target calculation result, which is used to enhance the fourth image;

[0249] The second processing unit 1130 uses a neural network to process the fourth image to obtain the third image, including:

[0250] Using a neural network, the fourth image is enhanced based on the target settlement result to obtain the third image.

[0251] In some embodiments, the image transformation methods for different types of images in the second image are different.

[0252] In some embodiments, the second image includes a luminance image and a chrominance image;

[0253] The second processing unit 1130 uses a neural network to perform AI processing on the second image, including:

[0254] Based on the luminance image in the second image, a neural network is used to perform image enhancement processing on the chrominance image in the second image to obtain an enhanced chrominance image.

[0255] In some embodiments, a second image corresponds to a first image which is divided into blocks to obtain an image block;

[0256] The second processing unit 1130 uses a neural network to perform AI processing on the second image, including:

[0257] The second images are enhanced using a neural network, and the enhanced second images are output; wherein the resolution of the enhanced second images is consistent with the resolution of the image blocks obtained by dividing the first image into blocks;

[0258] Based on the width of each image block, the storage start address of each image block, and the storage span, the serial image data corresponding to each enhanced second image is stored in the same designated storage device; wherein, the pixel values ​​of each image are arranged in the designated storage device in order from left to right and from top to bottom according to the pixel position.

[0259] In some embodiments, where the second image is obtained by filling the image blocks with pixels outside their boundaries.

[0260] The second processing unit 1130 uses a neural network to enhance each second image and outputs the enhanced second image, including:

[0261] The second images are enhanced using a neural network, and the pixel values ​​of the filled regions in each second image are removed to obtain the enhanced second images.

[0262] In some embodiments, the second processing unit 1130 stores the serial image data corresponding to each enhanced second image into the same designated storage device according to the width of each image block, the storage start address of each image block, and the storage span, including:

[0263] For any enhanced second image, the serial image data corresponding to the enhanced second image is stored according to the storage start address of the image block corresponding to the enhanced second image;

[0264] When the number of pixel values ​​stored each time is consistent with the width of the image block, the storage span is added to the current storage starting address of the image block to obtain a new storage starting address. The remaining pixel values ​​in the serial image data corresponding to the enhanced second image are then stored according to the new storage starting address until all pixel values ​​have been stored.

[0265] The storage span is consistent with the width of the image before block partitioning, and the storage starting address of the image block is determined based on the position of the top-left pixel value of the image block in the image before block partitioning.

[0266] In some embodiments, the first processing unit 1120 performs data preprocessing on the first image to obtain a second image, including:

[0267] According to the first strategy, the pixel value distribution of the first image is adjusted to obtain the second image; wherein, the pixel value distribution adjustment includes pixel value scaling and / or offset;

[0268] The second processing unit 1130 uses a neural network to perform AI processing on the second image to obtain a third image, including:

[0269] The second image is enhanced using the neural network to obtain the fifth image;

[0270] According to the second strategy, the pixel value distribution of the fifth image is adjusted to obtain the second image; wherein the adjustment direction of the second strategy is opposite to the adjustment direction of the first strategy.

[0271] This application provides an electronic device including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the neural network-based video image enhancement method described above.

[0272] Please see Figure 12 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device may include a processor 1201 and a memory 1202 storing machine-executable instructions. The processor 1201 and the memory 1202 can communicate via a system bus 1203. Furthermore, by reading and executing the machine-executable instructions in the memory 1202 corresponding to the neural network-based video image enhancement logic, the processor 1201 can execute the neural network-based video image enhancement method described above.

[0273] The memory 1202 mentioned in this document can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0274] In some embodiments, a machine-readable storage medium, such as Figure 12The memory 1202 in the machine-readable storage medium stores machine-executable instructions, which, when executed by a processor, implement the neural network-based video image enhancement method described above. For example, the storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.

[0275] This application provides an intelligent device including a processor, a memory, and a display screen. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the neural network-based video image enhancement method described above. The intelligent device is also used to display the third image.

[0276] For example, the processor described above includes a processor with AI processing capabilities, such as a neural network processor.

[0277] For example, the aforementioned display screen may include, but is not limited to, LED (Light Emitting Diode) creative display screens, LED displays, LCD (Liquid Crystal Display) displays, or LCD splicing screens.

[0278] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0279] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A video image enhancement method based on neural networks, characterized in that, include: Acquire the first image from the front-end device; The first image includes at least two types of images; The first image is preprocessed to obtain a second image; wherein the resolution of the second image is equal to or less than the resolution of the first image, and the number of the second images is greater than or equal to the number of the first images; Using a neural network, the second image is processed by AI to obtain a third image; wherein, the third image is used for storage or display, the number of types of the third image is less than or equal to the number of types of the first image, and the resolution of the third image is equal to or greater than the resolution of the same type of image in the first image, and at least one of the number of types of the third image and the number of types of the first image, and the resolution of the third image and the resolution of the same type of image in the first image, is different; the AI ​​processing is used to achieve image enhancement; The step of performing data preprocessing on the first image to obtain the second image includes: The first image is divided into blocks to obtain multiple image blocks; The outer edges of the image blocks are filled with pixels to obtain the second image; For non-edge blocks, the pixel values ​​of the filled region are the pixel values ​​of that region in the first image; where a non-edge block is an image block that does not include the boundary of the first image; And / or, For edge blocks, the pixel values ​​of the filled region on the image boundary side are the pixel values ​​of the image boundary, and the pixel values ​​of the filled region on the non-image boundary side are the pixel values ​​of that region in the first image.

2. The method according to claim 1, characterized in that, The AI ​​processing of the second image using a neural network includes: The second image is transformed to obtain an image transformation result, which includes a fourth image; wherein the resolution of the fourth image is equal to or less than the resolution of the second image, and the number of fourth images is greater than or equal to the number of second images; The fourth image is processed using a neural network to obtain the third image.

3. The method according to claim 2, characterized in that, The image transformation result also includes the target calculation result, which is used to enhance the fourth image; The process of using a neural network to process the fourth image to obtain the third image includes: Using a neural network, the fourth image is enhanced based on the target settlement result to obtain the third image.

4. The method according to claim 2, characterized in that, The image transformation methods for different types of images in the second image are different.

5. The method according to claim 1, characterized in that, The second image includes a luminance image and a chrominance image; The AI ​​processing of the second image using a neural network includes: Based on the luminance image in the second image, a neural network is used to perform image enhancement processing on the chrominance image in the second image to obtain an enhanced chrominance image.

6. The method according to claim 1, characterized in that, A second image is divided into blocks to obtain an image block; The AI ​​processing of the second image using a neural network includes: The second images are enhanced using a neural network, and the enhanced second images are output; wherein the resolution of the enhanced second images is consistent with the resolution of the image blocks obtained by dividing the first image into blocks; Based on the width of each image block, the storage start address of each image block, and the storage span, the serial image data corresponding to each enhanced second image is stored in the same designated storage device; wherein, the pixel values ​​of each image are arranged in the designated storage device in order from left to right and from top to bottom according to the pixel position.

7. The method according to claim 6, characterized in that, In the case where the second image is obtained by filling the outer pixels of the image block,... The step of using a neural network to enhance each second image and outputting the enhanced second image includes: The second images are enhanced using a neural network, and the pixel values ​​of the filled regions in each second image are removed to obtain the enhanced second images.

8. The method according to claim 7, characterized in that, The step of storing the serial image data corresponding to each enhanced second image into the same designated storage device according to the width of each image block, the storage start address of each image block, and the storage span includes: For any enhanced second image, the serial image data corresponding to the enhanced second image is stored according to the storage start address of the image block corresponding to the enhanced second image; When the number of pixel values ​​stored each time is consistent with the width of the image block, the storage span is added to the current storage starting address of the image block to obtain a new storage starting address. The remaining pixel values ​​in the serial image data corresponding to the enhanced second image are then stored according to the new storage starting address until all pixel values ​​have been stored. The storage span is consistent with the width of the image before block partitioning, and the storage starting address of the image block is determined based on the position of the top-left pixel value of the image block in the image before block partitioning.

9. The method according to claim 1, characterized in that, The step of performing data preprocessing on the first image to obtain the second image includes: According to the first strategy, the pixel value distribution of the first image is adjusted to obtain the second image; wherein, the pixel value distribution adjustment includes pixel value scaling and / or offset; The process of using a neural network to perform AI processing on the second image to obtain a third image includes: The second image is enhanced using the neural network to obtain the fifth image; According to the second strategy, the pixel value distribution of the fifth image is adjusted to obtain the second image; wherein the adjustment direction of the second strategy is opposite to the adjustment direction of the first strategy.

10. A video image enhancement device based on a neural network, characterized in that, include: An acquisition unit is used to acquire a first image from a front-end device; the first image includes at least two types of images. A first processing unit is configured to perform data preprocessing on the first image to obtain a second image; wherein the resolution of the second image is equal to or less than the resolution of the first image, and the number of the second images is greater than or equal to the number of the first images; The second processing unit is used to perform AI processing on the second image using a neural network to obtain a third image; wherein the third image is used for storage or display, the number of types of the third image is less than or equal to the number of types of the first image, and the resolution of the third image is equal to or greater than the resolution of similar images in the first image, and at least one of the number of types of the third image being different from the number of types of the first image, and the resolution of the third image being different from the resolution of similar images in the first image; the AI ​​processing is used to achieve image enhancement; The first processing unit performs data preprocessing on the first image to obtain a second image, including: The first image is divided into blocks to obtain multiple image blocks; The outer edges of the image blocks are filled with pixels to obtain the second image; For non-edge blocks, the pixel values ​​of the filled region are the pixel values ​​of that region in the first image; where a non-edge block is an image block that does not include the boundary of the first image; And / or, For edge blocks, the pixel values ​​of the filled region on the image boundary side are the pixel values ​​of the image boundary, and the pixel values ​​of the filled region on the non-image boundary side are the pixel values ​​of that region in the first image.

11. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method as described in any one of claims 1-9.

12. An intelligent device, characterized in that, include: The device includes a processor, a memory, and a display screen, wherein the memory stores machine-executable instructions that can be executed by the processor, the processor being configured to execute the machine-executable instructions to implement the method as described in any one of claims 1-9, and the intelligent device is further configured to display the third image.

Citation Information

Patent Citations

  • Image processing method, electronic device and readable medium thereof

    CN113298712A