Image dithering method and device, electronic equipment, storage medium and chip
By using preset time domain values and threshold matrix to enhance preprocessing and jitter processing on the image in the image jitter algorithm, the problem of unsatisfactory image jitter effect in the prior art is solved, and a higher quality image display and jitter effect are achieved .
Patent Information
- Application Number
- CN202310955212.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
When the image jitter algorithm in the prior art reduces the color depth or grayscale level, it cannot effectively retain the visual information of the original image, resulting in unsatisfactory image quality after processing.
By acquiring at least one frame of input image, enhancing preprocessing of the image using preset time domain values, and jittering the image based on the preset threshold matrix to obtain the output image. This method combines time domain values and threshold matrix to enhance the display quality and jitter randomness of the image.
Improves the display quality and jitter randomness of the image, and enhances the visual performance of the image when the color or grayscale level is limited.
Smart Images

Figure CN119450217A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to an image jitter method, device, electronic device, storage medium and chip. Background Art
[0002] The image dithering algorithm is a method to preserve the visual information of the original image as much as possible while reducing the color depth or grayscale. After the image dithering process, more colors or grayscale levels can be simulated when the color or grayscale level of the image is limited, thereby improving the visual quality of the image. The image dithering algorithms in the related art include random dithering, ordered dithering and error diffusion, etc., but the quality of the images processed by the above image dithering algorithms is not ideal. Summary of the invention
[0003] The present disclosure provides an image jitter method, device, electronic device, storage medium and chip to solve the problems in the related art.
[0004] A first aspect of the present disclosure provides an image jitter method, the method comprising:
[0005] Obtain at least one frame of input image;
[0006] Performing enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to obtain a preprocessed image corresponding to each input image frame;
[0007] Based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix, an output image corresponding to each frame of the input image is obtained.
[0008] In some embodiments, the image jitter method further includes:
[0009] Based on the second preset time domain value and the frame sequence number of each frame of the input image, the first preset time domain value corresponding to each frame of the input image is obtained.
[0010] In some embodiments, the step of performing enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to obtain a preprocessed image corresponding to each input image frame includes:
[0011] Obtaining a pixel value of each pixel point of each frame of input image in the at least one frame of input image;
[0012] Based on the first preset time domain value and the pixel value of each pixel point of each frame of the input image, the pixel value of each pixel point of the preprocessed image corresponding to each frame of the input image is determined.
[0013] In some embodiments, before obtaining the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix, the method further includes:
[0014] Determine whether the frame number of the current frame input image is updated;
[0015] If so, each preset threshold matrix in the at least one preset threshold matrix is rotated, and the at least one preset threshold matrix after rotation is determined to be the at least one preset threshold matrix corresponding to the current frame input image.
[0016] In some embodiments, the obtaining of the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix includes:
[0017] Obtaining the size of each preset threshold matrix in the at least one preset threshold matrix;
[0018] Determine a first processed image corresponding to each frame of the input image based on a first preset threshold matrix having a largest matrix size among the at least one preset threshold matrix and a pre-processed image corresponding to each frame of the input image;
[0019] Determine a first processed image corresponding to each frame of input image as a pre-processed image corresponding to each frame of input image, traverse other preset threshold matrices in the at least one preset threshold matrix from large to small, and update the first processed image corresponding to each frame of input image;
[0020] Determine the updated first processed image corresponding to each frame of the input image as the output image corresponding to each frame of the input image.
[0021] In some embodiments, determining the first processed image corresponding to each frame of the input image based on a first preset threshold matrix having the largest matrix size among the at least one preset threshold matrix and a pre-processed image corresponding to each frame of the input image includes:
[0022] Determine a first pixel width difference between the input image and the output image based on the pixel widths of the input image and the output image;
[0023] Determining a first shift value based on the first pixel width difference and the number of the preset threshold matrix;
[0024] Determine a first preprocessing value for each pixel in the preprocessing image corresponding to each frame of the input image based on the pixel value of each pixel in the preprocessing image corresponding to each frame of the input image and the first shift value;
[0025] Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image and the first preset threshold matrix, a first processed image corresponding to each frame of the input image is determined.
[0026] In some embodiments, determining the first processed image corresponding to each frame of the input image based on the first preprocessed value of each pixel in the preprocessed image corresponding to each frame of the input image and the first preset threshold matrix includes:
[0027] Based on a first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determining a first judgment value within a threshold interval of the first preset threshold matrix mapped to the first preprocessing value;
[0028] Based on the first judgment value and the threshold value corresponding to the first judgment value in the first preset threshold value matrix, a first processed image corresponding to each frame of the input image is determined.
[0029] In some embodiments, the determining, based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, a first judgment value within a threshold range of the first preset threshold matrix mapped to the first preprocessing value includes:
[0030] Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determine that the value composed of the lowest two bits of the first preprocessing value is a second judgment value;
[0031] The first judgment value is determined based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value.
[0032] In some embodiments, determining the first processed image corresponding to each frame of the input image based on the first judgment value and the threshold value corresponding to the first preset threshold value matrix includes:
[0033] Determine whether the first judgment value is greater than a threshold value corresponding to the first judgment value in a first preset threshold value matrix;
[0034] If so, determine that the value obtained by adding one to the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image.
[0035] In some embodiments, the image jitter method further includes:
[0036] If not, then determine that the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image.
[0037] In some embodiments, determining the first judgment value based on the threshold width of the threshold in the first preset threshold matrix and the second judgment value includes:
[0038] Based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value bit width of the second judgment value, determining that the difference between the threshold bit width and the second judgment value bit width is a second shift value;
[0039] The first judgment value is determined based on the second judgment value and the second shift value.
[0040] In some embodiments, before determining whether the first judgment value is greater than a corresponding threshold value in a first preset threshold matrix, the method further includes:
[0041] Determine a threshold corresponding to the first judgment value in the first preset threshold matrix.
[0042] In some embodiments, determining the threshold corresponding to the first judgment value in the first preset threshold matrix includes:
[0043] Based on the size of the first preset threshold matrix, a threshold corresponding to the first judgment value in the first preset threshold matrix is determined.
[0044] A second aspect of the present disclosure provides an image jittering device, the device comprising:
[0045] A first acquisition unit, used to acquire at least one frame of input image;
[0046] A second acquisition unit, configured to perform enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value, and acquire a preprocessed image corresponding to each input image frame;
[0047] The third acquisition unit is used to acquire the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix.
[0048] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect embodiment of the present disclosure.
[0049] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.
[0050] The fifth aspect embodiment of the present disclosure proposes a chip, comprising at least one processor and an interface circuit; the processor is used to execute instructions and / or data interaction through the interface circuit, so that the chip executes the method described in any one of claims 1 to 12.
[0051] In summary, the image jittering method proposed in the present disclosure includes: obtaining at least one frame of input image; performing enhanced preprocessing on each frame of the at least one frame of input image using a first preset time domain value to obtain a preprocessed image corresponding to each frame of input image; based on the preprocessed image corresponding to each frame of input image and at least one preset threshold matrix, obtaining an output image corresponding to each frame of input image. The solution provided in the present disclosure enhances the input image by using the first preset time domain value, thereby improving the display quality of the image. At the same time, the input image is jittered by using at least one preset threshold matrix, thereby increasing the randomness of the jitter and further improving the display quality of the image.
[0052] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0054] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0055] Figure 2 A schematic diagram of a flow chart of an image jittering method provided by an embodiment of the present disclosure;
[0056] Figure 3 A schematic flow chart of a method for obtaining an output image corresponding to each frame of an input image provided in an embodiment of the present application;
[0057] Figure 4 A schematic flow chart of a method for determining a first processed image corresponding to each frame of input image provided in an embodiment of the present application;
[0058] Figure 5 A flowchart of an image jittering method provided for an application example of the present disclosure;
[0059] Figure 6 A schematic diagram of the structure of an image jitter device provided by an embodiment of the present disclosure;
[0060] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure;
[0061] Figure 8 A schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0062] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0063] The image dithering algorithm is a method to preserve the visual information of the original image as much as possible while reducing the color depth or grayscale. After the image dithering process, more colors or grayscale levels can be simulated when the color or grayscale level of the image is limited, thereby improving the visual quality of the image. The image dithering algorithms in the related art include random dithering, ordered dithering and error diffusion, etc., but the quality of the images processed by the above image dithering algorithms is not ideal.
[0064] For example, a related art provides an image jitter method, which adds the truncated k-bit value of the input pixel value of the current 3D image to the value of the corresponding position in a preset threshold matrix, takes the carry value, and then adds the carry value to the high m values of the input pixel value. If the added value is greater than the preset maximum value, the output maximum value is the output pixel value of the current pixel. If the added value is less than the preset maximum value, the output value is the output pixel value of the current pixel. And so on, traverse the entire 3D image and complete the above operations for all pixels.
[0065] However, the image jittering method provided by the above-mentioned related technology does not consider the time domain characteristics of different frame input images, nor does it consider the fixed influence of a single threshold matrix on multiple frame input images. Therefore, when processing multiple frame input images, its display effect is not ideal.
[0066] In order to solve the problems existing in the related art, the present disclosure proposes an image jittering method. The solution provided by the present disclosure enhances the input image through a first preset time domain value, thereby improving the display quality of the image. At the same time, the input image is jittered based on the pixel width of the input image and the output image, thereby further improving the display quality of the image.
[0067] Before introducing the detailed solution of the present disclosure, the scenario to which the solution of the present disclosure is applied is described first. Figure 1 FIG. 1 is an application scenario diagram of an image jitter method in an embodiment. Figure 1As shown, the application scenario includes an electronic device 101, in which a camera module and several applications can be installed. The application can initiate an image acquisition instruction to acquire an image, and the camera module acquires an image 102. Among them, the camera module can include a front camera module and / or a rear camera module. Finally, the image 102 is sent to the target application. Among them, the electronic device 101 can be a smart phone, a tablet computer, a personal digital assistant, a wearable device, etc.
[0068] In some optional embodiments, the electronic device 101 may also be a vehicle-mounted device or a vehicle networking device, such as a smart car, etc. In the present disclosure, only a smart phone is taken as an example, but it does not limit the scope of the present disclosure.
[0069] A camera may be installed on the electronic device 101, and an image 102 may be acquired through the installed camera. The camera may be divided into laser cameras, visible light cameras, and other types according to the different acquired images 102. The laser camera may acquire the image 102 formed by irradiating the laser onto the object, and the visible light camera may acquire the image formed by irradiating the visible light onto the object. Several cameras may be installed on the electronic device 101, and the installation positions are not limited. For example, a camera may be installed on the front panel of the electronic device 101, and two cameras may be installed on the back panel. The camera may also be installed inside the electronic device 101 in an embedded manner, and then the camera may be opened by rotating or sliding. Specifically, a front camera and a rear camera may be installed on the electronic device 101. The front camera and the rear camera may acquire the image 102 from different perspectives. Generally, the front camera may acquire the image 102 from the front perspective of the electronic device, and the rear camera may acquire the image 102 from the back perspective of the electronic device.
[0070] It should be understood that in the present disclosure, the front camera or the rear camera is only used as an example to distinguish the shooting angles of different cameras, rather than to limit the functions of multiple cameras. The multiple cameras in the present disclosure can be rear cameras or front cameras at the same time, which is not limited in the present disclosure.
[0071] Several applications can be installed in the electronic device 101. An application refers to software written in an electronic device for a certain application purpose. The electronic device 101 can provide services to users through the application. When the application needs to capture the image 102, an image capture instruction will be initiated. The electronic device 101 will call the camera module according to the image capture instruction to capture the image 102. The image capture instruction refers to an instruction used to trigger the image capture operation.
[0072] The electronic device 101 is also provided with a processor, and the image processing module in the processor can process the image 102 captured by the camera module, for example, execute the image jitter method provided in the present disclosure.
[0073] Figure 2 The following is a flow chart of an image jittering method provided by an embodiment of the present disclosure. Figure 2 As shown, the method includes:
[0074] Step 201, obtaining at least one frame of input image;
[0075] In one embodiment, at least one frame of input image may be acquired through an acquisition device such as a camera, and then the at least one frame of input image acquired by the camera may be acquired through an image acquisition instruction.
[0076] In one embodiment, at least one input image frame belonging to a video on the Internet may also be crawled.
[0077] In one embodiment, the at least one input image frame may be one frame, or may be a plurality of consecutive input image frames belonging to the same video stream.
[0078] The present disclosure does not limit the method for acquiring at least one frame of input image and the specific number of frames of the input image acquired.
[0079] Step 202, performing enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to obtain a preprocessed image corresponding to each input image frame;
[0080] Performing enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to obtain a preprocessed image corresponding to each input image frame;
[0081] In one embodiment, the size of the first preset time domain value may be an integer value such as 1, 2, etc., and the specific size of the first preset time domain value is not limited in the present disclosure.
[0082] In one embodiment, the first preset time domain value of each input image frame in the at least one input image frame may be the same value or different values, or partially the same and partially different, which is not limited in the present disclosure.
[0083] In one embodiment, the enhancement preprocessing of each input image in the at least one input image frame by using the first preset time domain value may be implemented by the following methods:
[0084] The first method uses the product value of the first preset time domain value and the pixel value of each pixel point of each frame of the at least one frame of input image as the pixel value of each pixel point in the preprocessed image corresponding to each frame of input image.
[0085] The second method uses the sum of the first preset time domain value and the pixel value of each pixel point of each frame of the at least one frame of input image as the pixel value of each pixel point in the preprocessed image corresponding to each frame of input image.
[0086] Based on this, in one embodiment, the step of performing enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to obtain a preprocessed image corresponding to each input image frame includes:
[0087] Obtaining a pixel value of each pixel point of each frame of input image in the at least one frame of input image;
[0088] Based on the first preset time domain value and the pixel value of each pixel point of each frame of the input image, the pixel value of each pixel point of the preprocessed image corresponding to each frame of the input image is determined.
[0089] In one embodiment, the input image is enhanced by using the first preset time domain value, thereby improving the display quality of the image.
[0090] In one embodiment, if the pixel value of each pixel point of each frame of the input image is expressed in the form of a binary number, the first preset time domain value is first converted into a binary number, and then the first preset time domain value is ANDed with the pixel value of each pixel point of each frame of the input image to determine the result of the ANDed operation as the pixel value of each pixel point of the preprocessed image corresponding to each frame of the input image.
[0091] In one embodiment, the image dithering method can simulate more colors or grayscale levels when the color or grayscale level of the image is limited, thereby improving the visual quality of the image. For example, when the pixel width of the input image is 12 bits, and the data bit width supported by the display for displaying the input image is only 8 bits, in order to display the input image on the display and improve the display quality of the image as much as possible, the input image can be processed by the image dithering method. The image dithering methods in the related art include random dithering, ordered dithering, and error diffusion.
[0092] When the ordered dithering method is used, the threshold matrix used in the ordered dithering method is a fixed threshold matrix. When processing multiple frames of input images, due to the influence of the fixed threshold matrix, the output images after the multiple frames of input images are processed will contain the same structural texture features, further affecting the image display quality. Therefore, in the present disclosure, different threshold matrices can be used to process input images with different frame numbers to obtain output images with higher display quality.
[0093] Based on this, the image jitter method provided by the embodiment of the present disclosure further includes:
[0094] Step 203: Based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix, an output image corresponding to each frame of the input image is obtained.
[0095] The image jittering method provided by the present disclosure includes: obtaining at least one frame of input image; performing enhancement preprocessing on each frame of the at least one frame of input image using a first preset time domain value to obtain a preprocessed image corresponding to each frame of input image; and obtaining an output image corresponding to each frame of input image based on the preprocessed image corresponding to each frame of input image and at least one preset threshold matrix. The scheme provided by the present disclosure enhances the input image by using the first preset time domain value, thereby improving the display quality of the image. At the same time, the input image is jittered by using at least one preset threshold matrix, thereby increasing the randomness of the jitter and further improving the display quality of the image.
[0096] In one embodiment, when obtaining at least one frame of input image in step 201 specifically means obtaining at least two frames of input image, for example, obtaining 4 frames of input image, in order to reflect the time domain differentiation of input images with different frame numbers, the first preset time domain value corresponding to each frame of input image should also be different.
[0097] Based on this, in one embodiment, the image jitter method further includes:
[0098] Based on the second preset time domain value and the frame sequence number of each frame of the input image, the first preset time domain value corresponding to each frame of the input image is obtained.
[0099] In one embodiment, the second preset time domain value may be any odd value, such as 1, 3, etc., which is not limited in the present disclosure. Wherein, the method for obtaining the first preset time domain value corresponding to each frame of the input image based on the second preset time domain value and the frame sequence number of each frame of the input image may be:
[0100] Converting the second preset time domain value and the frame number of each frame of the input image into a binary number;
[0101] Performing an AND operation on the second preset time domain value and the binary number corresponding to the frame sequence number of each frame of the input image;
[0102] The result of the AND operation is determined as the first preset time domain value corresponding to each frame of the input image.
[0103] In one embodiment, when the preset threshold matrix used by the pre-processed image corresponding to each frame of the input image is the same, it will have a fixed impact on multiple frames of input images. For example, the same structural texture exists in the output image after the multiple frames of input images are processed, thereby affecting the image display quality.
[0104] Based on this, in one embodiment, before obtaining the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix, the method further includes:
[0105] Determine whether the frame number of the current frame input image is updated;
[0106] For example, if the frame number of the previous input image frame is 2 and the frame number of the current input image frame is 3, it is determined that the frame number of the current input image frame is updated.
[0107] If so, each preset threshold matrix in the at least one preset threshold matrix is rotated, and the at least one preset threshold matrix after rotation is determined to be the at least one preset threshold matrix corresponding to the current frame input image.
[0108] In one embodiment, the method of rotating each preset threshold matrix in the at least one preset threshold matrix may be to rotate each preset threshold matrix in the at least one preset threshold matrix counterclockwise, or may be to rotate each preset threshold matrix in the at least one preset threshold matrix clockwise. This is not limited in the present disclosure.
[0109] In one embodiment, since the preprocessed image corresponding to each frame of the input image is jittered by at least one preset threshold matrix, an iterative method can be used to traverse each preset threshold matrix in the at least one preset threshold matrix, and each preset threshold matrix can be used to jitter each frame of the input image to enhance the randomness of the jitter and improve the display quality of the output image.
[0110] Based on this, in one embodiment, if Figure 3 As shown, the obtaining of the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix includes:
[0111] Step 301, obtaining the size of each preset threshold matrix in the at least one preset threshold matrix;
[0112] In one embodiment, the size of the preset threshold matrix may be any size of 2*2, 4*4, 8*8, etc., which is not limited in the present disclosure.
[0113] In one embodiment, the 2*2 size preset threshold matrix is The preset threshold matrix of sizes such as 4*4 and 8*8 can be obtained by the Bayer recursive method, which will not be described in detail in the present disclosure.
[0114] Step 302, determining a first processed image corresponding to each frame of the input image based on a first preset threshold matrix having the largest matrix size among the at least one preset threshold matrix and a pre-processed image corresponding to each frame of the input image;
[0115] In one embodiment, taking the at least one preset threshold matrix as two preset threshold matrices as an example, after each frame of the input image is dithered by the two preset threshold matrices, the pixel width of the output image should be the same as the pixel width of the output image. Based on this, if the difference in pixel width between the input image and the output image is 4, the difference in pixel width between the first processed image after the input image is processed by the first preset threshold matrix and the pixel width of the output image may be 2. That is, after the input image is dithered twice by the two preset threshold matrices, the pixel width of the output image should be the same as the pixel width of the output image.
[0116] Based on this, in one embodiment, if Figure 4 As shown, the determining of the first processed image corresponding to each frame of the input image based on the first preset threshold matrix with the largest matrix size among the at least one preset threshold matrix and the pre-processed image corresponding to each frame of the input image includes:
[0117] Step 401, determining a first pixel width difference between the input image and the output image based on the pixel widths of the input image and the output image;
[0118] Step 402, determining a first shift value based on the first pixel width difference and the number of the preset threshold matrix;
[0119] In one embodiment, the ratio of the first pixel width difference to the number of the preset threshold matrix can be determined as the first shift value; that is, if the pixel width difference between the input image and the output image is 4, the first shift value is 2.
[0120] Step 403, determining a first preprocessing value for each pixel in the preprocessing image corresponding to each frame of the input image based on the pixel value of each pixel in the preprocessing image corresponding to each frame of the input image and the first shift value;
[0121] In one embodiment, the pixel value of each pixel in the preprocessed image corresponding to each frame of the input image may be converted into a binary number. When the first shift value is 2, the binary number may be right shifted by two bits, and the result of the right shift by two bits may be used as the first preprocessed value of each pixel in the preprocessed image corresponding to each frame of the input image.
[0122] Step 404 : determining a first processed image corresponding to each frame of the input image based on the first preprocessed value of each pixel in the preprocessed image corresponding to each frame of the input image and the first preset threshold matrix.
[0123] In one embodiment, since the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image may have a different bit width from the threshold in the first preset threshold matrix, for example, the first preset threshold matrix is a preset threshold matrix of 8*8 size, and its threshold interval is 0 to 63. At this time, the first preprocessing value cannot be compared with the threshold in the first preset threshold matrix.
[0124] Based on this, in one embodiment, determining the first processed image corresponding to each frame of the input image based on the first preprocessed value of each pixel in the preprocessed image corresponding to each frame of the input image and the first preset threshold matrix includes:
[0125] Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determine the first preprocessing value mapped to a first judgment value within the threshold interval of the first preset threshold matrix; the bit width of the first judgment value is the same as the threshold bit width in the first preset threshold matrix;
[0126] Based on the first judgment value and its corresponding threshold in the first preset threshold matrix, a first processed image corresponding to each frame of the input image is determined.
[0127] In one embodiment, the determining, based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, a first judgment value within a threshold range of the first preset threshold matrix mapped to the first preprocessing value includes:
[0128] Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determine that the value composed of the lowest two bits of the first preprocessing value is a second judgment value;
[0129] The first judgment value is determined based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value.
[0130] In one embodiment, since the bit width of the second judgment value is 2, if the threshold interval of the threshold in the first preset threshold matrix is 0 value 63, that is, the corresponding threshold bit width is 6, at this time, in order to make the bit width of the first judgment value the same as the threshold bit width, the second judgment value needs to be left shifted by 4 bits, and the result of the left shift of 4 bits is determined to be the first judgment value.
[0131] Based on this, in one embodiment, determining the first judgment value based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value includes:
[0132] Based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value bit width of the second judgment value, determining that the difference between the threshold bit width and the second judgment value bit width is a second shift value;
[0133] The first judgment value is determined based on the second judgment value and the second shift value.
[0134] Step 303, determining that the first processed image corresponding to each frame of input image is the pre-processed image corresponding to each frame of input image, traversing other preset threshold matrices in the at least one preset threshold matrix from large to small, and updating the first processed image corresponding to each frame of input image;
[0135] In one embodiment, step 303 is an iterative process, that is, each preset threshold matrix in the at least one preset threshold matrix is traversed in an iterative manner, and each preset threshold matrix is used to perform dithering processing on each frame of the input image to enhance the randomness of the dithering and improve the display quality of the output image.
[0136] In one embodiment, the purpose of image dithering is to use fewer gray levels to represent a larger gray level range through dithering. The method of using a threshold matrix for dithering is called ordered dithering. In step 303, at least one preset threshold matrix is used to perform ordered dithering on the input image, and the traversal process can be from large to small according to the rules of image dithering.
[0137] Step 304: determine the updated first processed image corresponding to each frame of the input image as the output image corresponding to each frame of the input image.
[0138] In one embodiment, determining the first processed image corresponding to each frame of the input image based on the first judgment value and the threshold value corresponding to the first preset threshold value matrix includes:
[0139] Determine whether the first judgment value is greater than a threshold value corresponding to the first judgment value in a first preset threshold value matrix;
[0140] If so, determining that the value obtained by adding one to the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image;
[0141] If not, then determine that the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image.
[0142] In one embodiment, before determining whether the first judgment value is greater than a threshold value corresponding to the first judgment value in a first preset threshold value matrix, the method further includes:
[0143] Determine a threshold corresponding to the first judgment value in the first preset threshold matrix.
[0144] In one embodiment, determining the threshold corresponding to the first judgment value in the first preset threshold matrix includes:
[0145] Based on the size of the first preset threshold matrix, a threshold corresponding to the first judgment value in the first preset threshold matrix is determined.
[0146] For example, if the size of the first preset threshold matrix is 8*8, the horizontal coordinate and the vertical coordinate of each pixel point in the preprocessed image corresponding to each frame of the input image are respectively ANDed with 7. It should be noted that the decimal number 7 needs to be converted into a binary number, and then the threshold at the coordinate corresponding to the result of the AND operation in the first preset threshold matrix is determined as the threshold corresponding to the first judgment value in the first preset threshold matrix.
[0147] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
[0148] The image jitter method provided by the present disclosure is further described below with an application example.
[0149] In the image jitter method provided by the application example of the present disclosure, there are 2 preset threshold matrices, with sizes of 8*8 and 4*4 respectively. The number of frames of the input image is 4. The difference between the pixel widths of the input image and the output image is 4.
[0150] like Figure 5 As shown, the image jittering method provided by the application example of the present disclosure includes:
[0151] Step 501, presetting a second preset time domain value and a first preset threshold matrix and a second preset threshold matrix;
[0152] The second preset time domain value may be any odd value, the matrix size of the first preset threshold matrix is 8*8, and the size of the second preset threshold matrix is 4*4;
[0153] Step 502, performing an AND operation on the second preset time domain value and the frame number of each frame of the input image to obtain a first preset time domain value corresponding to the first frame of the input image;
[0154] Step 503, performing an AND operation on the first preset time domain value and the pixel value of each pixel point of the first frame input image to obtain a preprocessed image corresponding to the first frame input image;
[0155] Step 504, according to the difference between the bit width of the preprocessed image corresponding to the first frame of input image and the bit width of the output pixel, right-shift the pixel value of each pixel point in the preprocessed image corresponding to the first frame of input image by two bits to obtain a first preprocessed image corresponding to the first frame of input image;
[0156] Step 505, based on the first pre-processed image corresponding to the first frame input image, determining a first judgment value corresponding to each pixel in the first frame input image, and based on the first judgment value and the threshold value corresponding to it in the first preset threshold matrix, determining a first processed image corresponding to the first frame input image;
[0157] Step 506, right-shifting the pixel value of each pixel in the first processed image corresponding to the first frame of input image by two bits to update the first pre-processed image;
[0158] Step 507, based on the updated first pre-processed image corresponding to the first frame input image, updating the first judgment value corresponding to each pixel in the first frame input image, and based on the updated first judgment value and its corresponding threshold in the second preset threshold matrix, updating the first processed image corresponding to the first frame input image;
[0159] Step 508, repeat the method described in steps 503 to 507, traverse the other three frames of input images, and when the frame number of the input image is updated, rotate the first preset threshold matrix and the second preset threshold matrix to obtain the first processed image corresponding to each frame of the input image.
[0160] like Figure 6 As shown, the embodiment of the present disclosure further provides an image jittering device, the image jittering device 600 comprising:
[0161] A first acquisition unit 601 is used to acquire at least one frame of input image;
[0162] A second acquisition unit 602 is configured to perform enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to acquire a preprocessed image corresponding to each input image frame;
[0163] The third acquisition unit 603 is used to acquire the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix.
[0164] In one embodiment, the image jittering device 600 further includes:
[0165] The fourth acquisition unit is used to acquire the first preset time domain value corresponding to each frame of the input image based on the second preset time domain value and the frame sequence number of each frame of the input image.
[0166] In one embodiment, the second obtaining unit 602 is specifically configured to:
[0167] Obtaining a pixel value of each pixel point of each frame of input image in the at least one frame of input image;
[0168] The sum of the first preset time domain value and the pixel value of each pixel point of each frame of the input image is determined as the pixel value of each pixel point of the preprocessed image corresponding to each frame of the input image.
[0169] In one embodiment, the image jittering device 600 further includes:
[0170] A first determining unit, used to determine whether the frame number of the current frame input image is updated;
[0171] If so, each preset threshold matrix in the at least one preset threshold matrix is rotated, and the at least one preset threshold matrix after rotation is determined to be the at least one preset threshold matrix corresponding to the current frame input image.
[0172] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0173] Obtaining the size of each preset threshold matrix in the at least one preset threshold matrix;
[0174] Determine a first processed image corresponding to each frame of the input image based on a first preset threshold matrix having a largest matrix size among the at least one preset threshold matrix and a pre-processed image corresponding to each frame of the input image;
[0175] Determine a first processed image corresponding to each frame of input image as a pre-processed image corresponding to each frame of input image, traverse other preset threshold matrices in the at least one preset threshold matrix from large to small, and update the first processed image corresponding to each frame of input image;
[0176] Determine the updated first processed image corresponding to each frame of the input image as the output image corresponding to each frame of the input image.
[0177] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0178] Determine a first pixel width difference between the input image and the output image based on the pixel widths of the input image and the output image;
[0179] Determining a first shift value based on the first pixel width difference and the number of the preset threshold matrix;
[0180] Determine a first preprocessing value for each pixel in the preprocessing image corresponding to each frame of the input image based on the pixel value of each pixel in the preprocessing image corresponding to each frame of the input image and the first shift value;
[0181] Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image and the first preset threshold matrix, a first processed image corresponding to each frame of the input image is determined.
[0182] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0183] Based on a first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determining a first judgment value within a threshold interval of the first preset threshold matrix mapped to the first preprocessing value;
[0184] Based on the first judgment value and its corresponding threshold in the first preset threshold matrix, a first processed image corresponding to each frame of the input image is determined.
[0185] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0186] Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determine that the value composed of the lowest two bits of the first preprocessing value is a second judgment value;
[0187] The first judgment value is determined based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value.
[0188] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0189] Determine whether the first judgment value is greater than a threshold value corresponding to the first judgment value in a first preset threshold value matrix;
[0190] If so, determining that the value obtained by adding one to the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image;
[0191] If not, then determine that the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image.
[0192] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0193] Based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value bit width of the second judgment value, determining that the difference between the threshold bit width and the second judgment value bit width is a second shift value;
[0194] The first judgment value is determined based on the second judgment value and the second shift value.
[0195] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0196] Determine a threshold corresponding to the first judgment value in the first preset threshold matrix.
[0197] In one embodiment, the third obtaining unit 603 is specifically configured to:
[0198] Based on the size of the first preset threshold matrix, a threshold corresponding to the first judgment value in the first preset threshold matrix is determined.
[0199] Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation of the method is also applicable to the device provided in the embodiment and will not be described in detail in this embodiment.
[0200] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.
[0201] Figure 7 is a block diagram of an electronic device 700 for implementing the above-mentioned image jittering method according to an exemplary embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0202] Reference Figure 7 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0203] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0204] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0205] The power supply component 706 provides power to the various components of the electronic device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.
[0206] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0207] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0208] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0209] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0210] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0211] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0212] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0213] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the image jittering method described in the above embodiments of the present disclosure.
[0214] The embodiment of the present disclosure also provides a chip, which can be seen in Figure 8 Schematic diagram of the chip structure shown. Figure 8 The chip shown includes at least one processor 801 and an interface circuit 802; the processor 801 is used to execute instructions and / or data interaction through the interface circuit 802, so that the chip executes the image dithering method provided in the embodiment of the present application.
[0215] Optionally, the chip further includes a memory 803, and the memory 803 is used to store necessary computer instructions and data. When the processor 801 executes the computer instructions, the electronic device executes the image dithering method described in the above embodiment of the present disclosure.
[0216] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0217] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0218] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0219] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0220] It should be understood that the various parts of the embodiments of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0221] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0222] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0223] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An image jitter method, characterized in that: include: Obtain at least one frame of input image; Performing enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to obtain a preprocessed image corresponding to each input image frame; Based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix, an output image corresponding to each frame of the input image is obtained.
2. The method according to claim 1, characterized in that Also includes: Based on the second preset time domain value and the frame sequence number of each frame of the input image, the first preset time domain value corresponding to each frame of the input image is obtained.
3. The method according to claim 1, characterized in that The method of performing enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value to obtain a preprocessed image corresponding to each input image frame includes: Obtaining a pixel value of each pixel point of each frame of input image in the at least one frame of input image; Based on the first preset time domain value and the pixel value of each pixel point of each frame of the input image, the pixel value of each pixel point of the preprocessed image corresponding to each frame of the input image is determined.
4. The method according to claim 1, characterized in that: Before obtaining the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix, the method further includes: In response to the frame number of the current frame input image being updated, rotating each preset threshold matrix of the at least one preset threshold matrix; Determine at least one preset threshold matrix after rotation as at least one preset threshold matrix corresponding to the current frame input image.
5. The method according to claim 1, characterized in that The obtaining, based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix, the output image corresponding to each frame of the input image comprises: Obtaining the size of each preset threshold matrix in the at least one preset threshold matrix; Determine a first processed image corresponding to each frame of the input image based on a first preset threshold matrix having a largest matrix size among the at least one preset threshold matrix and a pre-processed image corresponding to each frame of the input image; Determine a first processed image corresponding to each frame of input image as a pre-processed image corresponding to each frame of input image, traverse other preset threshold matrices in the at least one preset threshold matrix from large to small, and update the first processed image corresponding to each frame of input image; Determine the updated first processed image corresponding to each frame of the input image as the output image corresponding to each frame of the input image.
6. The method according to claim 5, characterized in that The determining, based on a first preset threshold matrix having the largest matrix size among the at least one preset threshold matrix and a pre-processed image corresponding to each frame of the input image, a first processed image corresponding to each frame of the input image comprises: Determine a first pixel width difference between the input image and the output image based on the pixel widths of the input image and the output image; Determining a first shift value based on the first pixel width difference and the number of the preset threshold matrix; Determine a first preprocessing value for each pixel in the preprocessing image corresponding to each frame of the input image based on the pixel value of each pixel in the preprocessing image corresponding to each frame of the input image and the first shift value; Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image and the first preset threshold matrix, a first processed image corresponding to each frame of the input image is determined.
7. The method according to claim 6, characterized in that The determining, based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image and the first preset threshold matrix, the first processed image corresponding to each frame of the input image comprises: Based on a first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determining a first judgment value within a threshold interval of the first preset threshold matrix mapped to the first preprocessing value; Based on the first judgment value and the threshold value corresponding to the first judgment value in the first preset threshold value matrix, a first processed image corresponding to each frame of the input image is determined.
8. The method according to claim 7, characterized in that The determining, based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, a first judgment value within the threshold interval of the first preset threshold matrix mapped to the first preprocessing value comprises: Based on the first preprocessing value of each pixel in the preprocessing image corresponding to each frame of the input image, determine that the value composed of the lowest two bits of the first preprocessing value is a second judgment value; The first judgment value is determined based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value.
9. The method according to claim 7, characterized in that: The determining, based on the first judgment value and the threshold value corresponding to it in the first preset threshold matrix, the first processed image corresponding to each frame of the input image comprises: Determine whether the first judgment value is greater than a threshold value corresponding to the first judgment value in a first preset threshold value matrix; If so, determine that the value obtained by adding one to the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image.
10. The method according to claim 9, characterized in that The method further comprises: If not, then determine that the first preprocessing value of each pixel point in the preprocessing image corresponding to each frame of the input image is the pixel value corresponding to each pixel point in the first processed image.
11. The method according to claim 8, characterized in that The determining the first judgment value based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value includes: Based on the threshold bit width of the threshold in the first preset threshold matrix and the second judgment value bit width of the second judgment value, determining that the difference between the threshold bit width and the second judgment value bit width is a second shift value; The first judgment value is determined based on the second judgment value and the second shift value.
12. The method according to claim 9, characterized in that Before determining whether the first judgment value is greater than a corresponding threshold value in a first preset threshold matrix, the method further comprises: Determine a threshold corresponding to the first judgment value in the first preset threshold matrix.
13. The method according to claim 12, characterized in that The determining a threshold corresponding to the first judgment value in the first preset threshold matrix includes: Based on the size of the first preset threshold matrix, a threshold corresponding to the first judgment value in the first preset threshold matrix is determined.
14. An image jittering device, characterized in that: The device comprises: A first acquisition unit, used to acquire at least one frame of input image; A second acquisition unit, configured to perform enhancement preprocessing on each input image of the at least one input image frame by using the first preset time domain value, and acquire a preprocessed image corresponding to each input image frame; The third acquisition unit is used to acquire the output image corresponding to each frame of the input image based on the preprocessed image corresponding to each frame of the input image and at least one preset threshold matrix.
15. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 13.
16. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 13.
17. A chip, characterized in that: The chip comprises at least one processor and an interface circuit; the processor is used to execute instructions and / or data interaction through the interface circuit, so that the chip executes the method according to any one of claims 1 to 13.