Image Blocking Method, Device, Display Device, and Storage Medium
By obtaining the resolution of multiple display screens to determine the basic resolution and scaling and chunking the image, the problems of uneven block size and incomplete division in image blocks are solved, and image processing is simplified and efficiency improvement is achieved.
Patent Information
- Application Number
- CN202310521582.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2043-05-10
AI Technical Summary
The prior art has problems of uneven block size and incomplete division in the process of image chunking, which leads to complicated subsequent calculations and processing.
By obtaining the resolution of multiple displays, determining the basic resolution, and scaling the image based on the basic resolution and the target resolution of the target display, obtaining the scaled image, and then tiling it.
The block size uniformity and adaptability after image chunking is achieved, and the subsequent image processing and calculation process is simplified.
Smart Images

Figure CN116504200B_ABST
Abstract
Description
Technical Field
[0001] This application relates to, but is not limited to, the field of image processing technology, and in particular, to an image segmentation method, apparatus, display device, and storage medium. Background Art
[0002] In some display driver chips, some image qualities usually adopt global gain or compensation, that is, an entire frame of image is processed and calculated as a whole. In this way, there are problems of insufficient local processing or overprocessing. To solve this problem, it is necessary to divide an entire frame of image into several blocks and process them separately. In the process of segmenting an image in the related art, when the image is segmented with a fixed block size, different resolution pictures will be segmented into different numbers of blocks, and there will be a situation where the division is not complete, which is not conducive to subsequent calculation and processing; when segmenting with a fixed number of blocks, the size of the block is adaptively changed according to the resolution of the image, but there will also be a situation where the size of the block is a decimal or the block size is uneven in order to make up an integer, making subsequent processing more cumbersome. Summary of the Invention
[0003] In view of this, embodiments of the present application at least provide an image segmentation method, apparatus, display device, and storage medium.
[0004] The technical solution of the embodiments of the present application is implemented as follows:
[0005] On the one hand, embodiments of the present application provide an image segmentation method, and the method includes:
[0006] Obtain the resolutions of multiple types of display screens capable of displaying the image to be segmented;
[0007] Based on the resolutions of the multiple types of display screens, determine a base resolution;
[0008] Based on the base resolution and the target resolution of the target display screen of the image to be segmented, perform image scaling on the image to be segmented to obtain a scaled image;
[0009] Segment the scaled image to obtain multiple image blocks of the image to be segmented.
[0010] On the other hand, embodiments of the present application provide an image segmentation apparatus, and the image segmentation apparatus includes:
[0011] A first acquisition module, configured to obtain the resolutions of multiple types of display screens capable of displaying the image to be segmented;
[0012] A first determination module, configured to determine a base resolution based on the resolutions of the multiple types of display screens;
[0013] A first scaling module, configured to perform image scaling on the image to be segmented based on the base resolution and the target resolution of the target display screen of the image to be segmented, so as to obtain a scaled image;
[0014] A first segmentation module, configured to segment the scaled image to obtain multiple image blocks of the image to be segmented.
[0015] In another aspect, an embodiment of the present application provides a display device, where the display device includes: a display panel and a display driver chip; the display driver chip is configured to implement the steps in the above method and drive the display panel to display a to-be-displayed image obtained from the multiple image blocks.
[0016] In another aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program that can run on the processor, and when the processor executes the program, it implements some or all of the steps in the above method.
[0017] In yet another aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements some or all of the steps in the above method.
[0018] In yet another aspect, an embodiment of the present application provides a computer program, including computer-readable code, and when the computer-readable code runs in a computer device, a processor in the computer device executes to implement some or all of the steps in the above method.
[0019] In yet another aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, it implements some or all of the steps in the above method.
[0020] An embodiment of the present application provides an image block segmentation method. For the to-be-block-segmented image obtained, first, the resolutions of multiple types of display screens capable of displaying the to-be-block-segmented image are obtained, and based on the resolutions of these multiple types of display screens, the basic resolution is determined. In this way, by means of the resolutions of multiple types of display screens, the basic resolution is set so that the basic resolution can meet the requirements of multiple types of display screens. Then, according to the basic resolution and the target resolution of the target display screen, the to-be-block-segmented image is scaled to obtain a scaled image. In this way, since the size of the to-be-block-segmented image is the same as the target resolution of the target display screen for actually displaying the to-be-block-segmented image, by combining the basic resolution and the target resolution to scale the size of the to-be-block-segmented image, it is possible to make the image size of the scaled image the same as the basic resolution. In this way, for any to-be-block-segmented image with any resolution, the size of the to-be-block-segmented image can be scaled by the basic resolution and the target resolution to obtain a scaled image with an image size the same as the basic resolution. Moreover, since the basic resolution is set by the resolutions of multiple types of display screens, the size of the scaled image can meet the resolutions of multiple types of displays. Furthermore, by performing block segmentation on the scaled image, the obtained multiple image blocks are beneficial for the subsequent image display process.
[0021] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the technical solutions of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings here are incorporated into the specification and constitute a part of this specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to explain the technical solutions of the present application.
[0023] Figure 1 It is a schematic flowchart of the implementation of the image block segmentation method provided by the embodiment of the present application;
[0024] Figure 2 It is another schematic flowchart of the implementation of the image block segmentation method provided by the embodiment of the present application;
[0025] Figure 3 It is a schematic framework diagram of downsampling the pixel data of a single channel in the embodiment of the present application;
[0026] Figure 4 It is a schematic framework diagram of downsampling the pixel data of 4 channels in the embodiment of the present application;
[0027] Figure 5 It is another schematic framework diagram of downsampling the pixel data of 4 channels in the embodiment of the present application;
[0028] Figure 6 It is a schematic composition structure diagram of an image block segmentation device provided by the embodiment of the present application;
[0029] Figure 7 This is a schematic diagram of the hardware entity of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0030] In order to make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be construed as limitations on the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0031] In the following description, "some embodiments" are involved, which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and they can be combined with each other without conflict.
[0032] The terms "first / second / third" involved are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.
[0034] Before further elaborating on the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained first. The nouns and terms involved in the embodiments of the present application are applicable to the following explanations.
[0035] The integrated circuit (IC) industry has continuously promoted the development of the smartphone industry. Touch and Display Drive Integration (TDDI) brings a unified system architecture. In the original system architecture, since the display and touch chips are separated, this may lead to the existence of some display noises. However, due to the unified control implemented by TDDI, it has a better effect in noise management. TDDI adopts the "time-sharing scanning" method, which divides the 1-frame display time into two parts. One part is used for touch scanning, and the other part is used for display scanning, without interference with each other, fundamentally reducing the hidden danger of signal interference.
[0036] To better understand the image segmentation method provided in the embodiments of the present application, the process of implementing image segmentation in some embodiments will be described below.
[0037] The embodiments of the present application provide an image segmentation method, which obtains the resolutions of multiple types of display screens capable of displaying the image to be segmented, and determines the base resolution according to the resolutions of these multiple types of display screens. In this way, by using the resolutions of multiple types of display screens to set the base resolution, the base resolution can meet the requirements of multiple types of display screens. This can ensure that the image size of the scaled image can meet the base resolution. Thus, for an image to be segmented with any resolution, the size of the image to be segmented can be scaled through the base resolution and the target resolution to obtain a scaled image whose image size matches the base resolution. As a result, the size of the scaled image can meet the resolutions of multiple types of displays. Furthermore, by segmenting the scaled image, the obtained multiple image blocks are beneficial for subsequent image display processes. The image segmentation method provided by the embodiments of the present application can be implemented by a display device, which can be a component of an electronic device. The electronic device can be various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device), etc., or can be implemented as a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0038] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.
[0039] Figure 1 It is a schematic flowchart of the implementation of the image segmentation method provided by the embodiments of the present application. As Figure 1 shown, it can be implemented through the following steps S101 to S104.
[0040] Step S101, obtain the resolutions of multiple types of display screens capable of displaying the image to be segmented.
[0041] In some embodiments, the image to be segmented may be image data input into a display driver chip. The image data may be one or more frames of images, or may also be a video, etc. The image to be segmented may be an image with complex picture content or an image with simple picture content. After the image to be segmented is segmented, the gain of pixels is determined according to the obtained image blocks, and then the gain is multiplied by the image to be segmented to obtain an image for display on a display screen. The multiple types of display screens are all display screens capable of displaying the image to be segmented. The multiple types of display screens may be display screens with different resolutions. The models and sizes of the multiple types of display screens may be the same or different.
[0042] Step S102, based on the resolutions of the multiple types of display screens, determine a base resolution.
[0043] In some embodiments, the base resolution of the image to be segmented is a resolution applicable to multiple display screens, and the base resolution may be less than the resolutions of the multiple display screens. The base resolution can be set through the resolutions of the multiple types of display screens, such that the base resolution is less than or equal to the lowest resolution among the resolutions of the multiple types of display screens.
[0044] In some possible implementation manners, by finding the minimum resolution among the resolutions of the multiple display screens, the base resolution is set to be less than or equal to the minimum resolution. In this way, setting the base resolution through the resolutions of the multiple types of display screens facilitates scaling the image to be segmented based on the base resolution and the target resolution, such that the size of the scaled image meets the base resolution, thereby meeting the resolutions of the multiple types of display screens.
[0045] Step S103, based on the base resolution and the target resolution of the target display screen of the image to be segmented, perform image scaling on the image to be segmented to obtain a scaled image.
[0046] In some embodiments, the target display screen is the display screen actually displaying the image to be segmented, so the target resolution of the target display screen is the same as the size of the image to be segmented. In this way, the size of the image to be segmented is scaled according to the proportional coefficient between the base resolution and the target resolution of the target display screen of the image to be segmented, such that the image size of the scaled image is the same as the base resolution.
[0047] In some possible implementation manners, the scaling process of the image to be segmented can be implemented through Figure 2 the steps shown below:
[0048] Step S201, determine the proportional coefficient between the base resolution and the target resolution.
[0049] In some embodiments, the target resolution of the target display screen is obtained to determine the proportionality coefficient between the target resolution and the base resolution.
[0050] In some possible implementation manners, the proportionality coefficient includes a horizontal proportionality coefficient and a vertical proportionality coefficient. First, based on the horizontal resolution of the base resolution and the horizontal resolution of the target resolution, the horizontal proportionality coefficient is determined. For example, the horizontal resolution of the target resolution is divided by the horizontal resolution of the base resolution to obtain the horizontal proportionality coefficient. Then, based on the vertical resolution of the base resolution and the vertical resolution of the target resolution, the vertical proportionality coefficient is determined. For example, the vertical resolution of the target resolution is divided by the vertical resolution of the base resolution to obtain the vertical proportionality coefficient.
[0051] Step S202: Based on the proportionality coefficient, perform image scaling on the image to be segmented to obtain a scaled image.
[0052] In some embodiments, according to the proportionality coefficient, image scaling is performed on the image to be segmented to adjust the image size of the image to be segmented, so that the image size of the obtained scaled image can match the base resolution. In this way, since the size of the image to be segmented is the same as the target resolution, after adjusting the size of the image to be segmented by the proportionality coefficient, the size of the scaled image is the same as the target resolution. Thus, for an image to be segmented with any resolution, image scaling can be performed on the image to be segmented by the proportionality coefficient to obtain a compressed image with an image size the same as the base resolution, so that the sizes of the compressed images corresponding to images to be segmented with different resolutions are the same.
[0053] In some possible implementation manners, when the pixel data of at least one channel of the image to be segmented is input in each clock cycle, the first count value of the data counter for counting the input pixel data is compared with the second count value of the sampling counter; and according to the comparison result, it is determined whether to sample the input pixel data to implement image scaling on the image to be segmented to obtain a scaled image. Wherein, the first count value of the data counter increases with the input pixel data, and the second count value of the sampling counter is adjusted according to the proportionality coefficient.
[0054] Step S104: Segment the scaled image to obtain multiple image blocks of the image to be segmented.
[0055] In some embodiments, the scaled image can be divided into blocks according to a fixed number of blocks to obtain multiple image blocks that meet the number of blocks. Alternatively, the scaled image can be divided into blocks according to a fixed block size to obtain multiple image blocks that meet the block size. Since the scaled image is obtained by adjusting the image size of the image to be blocked according to the scale factor, and the scale factor is obtained by the ratio between the base resolution and the target resolution, the image sizes of the scaled images corresponding to the images to be blocked with different resolutions can all be the same as the base resolution. Furthermore, for images to be blocked with different resolutions, multiple image blocks with the same size and the same number can be obtained by blocking, which is convenient for subsequent processing and calculation of the multiple image blocks.
[0056] In the embodiments of the present application, by obtaining the resolutions of multiple types of display screens capable of displaying the image to be blocked, the base resolution is determined. In this way, by setting the base resolution through the resolutions of multiple types of display screens, the base resolution can meet the resolution requirements of multiple types of display screens. Then, according to the base resolution and the target resolution of the target display screen, the image to be blocked is scaled to obtain a scaled image. In this way, since the size of the image to be blocked is the same as the target resolution of the target display screen that actually displays the image to be blocked, by combining the base resolution and the target resolution to scale the size of the image to be blocked, the image size of the scaled image can be the same as the base resolution. In this way, for an image to be blocked with any resolution, the size of the image to be blocked can be scaled through the base resolution and the target resolution to obtain a scaled image with an image size the same as the base resolution. Moreover, since the base resolution is set through the resolutions of multiple types of display screens, the size of the scaled image can meet the resolutions of multiple types of displays. Furthermore, by blocking the scaled image, the multiple obtained image blocks are beneficial for the subsequent image display process.
[0057] In some embodiments, by obtaining multiple types of display screens capable of image display, and setting the base resolution through the minimum resolution of the multiple types of display screens, that is, step S102 above can be implemented through the following steps S121 and S122 (not shown in the figure):
[0058] Step S121, determine the minimum resolution among the resolutions of the multiple types of display screens.
[0059] In some embodiments, by obtaining the resolution of each type of display screen and finding the minimum resolution therefrom.
[0060] Step S122, based on the minimum resolution, determine the base resolution.
[0061] In some embodiments, after finding the minimum resolution, the base resolution can be set to be less than or equal to the minimum resolution. In this way, by using the minimum resolution among the resolutions of multiple types of display screens to set the base resolution, after image scaling according to the scale factor calculated based on the base resolution, the image size of the scaled image can be less than the resolutions of multiple types of display screens, so that the image can be displayed on the multiple types of display screens with a better picture quality.
[0062] In some embodiments, for the pixel data of at least one channel input within a target clock cycle, by analyzing the first count value of the data counter and the second count value of the sampling counter, the pixel data of the at least one channel can be processed to obtain the adjusted data within the clock cycle, and thus the scaled image can be obtained through the adjusted data within multiple clock cycles; that is, the above step S202 can be implemented through the following steps S221 to S225 (not shown in the figure):
[0063] Step S221: Determine the pixel data of at least one channel input within the target clock cycle in the to-be-blocked image.
[0064] In some embodiments, along the pixel rows of the to-be-blocked image, the pixel data of at least one channel is input within each clock cycle, that is, the pixel data of the at least one channel is the input data within one clock cycle.
[0065] For example, single-channel pixel data is input within one clock cycle, 2-channel pixel data is input within one clock cycle, 3-channel pixel data is input within one clock cycle, or 4-channel pixel data is input within one clock cycle, etc. If the pixel data of at least one channel is taken as an example of single-channel pixel data, the input data within the first clock cycle is the first pixel data at the leftmost side of the first row of the to-be-blocked image. If the pixel data of at least one channel is taken as an example of 4-channel pixel data, the input data within the first clock cycle is 4 consecutive pixel data starting from the leftmost side of the first row of the to-be-blocked image.
[0066] Step S222: Determine the first count value of at least one data counter that counts the pixel data of the at least one channel within the target clock cycle.
[0067] In some embodiments, if pixel data of at least one channel is input within the target clock cycle, then the input pixel data of at least one channel is counted by at least one data counter. The at least one data counter can be one, or the same as the number of channels of the pixel data of at least one channel. For example, for pixel data of four channels, 4 counters are used for counting, and each counter counts the pixel data of one channel. Within the target clock cycle, a first count value of each counter is obtained. Among the at least one data counter, the first count value of the data counter is obtained by accumulating the number of channels of all the pixel data that has been input currently.
[0068] In some possible implementation manners, that is, the above step S222 can be implemented through the following steps:
[0069] First step, obtain the historical count value of each data counter in the previous clock cycle.
[0070] Here, the sampling counter corresponds to the data counter one by one; the previous clock cycle is adjacent to the target clock cycle in time sequence, and the previous clock cycle is before the target clock cycle; each data counter in the first clock cycle has a preset initial value, and the preset initial value of each data counter corresponds to the number of channels of the pixel data input in the first clock cycle.
[0071] Second step, based on the historical count value of each data counter and the number of channels of the at least one channel, determine the first count value of each data counter in the target clock cycle.
[0072] In this way, every time pixel data of at least one channel is input within the target clock cycle, by adding the historical count value of the data counter in the previous clock cycle to the number of channels of the at least one channel, the first count value of the data counter in the target clock cycle is obtained; thus, the pixel data of at least one channel can be counted quickly and accurately by at least one counter.
[0073] In some possible implementation manners, each data counter in at least one data counter can also be used to count the total number of channels of the pixel data that has been input currently, and the first count value of each data counter is obtained.
[0074] Here, if the pixel data of at least one channel is used as the input data within the target clock cycle, then the first count value of each data counter among the at least one data counter increases; moreover, the first count value of each data counter is obtained by counting the total number of channels of the pixel data that has been input so far. For example, if the pixel data of at least one channel is the pixel data of 4 channels, that is, 4-channel pixel data is input within the target clock cycle, and if four data counters are used to count the pixel data of 4 channels, that is, one data counter counts the pixel data of one channel. The first data counter counts the pixel data of the first channel, so the first count value is 1; the second data counter counts the pixel data of the first two channels, so the first count value is 2; the third data counter counts the pixel data of the first three channels, so the first count value is 3, and so on.
[0075] Step S223: Determine the second count value of at least one sampling counter based on the proportionality coefficient and the first count value of the at least one data counter.
[0076] In some embodiments, the sampling counter corresponds one-to-one with the data counter. That is, the number of sampling counters is the same as the number of data counters. If one data counter is used to count the pixel data of at least one channel, then one sampling counter is also used to count the sampling situation of the pixel data. To enable uniform sampling through the second count value of the sampling counter, according to the comparison result between the first count value and the second count value, and referring to the second count value of the current sampling counter and the proportionality coefficient, calculate the second count value of the next sampling counter.
[0077] In some possible implementation manners, the above step S223 can be implemented through the following steps S2231 and S2232 (not shown in the figure):
[0078] Step S2231: Compare the first count value of the current data counter among the at least one data counter with the second count value of the current sampling counter corresponding to the current data counter to obtain a comparison result.
[0079] Here, since the data counter and the sampling counter are in one-to-one correspondence, the current sampling counter corresponding to the current data counter is the data counter and the sampling counter for the same channel within one clock cycle. Compare the integer part of the first count value of the current data counter with the integer part of the second count value of the current sampling counter to determine whether the integer parts of the two count values are the same, and obtain a comparison result. In this way, the comparison result is: the integer part of the first count value of the current data counter is the same as the integer part of the second count value of the current sampling counter, or, the integer part of the first count value of the current data counter is different from the integer part of the second count value of the current sampling counter.
[0080] Step S2232, based on the comparison result, the proportionality coefficient, and the second count value of the current sampling counter, determine the second count value of the next sampling counter of the current sampling counter.
[0081] Here, according to this comparison result, through the proportionality coefficient and the second count value of the current sampling counter, the second count value of the next sampling counter of the current sampling counter can be calculated. Similarly, the second count value of the current sampling counter can be obtained by comparing the second count value of the previous sampling counter with the first count value of the previous data counter and calculating through the proportionality coefficient and the second count value of the previous sampling counter. In this way, by analyzing whether the integer part of the first count value of the current data counter is the same as the integer part of the second count value of the current sampling counter, a comparison result is obtained; thus, according to the comparison result, through the proportionality coefficient and the second count value of the current sampling counter, the second count value of the next sampling counter can be determined. In this way, in the process of determining the second count value of the next sampling counter, the proportionality coefficient between the target resolution and the base resolution and the second count value of the current sampling counter can be fully considered, and thus uniform sampling of pixel data in the image can be achieved through the second count value of the sampling counter.
[0082] In some possible implementation manners, a second count value of at least one sampling counter may be determined according to a proportionality coefficient and the number of times of sampling pixel data of at least one channel in the previous clock cycle. The previous clock cycle is adjacent to the target clock cycle in time sequence, and the previous clock cycle is before the target clock cycle. For example, in at least one sampling counter in each clock cycle, a reference value is set for the first sampling counter, but the reference of the first sampling counter in different clock cycles changes according to the sampling quantity of at least one channel in the previous clock cycle. For example, if all the pixel data of at least one channel are sampled in the previous clock cycle, then the reference value of the first sampling counter in the next clock cycle is increased by three proportionality coefficients; if there is one piece of pixel data of at least one channel not sampled in the previous clock cycle, then the reference value of the first sampling counter in the next clock cycle is increased by two proportionality coefficients. If there are 4 channels in at least one channel, then there will be at most two channels of pixel data not sampled. In this way, by analyzing the sampling data of the channels in the previous clock cycle in combination with the proportionality coefficient to determine the count value of the sampling counter, the second count value of the sampling counter can be made to better match the base resolution, so as to facilitate subsequent uniform sampling through the comparison result of the first count value and the second count value.
[0083] Step S224: Based on the first count value and the second count value, perform data processing on the pixel data of at least one channel to obtain the adjusted data in the target clock cycle.
[0084] In some embodiments, the integer part of the first count value and the integer part of the second count value are compared, and thus, according to the comparison result, the size of the pixel data of at least one channel is adjusted to obtain the adjusted data in the target clock cycle. For example, if the integer part of the first count value is the same as the integer part of the second count value, then the size of the pixel data of at least one channel is reduced by downsampling to obtain the adjusted data.
[0085] Step S225: Based on the adjusted data in multiple clock cycles, determine the scaled image.
[0086] In some embodiments, the multiple clock cycles are the clock cycles occupied by all the pixel data of the image to be blocked input. By obtaining the adjusted data in each clock cycle, a scaled image with an image size the same as the base resolution can be obtained.
[0087] In the embodiments of the present application, since the second count value is determined by the proportionality coefficient and the first count value of the data counter, by comparing the first count value of the data counter and the second count value of the sampling counter and performing data processing on the pixel data of at least one channel, the finally obtained compressed image can be made to better match the proportionality coefficient between the target resolution and the base resolution. Therefore, after image block division is performed according to the compressed image, the efficiency of data processing during subsequent image display can be improved, and thus the image display quality effect can be improved.
[0088] In other embodiments, when the pixel data of at least one channel is pixel data of 2 or more channels, first, the number of clock cycles that need to be delayed is determined according to the number of channels. For example, when the number of channels is 4, the number of clock cycles to be delayed is determined to be 2. Secondly, the pixel data of multiple channels serving as input data is delayed according to the number of clock cycles to be delayed. As Figure 5 shown, the pixel data of 4 channels is delayed by two clock cycles. Thirdly, according to the number of clock cycles to be delayed and the number of channels, the first count value of the data counter in the first clock cycle with data input is determined; the subsequent first count values of the data counter are all increased by the number of channels based on the first count value of the previous data counter. As Figure 5 shown, after the pixel data of 4 channels is delayed by two clock cycles, it is input in the third clock cycle, and the first count value of the data counter in the third clock cycle is 9. Finally, the second count value of the sampling counter in the first clock cycle with data input is still determined by the second count value of the sampling counter in the previous clock cycle and the proportionality coefficient. In this way, when pixel data of multiple channels is input in each clock cycle, by appropriately delaying the pixel data, the uniformity of subsequent sampling of the pixel data can be improved.
[0089] In some embodiments, according to different comparison results, different methods are used to determine the second count value of the subsequent sampling counter, that is, step S2232 above can be implemented in the following two ways:
[0090] Method 1: When the comparison result indicates that the integer part of the first count value is the same as the integer part of the second count value, based on the proportionality coefficient, the second count value of the current sampling counter is adjusted to obtain the second count value of the subsequent sampling counter.
[0091] Here, in the hardware design, since the first count value of the data counter is an integer, only the integer parts of the first count value and the second count value are compared here. If the integer part of the first count value is the same as the integer part of the second count value, it indicates that the count values of the sampling counter and the data counter are matched, so the pixel data input at this time is sampled. At the same time, the horizontal scale factor in the scale factor is added to the second count value of the current sampling counter, and the obtained sum result is used as the second count value of the next sampling counter of the current sampling counter. In this way, when the integer parts of the first count value and the second count value are the same, the scale factor between the target resolution and the base resolution is added to the second count value of the current sampling counter to obtain the second count value of the next sampling counter; thus, it can be ensured that the second count value of the sampling counter is matched with the scale factor, and the uniformity of pixel data sampling can be improved.
[0092] Method 2: In the case where the comparison result indicates that the integer part of the first count value is different from the integer part of the second count value, the second count value of the current sampling count is used as the second count value of the next sampling counter.
[0093] Here, if the integer part of the first count value is different from the integer part of the second count value, it means that the pixel data input at this time is not sampled. At the same time, the second count value of the current sampling count is used as the second count value of the next sampling counter of the current sampling counter. In this way, when the integer parts of the two values are different, the second count value of the current sampling counter is maintained, and as the input pixel data increases, the first count value of the data counter increases, so it can be ensured that the integer part of the second count value of the subsequent sampling counter is the same as the integer part of the first count value of the data counter as soon as possible, so as to realize the sampling of pixel data, reduce the number of discarded pixel data, and improve the authenticity of the finally obtained image data.
[0094] In some embodiments, according to the comparison result of the first count value of the data counter and the second count value of the corresponding sampling counter, the single-channel pixel data is processed to obtain the adjusted data within the target clock cycle, that is, the above step S224 can be implemented by the following steps S2241 and S2242 (not shown in the figure):
[0095] Step S2241, based on the comparison result between the first count value of the current data counter and the second count value of the current sampling counter corresponding to the current data counter, process the single-channel pixel data counted by the current data counter to obtain the intermediate single-channel data of the single channel.
[0096] In some embodiments, a comparison result between a first count value of a current data counter and a second count value of a current sampling counter corresponding to the current data counter is obtained. Then, according to the content of the comparison result, the pixel data of a single channel counted by the current data counter is downsized to obtain intermediate single-channel data of the single channel. Different comparison results lead to different data processing methods for the pixel data of the single channel. In this way, by analyzing whether the integer part of the first count value is the same as the integer part of the second count value, it is determined whether to downsample the pixel data. That is, step S242 above can be implemented in the following two ways:
[0097] In a first method, when the comparison result indicates that the integer part of the first count value is the same as the integer part of the second count value, the pixel data of the single channel counted by the current data counter is downsampled to obtain the intermediate single-channel data of the single channel.
[0098] Here, for the current data counter, if the integer part of the first count value is the same as the integer part of the second count value, it means that the pixel data counted by the current data counter can be downsampled to reduce the size of the pixel data, thereby obtaining the intermediate single-channel data of the single channel.
[0099] Taking at least one channel being a 4-channel as an example, there are 4 sampling counters and 4 data counters, and one data counter corresponds to one sampling counter. By comparing the second count value of the first sampling counter and the first count value of the first data counter, it is determined whether to downsample the pixel data of the input first channel; by comparing the second count value of the second sampling counter and the first count value of the second data counter, it is determined whether to downsample the pixel data of the input second channel. And so on, by comparing the second count value of the fourth sampling counter and the first count value of the fourth data counter, it is determined whether to downsample the pixel data of the input fourth channel. In this way, for each input of pixel data of one channel, the first count value of the data counter is incremented by 1. If the integer part of the second count value of the sampling counter is the same as the integer part of the first count value of the data counter, then the pixel data of the single channel is downsampled so that the image size corresponding to the obtained intermediate single-channel data is smaller. Moreover, the second count value is determined by a scale factor, and the scale factor is obtained by the ratio of the base resolution and the target resolution; therefore, by comparing whether the integer part of the second count value is the same as the integer part of the first count value to determine whether to perform downsampling, it can be ensured that the image size of the finally sampled scaled image matches the base resolution, so that for a to-be-blocked image with any resolution, it can be divided into image blocks of the same size and the same number.
[0100] Method 2: When the comparison result indicates that the integer part of the first count value is different from the integer part of the second count value, discard the pixel data of the single channel counted by the current data counter, and determine that the intermediate single-channel data of the single channel is empty data.
[0101] Here, if the integer part of the first count value is different from the integer part of the second count value, it means that there is an inequality between the second count value of the sampling counter and the first count value of the data counter. Therefore, the pixel data input at this time is not sampled, and the pixel data input at this time is discarded. So the intermediate single-channel data of this single channel is empty data. The second count value can be calculated through the horizontal scale factor in the scale factor, and the horizontal scale factor is obtained by the ratio of the horizontal resolution in the base resolution to the horizontal resolution in the target resolution. Among them, the horizontal resolution refers to the number of pixels included in one row of the image. Therefore, when scaling, discarding data (i.e., pixels) actually reduces the resolution. In the embodiments of the present application, by counting the sampling coefficient and comparing it with the count of the data, it is determined which pixel data should be discarded, so as to reduce the resolution of the image to be block-divided to the target resolution. In this way, when the integer parts of the two count values are different, discarding the pixel data of the current input single channel can discard some pixel data in the entire image to be block-divided, so as to reduce the image resolution and improve the data processing speed.
[0102] Step S2242, based on the intermediate single-channel data of the at least one channel, determine the adjusted data within the target clock cycle.
[0103] In some embodiments, the intermediate single-channel data of the at least one channel includes: intermediate single-channel data obtained by downsampling the input pixel data, and empty data. Within the target clock cycle, use the intermediate single-channel data corresponding to the pixel data of the at least one channel input within this target clock cycle as the adjusted data within this target clock cycle.
[0104] In the embodiments of the present application, the process of data processing for the pixel data of a single channel is determined by the comparison result between the first count value and the second count value. Therefore, the adjusted data within the obtained target clock cycle is related to the comparison result. Thus, different data processing processes can be performed on the pixel data of the single channel according to different comparison results, and further, the adjusted data within the obtained target clock cycle can meet the subsequent image display process.
[0105] Next, the application of the image block division method provided by the embodiments of the present application in an actual scenario will be described. Taking the image scaling algorithm (Down Scaling algorithm) applicable to image block division of different resolutions as an example for description.
[0106] An embodiment of the present application provides an image block segmentation method, which can be implemented through the following steps:
[0107] First step, determine the size of the block and the base resolution.
[0108] In some embodiments, for the convenience of writing hardware code and calculation, the positive integer exponential power of 2 is usually taken as the horizontal and vertical sizes of the block, such as 256×256 (the 8th power of 2). The base resolution is not necessarily the real screen resolution, but the base resolution needs to be less than the resolutions of all other screens that may be applicable. Assuming the minimum screen resolution that may occur is 1080×1920, then the base resolution is 1024×1792. It is less than the minimum resolution both horizontally and vertically, but can be divided evenly by 256×256 and is numerically closest to the minimum resolution.
[0109] Second step, determine the scaling factor (SF).
[0110] In some embodiments, according to the actual screen resolution, divide its horizontal size and vertical size by 1024 and 1792 respectively to obtain the horizontal scaling factor (HSF) and the vertical scaling factor (VSF), such as:
[0111] Example 1. Assume the actual screen resolution is 1280×2800, then the horizontal scaling factor is 1280 / 1024 = 1.25, and the vertical scaling factor is 2800 / 1792 = 1.5625.
[0112] Example 2. Assume the actual screen resolution is 1080×1920, then the horizontal scaling factor is 1080 / 1024 = 1.0546875, and the vertical scaling factor is 1920 / 1792 = 1.07142857.
[0113] Third step, perform downsampling according to the scaling factor.
[0114] In some embodiments, downsampling can be implemented in the following three ways:
[0115] Method 1: Taking HSF as 1.25 as an example, perform downsampling on single-channel data.
[0116] First, count the input data. A new piece of data is input per clock, and the input data counter is incremented by 1 accordingly. Second, count the sampling counter. The initial value of the sampling counter is 1. Before accumulation, compare the integer part of the sampling counter with the integer part of the input data counter. When the integer parts are the same, sample the image data and add the count value by HSF. When the integer parts are different, do not sample the image data and keep the count value unchanged until new data comes in, and then continue to repeat the above comparison and accumulation actions. As Figure 3 shown, when the input data is D1, that is, when the first data is input, the value of the input data counter 301 is 1, and the value of the sampling counter 302 is 1. In this way, the integer part of the sampling counter is the same as the integer part of the input data counter, and the input data D1 is sampled. After that, input data D2, the value of the input data counter 301 is incremented by 1, that is, the value of the input data counter 301 is 2, and the value of the sampling counter 302 is incremented by 1.25, that is, the value of the sampling counter 302 is 2.25. At this time, the integer part of the sampling counter is the same as the integer part of the input data counter, and the input data D3 is sampled. Similarly, sample the sampling data D3 and D4. When the input data is D5, the value of the sampling counter is 6, and the value of the input data counter is 5, that is, the integer parts of the two values are different, so the value of the sampling counter remains unchanged and the input data D5 is not sampled. When the input data is D6, the integer part of the sampling counter is the same as the integer part of the input data calculator, and the input data D6 is sampled. Similarly, sample the input data D7, D8, and D9; when the input data is D10, the value of the sampling counter is 11, and the value of the input data counter is 10, that is, the integer parts of the two values are different, so the value of the sampling counter remains unchanged and the input data D10 is not sampled.
[0117] Method 2: Take HSF as 1.741640625 and downsample four-channel data as an example for illustration.
[0118] Input pixel data of 4 channels within one clock cycle, which is equivalent to expanding the single-channel calculation method in Method 1. To complete the calculation within one clock cycle, four input data counters and 4 sampling counters are used simultaneously. The sampling counter has a reference, but this reference will change according to the sampling quantity of the four channels in the previous clock cycle. For example, if all are sampled, the reference will be incremented by three proportionality coefficients. If one is not sampled, the base will be incremented by two proportionality coefficients. At most, two will not be sampled, and the situation of three not being sampled will not occur. Among them, the counting method of the 4 input data counters can be regarded as that the initial values of the 4 input data counters are 1, 2, 3, and 4 respectively, and the count values of the 4 input data counters are incremented by 4 every clock.
[0119] During one clock cycle, the initial value of the first sampling counter is 1. At this time, before accumulation, the integer part is compared with the integer part of the input data counter. When the integer parts are the same, the pixel data is sampled and the count value is incremented by HSF. When the integer parts are different, the pixel data is not sampled and the count value remains unchanged until new data comes in and the above comparison and accumulation actions are repeated. As Figure 4 shown, 4-channel pixel data is input in each clock cycle. The values 1, 2, 3, and 4 are the count values of the 4 input data counters in the first clock cycle 401; the values 1, 2.74316, 4.486328, and 4.486328 are the count values of the 4 sampling counters in the 4 first clock cycles.
[0120] Among them, when the pixel data of the first channel is input in the first clock cycle, the first input data counter counts, and the count value is 1; moreover, the initial value of the sampling counter is 1, so the integer parts of the two count values are the same. Downsampling is performed on the pixel data of the first channel, so that the count value of the sampling counter plus HSF is used as the count value of the next sampling counter, that is, 1 + 1.741640625 = 2.74316. Then, it is compared whether the integer part of the count value of the second input data counter is the same as the integer part of the count value of the second sampling counter. Since the pixel data of the second channel is input, the count value of the second input data counter is 2, and the integer parts of the two count values are the same. Downsampling is performed on the pixel data of the second channel, and the count value of the third sampling counter is 4.486328. Then, it is compared whether the integer part of the count value of the third input data counter is the same as the integer part of the count value of the third sampling counter. Since the count value of the third input data counter is 3, the integer parts of the two count values are different. Therefore, the count value of the fourth sampling counter retains the count value of the third sampling counter, which is still 4.486328; and the pixel data of the third channel is discarded. And so on. In the second clock cycle 402, the pixel data of the 5th and 8th channels are discarded, and downsampling is performed on the pixel data of the 6th and 7th channels. In the third clock cycle 403, the pixel data of the 10th and 12th channels are discarded, and downsampling is performed on the pixel data of the 9th and 11th channels. In the fourth clock cycle 404, the pixel data of the 15th channel are discarded, and downsampling is performed on the pixel data of the 3rd, 14th, and 16th channels. In the fifth clock cycle 405, the pixel data of the 17th and 19th channels are discarded, and downsampling is performed on the pixel data of the 18th and 20th channels. In the sixth clock cycle 406, the pixel data of the 22nd and 24th channels are discarded, and downsampling is performed on the pixel data of the 21st and 23rd channels. In this way, this method 2 can be applied to any HSF value between 1 and 2 (two pixel data out of four pixel data can be discarded at a time), and there is a more explicit description of which data to discard.
[0121] Method 3: Taking HSF as 1.25 as an example, downsampling is performed according to four-channel data.
[0122] First, delay the input four-channel data by two clock cycles. Set the initial values of the input data counter and the sampling counter to 1. Then, the input data counter increments by the number of channels, which is 4, every clock cycle. The sampling counter first compares the integer part of itself with the integer part of the input data counter. If they are the same, it adds 4 times the HSF, which is 5. If they are different, it adds 3 times the HSF, which is 3.75. Then, a new round of comparison and accumulation is performed. When the integer parts are the same, sample the data of all four channels. When the integer parts are different, discard one data of any one channel. In some possible implementation manners, when the integer parts are different, in several consecutive rounds, discard the data of different channels. As Figure 5 shown, delay the input pixel data by two clocks, that is, input the pixel data 1 to 4 of 4 channels at the 3rd clock. So, the value of the input data counter 501 is 9, and the value of the sampling counter 502 is 9.75. In this way, the integer part of the sampling counter is the same as the integer part of the input data counter, sample the channel data 1 to 4, and the value of the sampling counter plus 5 is 14.75, and the value of the input data counter is 13. In this way, the integer parts of the two values are different, and discard the channel data 5 among the input 4-channel data 5 to 8. When inputting the channel data 9 to 12, the value of the input data counter is 17, and the value of the sampling counter is 18.5. In this way, the integer parts of the two values are different, and discard the input channel data 10 that is not in the same channel as the channel data 5. Similarly, among the input channel data 13 to 16, discard the channel data 15; among the input channel data 17 to 20, discard the channel data 20. When inputting the channel data 21 to 24, the value of the input data counter is 29, and the value of the sampling counter is 29.75. The integer parts of these two values are the same, and sample the channel data 21 to 24. When inputting the data 25 to 28, the value of the input data counter is 33, and the value of the sampling counter is 34.75. The integer parts of these two values are different, and discard the channel data 25 among the channel data 25 to 28. In this way, Method 3 can be applicable to the situation where the HSF is small (at most discard one pixel data among four pixel data at a time). Since fewer sampling counters are designed in the circuit, the area and power consumption in the chip will be smaller.
[0123] After image scaling, due to the uniformity of sampling, even if some rows and columns of pixels are discarded, it will not cause serious distortion of the sampled image. Moreover, the size of the sampled image is the same as the base resolution. Therefore, images of any resolution can be divided into blocks of the same size and the same number. During subsequent calculations, the gain value of the unsampled data can be obtained by averaging the gain values of two adjacent data.
[0124] In some possible implementation manners, in addition to single-channel and four-channel data, other channel numbers are also applicable to the image scaling algorithm. Moreover, in addition to the image quality parameters, any other parameters that require image block division can also be optimized by the image scaling algorithm.
[0125] In the embodiments of the present application, the image is sampled by the image scaling algorithm, and images of any resolution can be divided into blocks of the same size and the same number, which is beneficial to subsequent data processing.
[0126] In the embodiments of the present application, for a dual-screen device, by setting different filters in the driving ICs of the two display screens, the last column and the first column of each display screen have valid data, so that there is no need to transmit additional data through the SPI protocol, and thus the time and memory resources can be optimized.
[0127] Based on the foregoing embodiments, the embodiments of the present application provide a display device, which includes each unit included and each module included in each unit, and can be implemented by a processor in a computer device; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0128] Figure 6 It is a schematic structural diagram of a composition of an image block division device provided by the embodiments of the present application. As Figure 6 shown, the image block division device 600 includes:
[0129] A first acquisition module 601, configured to acquire the resolutions of multiple types of display screens capable of displaying the image to be block-divided;
[0130] A first determination module 602, configured to determine a basic resolution based on the resolutions of the multiple types of display screens;
[0131] A first scaling module 603, configured to perform image scaling on the image to be block-divided based on the basic resolution and the target resolution of the target display screen of the image to be block-divided, to obtain a scaled image;
[0132] A first block division module 604, configured to perform block division on the scaled image to obtain multiple image blocks of the image to be block-divided.
[0133] In some embodiments, the first determination module 602 includes:
[0134] The first determination sub-module is configured to determine the minimum resolution among the resolutions of the multiple types of display screens.
[0135] The second determination sub-module is configured to determine the base resolution based on the minimum resolution.
[0136] In some embodiments, the first scaling module 603 includes:
[0137] The third determination sub-module is configured to determine the proportionality coefficient between the base resolution and the target resolution.
[0138] The first scaling sub-module is configured to perform image scaling on the to-be-blocked image based on the proportionality coefficient to obtain the scaled image.
[0139] In some embodiments, the first scaling sub-module includes:
[0140] The first determination unit is configured to determine the pixel data of at least one channel input within a target clock cycle in the to-be-blocked image.
[0141] The second determination unit is configured to determine the first count value of at least one data counter for counting the pixel data of the at least one channel within the target clock cycle.
[0142] The third determination unit is configured to determine the second count value of at least one sampling counter based on the proportionality coefficient and the first count value of the at least one data counter; wherein, the sampling counter corresponds to the data counter one by one.
[0143] The first processing unit is configured to perform data processing on the pixel data of the at least one channel based on the first count value and the second count value to obtain the adjusted data within the target clock cycle.
[0144] The fourth determination unit is configured to determine the scaled image based on the adjusted data within multiple clock cycles.
[0145] In some embodiments, the second determination unit includes:
[0146] The first acquisition sub-unit is configured to acquire the historical count value of each data counter within the previous clock cycle; wherein, the sampling counter corresponds to the data counter one by one; the previous clock cycle is adjacent to the target clock cycle in time sequence, and the previous clock cycle is before the target clock cycle; each data counter within the first clock cycle has a preset initial value, and the preset initial value of each data counter corresponds to the number of channels of the pixel data input within the first clock cycle.
[0147] A first determination subunit, configured to determine a first count value of each data counter in the target clock cycle based on the historical count values of each data counter and the number of channels of the at least one channel.
[0148] In some embodiments, the third determination unit includes:
[0149] A first comparison subunit is configured to compare the first count value of the current data counter in the at least one data counter with the second count value of the current sampling counter corresponding to the current data counter to obtain a comparison result;
[0150] A second determination subunit, configured to determine a second count value of the sampling counter after the current sampling counter based on the comparison result, the proportionality coefficient, and the second count value of the current sampling counter.
[0151] In some embodiments, the second determination subunit is further configured to: when the comparison result indicates that the integer part of the first count value is the same as the integer part of the second count value, adjust the second count value of the current sampling counter based on the proportionality coefficient to obtain the second count value of the sampling counter after the current sampling counter; when the comparison result indicates that the integer part of the first count value is different from the integer part of the second count value, use the second count value of the current sampling counter as the second count value of the sampling counter after the current sampling counter.
[0152] In some embodiments, the first processing unit includes:
[0153] A processing subunit, configured to perform data processing on the pixel data of a single channel counted by the current data counter based on the comparison result between the first count value of the current data counter and the second count value of the current sampling counter corresponding to the current data counter to obtain intermediate single-channel data of the single channel;
[0154] A third determination subunit, configured to determine the adjusted data in the target clock cycle based on the intermediate single-channel data of the at least one channel.
[0155] In some embodiments, the processing subunit is further configured to: when the comparison result indicates that the integer part of the first count value is the same as the integer part of the second count value, perform downsampling on the pixel data of the single channel counted by the current data counter to obtain the intermediate single-channel data of the single channel.
[0156] In some embodiments, the processing subunit is further configured to: when the comparison result indicates that the integer part of the first count value is different from the integer part of the second count value, discard the pixel data of a single channel counted by the current data counter; and determine that the intermediate single-channel data of the single channel is empty data.
[0157] The description of the above device embodiments is similar to that of the above method embodiments and has similar beneficial effects to those of the method embodiments. In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. For the technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0158] It should be noted that in the embodiments of the present application, if the above backlight control method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the related art, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes. In this way, the embodiments of the present application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.
[0159] The embodiments of the present application provide a display device, which includes: a display panel and a display driving chip; wherein, the display driving chip is configured to implement the steps in the above method and drive the display panel to display a to-be-displayed image obtained through the multiple image blocks.
[0160] The embodiments of the present application provide a computer device, including a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor executes the program, it implements some or all of the steps in the above method.
[0161] The embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements some or all of the steps in the above method. The computer-readable storage medium can be transient or non-transient.
[0162] An embodiment of the present application provides a computer program, including computer-readable code. When the computer-readable code runs in a computer device, a processor in the computer device executes to implement some or all of the steps in the above method.
[0163] An embodiment of the present application provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be specifically implemented in a manner of hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium. In other embodiments, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.
[0164] It should be noted here that: the descriptions of the above embodiments tend to emphasize the differences between the embodiments, and their similarities can be referred to each other. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects to the method embodiments. For the technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of the present application, please refer to the descriptions of the method embodiments of the present application for understanding.
[0165] It should be noted that Figure 7 is a schematic diagram of the hardware entity of a computer device provided by an embodiment of the present application. As Figure 7 shown, the hardware entity of the computer device 700 includes: a processor 701, a communication interface 702, and a memory 703, where:
[0166] The processor 701 generally controls the overall operation of the computer device 700.
[0167] The communication interface 702 can enable the computer device to communicate with other terminals or servers through a network.
[0168] The memory 703 is configured to store instructions and applications executable by the processor 701, and can also cache data to be processed or already processed by the processor 701 and each module in the computer device 700 (for example, image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be performed between the processor 701, the communication interface 702, and the memory 703 through a bus 704.
[0169] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the "in one embodiment" or "in an embodiment" that appears throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the magnitude of the serial numbers of the above steps / processes does not mean the sequence of execution. The execution sequence of each step / process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0170] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0171] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling or communication connection between the components shown or discussed with each other can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0172] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units; they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, each functional unit in the embodiments of the present application can be all integrated in a processing unit, or each unit can be separately used as a unit, or two or more units can be integrated in one unit; the above integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
[0174] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments; and the foregoing storage medium includes: removable storage devices, read-only memory (ROM), magnetic disks, or optical discs and other various media that can store program codes.
[0175] Alternatively, if the above integrated units of the present application are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the related technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present application. And the foregoing storage medium includes: removable storage devices, ROM, magnetic disks, or optical discs and other various media that can store program codes.
[0176] As described above, the above are only the implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application.
Claims
1. An image block division method, characterized in that, The method includes: Obtaining the resolutions of multiple types of display screens capable of displaying the image to be segmented; Determining a base resolution based on the resolutions of the multiple types of display screens; Performing image scaling on the image to be segmented based on the base resolution and the target resolution of the target display screen of the image to be segmented to obtain a scaled image; Segmenting the scaled image to obtain multiple image blocks of the image to be segmented; Wherein, performing image scaling on the image to be segmented based on the base resolution and the target resolution of the target display screen of the image to be segmented to obtain a scaled image includes: Determining a proportionality coefficient between the base resolution and the target resolution; Performing image scaling on the image to be segmented based on the proportionality coefficient to obtain the scaled image; Wherein, performing image scaling on the image to be segmented based on the proportionality coefficient to obtain the scaled image includes: Determining pixel data of at least one channel input within a target clock cycle in the image to be segmented; Determining a first count value of at least one data counter that counts the pixel data of the at least one channel within the target clock cycle; Determining a second count value of at least one sampling counter based on the proportionality coefficient and the first count value of the at least one data counter; wherein, the sampling counter corresponds to the data counter one by one; Performing data processing on the pixel data of the at least one channel based on the first count value and the second count value to obtain adjusted data within the target clock cycle; Determining the scaled image based on the adjusted data within multiple clock cycles.
2. The method according to claim 1, characterized in that, The determining a base resolution based on the resolutions of the multiple types of display screens includes: Determining the minimum resolution among the resolutions of the multiple types of display screens; Determining the base resolution based on the minimum resolution.
3. The method according to claim 1, wherein The determining a first count value of at least one data counter that counts the pixel data of the at least one channel within the target clock cycle includes: Obtaining a historical count value of each data counter in the previous clock cycle; wherein, the sampling counter corresponds to the data counter one by one; the previous clock cycle is adjacent to the target clock cycle in time sequence, and the previous clock cycle is before the target clock cycle; each data counter in the first clock cycle has a preset initial value, and the preset initial value of each data counter corresponds to the number of channels of the pixel data input in the first clock cycle; Determining the first count value of each data counter in the target clock cycle based on the historical count value of each data counter and the number of channels of the at least one channel.
4. The method according to claim 1, characterized in that The determining a second count value of at least one sampling counter based on the proportionality coefficient and the first count value of the at least one data counter includes: Comparing the first count value of the current data counter in the at least one data counter with the second count value of the current sampling counter corresponding to the current data counter to obtain a comparison result; Determine the second count value of the next sampling counter of the current sampling counter based on the comparison result, the proportionality coefficient, and the second count value of the current sampling counter.
5. The method according to claim 4, characterized in that, The determining the second count value of the next sampling counter of the current sampling counter based on the comparison result, the proportionality coefficient, and the second count value of the current sampling counter includes: When the comparison result indicates that the integer part of the first count value is the same as the integer part of the second count value, adjust the second count value of the current sampling counter based on the proportionality coefficient to obtain the second count value of the next sampling counter; When the comparison result indicates that the integer part of the first count value is different from the integer part of the second count value, use the second count value of the current sampling count as the second count value of the next sampling counter.
6. The method according to claim 1, characterized in that The performing data processing on the pixel data of the at least one channel based on the first count value and the second count value to obtain the adjusted data within the target clock cycle includes: Based on the comparison result between the first count value of the current data counter and the second count value of the current sampling counter corresponding to the current data counter, perform data processing on the pixel data of a single channel counted by the current data counter to obtain the intermediate single-channel data of the single channel; Determine the adjusted data within the target clock cycle based on the intermediate single-channel data of the at least one channel.
7. The method according to claim 6, characterized in that, The performing data processing on the pixel data of a single channel counted by the current data counter based on the comparison result between the first count value of the current data counter and the second count value of the current sampling counter corresponding to the current data counter to obtain the intermediate single-channel data of the single channel includes: When the comparison result indicates that the integer part of the first count value is the same as the integer part of the second count value, perform downsampling on the pixel data of the single channel counted by the current data counter to obtain the intermediate single-channel data of the single channel.
8. The method according to claim 6, characterized in that The performing data processing on the pixel data of a single channel counted by the current data counter based on the comparison result between the first count value of the current data counter and the second count value of the current sampling counter corresponding to the current data counter to obtain the intermediate single-channel data of the single channel includes: When the comparison result indicates that the integer part of the first count value is different from the integer part of the second count value, discard the pixel data of the single channel counted by the current data counter; Determine that the intermediate single-channel data of the single channel is empty data.
9. An image block dividing device, characterized in that, The image block dividing device includes: A first obtaining module, configured to obtain the resolutions of multiple types of display screens capable of displaying the image to be divided; A first determining module, configured to determine the basic resolution based on the resolutions of the multiple types of display screens; A first scaling module, configured to perform image scaling on the image to be divided based on the basic resolution and the target resolution of the target display screen of the image to be divided to obtain the scaled image; The first chunking module is used to chunk the scaled image to obtain multiple image chunks of the to-be-chunked image; Among them, the first scaling module includes: The third determination sub-module is used to determine the proportionality coefficient between the base resolution and the target resolution; The first scaling sub-module is used to perform image scaling on the to-be-chunked image based on the proportionality coefficient to obtain the scaled image; Among them, the first scaling sub-module includes: The first determination unit is used to determine the pixel data of at least one channel input within the target clock cycle in the to-be-chunked image; The second determination unit is used to determine the first count value of at least one data counter that counts the pixel data of the at least one channel within the target clock cycle; The third determination unit is used to determine the second count value of at least one sampling counter based on the proportionality coefficient and the first count value of the at least one data counter; wherein, the sampling counter corresponds to the data counter one by one; The first processing unit is used to perform data processing on the pixel data of the at least one channel based on the first count value and the second count value to obtain the adjusted data within the target clock cycle; The fourth determination unit is used to determine the scaled image based on the adjusted data within multiple clock cycles.
10. A display device, characterized in that, The display device includes: a display panel and a display driver chip; The display driver chip is used to implement the steps in the method according to any one of claims 1 to 8, and drive the display panel to display the to-be-displayed image obtained from the multiple image chunks.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps in the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Screen synchronization method and device
CN102981793A
Image processor
JP1994333033A
Image display system, image display method and projection display device
JP2009080333A