Electronic device and display control method thereof
By using index values determined by index sequences and frame sequence numbers in the electronic paper device to process the input image, and generating binary or multi-valued output images that simulate continuous grayscale images, the problem that electronic paper cannot display continuous grayscales is solved, and the display hierarchy and user experience of the device are improved.
Patent Information
- Application Number
- CN202411523584.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Existing electronic paper can only display binary images in black and white, and cannot present a continuous grayscale between black and white, lacking a sense of layering.
By obtaining the video stream and index sequence, the index value is determined based on the frame sequence number, and the pixel value of the output image is determined based on the pixel points and index values of the input image, and a binary or multi-value output image is generated to simulate the effect of continuous grayscale images.
The effect of displaying continuous grayscale images on binary or multi-value devices such as electronic paper is realized, which enhances visual hierarchy and continuity, and improves the display effect and user experience of the device.
Smart Images

Figure CN119046484B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display control, and in particular to an electronic device and a display control method thereof. Background Art
[0002] Current electronic paper can only display binary images in black and white, which means that electronic paper cannot present other gray levels between black and white and lacks a sense of hierarchy. Summary of the invention
[0003] In view of this, the present application provides an electronic device and a display control method thereof, which can solve the above technical problems.
[0004] In a first aspect, an embodiment of the present application provides an electronic device, wherein the electronic device includes a display module, and the display control method includes:
[0005] Acquire a video stream, the video stream comprising a plurality of input image frames in a time sequence, the plurality of input image frames having frame numbers arranged in sequence according to the time sequence;
[0006] Obtain an index sequence, wherein the index sequence includes multiple index values;
[0007] Determine, according to the frame sequence number of each input image frame in the plurality of input image frames, an index value corresponding to each input image frame in the index sequence;
[0008] Determine the pixel value of each corresponding pixel point in the output image of the corresponding frame according to each pixel point of the input image of each frame and the index value corresponding to the input image of the frame, so as to generate the output image of the corresponding frame, thereby generating a plurality of output images;
[0009] The display module of the electronic device is controlled to output the plurality of frames of output images in sequence to display the video stream.
[0010] In a second aspect, an embodiment of the present application provides an electronic device, comprising a display module, a processor and a memory, wherein the processor is connected to the display module and the memory, a computer program is stored in the memory, and the processor runs the computer program to execute the steps of the display control method described in the first aspect.
[0011] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein the computer program is run by a processor to execute the steps of the display control method described in the first aspect.
[0012] Therefore, in the present application, binary or multi-value devices such as electronic paper cannot display continuous grayscale images. The present application aims to convert continuous grayscale images (input images) into binary images (output images) for display by binary or multi-value devices such as electronic paper. Since the human eye has low-pass characteristics and perceptual similarity, the low-pass characteristic means that the human eye can perform low-pass filtering on high-frequency signals. Therefore, at a normal observation distance, the binary image will present the effect of a continuous grayscale image; perceptual similarity means that the human eye will integrate similar areas or pixels to form a smoother visual experience, ignoring the specific grayscale value of a single pixel. Therefore, the present application optimizes the binarization algorithm, that is, introduces an index sequence, and then determines the index value corresponding to each frame of the input image in the index sequence according to the frame sequence number of each frame of the input image in the several frames; and then determines the pixel value of each corresponding pixel point in the corresponding frame output image according to each pixel point of each frame of the input image and the index value corresponding to the frame of the input image, so as to generate the output image of the corresponding frame, thereby generating several frames of output images. It can be seen that although the input image is a continuous grayscale image and the output image is a binary or multi-valued non-continuous grayscale image, the pixel values of the corresponding pixel points in the corresponding frame output image are determined for each pixel point of each frame of the input image and the index value corresponding to the frame of the input image, and the pixel value distribution of the same pixel point in several frames of output images is optimized, so that the pixel value of the same pixel point in several frames of output images can present a display grayscale value other than the pixel value that the pixel point itself can display after visually mixing, so that the display grayscale value of the same pixel point of several frames of input images and the corresponding several frames of output images is closer, and the image viewer will not obviously feel the limitation of using only two grayscales, so that the image displayed on a binary device or multi-value device such as electronic paper has the effect of displaying a continuous grayscale image, which is closer to a continuous grayscale image, and can effectively improve the display effect of a binary device or multi-value device such as electronic paper, so that the viewer can visually feel the sense of hierarchy and continuity, and achieve a better visual experience, making it more practical and beautiful in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0014] Figure 1 This is a schematic diagram of a module of an electronic device in an embodiment of the present application;
[0015] Figure 2 A flow chart showing a control method in one embodiment of the present application;
[0016] Figure 3 This is a schematic diagram of a specific flow chart of step S23 of the display control method in one embodiment of the present application;
[0017] Figure 4 This is a schematic diagram of a specific flow chart of step S24 of the display control method in one embodiment of the present application;
[0018] Figure 5 This is a schematic diagram of a specific flow chart of step S242 of the display control method in one embodiment of the present application;
[0019] Figure 6 This is a module diagram of the processor controlling the display module in an embodiment of the present application.
[0020] Reference numerals:
[0021] 100 - electronic equipment;
[0022] 10- Processor;
[0023] 20- memory;
[0024] 30-display module;
[0025] 21-Register;
[0026] 22-External memory;
[0027] 11-threshold generation module;
[0028] 12- Image generation module;
[0029] 13-Multiplexer. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme of the embodiments of the present application is clearly and completely described below in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application.
[0031] Unless otherwise defined, the technical or scientific terms used herein shall have the usual meaning as understood by a person of ordinary skill in the field to which this application belongs. The words "one", "an" or "the" and the like used in this application do not indicate a quantitative limitation, but are only used to indicate the presence of at least one. The words "include" or "comprise" and the like mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. The words "connect" or "connected" and the like are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0032] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0033] Please refer to Figure 1 , Figure 1 Schematic diagram of a module of an electronic device 100 in an embodiment of the present application. The electronic device 100 may be, but is not limited to, a binary or multi-value device such as an e-book, a monochrome display device, or an electronic device such as a mobile phone or a tablet provided with a binary or multi-value device. Among them, a binary device may be, but is not limited to, an electronic paper, a monochrome display device, a black and white mode of a digital camera, or a device that can only display a binary image in black and white but cannot display a continuous grayscale image, and a multi-value device may be, but is not limited to, a device that can display grayscale images other than black and white but cannot display a continuous grayscale image. In this embodiment, the electronic device 100 is an electronic paper. The electronic device 100 includes a processor 10, a memory 20, and a display module 30. The processor 10 is connected to the memory 20 and the display module 30.
[0034] The processor 10 may be, but is not limited to, a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0035] The memory 20 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (Flash Card), multiple disk storage devices, flash memory devices, or other volatile solid-state storage devices.
[0036] The display module 30 is a display module for displaying binary images or multi-valued images, for example, a display module of electronic paper.
[0037] In some embodiments, the memory 20 stores a computer program, and the processor 10 runs the computer program to perform the steps of the display control method.
[0038] Please refer to Figure 2 , Figure 2 1 is a flow chart of a display control method in an embodiment of the present application. The display control method comprises:
[0039] Step S21: obtaining a video stream, wherein the video stream includes a plurality of input image frames in a time sequence, wherein the plurality of input image frames have frame numbers arranged in sequence according to the time sequence;
[0040] Step S22: obtaining an index sequence, wherein the index sequence includes a plurality of index values;
[0041] Step S23: determining an index value corresponding to each input image frame in the index sequence according to the frame sequence number of each input image frame in the plurality of input image frames;
[0042] Step S24: determining the pixel values of the corresponding pixel points in the output image of the corresponding frame according to the pixel points of each frame of the input image and the index value corresponding to the frame of the input image, so as to generate the output image of the corresponding frame, thereby generating a plurality of frames of output images;
[0043] Step S25: controlling the display module 30 of the electronic device 100 to sequentially output the plurality of frames of output images to display the video stream.
[0044] Therefore, in the present application, binary or multi-value devices such as electronic paper cannot display continuous grayscale images. The present application aims to convert continuous grayscale images (input images) into binary images (output images) for display by binary or multi-value devices such as electronic paper. Since the human eye has low-pass characteristics and perceptual similarity, the low-pass characteristic means that the human eye can perform low-pass filtering on high-frequency signals. Therefore, at a normal observation distance, the binary image will present the effect of a continuous grayscale image; perceptual similarity means that the human eye will integrate similar areas or pixels to form a smoother visual experience, ignoring the specific grayscale value of a single pixel. Therefore, the present application optimizes the binarization algorithm, that is, introduces an index sequence, and then determines the index value corresponding to each frame of the input image in the index sequence according to the frame sequence number of each frame of the input image in the several frames; and then determines the pixel value of each corresponding pixel point in the corresponding frame output image according to each pixel point of each frame of the input image and the index value corresponding to the frame of the input image, so as to generate the output image of the corresponding frame, thereby generating several frames of output images. It can be seen that although the input image is a continuous grayscale image and the output image is a binary or multi-valued non-continuous grayscale image, the pixel values of the corresponding pixel points in the corresponding frame output image are determined for each pixel point of each frame of the input image and the index value corresponding to the frame of the input image, and the pixel value distribution of the same pixel point in several frames of output images is optimized, so that the pixel value of the same pixel point in several frames of output images can present a display grayscale value other than the pixel value that the pixel point itself can display after visually mixing, so that the display grayscale value of the same pixel point of several frames of input images and the corresponding several frames of output images is closer, and the image viewer will not obviously feel the limitation of using only two grayscales, so that the image displayed on a binary device or multi-value device such as electronic paper has the effect of displaying a continuous grayscale image, which is closer to a continuous grayscale image, and can effectively improve the display effect of a binary device or multi-value device such as electronic paper, so that the viewer can visually feel the sense of hierarchy and continuity, and achieve a better visual experience, making it more practical and beautiful in practical applications.
[0045] In some embodiments, the number of index values of the index sequence is greater than or equal to 2.
[0046] In some embodiments, the number of elements of the index sequence may be 4, 8, 16, 32, 64, 128, etc., which is not limited here.
[0047] In some embodiments, each index value in the index sequence is at least partially different. In this embodiment, each element value of the index sequence is different.
[0048] In some embodiments, the maximum value of each index value in the index sequence is less than or equal to N-1, and the minimum value is greater than or equal to 0. In other embodiments, the maximum value and the minimum value of each index value in the index sequence can be determined according to actual conditions and are not limited here.
[0049] In some embodiments, the input image is a continuous grayscale image, and the output image is a binary image.
[0050] In other embodiments, the input image is a high grayscale image, and the output image is a low grayscale image, wherein the high grayscale image and the low grayscale image are relative concepts, and the number of displayed grayscale values of the high grayscale image is greater than the number of displayed grayscale values of the low grayscale image.
[0051] For some examples, please refer to Figure 3 , Figure 3 This is a specific flow chart of step S23 of the display control method in an embodiment of the present application. It can be understood that, Figure 3 The steps can be adjusted in order or increased or decreased according to actual needs, and are not limited here. The step S23 includes:
[0052] Step S231: performing a modulo operation on the frame sequence number of each frame of the input image and the number of index frames of the index sequence to obtain an index value sequence number of the index sequence corresponding to each frame of the input image;
[0053] Step S232: determining the index value corresponding to each frame of the input image in the index sequence according to the index value sequence of the index sequence.
[0054] In some embodiments, the formula corresponding to step S23 is I (imodN), i is the frame number of the input image, N is the number of index values in the index sequence, and imodN is a modulo operation of i on N.
[0055] In another embodiment, the formula corresponding to step S231 is a modulo operation, which is not limited here.
[0056] Therefore, in the present application, when the number of index values of the index sequence is less than the number of frames of the input image and the output image, the index value corresponding to each frame of the input image can be determined based on the modulo operation, so that the index sequence is miniaturized and the system memory is reduced.
[0057] In some embodiments, the output image is a binary image, and each pixel of the output image can display 0 or 255. When the number of index values of the index sequence is 4, several frames of the output image are divided into several output image groups according to the order of time, and each output image group also includes 4 frames of output images. Like the index sequence, each frame of output image of each output image group is in one-to-one correspondence with each index value of the index sequence. Therefore, the pixel value of each pixel of each frame of output image of the output image group is calculated by the pixel value of each pixel of the corresponding input image and the index value corresponding to the frame of input image. Therefore, the pixel value of each pixel of each frame of output image of each output image group can be adjusted accordingly according to each index value of the index sequence, and the distribution of pixel values of the same pixel in several frames of output images is optimized, so that the pixel value of the same pixel in several frames of output images can present a display grayscale value other than the pixel value × that the pixel itself can display after visual color mixing. Among them, when the number of index values of the index sequence is 4, when the pixel values of the same pixel point of the output image group are all 0, the display grayscale value that can be visually presented is the average of the sum of the pixel values of the same pixel point of the output image group, that is, 0. Similarly, when only one pixel point of the pixel value of the same pixel point of the output image group is 255, and the other three pixels are all 0, the display grayscale value that can be visually presented is the average of the sum of the pixel values of the same pixel point of the output image group, that is, 255 / 4=64. Similarly, when only two pixel points of the pixel value of the same pixel point of the output image group are 255, and the other two pixel points are 0, the display grayscale value that can be visually presented is the average of the sum of the pixel values of the same pixel point of the output image group, that is, 510 / 4=128. Similarly, the same pixel point of the output image group can also have a display grayscale value of 192 or 255; for another example, when the number of index values of the index sequence is 16, several frames of the output image are divided into several output image groups according to the order of time, and each output image group also includes 16 frames of output images. Like the index sequence, each frame of output image of each output image group is in a one-to-one correspondence with each index value of the index sequence. Therefore, the pixel value of each pixel point of each frame of output image of the output image group is calculated by the pixel value of each pixel point of the corresponding input image and the index value corresponding to the frame of input image. Therefore, the pixel value of each pixel point of each frame of output image of each output image group can be adjusted accordingly according to each index value of the index sequence, and the pixel value distribution of the same pixel point in several frames of output images is optimized, so that the pixel value of the same pixel point in several frames of output images can present a display grayscale value other than the pixel value that the pixel point itself can display after visual color mixing.Among them, when the number of index values of the index sequence is 16, there are 17 display grayscale values that can be visually presented by the same pixel point of the output image group, namely, 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, and 255; for another example, when the number of index values of the index sequence is 64, several frames of the output image are divided into several output image groups according to the sequence of time, and each output image group also includes 64 frames of output images. Like the index sequence, each frame of output image of each output image group is in one-to-one correspondence with each index value of the index sequence. Therefore, the pixel value of each pixel point of each frame of output image of the output image group is calculated by the pixel value of each pixel point of the corresponding input image and the index value corresponding to the frame of input image. Thus, the pixel values of each pixel point of each frame of output image of each output image group can be adjusted accordingly according to each index value of the index sequence, and the pixel value distribution of the same pixel point in several frames of output image is optimized, so that the pixel value of the same pixel point in several frames of output image can present a display grayscale value other than the pixel value that the pixel point itself can display after visually mixing. Among them, when the number of index values of the index sequence is 64, there are 65 kinds of display grayscale values that can be visually presented by the same pixel point of the output image group, namely, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 255.
[0058] Therefore, in the present application, the more index values of the index series there are, the more display grayscale values formed after visually mixing the same pixel point in several frames of output images. The number of index values of the index series is proportional to the number of display grayscale values formed after visually mixing the same pixel point in several frames of output images. Therefore, the number of index values of the index series can be adjusted according to needs, and then the number of display grayscale values formed after visually mixing the same pixel point in several frames of output images can be adjusted to improve the display layering of several frames of output images.
[0059] For some examples, please refer to Figure 4 , Figure 4This is a specific flow chart of step S24 of the display control method in an embodiment of the present application. It can be understood that, Figure 4 The steps can be adjusted in order or increased or decreased according to actual needs, and are not limited here. Step S24 includes:
[0060] Step S241: calculating a threshold corresponding to each frame of the input image at least according to the index value corresponding to each frame of the input image;
[0061] Step S242: Compare the pixel value of each pixel in each frame of the input image with the threshold value corresponding to the input image of that frame to obtain a comparison result, and determine the pixel value of each corresponding pixel in the output image according to the comparison result to generate an output image of the corresponding frame.
[0062] Thus, firstly, the threshold value corresponding to each frame of the input image is calculated at least according to the index value corresponding to each frame of the input image, so each frame of the input image has a corresponding threshold value, and the size of the threshold value is related to the size of the determined index value of each frame of the input image; then, the pixel value of each pixel point in each frame of the input image is compared with the threshold value corresponding to the input image of the frame to obtain a comparison result, and the pixel value of each corresponding pixel point in the output image is determined according to the comparison result to generate the output image of the corresponding frame, so, for each pixel point of each frame of the input image, the pixel value of each corresponding pixel point in the output image of the corresponding frame is determined according to the index value corresponding to the input image of the frame. The pixel values of the corresponding pixel points are optimized, and the pixel value distribution of the same pixel point in several frames of output images is optimized, so that the pixel values of the same pixel point in several frames of output images can present a display grayscale value other than the pixel value that the pixel point itself can display after visually mixing. The image viewer will not obviously feel the limitation of using only two grayscales, so that the image displayed on a binary device or multi-value device such as electronic paper has the effect of displaying a continuous grayscale image, which is closer to a continuous grayscale image, and can effectively improve the display effect of a binary device or multi-value device such as electronic paper, so that the viewer can visually feel the sense of hierarchy and continuity, achieve a better visual experience, and make it more practical and beautiful in actual applications.
[0063] In some embodiments, step S241 specifically includes:
[0064] A threshold value corresponding to each frame of the input image is obtained according to the index value corresponding to each frame of the input image and the number of index values of the index sequence.
[0065] Therefore, in the present application, the threshold value corresponding to the input image of each frame can be obtained according to the index value corresponding to the input image of the frame and the number of index values of the index sequence. The calculation process is simple, the amount of calculation is small, and the calculation speed can be improved.
[0066] In some embodiments, obtaining the threshold corresponding to each frame of the input image according to the index value corresponding to each frame of the input image and the number of index values of the index sequence specifically includes:
[0067] Obtaining a threshold value corresponding to each frame of the input image according to the first operation formula, the index value corresponding to each frame of the input image and the number of index values of the index sequence;
[0068] Wherein, the first operation formula is: , where i is the frame number of the input image, N is the number of index values in the index sequence, I (imodN) is the index sequence, imodN is the modulus operation of i on N, and T (i) is the threshold of the i-th frame image.
[0069] Therefore, according to the above calculation formula, the threshold value of each frame of the input image can be calculated. The calculation process is simple, and an index sequence with a smaller number of index values can be used, so that the frame number of the input image can correspond to a specific index value in the index sequence after a modulo operation is performed on the number of index values. Then, the threshold value of the frame of the input image is calculated by the ratio of the index value to the number of index sequences, which can reduce the number of index values in the index sequence and reduce the space occupied by the index sequence.
[0070] It is understandable that in other embodiments, the pixel value of each pixel in the corresponding frame output image can be directly calculated based on the pixel value of each pixel of the input image of each frame and the index value corresponding to the input image of each frame, which is not limited here.
[0071] It is understandable that, in other embodiments, the first operation formula may be adjusted according to actual needs, for example, adjusting the value of the constant 0.5, etc., which is not limited here.
[0072] For some examples, please refer to Figure 5 , Figure 5 This is a specific flow chart of step S242 of the display control method in an embodiment of the present application. It can be understood that, Figure 5 The steps can be adjusted in order or increased or decreased according to actual needs, and are not limited here. Step S242 specifically includes:
[0073] Step S2421: Determine whether the pixel value of each pixel point of the input image of the frame is greater than the threshold corresponding to the input image of the frame, if so, proceed to step S2422, otherwise, proceed to step S2423.
[0074] Step S2422: Determine that the pixel value of a corresponding pixel point of the output image of the corresponding frame of the input image of the frame is a first value;
[0075] Step S2423: Determine that the pixel value of a corresponding pixel point of the output image of the corresponding frame of the input image is a second value, and the first value is different from the second value.
[0076] In some embodiments, the calculation formula of step S242 is:
[0077] If c(i,x,y)>T(i),h(i,x,y)=255; otherwise,h(i,x,y)=0.
[0078] Among them, h(i,x,y)= is the pixel value of the pixel at the xth row and yth column in the i-th frame output image, c(i,x,y) is the pixel value of the pixel at the xth row and yth column in the i-th frame input image, T(i) is the threshold of the i-th frame input image, i is the frame number, x is the number of rows, and y is the number of columns.
[0079] In this embodiment, the first value is 255, and the second value is 0. In other embodiments, the first value is 0, and the second value is 255. In other embodiments, the first value and the second value may be other values, which are not limited here.
[0080] Therefore, in the present application, a continuous grayscale image (input image) can be converted into a binary image (output image) for display on a binary or multi-value device such as electronic paper. Moreover, by comparing the pixel values of the pixel points of the frame input image with the corresponding threshold values of the frame input image, the operation process of converting the continuous grayscale image (input image) into a binary image (output image) can be simplified, thereby improving the image conversion efficiency.
[0081] In some embodiments, step S24 can be implemented by two algorithms, which specifically include a time-disordered jitter algorithm and a time-ordered jitter algorithm. The time-disordered jitter algorithm means that the index values of each element of the index sequence are randomly set and have no regularity. The time-ordered jitter algorithm means that the index values of each element of the index sequence are not randomly set and have regularity.
[0082] The formulas of step S241 and step S242 corresponding to the two algorithms are the same. Specifically, the first calculation formula of step S241 is:
[0083] , where i is the frame number of the input image, N is the number of index values in the index sequence, I (imodN) is the index sequence, imodN is the modulus operation of i on N, and T (i) is the threshold of the i-th frame image.
[0084] Specifically, the calculation formula of step S242 is:
[0085] If c(i,x,y)>T(i),h(i,x,y)=255; otherwise,h(i,x,y)=0.
[0086] Among them, h(i,x,y) is the pixel value of the pixel at the xth row and yth column in the i-th frame output image, c(i,x,y) is the pixel value of the pixel at the xth row and yth column in the i-th frame input image, T(i) is the threshold of the i-th frame input image, i is the frame number, x is the number of rows, and y is the number of columns.
[0087] The difference between the two algorithms is that they use different index sequences.
[0088] In the first embodiment, the index sequence used by the time disorder jitter algorithm is a random sequence, and an example is as follows: I=[0,2,3,1]. In other embodiments, the index sequence can also be exemplified as: I=[0,1,3,2].
[0089] In some other embodiments, the number of index values of the index sequence may also be 16, 64, etc.
[0090] Therefore, in the time disorder jitter algorithm, the index sequence is a random sequence, and the values of the elements of the index sequence are all different. It can be understood that the elements of the index sequence can be 4, 8, 16, 32, 64, 128, etc., which are not limited here.
[0091] Next, taking the pixel value of the pixel point at row 0 and column 0 of the input image of frame 0 as 64, the pixel value of the pixel point at row 0 and column 0 of the input image of frame 1 as 64, the pixel value of the pixel point at row 0 and column 0 of the input image of frame 2 as 64, and the pixel value of the pixel point at row 0 and column 0 of the input image of frame 3 as 64 as an example, the algorithm is described as follows:
[0092] c(0,0,0)=64, c(1,0,0)=64, c(2,0,0)=64, c(3,0,0)=64;
[0093] The index sequence is I=[0,2,3,1], then the number of index values of the index sequence I is N=4;
[0094] When calculating the threshold T(0) corresponding to the input image of the 0th frame, i=0. According to imodN=0, we need to select the 0th index value 0 in the index sequence I. Therefore,
[0095] ;
[0096] The pixel value h(0,x,y) of each pixel in the input image of frame 0 is: if c(0,x,y)>T(0),h(0,x,y)=255; otherwise,h(0,x,y)=0.
[0097] Therefore, it can be determined that the pixel value of h(0,0,0) is 255.
[0098] When calculating the threshold T(1) corresponding to the first frame input image, i=1, according to imodN=1, therefore, the first index value 2 in the index sequence I needs to be selected, so,
[0099] .
[0100] The pixel value h(1,x,y) of each pixel in the first frame of the input image is: if c(1,x,y)>T(1),h(1,x,y)=255; otherwise,h(1,x,y)=0.
[0101] Therefore, it can be determined that the pixel value of h(1,0,0) is 0.
[0102] When calculating the threshold T(2) corresponding to the second frame input image, i=2. According to imodN=2, we need to select the second index value 3 in the index sequence I. Therefore,
[0103] ;
[0104] The pixel value h(2,x,y) of each pixel in the second frame input image is: if c(2,x,y)>T(2),h(2,x,y)=255; otherwise,h(2,x,y)=0.
[0105] Therefore, it can be determined that the pixel value of h(2,0,0) is 0.
[0106] When calculating the threshold T(3) corresponding to the third frame input image, i=3. According to imodN=3, we need to select the third index value 0 in the index sequence I. Therefore,
[0107] ;
[0108] The pixel value h(3,x,y) of each pixel in the input image of the third frame is: if c(3,x,y)>T(3),h(3,x,y)=255; otherwise,h(3,x,y)=0.
[0109] Therefore, it can be determined that the pixel value of h(3,0,0) is 0.
[0110] It can be seen from this that the pixel value of the pixel in the 0th row and 0th column of the input image of the 0th frame is 64, the pixel value of the pixel in the 0th row and 0th column of the input image of the 1st frame is 64, the pixel value of the pixel in the 0th row and 0th column of the input image of the 2nd frame is 64, and the pixel value of the pixel in the 0th row and 0th column of the input image of the 3rd frame is 64. Correspondingly, the pixel value of the pixel in the 0th row and 0th column of the output image of the 0th frame is 255, the pixel value of the pixel in the 0th row and 0th column of the output image of the 1st frame is 0, the pixel value of the pixel in the 0th row and 0th column of the output image of the 2nd frame is 0, and the pixel value of the pixel in the 0th row and 0th column of the output image of the 3rd frame is 0. Due to the low-pass characteristic of the human eye, when the binary image is observed at a normal observation distance, it will present the visual effect of a continuous grayscale image. Therefore, the displayed grayscale values of the pixel points h(0,0,0), h(1,0,0), h(2,0,0) and h(3,0,0) in a time sequence seen by the human eye are the average value 64 of h(0,0,0), h(1,0,0), h(2,0,0) and h(3,0,0), which are grayscale values other than 0 and 255. Therefore, although the output image is a binary image, it can present a display effect with more grayscale values, making the output image more layered.
[0111] Thus, in the first embodiment, a threshold value corresponding to the input image of each frame is calculated at least according to the index value corresponding to the input image of each frame; the pixel value of each pixel in the input image of each frame is compared with the threshold value corresponding to the input image of the frame to obtain a comparison result, and the pixel value of each corresponding pixel in the output image is determined according to the comparison result to generate an output image of the corresponding frame. Since the index sequence selects a random sequence, the pixel value of each pixel in the output image has a small dependence on the selected index sequence. Therefore, only one index sequence needs to be pre-stored, which takes up little memory.
[0112] In the second embodiment, the index sequence used by the time-ordered jitter algorithm is an ordered sequence, and an example is as follows: I=[0, 1, 2, 3].
[0113] In other embodiments, the index sequence may also be exemplified as: I=[1,3,5,7].
[0114] It is understandable that in the time-ordered jitter algorithm, the index sequence is an ordered sequence, and the values of the elements of the ordered sequence are different. It is understandable that the elements of the index sequence can be 4, 8, 16, 32, 64, 128, etc., which are not limited here.
[0115] In the second embodiment, a threshold value corresponding to the input image of each frame is calculated at least based on the index value corresponding to the input image of each frame; the pixel value of each pixel in the input image of each frame is compared with the threshold value corresponding to the input image of the frame to obtain a comparison result, and the pixel value of each corresponding pixel in the output image is determined based on the comparison result to generate the output image of the corresponding frame. The specific implementation method is the same as the first embodiment and will not be repeated here.
[0116] In the second embodiment, by controlling the difference between adjacent values of the index sequence, the brightness change between different frames can be controlled to reduce flicker.
[0117] Please refer to Figure 6 , Figure 6 Schematic diagram of a module in which the processor 10 controls the display module 30 in an embodiment of the present application. Specifically, the memory 20 also includes a register 21 and an external memory 22. The processor 10 is connected to the register 21. The register 21 interacts with the external memory 22 via an APB (Advanced Peripheral Bus) bus, and reads the index sequence from the external memory 22 to the register 21 for temporary storage. It can be understood that the processor 10 is used to:
[0118] Acquire a video stream, the video stream comprising a plurality of input image frames in a time sequence, the plurality of input image frames having frame numbers arranged in sequence according to the time sequence;
[0119] Obtain an index sequence, wherein the index sequence includes multiple index values;
[0120] Determine, according to the frame sequence number of each input image frame in the plurality of input image frames, an index value corresponding to each input image frame in the index sequence;
[0121] Determine the pixel value of each corresponding pixel point in the output image of the corresponding frame according to each pixel point of the input image of each frame and the index value corresponding to the input image of the frame, so as to generate the output image of the corresponding frame, thereby generating a plurality of output images;
[0122] The display module 30 of the electronic device 100 is controlled to output the plurality of frames of output images in sequence to display the video stream.
[0123] Therefore, in the present application, the present application optimizes the binarization algorithm, that is, introduces an index sequence, and then determines the index value corresponding to each frame of input image in the index sequence according to the frame sequence number of each frame of input image in the several frames of input image; and then determines the pixel value of each corresponding pixel point in the corresponding frame output image according to each pixel point of the input image of each frame and the index value corresponding to the frame of input image, so as to generate the output image of the corresponding frame, thereby generating several frames of output images. It can be seen that although the input image is a continuous grayscale image and the output image is a binary or multi-valued non-continuous grayscale image, the pixel value of each corresponding pixel point in the corresponding frame output image is determined by the index value corresponding to each pixel point of the input image of each frame, which is optimized. The pixel value distribution of the same pixel point in several frames of output images is optimized, so that the pixel value of the same pixel point in several frames of output images can present a display grayscale value other than the pixel value that the pixel point itself can display after visually mixing, so that the display grayscale value of the same pixel point of several frames of input images and the corresponding several frames of output images are closer, and the image viewer will not obviously feel the limitation of using only two grayscales, so that the image displayed on a binary device or multi-value device such as electronic paper has the effect of displaying a continuous grayscale image, which is closer to a continuous grayscale image, and can effectively improve the display effect of a binary device or multi-value device such as electronic paper, so that the viewer can visually feel the sense of hierarchy and continuity, achieve a better visual experience, and make it more practical and beautiful in actual applications.
[0124] Specifically, the processor 10 includes a threshold generation module 11 and an image generation module 12. The threshold generation module 11 is connected to the register 21. The threshold generation module 11 has two input sources, one of which is a plurality of input image frames (a plurality of input image frames of an input video stream), and the other input source is an index sequence from the register 21. The threshold generation module 11 is used to determine the index value corresponding to each input image frame in the index sequence according to the frame sequence number of each input image frame in the plurality of input image frames, and to calculate the threshold value corresponding to each input image frame at least according to the index value corresponding to each input image frame; the image generation module 12 compares the pixel value of each pixel point in each input image frame with the threshold value corresponding to the input image frame to obtain a comparison result, and determines the pixel value of each corresponding pixel point in the output image according to the comparison result to generate an output image of the corresponding frame (a plurality of output images of an output video stream).
[0125] Thus, firstly, the threshold value corresponding to each frame of the input image is calculated at least according to the index value corresponding to each frame of the input image, so each frame of the input image has a corresponding threshold value, and the size of the threshold value is related to the size of the determined index value of each frame of the input image; then, the pixel value of each pixel point in each frame of the input image is compared with the threshold value corresponding to the input image of the frame to obtain a comparison result, and the pixel value of each corresponding pixel point in the output image is determined according to the comparison result to generate the output image of the corresponding frame, so, for each pixel point of each frame of the input image, the pixel value of each corresponding pixel point in the output image of the corresponding frame is determined according to the index value corresponding to the input image of the frame. The pixel values of the corresponding pixel points are optimized, and the pixel value distribution of the same pixel point in several frames of output images is optimized, so that the pixel values of the same pixel point in several frames of output images can present a display grayscale value other than the pixel value that the pixel point itself can display after visually mixing. The image viewer will not obviously feel the limitation of using only two grayscales, so that the image displayed on a binary device or multi-value device such as electronic paper has the effect of displaying a continuous grayscale image, which is closer to a continuous grayscale image, and can effectively improve the display effect of a binary device or multi-value device such as electronic paper, so that the viewer can visually feel the sense of hierarchy and continuity, achieve a better visual experience, and make it more practical and beautiful in actual applications.
[0126] In some embodiments, the threshold value generating module 11 is used to obtain the threshold value corresponding to each frame of the input image according to the index value corresponding to each frame of the input image and the number of index values of the index sequence.
[0127] Therefore, in the present application, the threshold value corresponding to the input image of each frame can be obtained according to the index value corresponding to the input image of the frame and the number of index values of the index sequence. The calculation process is simple, the amount of calculation is small, and the calculation speed can be improved.
[0128] In some embodiments, the image generation module 12 is used to determine whether the pixel value of each pixel point of the input image of the frame is greater than a threshold value corresponding to the input image of the frame; if so, determine that the pixel value of a corresponding pixel point of the corresponding frame output image of the input image of the frame is a first value; if not, determine that the pixel value of a corresponding pixel point of the corresponding frame output image of the input image of the frame is a second value, and the first value is different from the second value.
[0129] Therefore, in the present application, a continuous grayscale image (input image) can be converted into a binary image (output image) for display on a binary or multi-value device such as electronic paper. Moreover, by comparing the pixel values of the pixel points of the frame input image with the corresponding threshold values of the frame input image, the operation process of converting the continuous grayscale image (input image) into a binary image (output image) can be simplified, thereby improving the image conversion efficiency.
[0130] In some embodiments, both the threshold generation module 11 and the image generation module 12 may use the above two algorithms, which will not be described in detail here.
[0131] In some embodiments, the processor 10 further includes a multiplexer 13. The multiplexer 13 is connected to the output end of the image generation module 12 and the input end of the threshold generation module 11. When the multiplexer 13 chooses to enable the dithering algorithm, the video stream is generated from the threshold generation module 11 through the image generation module 12 to generate an output video stream and is output through the multiplexer 13; when the multiplexer 13 chooses not to enable the dithering algorithm, the video stream is directly output from the multiplexer 13 without passing through the threshold generation module 11 and the image generation module 12.
[0132] Therefore, by using the multiplexer 13, it is possible to choose to perform dithering algorithm processing on the video stream or not, thereby increasing the diversity of the output video stream selectivity.
[0133] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0134] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0135] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to perform the steps of the aforementioned display control method.
[0136] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A display control method, applied to an electronic device, wherein the electronic device is an electronic paper, and the electronic device includes a display module, characterized in that: The display control method comprises: Acquire a video stream, the video stream comprising a plurality of input image frames in a time sequence, the plurality of input image frames having frame numbers arranged in sequence according to the time sequence; Obtain an index sequence, wherein the index sequence is a random sequence, and the index sequence includes a plurality of index values, and the plurality of index values are different from each other, wherein the index sequence used by the input images with different frame numbers is the same index sequence; Determine, according to the frame sequence number of each input image frame in the plurality of input image frames, an index value corresponding to each input image frame in the index sequence; Obtaining a threshold value corresponding to each frame of the input image according to the first operation formula, the index value corresponding to each frame of the input image and the number of index values of the index sequence; Wherein, the first operation formula is: ,in, is the frame number of the input image, N is the number of index values in the index sequence, is the index sequence, Perform a modulo operation on N for i, T is the threshold of the i-th frame image; Comparing the pixel value of each pixel point in each frame of the input image with the threshold value corresponding to the input image of the frame to obtain a comparison result, and determining the pixel value of each corresponding pixel point in the output image according to the comparison result to generate an output image of the corresponding frame, thereby generating a plurality of frames of output images; wherein the input image is a continuous grayscale image, the output image is a binary image, and the input image corresponds to the output image one by one; The display module of the electronic device is controlled to output the plurality of frames of output images in sequence to display the video stream.
2. The display control method according to claim 1, characterized in that: The step of determining the index value corresponding to each input image frame in the index sequence according to the frame sequence number of each input image frame in the plurality of input image frames includes: Performing a modulo operation on the frame sequence number of each frame of the input image and the number of index frames of the index sequence to obtain an index value sequence number of the index sequence corresponding to each frame of the input image; The index value corresponding to each frame of the input image in the index sequence is determined according to the index value sequence of the index sequence.
3. The display control method according to claim 1, characterized in that: The step of comparing the pixel value of each pixel point in each frame of the input image with a threshold value corresponding to the input image of the frame to obtain a comparison result, and determining the pixel value of each corresponding pixel point in the output image according to the comparison result to generate an output image of the corresponding frame includes: When the comparison result is that the pixel value of the pixel point of the input image of the frame is greater than the threshold value corresponding to the input image of the frame, determine that the pixel value of a corresponding pixel point of the output image of the frame corresponding to the input image of the frame is a first value; When the comparison result is that the pixel value of the pixel point of the input image of the frame is less than the threshold corresponding to the input image of the frame, the pixel value of a corresponding pixel point of the output image of the corresponding frame of the input image of the frame is determined to be a second value, and the first value is different from the second value.
4. The display control method according to any one of claims 1 to 3, characterized in that: The minimum value of the index value in the index sequence is greater than or equal to 0, and the maximum value is less than or equal to N-1, where N is the number of index values in the index sequence.
5. An electronic device, characterized in that: It comprises a display module, a processor and a memory, wherein the processor is connected to the display module and the memory, a computer program is stored in the memory, and the processor runs the computer program to execute the steps of the display control method described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program is executed by a processor to perform the steps of the display control method according to any one of claims 1 to 4.
7. An electronic paper, characterized in that: include: register; A threshold generation module is connected to the register, and the threshold generation module has a first input source and a second input source, the first input source is an input video stream, the input video stream includes a plurality of frames of input images, and the second input source is an index sequence from the register, wherein the index sequence is a random sequence, the index sequence includes a plurality of index values, and the plurality of index values are different from each other; the threshold generation module is used to determine the index value corresponding to each frame of the input image in the index sequence according to the frame sequence number of each frame of the input image in the plurality of frames of the input image, and to obtain the threshold value corresponding to each frame of the input image according to a first operation formula, the index value corresponding to each frame of the input image and the number of index values of the index sequence; wherein the first operation formula is: ,in, is the frame number of the input image, N is the number of index values in the index sequence, is the index sequence, Perform a modulo operation on N for i, T is the threshold value of the i-th frame image, wherein the index sequence used by the input images with different frame numbers is the same index sequence; An image generation module, used for comparing the pixel value of each pixel point in each frame of the input image with the threshold value corresponding to the input image of the frame to obtain a comparison result, and determining the pixel value of each corresponding pixel point in the output image according to the comparison result to generate an output image of the corresponding frame, wherein the input image is a continuous grayscale image, the output image is a binary image, the input image corresponds to the output image one by one, and a plurality of frames of the output image form an output video stream; and A multiplexer is connected to the output end of the image generation module and the input end of the threshold generation module. When the multiplexer chooses to enable the dithering algorithm, the input video stream is generated from the threshold generation module through the image generation module to the output video stream and is output through the multiplexer; when the multiplexer chooses not to enable the dithering algorithm, the input video stream is directly output from the multiplexer without passing through the threshold generation module and the image generation module.
8. The electronic paper according to claim 7, characterized in that: The threshold generation module is used to obtain the threshold corresponding to each frame of the input image according to the index value corresponding to each frame of the input image and the number of index values of the index sequence; and / or, the image generation module is used to determine whether the pixel value of each pixel point of the input image of the frame is greater than the threshold corresponding to the input image of the frame, and if so, determine that the pixel value of a corresponding pixel point of the corresponding frame output image of the input image of the frame is a first value; if not, determine that the pixel value of a corresponding pixel point of the corresponding frame output image of the input image of the frame is a second value, and the first value is different from the second value.
Citation Information
Patent Citations
Display control method, display control device and system
CN117496918A