Image display method and device, test device and storage medium
By acquiring and processing the touch data of the display screen in the test device, and using the compression unit in the memory to compress and decompress the image data, the problem of using compressed image testing in the prior art is solved, and cost reduction and data transmission speed are achieved. promote.
Patent Information
- Application Number
- CN202411309137.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-27
AI Technical Summary
Existing test devices do not support using compressed images for testing, resulting in high demand for memory devices, high cost and slow data transmission speed.
By acquiring the touch data of the display screen, determining the touch position and reading and writing to the compression unit in the memory, compression and decompression of the display screen image is realized, and image data in the display screen is updated.
Supports testing with compressed images, reducing storage and transmission costs and improving data transmission speed.
Smart Images

Figure CN119200936A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image display, and in particular to an image display method, device, testing device and storage medium. Background Art
[0002] After the display screen is produced, various functions of the display screen need to be tested. Currently, a test device is usually used to test the display screen.
[0003] However, current test devices do not support the use of compressed images to implement test functions, and the use of uncompressed images will cause related storage devices to require larger storage space, which is not only costly but also slow in data transmission speed. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present application provides an image display method, device, test device and storage medium, which are conducive to enabling the test device to support the use of compressed images for testing.
[0005] To solve the above problems, the present invention provides the following technical solutions: In a first aspect, an embodiment of the present application provides an image display method, the method comprising: Get the touch data generated when the display screen is touched; determining a touch position according to the touch data; Determine a first target compression unit in a memory according to the touch position; wherein the memory includes a plurality of compression units, each of which is used to determine the colors of a plurality of pixel points in the image; reading the first target compression unit; Decompressing the first target compression unit to obtain first image data; rewriting the first image data to obtain second image data; compressing the second image data to obtain a second target compression unit; writing the second target compression unit into the memory; The image displayed on the display screen is updated according to the compression unit in the memory.
[0006] In some implementations, determining a first target compression unit in a memory according to the touch coordinates includes: Obtaining the pixel length and pixel width of each compression unit; The first target compression unit is determined according to the touch coordinates, the pixel length, and the pixel width.
[0007] In some implementations, determining the first target compression unit according to the touch coordinates, the pixel length, and the pixel width includes: Determine the number of columns of the first target compression unit according to a quotient of a horizontal coordinate in the touch coordinate divided by the pixel length; Determine the number of rows of the first target compression unit according to a quotient of a vertical coordinate in the touch coordinate divided by the pixel width; The serial number of the first target compression unit is determined according to the number of rows and the number of columns, and the first target compression unit is determined according to the serial number.
[0008] In some implementations, determining the first target compression unit according to the sequence number includes: Determine a start address and an end address of the first target compression unit according to the sequence number; The reading the first target compression unit includes: The first target compression unit is read according to the start address and the end address.
[0009] In some implementations, writing the second target compression unit into the memory includes: The second target compression unit is written into the memory according to the start address.
[0010] In some implementations, rewriting the first image data to obtain second image data includes: Determine a target pixel point in the first image data according to the touch position; The values of the sub-pixels included in the target pixel are rewritten to obtain second image data.
[0011] In some implementations, determining a target pixel in the first image data according to the touch position includes: Determine a starting address of a target pixel point in the first image data according to the touch position; The step of rewriting the value of the sub-pixel included in the target pixel point to obtain the second image data comprises: Obtaining a first sub-pixel value, a second sub-pixel value, and a third sub-pixel value corresponding to a preset color; Rewriting the value of the starting address into the first sub-pixel value, so as to rewrite the value of the first sub-pixel included in the target pixel; Rewriting the value of the first address after the start address into the second sub-pixel value, so as to rewrite the value of the second sub-pixel included in the target pixel; The value of the second address after the start address is rewritten as the third sub-pixel value, so as to rewrite the value of the third sub-pixel included in the target pixel.
[0012] In a second aspect, an embodiment of the present application provides an image display device, the image display device comprising: A first acquisition unit, used to acquire touch data generated when the display screen is touched; A touch unit, used to determine a touch position according to the touch data; A determination unit, configured to determine a first target compression unit in a memory according to the touch position; wherein the memory includes a plurality of compression units, each of which is configured to determine the colors of a plurality of sub-pixels in the image; A reading unit, configured to read the first target compression unit; a decompression unit, configured to decompress the first target compression unit to obtain first image data; A rewriting unit, used for rewriting the first image data to obtain second image data; A compression unit, used for compressing the second image data to obtain a second target compression unit; a writing unit, configured to write the second target compression unit into the memory; An updating unit is used to update the image displayed on the display screen according to the compression unit in the memory.
[0013] In a third aspect, an embodiment of the present application provides a testing device, the testing device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the image display method according to the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the image display method of the first aspect.
[0015] The present application provides an image display method, device, test device and storage medium, the method comprising: obtaining touch data generated when a display screen is touched; determining a touch position according to the touch data; determining a first target compression unit in a memory according to the touch position; wherein the memory comprises a plurality of compression units, each of which is used to determine the colors of a plurality of pixels in an image; reading the first target compression unit; decompressing the first target compression unit to obtain first image data; rewriting the first image data to obtain second image data; compressing the second image data to obtain a second target compression unit; writing the second target compression unit to the memory; and updating the image displayed on the display screen according to the compression unit in the memory. The present application rewrites the compression unit corresponding to the touch position when the display screen is touched, so that the image color at the touch position in the display screen changes, so that the test device supports the use of compressed images to implement test functions, reduces costs and increases data transmission speeds. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of an application scenario of an image display method provided in this application.
[0017] Figure 2 It is a system structure diagram of a test system provided by this application.
[0018] Figure 3 It is a flowchart of an image display method provided in an embodiment of the present application.
[0019] Figure 4 It is a schematic diagram of the distribution of compression units in a display screen provided in an embodiment of the present application.
[0020] Figure 5 It is a structural schematic diagram of an image display device provided in an embodiment of the present application.
[0021] Figure 6 It is a structural schematic diagram of a testing device provided in an embodiment of the present application.
[0022] Figure 7 It is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0025] After the display screen is produced, it is necessary to test various functions of the display screen, such as testing the image display function and the touch function of the display screen. Currently, a test device is usually used to test the display screen.
[0026] For the image display function, the test device can output the image to the display screen for testing; illustratively, the test path of the test device can be that the microcontroller unit (MCU) reads the image data from the flash memory (Flash), outputs the image data to the static random-access memory (SRAM), and then transmits the image data in the SRAM through an image output module, such as the mobile industry processor interface (MIPI) module, and outputs it to the display screen for display.
[0027] For the touch function, when the display screen displays an image and the user touches it, the test device can change the color of the image at the position where the user touches.
[0028] However, current test devices usually use uncompressed images to test image display functions. Taking an RGB image as an example, each pixel of the uncompressed RGB image includes three sub-pixels, and the data of the three sub-pixels of each pixel are stored in the SRAM, that is, the SRAM stores data in units of pixels. Therefore, when performing touch detection, the sub-pixel data of the pixel can be directly rewritten in the SRAM, thereby changing the color of the pixel.
[0029] However, when using compressed images, data is stored in SRAM in compression units, which do not include complete data for each pixel. Therefore, the touch detection function of the test device can no longer be achieved by directly rewriting the sub-pixel data of the pixel in SRAM.
[0030] The use of uncompressed images will cause the related storage devices in the test device, such as the above-mentioned flash memory and SRAM, to require a larger storage space, which is not only costly but also slow in data transmission speed.
[0031] See also Figure 1 , Figure 1 Schematic diagram of an application scenario of an image display method provided by this application. Figure 1 As shown, the image display method is applied to Figure 1 In the application scenario 1, the application scenario 1 includes: a testing device 10 and a display screen 20.
[0032] In some implementations, the testing device 10 is used to output an image to the display screen 20 for display, and when the display screen 20 is touched, acquire touch data generated when the display screen 20 is touched.
[0033] In some embodiments, the testing device 10 includes a testing box, a testing board, etc. For example, the testing device 10 is a liquid crystal module (LCM) testing box.
[0034] In some embodiments, the display screen 20 includes a liquid crystal display (LCD), a cathode ray tube display (CRT), an organic light-emitting diode display (OLED), or a light emitting diode display (LEDDisplay).
[0035] See also Figure 2 , Figure 2 Schematic diagram of the system structure of a test system provided by this application. Figure 2 As shown, the system 100 includes: a testing device 110 and a display screen 120 .
[0036] The testing device 110 includes a processing unit 111 , a memory 112 , a first decoder 113 , an image output module 114 , a second decoder 115 and a storage unit 116 .
[0037] The display screen 120 includes a driving chip 121 and a screen 122 .
[0038] In some implementations, the testing device 110 includes a scaler chip, and the scaler includes a processing unit 111 , a memory 112 , a first decoder 113 , an image output module 114 , a second decoder 115 , and a storage unit 116 .
[0039] In some embodiments, when testing the image display function of the display screen, the processing unit 111 reads the compressed image data from the storage unit 116, loads the image data into the memory 112, and decodes the compressed image data through the first decoder 113, and the image output module 114 outputs the decoded image data to the driver chip 121 in the display screen 120, so that the screen 122 displays the corresponding image.
[0040] In some embodiments, when testing the touch detection function of the display screen, the user or certain devices are required to touch the screen 122 first. When the screen 122 is touched, the driver chip 121 generates touch data and sends it to the processing unit 111. The processing unit 111 reads the data of the corresponding compression unit in the memory 112 according to the touch data. The read data of the compression unit is decoded by the second decoder 115. After decoding, the processing unit 111 rewrites the decoded data, and rewrites it into the storage 112 after the rewriting is completed. After the writing is completed, the image is output again through the first decoder 113 and the image output module 114 to update the image displayed on the screen 122 in the display screen 120. The details will be introduced in the following part of the manual and will not be repeated here.
[0041] In some implementations, the processing unit 111 is an MCU.
[0042] In some implementations, the storage unit 116 is a flash memory.
[0043] Furthermore, the storage unit 116 can be a NOR flash memory, which is a non-volatile memory used to store program code, firmware, operating systems and other data. NOR Flash has a lower storage density and higher cost, but has a faster read speed, lower read latency and better random access performance.
[0044] It is understandable that the storage unit 116 in the present application needs to store compressed image data. The format of the uncompressed image is, for example, the BMP (bitmap) format. BMP uses a bit-mapped storage format and does not use any other compression except for the optional image depth. Therefore, the space occupied by the BMP file is very large.
[0045] The formats of the compressed images stored in the storage unit 116 include Display Stream Compression (DSC), Free Lossless Image Format (FLIF), WebP format, and the like.
[0046] In some embodiments, the image data stored in the storage unit 116 is in DSC format; wherein, image compression transmission is to compress the image data before transmission, so that high-resolution content can be output with low bandwidth, and the compressed picture performance is visually distortion-free and low-latency. DSC can be used in various image interfaces, including DisplayPort, HDMI, MIPI, etc.
[0047] In some embodiments, when the image data stored in the storage unit 116 is in DSC format, the first decoder 113 and the second decoder 115 are DSC decoders. The DSC decoder is a device or software component specifically used to decode image data compressed by DSC technology. The function of the DSC decoder is to decode the compressed image data and restore it to the original, viewable image.
[0048] In some implementations, when the image data stored in the storage unit 116 is in a DSC format, the image output module is a MIPI module.
[0049] In some embodiments, the driver chip 121 is connected to an interrupt pin of the processing unit 111. When the driver chip 121 obtains touch data, the driver chip 121 sends an interrupt signal to the processing unit 111 through the interrupt pin to notify the processing unit 111 to obtain and process the touch data obtained by the driver chip 121 through the integrated circuit bus (Inter-Integrated Circuit, I2C).
[0050] The system structure of the above-mentioned test system can realize the touch detection function of the display screen when the test device uses the compressed image.
[0051] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of an image display method provided in an embodiment of the present application. Figure 3 As shown, the image display method 200 includes: steps 210 to 290.
[0052] Step 210: Acquire touch data generated when the display screen is touched.
[0053] In some implementations, the touch data includes at least: Coordinates of the touch point: Indicates the location of the touch event on the screen. The coordinates are usually in pixels and include X-axis and Y-axis values.
[0054] Optionally, the coordinate origin of the touch point's coordinates is the lower left corner of the screen, the positive direction of the X-axis points from the left side of the screen to the right side of the screen, and the positive direction of the Y-axis points from the bottom side of the screen to the top side of the screen.
[0055] In some implementations, the touch data further includes: 1. Touch type: The touch type may include single-point touch, multi-point touch (such as pinch-to-zoom or gesture operation), etc. Based on the number of touch points, it can be determined what type of touch operation the user is performing.
[0056] 2. Touch pressure: Some touch screens support pressure sensing, which can identify the strength of the user's touch on the screen. This information can be used for more sophisticated interactions, such as adjusting the thickness of handwriting in drawing applications.
[0057] 3. Touch duration: The duration of a touch event is also one of the important data. It can be used to distinguish between short click operations and long press operations.
[0058] 4. Touch speed: For a moving touch point, its moving speed is also useful data, which can be used to identify the speed and acceleration of the sliding operation.
[0059] 5. Touch event type: including touch start (down), touch move (move), touch end (up) and other event types, which are used to track the entire life cycle of touch operations.
[0060] Step 220: Determine the touch position according to the touch data.
[0061] In some implementations, coordinates of a touch point in the touch data are identified, and the touch position is determined according to the coordinates of the touch point.
[0062] In some implementations, the coordinates of the touch points and the touch type in the touch data are identified, and when the touch type is multi-point touch, the coordinates of each touch point are acquired respectively.
[0063] In some embodiments, at least one of touch pressure, touch duration, and touch event type in touch data is identified; when at least one of the touch pressure, touch duration, and touch event type meets preset conditions, the coordinates of the touch point in the touch data are identified, and the touch position is determined based on the coordinates of the touch point.
[0064] Optionally, the preset condition includes at least one of a touch pressure greater than a preset pressure threshold, a touch duration greater than a preset duration threshold, and a touch event being a non-touch end event.
[0065] By judging whether the touch data meets the preset conditions, it is possible to identify whether the display screen is accidentally touched. In the case of an accidental touch, subsequent operations are not performed, thus saving computing resources.
[0066] Step 230: Determine a first target compression unit in a memory according to the touch position; wherein the memory includes a plurality of compression units, each of which is used to determine the colors of a plurality of pixel points in the image.
[0067] See also Figure 4 , Figure 4 Schematic diagram of the distribution of compression units in the display screen provided by the embodiment of the present application. Figure 4 As shown, Figure 4 The image displayed in the middle display screen 300 can be divided into 45 compression units, each compression unit includes N*M pixels, wherein N and M are both positive integers and both greater than 1, N is the pixel length of the compression unit, and M is the pixel width of the compression unit.
[0068] In some embodiments, Figure 4 Each compression unit in has the same pixel length and pixel width.
[0069] In some embodiments, Figure 4 The coordinate origin of the touch point is the lower left corner of the screen, the positive direction of the X-axis is from the left side of the screen to the right side of the screen, and the positive direction of the Y-axis is from the bottom side of the screen to the top side of the screen.
[0070] In some embodiments, data of all compression units constitute a complete image displayed on the display screen, and each compression unit corresponds to a portion of the complete image.
[0071] Furthermore, the compression method of compressing N*M pixels into compression units determines the format of the image. The image formats include DSC, FLIF, WebP, etc. For details, please refer to the introduction in the above part of the specification, which will not be repeated here.
[0072] In some embodiments, step 230 includes the following steps.
[0073] (1) Obtain the pixel length and pixel width of each compression unit.
[0074] (2) Determine the first target compression unit according to the touch coordinates, the pixel length, and the pixel width.
[0075] Specifically, the touch coordinates are in pixels, and the position of the first target compression unit corresponding to the pixel point corresponding to the touch position can be determined according to the touch coordinates, the pixel length, and the pixel width.
[0076] In some implementations, the step of determining the first target compression unit according to the touch coordinates, the pixel length, and the pixel width includes the following steps.
[0077] (2.1) determining the number of columns of the first target compression unit according to a quotient of a horizontal coordinate in the touch coordinate divided by the pixel length; (2.2) determining the number of rows of the first target compression unit according to a quotient of a vertical coordinate in the touch coordinate divided by the pixel width; (2.3) Determine a sequence number of the first target compression unit according to the number of rows and the number of columns, and determine the first target compression unit according to the sequence number.
[0078] In some embodiments, if the quotient of the horizontal coordinate in the touch coordinate divided by the pixel length is an integer, the number of columns of the first target compression unit is equal to the quotient; if the quotient of the horizontal coordinate in the touch coordinate divided by the pixel length is not an integer, the number of columns of the first target compression unit is equal to the integer part of the quotient plus one.
[0079] In some embodiments, if the quotient of the vertical coordinate in the touch coordinate divided by the pixel width is an integer, the number of rows of the first target compression unit is equal to the quotient; if the quotient of the vertical coordinate in the touch coordinate divided by the pixel width is not an integer, the number of rows of the first target compression unit is equal to the integer part of the quotient plus one.
[0080] For example, Figure 4 For example, suppose Figure 4 The pixel length and pixel width of the compression unit are both 4, the touch coordinates are (11, 20), the quotient of the horizontal coordinate in the touch coordinates divided by the pixel length is 2.75, which is not an integer, then the number of columns of the first target compression unit is equal to the integer part of the quotient plus one, that is, equal to 3; the quotient of the vertical coordinate in the touch coordinates divided by the pixel width is equal to 5, which is an integer, then the number of rows of the first target compression unit is equal to the quotient; thus, it is determined that the first target compression unit is located in the fifth row and third column, Figure 4 The sequence number of the compression unit in the fifth row and third column is 3.
[0081] In the above manner, the serial number of the compression unit touched by the user can be determined by the touch coordinates, so that the target compression unit can be determined in the memory according to the serial number, and the touch detection function when using the compressed image can be realized in combination with the subsequent steps.
[0082] Step 240: Read the first target compression unit.
[0083] In some implementations, the step of determining the first target compression unit according to the sequence number comprises the following steps.
[0084] (1) determining a start address and an end address of the first target compression unit according to the sequence number; At this time, step 240 includes the following steps.
[0085] (2) Reading the first target compression unit according to the start address and the end address.
[0086] In some embodiments, after the original image is compressed into a compressed image, each compression unit in the compressed image will be numbered. When the compressed image is written to the memory, the serial number of each compression unit and the correspondence table of the start address and the end address will be written at the same time. The start address and the end address of the first target compression unit can be determined based on the serial number and the correspondence table.
[0087] Optionally, the compressed image and the correspondence table do not need to be written at the same time, but the compressed image is written first and the correspondence table is written later; or the correspondence table is written first and the compressed image is written later.
[0088] Optionally, the correspondence table may not be written into the memory, but may be written into the storage unit, for example Figure 2 or written into an electronic device that is communicatively connected to the test device, such as a computer, a tablet computer, etc.
[0089] Step 250: decompress the first target compression unit to obtain first image data.
[0090] In some embodiments, the processing unit and the memory are both connected to the decoder, e.g. Figure 2 The second decoder 115 in the decoder reads and decodes the data of the first target compression unit, decompresses the data to obtain the first image data, and sends the first image data to the processing unit.
[0091] Step 260: rewrite the first image data to obtain second image data.
[0092] In some embodiments, one way to implement the touch detection function is to change the color of the image at the position where the user touches the screen after the user touches the screen. For example, in the initial state, the display screen displays a completely black image. After the user touches the screen, the color of the image at the position where the user touches the screen changes to white. At this time, the tester can know that the touch function of the screen at that location is intact.
[0093] In some embodiments, step 260 includes the following steps.
[0094] (1) Determine a target pixel point in the first image data according to the touch position.
[0095] (2) Rewriting the values of the sub-pixels included in the target pixel to obtain second image data.
[0096] In some embodiments, each compression unit corresponds to a reference coordinate, and the horizontal coordinate of the touch coordinate of the touch position is subtracted from the horizontal coordinate of the reference coordinate to obtain the horizontal coordinate of the position coordinate, and the vertical coordinate of the touch coordinate of the touch position is subtracted from the vertical coordinate of the reference coordinate to obtain the vertical coordinate of the position coordinate. The horizontal coordinate of the position coordinate is the column number of the target pixel point in the target compression unit, and the vertical coordinate of the position coordinate is the row number of the target pixel point in the target compression unit.
[0097] For example, Figure 4 For example, Figure 4 The reference coordinates of the compression unit 37 are (0, 0). If the touch coordinates are (1, 1), the position coordinates are (1, 1), which means that the target pixel point is in the first row and first column in the compression unit 37, and so on.
[0098] In some implementations, rewriting the values of the sub-pixels included in the target pixel may change the color of the target pixel.
[0099] In some implementations, the screen is usually an RGB screen, and the target pixel includes a red sub-pixel, a green sub-pixel, and a blue sub-pixel, which are three sub-pixels in total.
[0100] However, the present application is not limited thereto. For example, when the screen is an RGBG screen, the target pixel includes a red sub-pixel, a green sub-pixel, a blue sub-pixel, and a green sub-pixel, a total of four sub-pixels.
[0101] In some embodiments, all pixels in the first image data have the same color, the brightness corresponding to each pixel is B0, the brightness of the rewritten target pixel in the second image data is B1, and the Weber contrast calculated by B0 and B1 is greater than the preset contrast, wherein the calculation formula of the Weber contrast C is as follows: C = (B1-B0) / B0 Optionally, the larger the value of the Weber contrast C is, the more obvious the difference between the two colors is. The size of the preset contrast can be selected as needed, and this application does not impose any limitation.
[0102] By making the Weber contrast calculated by B0 and B1 greater than the preset contrast, it can be ensured that the user can significantly observe the color change of the target pixel point, so as to intuitively judge whether the touch function at the touch position of the display screen is intact.
[0103] In some implementations, the step of determining a target pixel in the first image data according to the touch position includes the following steps.
[0104] (1) Determine a starting address of a target pixel point in the first image data according to the touch position.
[0105] Based on this, the step of rewriting the value of the sub-pixel included in the target pixel point to obtain the second image data includes the following steps.
[0106] (2) Obtain a first sub-pixel value, a second sub-pixel value, and a third sub-pixel value corresponding to a preset color.
[0107] (3) Rewriting the value of the starting address into the first sub-pixel value to rewrite the value of the first sub-pixel included in the target pixel.
[0108] (4) Rewriting the value of the first address after the start address into the second sub-pixel value, so as to rewrite the value of the second sub-pixel included in the target pixel.
[0109] (5) Rewriting the value of the second address after the start address into the third sub-pixel value, so as to rewrite the value of the third sub-pixel included in the target pixel.
[0110] Through the above method, the color of the target pixel point can be made the same as the preset color, so as to realize the touch detection function of the test device.
[0111] Step 270: compress the second image data to obtain a second target compression unit.
[0112] Step 280: Write the second target compression unit into the memory.
[0113] In some embodiments, step 280 includes the following steps.
[0114] The second target compression unit is written into the memory according to the start address.
[0115] Among them, the starting address is the starting address in the memory before the first target compression unit is read. In this application, the first image data is rewritten and no data is added or deleted. Therefore, the second target compression unit and the first target compression unit are the same size, and the second target compression unit is directly written back to the original position of the first target compression unit.
[0116] Step 290: Update the image displayed on the display screen according to the compression unit in the memory.
[0117] Specifically, the image needs to be re-output to the display screen so that the user can observe the color change at the touch position to determine whether the touch function of the display screen is intact.
[0118] The present application rewrites the compression unit corresponding to the touch position when the display screen is touched, so that the image color at the touch position in the display screen changes, so that the test device supports the use of compressed images to implement the test function, reduces costs and improves data transmission speed.
[0119] Furthermore, in the above embodiment, one touch position is used as an example, but the above part of the specification has mentioned that the user may have multi-finger touch operations. In this case, the image display method provided in the embodiment of the present application also includes the following steps.
[0120] (1) Acquire touch data generated when a display screen is touched, and identify the touch type in the touch data.
[0121] (2) When the touch type is a multi-point touch, identifying a first touch position and a second touch position in the touch data.
[0122] (3) Execute steps 330 to 380 based on the first touch position, and execute steps 330 to 380 based on the second touch position.
[0123] (4) Updating the image displayed on the display screen according to the compression unit in the second memory.
[0124] Through the above method, the touch detection function when the user performs multi-finger touch can be supported.
[0125] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an image display device provided in an embodiment of the present application. Figure 5 As shown, the image display device 300 includes: a first acquisition unit 310, a touch unit 320, a determination unit 330, a reading unit 340, a decompression unit 350, a rewriting unit 360, a compression unit 370, a writing unit 380, and an updating unit 390.
[0126] The first acquisition unit 310 is used to acquire touch data generated when the display screen is touched.
[0127] The touch unit 320 is used to determine a touch position according to the touch data.
[0128] The determination unit 330 is configured to determine a first target compression unit in a memory according to the touch position, wherein the memory stores a plurality of compression units, and the compression units are configured to determine the colors of a plurality of sub-pixels in the image.
[0129] The reading unit 340 is configured to read the first target compression unit.
[0130] The decompression unit 350 is used to decompress the first target compression unit to obtain first image data.
[0131] The rewriting unit 360 is used to rewrite the first image data to obtain second image data.
[0132] The compression unit 370 is used to compress the second image data to obtain a second target compression unit.
[0133] The writing unit 380 is used to write the second target compression unit into the memory.
[0134] The updating unit 390 is used to update the image displayed on the display screen according to the compression unit in the memory.
[0135] See also Figure 6 , Figure 6 Schematic diagram of a test device provided in an embodiment of the present application. Figure 6 As shown, the test device 400 includes: one or more processors 410 and a memory 420, Figure 6 A processor 410 is taken as an example.
[0136] In some implementations, the processor 410 and the memory 420 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0137] In some embodiments, the processor 410 is used to obtain touch data generated when the display screen is touched; determine the touch position based on the touch data; determine a first target compression unit in the memory based on the touch position; wherein the memory includes multiple compression units, each of which is used to determine the colors of multiple pixels in the image; read the first target compression unit; decompress the first target compression unit to obtain first image data; rewrite the first image data to obtain second image data; compress the second image data to obtain a second target compression unit; write the second target compression unit to the memory; and update the image displayed on the display screen according to the compression unit in the memory.
[0138] In some embodiments, the memory 420 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules of the image display method in the embodiment of the present application. The processor 410 executes various functional applications and data processing of the test device by running the non-volatile software programs, instructions and modules stored in the memory 420, that is, the image display method of the above method embodiment is implemented.
[0139] In some embodiments, the memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the test device, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0140] In some embodiments, one or more modules are stored in the memory 420, and when executed by one or more processors 410, the image display method in any of the above method embodiments is executed, for example, the image display method described above is executed. Figure 3 Method steps 210 to 290 in.
[0141] Please refer to Figure 7 , Figure 7 The computer-readable storage medium 500 stores a program code 510, which can be called by a processor to execute the image display method described in the above method embodiment.
[0142] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has a storage space for program codes for executing any method steps in the above control method. These program codes may be read from or written to one or more computer program products. The program code may be compressed, for example, in an appropriate form.
[0143] In summary, the present application provides an image display method, device, test device and storage medium, the method comprising: obtaining touch data generated when a display screen is touched; determining a touch position according to the touch data; determining a first target compression unit in a memory according to the touch position; wherein the memory comprises a plurality of compression units, each of which is used to determine the colors of a plurality of pixels in the image; reading the first target compression unit; decompressing the first target compression unit to obtain first image data; rewriting the first image data to obtain second image data; compressing the second image data to obtain a second target compression unit; writing the second target compression unit to the memory; and updating the image displayed on the display screen according to the compression unit in the memory. The present application rewrites the compression unit corresponding to the touch position when the display screen is touched, so that the image color at the touch position in the display screen changes, so that the test device supports the use of compressed images to implement test functions, reduces costs and increases data transmission speeds.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. 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 spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An image display method, characterized in that: The method comprises: Get the touch data generated when the display screen is touched; determining a touch position according to the touch data; Determine a first target compression unit in a memory according to the touch position; wherein the memory includes a plurality of compression units, each of which is used to determine the colors of a plurality of pixel points in the image displayed on the display screen; reading the first target compression unit; Decompressing the first target compression unit to obtain first image data; rewriting the first image data to obtain second image data; compressing the second image data to obtain a second target compression unit; writing the second target compression unit into the memory; The image displayed on the display screen is updated according to the compression unit in the memory.
2. The method according to claim 1, characterized in that The step of determining a first target compression unit in a memory according to the touch coordinates comprises: Obtaining the pixel length and pixel width of each compression unit; The first target compression unit is determined according to the touch coordinates, the pixel length, and the pixel width.
3. The method according to claim 2, characterized in that The determining the first target compression unit according to the touch coordinates, the pixel length, and the pixel width includes: Determine the number of columns of the first target compression unit according to a quotient of a horizontal coordinate in the touch coordinate divided by the pixel length; Determine the number of rows of the first target compression unit according to a quotient of a vertical coordinate in the touch coordinate divided by the pixel width; The serial number of the first target compression unit is determined according to the number of rows and the number of columns, and the first target compression unit is determined according to the serial number.
4. The method according to claim 3, characterized in that The determining the first target compression unit according to the sequence number comprises: Determine a start address and an end address of the first target compression unit according to the sequence number; The reading the first target compression unit includes: The first target compression unit is read according to the start address and the end address.
5. The method according to claim 4, characterized in that Writing the second target compression unit into the memory comprises: The second target compression unit is written into the memory according to the start address.
6. The method according to claim 1, characterized in that The rewriting of the first image data to obtain the second image data comprises: Determine a target pixel point in the first image data according to the touch position; The values of the sub-pixels included in the target pixel are rewritten to obtain second image data.
7. The method according to claim 6, characterized in that: The determining a target pixel point in the first image data according to the touch position includes: Determine a starting address of a target pixel point in the first image data according to the touch position; The step of rewriting the value of the sub-pixel included in the target pixel point to obtain the second image data comprises: Obtaining a first sub-pixel value, a second sub-pixel value, and a third sub-pixel value corresponding to a preset color; Rewriting the value of the starting address into the first sub-pixel value, so as to rewrite the value of the first sub-pixel included in the target pixel; Rewriting the value of the first address after the start address into the second sub-pixel value, so as to rewrite the value of the second sub-pixel included in the target pixel; The value of the second address after the start address is rewritten as the third sub-pixel value, so as to rewrite the value of the third sub-pixel included in the target pixel.
8. An image display device, characterized in that: The device comprises: A first acquisition unit, used to acquire touch data generated when the display screen is touched; A touch unit, used to determine a touch position according to the touch data; A determination unit, configured to determine a first target compression unit in a memory according to the touch position; wherein the memory stores a plurality of compression units, and the compression unit is configured to determine the colors of a plurality of sub-pixels in the image; A reading unit, configured to read the first target compression unit; a decompression unit, configured to decompress the first target compression unit to obtain first image data; A rewriting unit, used for rewriting the first image data to obtain second image data; A compression unit, used for compressing the second image data to obtain a second target compression unit; a writing unit, configured to write the second target compression unit into the memory; An updating unit is used to update the image displayed on the display screen according to the compression unit in the memory.
9. A testing device, characterized in that: The testing device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image display method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the image display method according to any one of claims 1 to 7.
