Method, device and image signal generator for displaying test images on a host computer
By analyzing and converting the color depth and bit depth values in the preset image file, the problem that the upper computer cannot correctly display non-8bit image files is solved, and the synchronous display effect of the upper computer and the display module to be tested is realized during testing.
Patent Information
- Application Number
- CN202111565331.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2041-12-20
AI Technical Summary
In the prior art, the upper computer cannot correctly display image files with a color depth of non-8 bits, resulting in the inability to correctly display the test images output from the display module to be tested.
By obtaining the preset image file, parsing its data header to obtain color depth values and bit depth values, the first valid data of each subpixel of each pixel is read in the actual data storage area, and converting it into the second valid data in the standard image file to generate a displayable standard image file.
The upper computer system can correctly display image files with color depth of non-8 bits, so that the upper computer and the display module to be tested can display the same test images synchronously during testing, adapting to test scenarios of different color depth types.
Smart Images

Figure CN114245030B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of display device detection, and in particular to a method and device for displaying a test image on a host computer, and an image signal generator. Background Art
[0002] There are many types of display panels at present, and different display panels support displaying images with different color depths. The single-channel color depth of a component in the color system (Red Green Blue, RGB) of an image pixel can be 6, 8, 10, or 12 bits (binary digit, bit). In the field of display devices, the single-channel color depth of a component of RGB is generally used to describe the color depth of a pixel, that is, the single-channel color depth.
[0003] In the technical field of display device detection, it is necessary to output a test image to the display module to be tested through an image signal generator (Pattern Generator, PG), and after the display device to be tested is dotted, the host system of the PG device needs to display the corresponding preview image, which is a thumbnail preview image corresponding to the image, in order to facilitate users to observe the thumbnail preview image on the host system to view the current test image. The UI controls and associated program libraries of the host device called by the host system can only correctly read out the image files of the conventional standard type with a color depth of 8bit, and then display the thumbnail preview image. However, the UI controls cannot correctly parse and read out the image data with a color depth of 6, 10, and 12bit, and therefore cannot correctly display the thumbnail preview image.
[0004] Specifically, in actual applications: (1) Image files with a color depth of 6 bits are similar to image files with a color depth of 8 bits, except that the highest 2 bits of each RGB byte of image files with a color depth of 6 bits are 0. When an ordinary picture player is used to open an image file with a color depth of 6 bits, it will be treated as an image file with a bit depth of 24 bits (color depth of 8 bits). Although it can be opened, the color displayed after opening is not the original color that the file should actually display. (2) When an ordinary picture player is used to open an image file with a color depth of 10 bits, it will be treated as a 32-bit bmp image in the RGBA format. Therefore, it can be opened, but the color displayed after opening is not the original color that the file should actually display. (3) For image files with a color depth of 12 bits, ordinary picture players cannot open them.
[0005] Therefore, there is an urgent need for a method for a host computer system to correctly display image files with a color depth other than 8 bits, so as to adapt to the scenario of outputting test images with corresponding color depths to display modules under test of different color depth types. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide a method, device and image signal generator for displaying a test image on a host computer, so as to solve the problem in the prior art that the host computer cannot display the correct image file.
[0007] In order to achieve the above object, the first aspect of the present invention provides a method for a host computer to display a test image, the method comprising:
[0008] Acquisition step: acquiring a preset image file; the preset image file includes a data header and an actual data storage area for storing actual data, and the data header includes a bit depth value and a color depth value;
[0009] Parsing step: parsing the preset image file to obtain the color depth value and the bit depth value;
[0010] Reading step: reading first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area according to the color depth value and the bit depth value;
[0011] Conversion step: converting the first valid data into second valid data in the standard image file; generating the standard image file according to the second valid data so as to obtain the standard image file.
[0012] In the embodiment of the present invention, the obtaining step further includes:
[0013] Determine whether the suffix of the current image file is a preset identifier;
[0014] When the suffix of the current image file is a preset identifier, the current image file is determined to be a preset image file, and the parsing step is entered;
[0015] When the suffix of the current image file is not a preset identifier, the current image file is determined to be a standard image file, and the preset image file is directly displayed.
[0016] In an embodiment of the present invention, the parsing step further includes:
[0017] Determine whether the parsed color depth value is the initial value;
[0018] When the color depth value is not the initial value, the reading step is entered.
[0019] In an embodiment of the present invention, the data header also includes a preset byte offset, an image height, and an image width.
[0020] The parsing step further includes: parsing a preset image file to obtain a preset byte offset, image height, and image width;
[0021] The reading step also includes: determining the starting position of the actual data storage area according to a preset byte offset; reading the first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area from the starting position according to the image height, image width, bit depth value and color depth value.
[0022] In an embodiment of the present invention, the data header also includes a preset byte offset and a file size;
[0023] The parsing step also includes: parsing a preset image file to obtain a file size and a preset byte offset;
[0024] The reading step also includes: determining the starting position of the actual data storage area according to a preset byte offset; reading the first valid data of each sub-pixel of each pixel in the preset image file from the actual data storage area starting from the starting position according to the file size, bit depth value and color depth value.
[0025] In an embodiment of the present invention, the data header also includes the sub-pixel color sequence of the pixel;
[0026] The parsing step further includes: parsing a preset image file to obtain a sub-pixel color sequence;
[0027] The conversion step also includes: converting the first valid data into second valid data in the standard image file according to the sub-pixel color sequence; generating the standard image file according to the second valid data so as to display the standard image file.
[0028] In an embodiment of the present invention, the method further includes:
[0029] Generates thumbnails from standard image files and displays them.
[0030] A second aspect of the present invention provides a device for displaying a test image on a host computer, the device comprising:
[0031] An acquisition module is used to acquire a preset image file; the preset image file includes a data header and an actual data storage area for storing actual data, and the data header includes a bit depth value and a color depth value;
[0032] A parsing module, used for parsing a preset image file to obtain a color depth value and a bit depth value;
[0033] A reading module, used for reading first valid data of each sub-pixel of each pixel in a preset image file in an actual data storage area according to a color depth value and a bit depth value;
[0034] The conversion module is used to convert the first valid data into second valid data in the standard image file; and generate the standard image file according to the second valid data so as to form a standard image file.
[0035] A third aspect of the present invention provides an image signal generator, comprising:
[0036] a memory configured to store instructions; and
[0037] The processor is configured to call instructions from the memory and implement the above-mentioned method for the host computer to display the test image when executing the instructions.
[0038] A fourth aspect of the present invention provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the method for displaying a test image according to the above-mentioned host computer.
[0039] Through the above technical solution, the preset image file is parsed to obtain the color depth value and the bit depth value; the first valid data of each sub-pixel of each pixel in the preset image file is read in the actual data storage area according to the color depth value and the bit depth value; the first valid data is further converted into the second valid data in the standard image file; the standard image file is generated according to the second valid data, and the standard image file is displayed. In this way, the host computer system can correctly display the image file with a color depth of non-8bit, so that the host computer and the display module to be tested display the same test image during the test, so that the host computer can synchronously display the test image in the scenario where the display module to be tested with different color depth types outputs the test image of the corresponding color depth.
[0040] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0042] Figure 1 A schematic diagram of a process flow of a method for displaying a test image by a host computer according to an embodiment of the present invention is shown;
[0043] Figure 2 A schematic diagram of the structure of a preset image file according to an embodiment of the present invention is shown;
[0044] Figure 3 The structure diagram of the device for displaying a test image on a host computer according to an embodiment of the present invention is schematically shown;
[0045] Figure 4 The structure block diagram of the image signal generator according to the embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0048] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their 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 at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0049] Figure 1 The following is a schematic diagram showing a flow chart of a method for displaying a test image on a host computer according to an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a method for a host computer to display a test image, and the method may include the following steps:
[0050] Acquisition step 102, acquiring a preset image file; the preset image file includes a data header and an actual data storage area for storing actual data, and the data header includes a bit depth value and a color depth value;
[0051] Parsing step 104, parsing the preset image file to obtain a color depth value and a bit depth value;
[0052] Reading step 106, reading first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area according to the color depth value and the bit depth value;
[0053] Conversion step 108: converting the first valid data into second valid data in the standard image file; generating the standard image file according to the second valid data so as to display the standard image file.
[0054] In the embodiment of the present invention, the preset image file refers to a preset image file generated according to the display module to be tested. The preset image file includes a data header and an actual data storage area for storing the actual area. That is, the actual data storage area and the data header are spliced to form the preset image file. The actual data storage area is an area relative to the non-actual data stored in the data header. The data header defines two fields, which store the color depth value and the bit depth value respectively.
[0055] The data header includes a color depth value that matches the display module to be tested and a bit depth value corresponding to the color depth value. Specifically, when the color depth of the image required by the display module to be tested is 8 bits, the corresponding bit depth value is set to 24 bits (in the RGB scene) or 32 bits (in the RGBX scene); when the color depth of the image required by the display module to be tested is 6 bits, the corresponding bit depth value is set to 24 bits; when the color depth of the image required by the display module to be tested is 10 bits, the corresponding bit depth value is set to 32 bits; when the color depth of the image required by the display module to be tested is 12 bits, the corresponding bit depth value is set to 40 bits.
[0056] Figure 2 The structure diagram of the preset image file according to the embodiment of the present invention is schematically shown. Figure 2 As shown, the preset image file of the embodiment of the present invention may include a data header and an actual data storage area. The data header may include, but is not limited to, a preset byte offset, a color depth value, a sub-pixel color (RGB) order, a file size, an image width, an image height, and a bit depth value. The color depth value refers to the number of bits for each color channel; the bit depth value refers to the number of bits occupied by each pixel; the unit of the preset byte offset is bytes, which represents the number of bytes from the starting storage position of the data header to the starting storage position of the actual data storage area; the image height and the image width represent the number of rows and columns of transmitted pixels, that is, the resolution size of the image; the unit of the file size is bytes, and the file size is the number of bytes of the preset byte offset + the number of bytes occupied by the image of the resolution size represented by the image width and height.
[0057] In an embodiment of the present invention, obtaining the preset image file can be obtained by the host computer sending it to the image signal generator in the form of a test file package for parsing, or the image signal generator directly generates the preset image file, or the external control box sends the preset image file to the image signal generator. In one example, the host computer system has an image editing module, and the user can set relevant parameters on the image editing interface according to the image requirements required by the display module to be tested, such as whether to generate a standard image file or a preset image file, the number of bits (i.e., color depth) of a single color channel of the preset image file, the number of bits occupied by each pixel (i.e., bit depth), the preset image style (common picture styles such as chessboard), image width, image height, etc. When the color depth of the image required by the display module to be tested is 8bit, the output preset image file format can also be selected, wherein the corresponding bit depth value is set to 24bit (in RGB scene) or 32bit (in RGBX scene); when the color depth of the display module to be tested is 8bit, a standard image format with a color depth of 8bit can also be generated. When the color depth of the image required by the display module to be tested is 6 bits, select the output preset image file format and set the bit depth value to 24 bits; when the color depth of the image required by the display module to be tested is 10 bits, select the output preset image file format and set the bit depth value to 32 bits; when the color depth of the image required by the display module to be tested is 12 bits, select the output preset image file format and set the bit depth value to 40 bits.
[0058] After reading the first valid data, the processor converts the first valid data into the second valid data in the standard image file; so as to generate the standard image file according to the second valid data, and display the standard image file, so that the host computer system can correctly display the preset image file. Specifically, the color depth, RGB order, and preset storage mode of each pixel of the standard image file (which can be a sequential splicing method from low to high) are known. Therefore, according to the relevant information of the known standard image file, the first valid data is converted into the second valid data corresponding to the standard image file, and then the standard image file is generated according to the second valid data and the format of the standard image file.
[0059] Through the above technical solution, the preset image file is parsed to obtain the color depth value and the bit depth value; the first valid data of each sub-pixel of each pixel in the preset image file is read in the actual data storage area according to the color depth value and the bit depth value; the first valid data is further converted into the second valid data in the standard image file; the standard image file is generated according to the second valid data, and the standard image file is displayed. In this way, the host computer system can correctly display the image file with a color depth of non-8bit, so that the host computer and the display module to be tested display the same test image during the test, so that the host computer can synchronously display the test image in the scenario where the display module to be tested with different color depth types outputs the test image with the corresponding color depth.
[0060] In the embodiment of the present invention, the obtaining step 102 may further include:
[0061] Determine whether the suffix of the current image file is a preset identifier;
[0062] When the suffix of the current image file is a preset identifier, the current image file is determined to be a preset image file, and the parsing step is entered;
[0063] When the suffix of the current image file is not a preset identifier, the current image file is determined to be a standard image file, and the image file is directly displayed.
[0064] Specifically, the suffixes of the standard image file and the preset image file may both contain identifiers, for example, the standard image file and the preset image file are distinguished by the suffix. In an embodiment of the present invention, the preset image file may contain a preset identifier. The processor may determine whether the current image file is a preset image file based on whether the suffix of the current image file is a preset identifier. In the case where the suffix of the current image file is a preset identifier, the current image file is determined to be a preset image file and the parsing step is entered; otherwise, it indicates that the current image file is a standard image file and the image file is directly displayed. By determining whether the current image file is a preset image file, the processing method can be better and quickly selected according to the type of the current image file, thereby improving the efficiency of the host computer in displaying the test image.
[0065] In the embodiment of the present invention, the parsing step 104 may further include:
[0066] Determine whether the parsed color depth value is the initial value;
[0067] When the color depth value is not the initial value, the reading step is entered.
[0068] Specifically, the processor reads and parses the preset image file to obtain a data header of the preset image file. It is determined whether the color depth value contained in the data header is an initial value, such as 0. If the color depth value is not 0, it indicates that the color depth value is assigned to form a preset image file, and then the reading step is entered to improve image processing efficiency.
[0069] In the embodiment of the present invention, the data header may further include a preset byte offset, an image height, and an image width, and the parsing step 104 may further include: parsing the preset image file to obtain a preset byte offset, an image height, and an image width;
[0070] The reading step 106 may also include: determining the starting position of the actual data storage area according to a preset byte offset; reading the first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area from the starting position according to the image height, image width, bit depth value and color depth value.
[0071] Specifically, the data header may include a preset byte offset, image height, and image width. After parsing the preset image file, the processor may obtain the preset byte offset, image height, and image width. Thus, the starting position of the actual data storage area may be determined according to the preset byte offset, and then the first valid data of each sub-pixel of all pixels may be read from the actual data storage area from the starting position according to the image height, image width, bit depth value, and color depth value. The principle of adopting this method is that both the starting position of the actual data and the total number of pixels stored are known, and the color depth value and bit depth are also known. In this way, according to the color depth, bit depth, and the preset pixel storage method (which may be a method of splicing from low to high in sequence), the valid data of each sub-pixel may be read in the actual data storage area of the preset image file, and the valid data is the first valid data.
[0072] In an embodiment of the present invention, the data header may further include a preset byte offset and a file size;
[0073] The parsing step 104 may also include: parsing a preset image file to obtain a file size and a preset byte offset;
[0074] The reading step 106 may also include: determining the starting position of the actual data storage area according to a preset byte offset; and reading the first valid data of each sub-pixel of each pixel in the preset image file from the actual data storage area starting from the starting position according to the file size, bit depth value and color depth value.
[0075] Specifically, the data header may also include a preset byte offset and a file size. The file size may be automatically calculated from the image height and image width, while the image height and image width are set by the user based on the properties of the display module to be tested. The processor parses the preset image file to obtain the file size and the preset byte offset, and the starting position of the actual data storage area may be determined according to the preset byte offset. Then, the first valid data of each sub-pixel of all pixels is read from the actual data storage area from the starting position according to the file size, color depth value and bit depth value. The principle of adopting this method is: knowing the starting position of the actual data storage and the total number of data bytes, and also knowing the color depth value and bit depth, so that the valid data of each sub-pixel can be read in the actual data storage area of the preset image file according to the color depth, bit depth and preset pixel storage method, as the first valid data. Of course, in actual applications, the data header may also include image height and image width, so that when the image height and image width are needed in the back-end development process, they can be obtained by parsing the preset image file, thereby having good adaptability.
[0076] In an embodiment of the present invention, the data header may further include a sub-pixel color sequence of the pixel;
[0077] The parsing step 104 may also include: parsing a preset image file to obtain a sub-pixel color sequence;
[0078] The conversion step 108 may further include: converting the first valid data into second valid data in the standard image file according to the sub-pixel color sequence; generating the standard image file according to the second valid data so as to display the standard image file.
[0079] Specifically, since the sub-pixel color order of the standard image file is known, such as RGB, and the sub-pixel color order obtained by parsing in step 104 is GBR, then in step 108, it is necessary to convert the first valid data of the sub-pixel G of the preset image file into the second valid data of the standard image file; similarly, the sub-pixels B and R of the preset image file also need to be converted into the second valid data of the standard image file, and finally, the second valid data converted into GBR are spliced according to the RGB order of the standard image file and the known pixel storage method to obtain the actual data of the standard image file, and the standard image file can be obtained based on the actual data.
[0080] It can be understood that the data header can also include a sub-pixel color (RGB) sequence. In this way, the RGB sequence can be obtained when parsing the preset image file, and setting the RGB sequence can make the format of the preset image file more universal. If the hardware has requirements for the RGB sequence when implementing image transmission or other processing (for example, a chip IP is designed according to a certain RGB sequence), the format of the preset image file can be expanded to adapt to various requirements in related fields. When generating a preset image file, it can be generated directly according to the required RGB sequence, and no additional conversion or processing is required when reading valid data from the preset image file, which facilitates data acquisition and user development. When developing according to the format of the preset image file, third-party users can flexibly set the default RGB sequence, so that when generating a preset image file, the pixel valid data of the image is stored in the default RGB sequence.
[0081] In an embodiment of the present invention, the method may further include:
[0082] Generates thumbnails from standard image files and displays them.
[0083] Specifically, the processor generates a standard image file according to valid data of each pixel of the standard image, and then controls the UI space to call a library function to generate a thumbnail from the standard image file, and displays the thumbnail.
[0084] It should be noted that the above-mentioned method for displaying a test image on a host computer can be applied to converting a preset image file into a standard image file and saving it before testing the display module to be tested. When testing the display module to be tested, the host computer obtains and displays the standard image file corresponding to the current test image file in real time; further, a thumbnail is generated from the standard image file converted from the preset image file, and the thumbnail is saved. When testing the display module to be tested, the host computer obtains and displays the thumbnail of the standard image file corresponding to the current test image file in real time. In this way, in some special scenarios, users need to develop a host computer according to their own business, and the above method can be used to enable the host computer to display thumbnails normally.
[0085] Figure 3 The structure diagram of the device for displaying a test image on a host computer according to an embodiment of the present invention is schematically shown. Figure 3 As shown, an embodiment of the present invention provides a device for displaying a test image on a host computer, and the device may include:
[0086] An acquisition module 302 is used to acquire a preset image file; the preset image file includes a data header and an actual data storage area for storing actual data, and the data header includes a bit depth value and a color depth value;
[0087] The parsing module 304 is used to parse the preset image file to obtain a color depth value and a bit depth value;
[0088] A reading module 306, configured to read first valid data of each sub-pixel of each pixel in a preset image file in an actual data storage area according to a color depth value and a bit depth value;
[0089] The conversion module 308 is used to convert the first valid data into second valid data in the standard image file; and generate the standard image file according to the second valid data so as to form a standard image file.
[0090] In an embodiment of the present invention, the preset image file refers to a preset image file generated according to the display module to be tested. The preset image file includes a data header and an actual data storage area for storing the actual area, and the data header includes a bit depth value and a color depth value of the preset image file. In other words, the actual data storage area and the data header are spliced to form the preset image file. The actual data storage area is an area relative to the non-actual data stored in the data header. The data header defines two fields, which store the color depth value and the bit depth value respectively.
[0091] The data header includes a color depth value that matches the display module to be tested and a bit depth value corresponding to the color depth value. Specifically, when the color depth of the image required by the display module to be tested is 8 bits, the corresponding bit depth value is set to 24 bits (in the RGB scene) or 32 bits (in the RGBX scene); when the color depth of the image required by the display module to be tested is 6 bits, the corresponding bit depth value is set to 24 bits; when the color depth of the image required by the display module to be tested is 10 bits, the corresponding bit depth value is set to 32 bits; when the color depth of the image required by the display module to be tested is 12 bits, the corresponding bit depth value is set to 40 bits.
[0092] like Figure 2 As shown, the preset image file of the embodiment of the present invention may include a data header and an actual data storage area. The data header may include, but is not limited to, a preset byte offset, a color depth value, a sub-pixel color (RGB) order, an identification number, a file size, an image width, an image height, and a bit depth value. The color depth value refers to the number of bits of each color channel; the bit depth value refers to the number of bits occupied by each pixel; the unit of the preset byte offset is bytes, which represents the number of bytes from the starting storage position of the data header to the starting storage position of the actual data storage area; the image height and the image width represent the number of rows and columns of transmitted pixels, that is, the resolution size of the image; the unit of the file size is bytes, and the file size is the number of bytes of the preset byte offset + the number of bytes occupied by the image of the resolution size represented by the image width and height.
[0093] In an embodiment of the present invention, obtaining the preset image file can be obtained by the host computer sending it to the image signal generator in the form of a test file package for parsing, or the image signal generator directly generates the preset image file, or the external control box sends the preset image file to the image signal generator. In one example, the host computer system has an image editing module, and the user can set relevant parameters on the image editing interface according to the image requirements required by the display module to be tested, such as whether to generate a standard image file or a preset image file, the number of bits (i.e., color depth) of a single color channel of the preset image file, the number of bits occupied by each pixel (i.e., bit depth), the preset image style (common picture styles such as chessboard), image width, image height, etc. When the color depth of the image required by the display module to be tested is 8bit, the output preset image file format can also be selected, wherein the corresponding bit depth value is set to 24bit (in RGB scene) or 32bit (in RGBX scene); when the color depth of the display module to be tested is 8bit, a standard image format with a color depth of 8bit can also be generated. When the color depth of the image required by the display module to be tested is 6 bits, select the output preset image file format and set the bit depth value to 24 bits; when the color depth of the image required by the display module to be tested is 10 bits, select the output preset image file format and set the bit depth value to 32 bits; when the color depth of the image required by the display module to be tested is 12 bits, select the output preset image file format and set the bit depth value to 40 bits.
[0094] After reading the first valid data, the processor converts the first valid data into the second valid data in the standard image file; so as to generate the standard image file according to the second valid data, and display the standard image file, so that the host computer system can correctly display the preset image file. Specifically, the color depth, RGB order, and preset storage mode of each pixel of the standard image file (which can be a sequential splicing method from low to high) are known. Therefore, according to the relevant information of the known standard image file, the first valid data is converted into the second valid data corresponding to the standard image file, and then the standard image file is generated according to the second valid data and the format of the standard image file.
[0095] Through the above technical solution, the preset image file is parsed to obtain the color depth value and the bit depth value; the first valid data of each sub-pixel of each pixel in the preset image file is read in the actual data storage area according to the color depth value and the bit depth value; the first valid data is further converted into the second valid data in the standard image file; the standard image file is generated according to the second valid data, and the standard image file is displayed. In this way, the host computer system can correctly display the image file with a color depth of non-8bit, so that the host computer and the display module to be tested display the same test image during the test, so that the host computer can synchronously display the test image in the scenario where the display module to be tested with different color depth types outputs the test image with the corresponding color depth.
[0096] Figure 4 The structure block diagram of the image signal generator according to the embodiment of the present invention is schematically shown. Figure 4 As shown, an embodiment of the present invention provides an image signal generator, comprising:
[0097] Memory 410, configured to store instructions; and
[0098] The processor 420 is configured to call instructions from the memory 410 and implement the above-mentioned method for the host computer to display a test image when executing the instructions.
[0099] In the embodiment of the present invention, the processor 420 may be configured to:
[0100] Acquisition step: acquiring a preset image file; the preset image file includes a data header and an actual data storage area for storing actual data, and the data header includes a bit depth value and a color depth value;
[0101] Parsing step: parsing the preset image file to obtain the color depth value and the bit depth value;
[0102] Reading step: reading first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area according to the color depth value and the bit depth value;
[0103] Conversion step: converting the first valid data into second valid data in the standard image file; generating the standard image file according to the second valid data so as to display the standard image file.
[0104] Furthermore, the processor 420 may be configured to:
[0105] The acquisition step also includes:
[0106] Determine whether the suffix of the current image file is a preset identifier;
[0107] When the suffix of the current image file is a preset identifier, the current image file is determined to be a preset image file, and the parsing step is entered;
[0108] When the suffix of the current image file is not a preset identifier, the current image file is determined to be a standard image file, and the preset image file is directly displayed.
[0109] Furthermore, the processor 420 may be configured to:
[0110] The parsing step also includes:
[0111] Determine whether the parsed color depth value is the initial value;
[0112] When the color depth value is not the initial value, the reading step is entered.
[0113] Furthermore, the data header also includes a preset byte offset, an image height, and an image width. The processor 420 may also be configured as follows:
[0114] The parsing step further includes: parsing a preset image file to obtain a preset byte offset, image height, and image width;
[0115] The reading step also includes: determining the starting position of the actual data storage area according to a preset byte offset; reading the first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area from the starting position according to the image height, image width, bit depth value and color depth value.
[0116] Further, the data header also includes a preset byte offset and a file size; further, the processor 420 may also be configured to:
[0117] The parsing step also includes: parsing a preset image file to obtain a file size and a preset byte offset;
[0118] The reading step also includes: determining the starting position of the actual data storage area according to a preset byte offset; reading the first valid data of each sub-pixel of each pixel in the preset image file from the actual data storage area starting from the starting position according to the file size, bit depth value and color depth value.
[0119] Further, the data header also includes the sub-pixel color sequence of the pixel; further, the processor 420 can also be configured to:
[0120] The parsing step further includes: parsing a preset image file to obtain a sub-pixel color sequence;
[0121] The conversion step also includes: converting the first valid data into second valid data in the standard image file according to the sub-pixel color sequence; generating the standard image file according to the second valid data so as to display the standard image file.
[0122] Furthermore, the processor 420 may be configured to:
[0123] Generates thumbnails from standard image files and displays them.
[0124] Through the above technical solution, the preset image file is parsed to obtain the color depth value and the bit depth value; the first valid data of each sub-pixel of each pixel in the preset image file is read in the actual data storage area according to the color depth value and the bit depth value; the first valid data is further converted into the second valid data in the standard image file; the standard image file is generated according to the second valid data, and the standard image file is displayed. In this way, the host computer system can correctly display the image file with a color depth of non-8bit so that the host computer and the display module to be tested display the same test image during the test, so that the host computer can synchronously display the test image in the scenario where the display module to be tested with different color depth types outputs the test image with the corresponding color depth.
[0125] An embodiment of the present invention further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the method for displaying a test image according to the above-mentioned host computer.
[0126] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0128] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0130] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0131] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0132] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0133] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0134] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for displaying a test image on a host computer, characterized in that: The method comprises: Acquisition step: acquiring a preset image file; the preset image file includes a data header and an actual data storage area for storing actual data, the data header includes a bit depth value and a color depth value; judging whether the suffix of the current image file is a preset identifier; if the suffix of the current image file is a preset identifier, judging that the current image file is a preset image file, and entering the parsing step; if the suffix of the current image file is not a preset identifier, judging that the current image file is a standard image file, and directly displaying the image file; Parsing step: parsing the preset image file to obtain the color depth value and the bit depth value; Reading step: reading first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area according to the color depth value and the bit depth value; Conversion step: converting the first valid data into second valid data in a standard image file; generating a standard image file according to the second valid data so as to display the standard image file; Among them, the method is applied before testing the display module to be tested, converting the preset image file into the standard image file and saving it; when testing the display module to be tested, the host computer obtains the standard image file corresponding to the current test image file in real time and displays it; the host computer includes an image editing module; according to the image requirements required by the display module to be tested and the relevant parameters set in the image editing module, it is determined whether to generate the standard image file or the preset image file.
2. The method according to claim 1, characterized in that The parsing step also includes: Determine whether the parsed color depth value is the initial value; When the color depth value is not the initial value, the reading step is entered.
3. The method according to claim 1, characterized in that The data header also includes a preset byte offset, image height and image width, The parsing step further includes: parsing the preset image file to obtain the preset byte offset, image height and image width; The reading step also includes: determining the starting position of the actual data storage area according to the preset byte offset; reading the first valid data of each sub-pixel of each pixel in the preset image file in the actual data storage area from the starting position according to the image height, the image width, the bit depth value and the color depth value.
4. The method according to claim 1, characterized in that: The data header also includes a preset byte offset and a file size; The parsing step further comprises: parsing the preset image file to obtain the file size and the preset byte offset; The reading step also includes: determining the starting position of the actual data storage area according to the preset byte offset; and reading the first valid data of each sub-pixel of each pixel in the preset image file from the actual data storage area starting from the starting position according to the file size, the bit depth value and the color depth value.
5. The method according to claim 1, characterized in that The data header also includes the sub-pixel color order of the pixel; The parsing step further includes: parsing the preset image file to obtain a sub-pixel color sequence; The conversion step also includes: converting the first valid data into second valid data in a standard image file according to the sub-pixel color sequence; generating a standard image file according to the second valid data so as to display the standard image file.
6. The method according to claim 1, characterized in that The method further comprises: A thumbnail is generated according to the standard image file and the thumbnail is displayed.
7. A device for displaying a test image on a host computer, characterized in that: The device comprises: an acquisition module, for acquiring a preset image file; the preset image file includes a data header and an actual data storage area for storing actual data, the data header includes a bit depth value and a color depth value; judging whether the suffix of the current image file is a preset identifier; if the suffix of the current image file is a preset identifier, judging the current image file to be a preset image file, and entering a parsing step; if the suffix of the current image file is not a preset identifier, judging the current image file to be a standard image file, and directly displaying the image file; A parsing module, used for parsing the preset image file to obtain the color depth value and the bit depth value; A reading module, configured to read first valid data of each sub-pixel of each pixel in the preset image file in an actual data storage area according to the color depth value and the bit depth value; A conversion module, configured to convert the first valid data into second valid data in a standard image file; and generate a standard image file according to the second valid data so as to display the standard image file; Among them, the device is used to convert the preset image file into the standard image file and save it before testing the display module to be tested; when testing the display module to be tested, the host computer obtains the standard image file corresponding to the current test image file in real time and displays it; the host computer includes an image editing module; according to the image requirements required by the display module to be tested and the relevant parameters set in the image editing module, it is determined whether to generate the standard image file or the preset image file.
8. An image signal generator, characterized in that: include: a memory configured to store instructions; as well as A processor is configured to call the instruction from the memory and implement the method for displaying a test image on a host computer according to any one of claims 1 to 6 when executing the instruction.
9. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions, which are used to enable a machine to execute the method for displaying a test image by a host computer according to any one of claims 1 to 6.
Citation Information
Patent Citations
Video image color depth conversion method, system and device
CN112689139A
Method and system for converting an image
US20110229040A1
