A superimposed image generation method, device, equipment and medium
Through the superimposed image generation method, the problem of limited operational flexibility and complex generation when generating logical diagrams with graphics and characters in the prior art is solved, and a more flexible and efficient image generation process is achieved.
Patent Information
- Application Number
- CN202310142990.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2043-02-08
AI Technical Summary
In the prior art, when generating logical diagrams with graphics and characters, operational flexibility is limited and the generation method is relatively complex.
Using the overlay image generation method, a logical diagram with graphics and characters is generated by outputting the main data stream and superimposing layer data on each frame of its image. The method includes obtaining overlay layer data and overlaying on the main data stream, supporting multiple layer combinations, such as any character layer, graphic layer, and specific character layer.
Improve operational flexibility, simplify the generation process, and make generation of logical diagrams with graphics and characters more flexible and efficient.
Smart Images

Figure CN116095255B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display and detection of liquid crystal modules, and in particular to a method, device, equipment and medium for generating a superimposed image. Background Art
[0002] As the resolution of LCD modules increases, the display effect becomes clearer, and the technical requirements for the module's research and development, production, and testing are also getting higher and higher. Therefore, in the module testing process, it is necessary to test the working status of each pixel of the module and the overall display effect of the module. To achieve these two goals, it is necessary to use different types of screen points. The former needs to display logical images (i.e., the images with accuracy and regularity generated by the image signal source through its own calculation and processing), and the latter needs to display BMP images (i.e., the image signal source loads and displays the external image preset in BMP format). At the same time, BMP images with graphics and characters, or logical diagrams with graphics and characters may also be required.
[0003] The prior art results in limited operational flexibility and a more complicated generation method when generating a logic diagram with graphics and characters. Summary of the invention
[0004] Based on the above problems, the present application provides a method, device, equipment and medium for generating an overlay image, which improves the operational flexibility and simplifies the generation method when generating a logic diagram with graphics or characters.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] In a first aspect, the present application provides a method for generating a superimposed image, the method comprising:
[0007] Output as the main data stream of the main layer;
[0008] Obtaining overlay layer data of at least one overlay layer;
[0009] The overlay layer data is overlaid on each frame image of the main data stream to obtain and output the overlaid data stream.
[0010] Optionally, obtaining the overlay layer data of at least one overlay layer includes:
[0011] According to the information of each overlay layer selected from the plurality of overlay layers, corresponding overlay layer data is generated and saved in a corresponding storage area;
[0012] For each selected overlay layer, the overlay layer data is read from the corresponding storage area.
[0013] Optionally, when the selected overlay layer includes a first specific character layer, and the specific character includes a position character of a cross cursor, generating corresponding overlay layer data and saving it to a corresponding storage area specifically includes:
[0014] The layer data of the position character is generated according to the position information of the cross cursor and saved in the corresponding storage area.
[0015] Optionally, when the selected overlay layer includes a second specific character layer, and the specific character includes a color character of a cross cursor, generating corresponding overlay layer data and saving it to a corresponding storage area specifically includes:
[0016] Determine pixel data of the intersection of the cross cursor in the data stream according to the position information of the cross cursor;
[0017] The layer data of the corresponding color characters are generated according to the pixel data of the intersection of the cross cursor and stored in the corresponding storage area, wherein the color characters are used to express the pixel data.
[0018] Optionally, the color character is the pixel data or an expression symbol corresponding to the pixel data.
[0019] Optionally, the method further comprises:
[0020] According to the intersection position information and color information of the cross cursor, the pixel data at the intersection position of the cross cursor in the main data stream or the superimposed data stream is replaced with the pixel data corresponding to the color information, thereby obtaining the main data stream or the superimposed data stream with a cross cursor.
[0021] Optionally, after obtaining the superimposed data stream, the method further includes:
[0022] Obtaining synchronization signals including a line synchronization signal, a field synchronization signal and a valid data strobe signal according to the image timing file;
[0023] Obtaining video stream data according to the synchronization signal and the superimposed data stream;
[0024] The video stream data is converted into video stream data corresponding to the video interface protocol, and output to the screen to be tested for display.
[0025] Optionally, a plurality of video interfaces and a plurality of processing channels have a preset corresponding connection relationship; each processing channel is used to output a main data stream as a main layer and to overlay the overlay layer data on each frame image of the main data stream;
[0026] The output is used as a main data stream of the main layer, and the overlay layer data is superimposed on each frame image of the main data stream to obtain and output the superimposed overlay data stream, specifically including:
[0027] Determining a processing channel connected to the current video interface according to the preset corresponding connection relationship and the current video interface;
[0028] Based on the determined processing channel output, a main data stream as a main layer is generated, and the overlay layer data is superimposed on each frame image of the main data stream to obtain and output the superimposed overlay data stream.
[0029] Optionally, the method further comprises:
[0030] When the main layer is a preset format image, splitting the preset format image into a plurality of sub-format images based on the parameters of the screen to be tested;
[0031] The determining, according to the preset corresponding connection relationship and the current video interface, a processing channel connected to the current video interface specifically includes:
[0032] According to the preset corresponding connection relationship and the multiple current video interfaces, determining multiple processing channels connected to the multiple current video interfaces, the multiple processing channels are used to process the multiple sub-format images in a one-to-one correspondence;
[0033] The step of reading the overlay layer data in the corresponding storage area for each selected overlay layer further includes:
[0034] For each of the selected overlay layers, partial overlay layer data corresponding to the sub-format image processed by each of the processing channels is read in the corresponding storage area.
[0035] Optionally, the method further comprises:
[0036] When the main layer is a logic diagram, a plurality of sub-logic diagrams constituting the logic diagram are generated based on the parameters of the screen to be tested;
[0037] The determining, according to the preset corresponding connection relationship and the current video interface, a processing channel connected to the current video interface specifically includes:
[0038] According to the preset corresponding connection relationship and the multiple current video interfaces, a plurality of processing channels connected to the multiple current video interfaces are determined, and the multiple processing channels are used to process the multiple sub-logic graphs in a one-to-one correspondence;
[0039] The step of reading the overlay layer data in the corresponding storage area for each selected overlay layer further includes:
[0040] For each of the selected overlay layers, partial overlay layer data corresponding to the sub-logic graph processed by each of the processing channels is read in the corresponding storage area.
[0041] Optionally, at least two of the video interfaces in the preset corresponding connection relationship are connected to one processing channel, which is called a multiplexed processing channel;
[0042] Based on the determined processing channel output, the main data stream of the main layer is used, including:
[0043] When the determined processing channel is a multiplexed processing channel, among at least two of the video interfaces connected to the multiplexed processing channel, the multiplexed processing channel is selected to be connected to the current video interface, and the main data stream of the main layer is output based on the multiplexed processing channel.
[0044] Optionally, the overlay layer further includes: an arbitrary character layer and a graphic layer.
[0045] Optionally, the method further comprises: in the horizontal direction, and / or
[0046] The superimposed data stream is flipped, translated and scrolled in the vertical direction.
[0047] In a second aspect, the present application provides a superimposed image generating device, the device comprising:
[0048] An acquisition module, used for acquiring overlay layer data of at least one overlay layer;
[0049] The overlay output module is used to output a main data stream as a main layer, and to overlay the overlay layer data on each frame image of the main data stream to obtain and output the overlay data stream after overlay.
[0050] Optionally, the device further comprises:
[0051] A generating module, used for generating corresponding overlay layer data and saving it to a corresponding storage area according to the information of each overlay layer selected from the multiple overlay layers;
[0052] The acquisition module is specifically used to read the overlay layer data in the corresponding storage area for each selected overlay layer.
[0053] Optionally, when the selected overlay layer includes a first specific character layer, and the specific character includes a position character of a cross cursor, the generation module is specifically used to generate layer data of the position character according to the position information of the cross cursor, and save it in a corresponding storage area.
[0054] Optionally, when the selected overlay layer includes a second specific character layer, and the specific character includes a color character of a cross cursor, the generation module is specifically used to determine the pixel data of the intersection of the cross cursor in the data stream according to the position information of the cross cursor; generate layer data of the corresponding color character according to the pixel data of the intersection of the cross cursor, and save it in a corresponding storage area, wherein the color character is used to express the pixel data.
[0055] Optionally, the color character is the pixel data or an expression symbol corresponding to the pixel data.
[0056] Optionally, the superposition output module includes:
[0057] The cross cursor line submodule is used to replace the pixel data at the intersection position of the cross cursor in the main data stream or the superimposed data stream with the pixel data corresponding to the color information according to the intersection position information and color information of the cross cursor, so as to obtain the main data stream or the superimposed data stream with a cross cursor.
[0058] Optionally, the device further comprises:
[0059] The conversion output module is used to obtain a synchronization signal including a line synchronization signal, a field synchronization signal and a valid data selection signal according to an image timing file; obtain video stream data according to the synchronization signal and the superimposed data stream; convert the video stream data into video stream data corresponding to a video interface protocol, and output it to the screen to be tested for display.
[0060] Optionally, a plurality of video interfaces and a plurality of processing channels have a preset corresponding connection relationship; each processing channel is used to output a main data stream as a main layer and to overlay the overlay layer data on each frame image of the main data stream, and the overlay output module further includes:
[0061] A processing channel determination submodule, used to determine the processing channel connected to the current video interface according to the preset corresponding connection relationship and the current video interface;
[0062] The overlay submodule is used to output a main data stream as a main layer based on the determined processing channel, and overlay the overlay layer data on each frame image of the main data stream to obtain and output the overlay data stream after overlay.
[0063] Optionally, the device further comprises:
[0064] A splitting module, used for splitting the preset format image into a plurality of sub-format images based on the parameters of the screen to be tested when the main layer is a preset format image;
[0065] The processing channel determination submodule is specifically used to determine multiple processing channels connected to multiple current video interfaces according to the preset corresponding connection relationship and multiple current video interfaces, and the multiple processing channels are used to process multiple sub-format images in a one-to-one correspondence;
[0066] The acquisition module is specifically used to read, for each selected overlay layer, part of the overlay layer data corresponding to the sub-format image processed by each processing channel in the corresponding storage area.
[0067] Optionally, the device further comprises:
[0068] A logic diagram generation module, when the main layer is a logic diagram, generates a plurality of sub-logic diagrams constituting the logic diagram based on the parameters of the screen to be tested;
[0069] The processing channel determination submodule is specifically used to determine multiple processing channels connected to multiple current video interfaces according to the preset corresponding connection relationship and multiple current video interfaces, and the multiple processing channels are used to process multiple sub-logic graphs in a one-to-one correspondence;
[0070] The acquisition module is further specifically used to read, for each selected overlay layer, part of the overlay layer data corresponding to the sub-logic diagram processed by each processing channel in the corresponding storage area.
[0071] Optionally, at least two of the video interfaces in the preset corresponding connection relationship are connected to one processing channel, which is called a multiplexed processing channel;
[0072] The superposition output module also includes:
[0073] The multiplexed processing channel determination submodule is used to select the multiplexed processing channel to be connected to the current video interface from at least two video interfaces connected to the multiplexed processing channel when the determined processing channel is a multiplexed processing channel, and output the main data stream as the main layer based on the multiplexed processing channel.
[0074] Optionally, the overlay layer further includes: an arbitrary character layer and a graphic layer.
[0075] Optionally, the device further comprises:
[0076] The action module is used to flip, translate and scroll the superimposed data stream in the horizontal direction and / or the vertical direction.
[0077] Optionally, the acquisition module and the superposition output module are implemented by programmable hardware; and the generation module is implemented by software.
[0078] In a third aspect, the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for generating a superimposed image as described in any one of the first aspects is implemented.
[0079] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the superimposed image generation method as described in any one of the first aspects.
[0080] First, output a main data stream as a main layer; then, obtain overlay layer data of at least one overlay layer; finally, overlay the overlay layer data on each frame image of the output main data stream to obtain an overlay data stream after overlaying, so as to display an overlay image on the screen to be tested based on the overlay data stream. By generating an image to be tested for display on the screen to be tested in a layer overlay manner, multiple overlay layers are set, such as geometric figures, arbitrary characters, and specific characters, etc., and at least one overlay layer can be selected to be overlaid as needed. Through the main layer (for example, a preset format diagram or a logic diagram) and the optional overlay layer, a preset format image with graphics and / or characters (such as a BMP format image) or a logic diagram with graphics and / or characters can be generated, thereby reducing the difficulty of generating the image to be tested and greatly improving the flexibility, which can be beneficial to the test effect of a high-resolution display screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0082] Figure 1 A flowchart corresponding to a superimposed image generation method provided in an embodiment of the present application;
[0083] Figure 2 A flowchart corresponding to another superimposed image generation method provided in an embodiment of the present application;
[0084] Figure 3 A schematic diagram of the corresponding relationship between the video interface and the processing channel provided in an embodiment of the present application;
[0085] Figure 4 A schematic diagram of the structure of a superposition generation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0086] As described above, the current method for generating images for detecting screens is limited in flexibility. Based on this, the present application adopts a layer overlay method to generate images for detecting screens. Through independent layers, users can flexibly output various images for detecting screens.
[0087] The present application adopts a method for generating a superimposed image, first, outputting a main data stream as a main layer; then, obtaining superimposed layer data of at least one superimposed layer; finally, superimposing the superimposed layer data on each frame image of the main data stream to obtain a superimposed data stream, so as to display the superimposed image on the screen to be tested based on the superimposed data stream. Of course, in practical applications, obtaining the superimposed layer data of at least one superimposed layer can also be located before outputting the main data stream of the main layer.
[0088] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.
[0089] See also Figure 1 , which is a flowchart corresponding to a superimposed image generation method provided in an embodiment of the present application; Figure 1 As shown, the method includes:
[0090] S101: Outputting a main data stream as a main layer.
[0091] As an example, the main layer can be a preset format image or a logic image. The preset format image can be a BMP image (bitmap), which is a standard image file format in the Windows operating system and can be supported by a variety of Windows applications; the logic image can be an internally generated custom monochrome image, horizontal or vertical color bar image, chessboard image, and grayscale gradient image, etc. It should be noted that this application does not impose any form of limitation on the generation method of the logic image and the conventional image.
[0092] S102: Obtain overlay layer data of at least one overlay layer.
[0093] As an example, the overlay layer may be any character layer, a graphic layer, or a specific character layer.
[0094] As an example, an arbitrary character layer is generated by the software part of the image signal generator (Processing System hereinafter referred to as PS) receiving instructions and other information from the host computer to call the software to generate the corresponding character layer, and is stored in the first storage area accordingly, so that the PL can subsequently read the data of the corresponding arbitrary character layer in the first storage area.
[0095] Compared with the hardware part (Progarmmable Logic, hereinafter referred to as PL), by using software to generate the corresponding characters, unlimited character editing content can be achieved.
[0096] As an example, the graphic layer is generated by the PS in the image signal generator receiving instructions and other information from the host computer to call the software for generating graphics, and is stored accordingly in the second storage area so that the PL can subsequently read the corresponding graphic layer data in the second storage area.
[0097] Compared with PL, by using PS to generate the corresponding graphics, it is possible to achieve unlimited collection graphics editing content.
[0098] As an example, a specific character layer is composed of a first specific character (position character), and / or a second specific character (color character). The position character represents the character of the position of the center point of the cross cursor. The position character is generated by the processor through the row and column information at the known intersection of the cross cursor, such as (m, n), where m represents the row and n represents the column, and the obtained position character is saved in the storage area allocated for the layer; the color character can be pixel data or the expression symbol corresponding to the pixel data. The pixel data can be RGB pixel value, such as (255,0,0), and the expression symbol corresponding to the pixel data can be the color corresponding to the RGB pixel value, such as the Chinese expression symbol of the color corresponding to (255,0,0) is red, that is, its expression symbol is "red", and the color character is generated by the processor after reading the pixel value of the intersection in the preset register table, and the obtained color character is saved in the storage area allocated for the layer. Of course, in actual applications, the color character can also be an RGB pixel value, then the pixel value is generated into a corresponding layer and saved in the third storage area allocated to the layer, so that the PL can read the data of the corresponding specific character layer in the third storage area later.
[0099] As an example, the acquired overlay layers include but are not limited to the following combination types: any character layer; a graphic layer; a specific character layer; any character layer and a graphic layer; any character layer and a specific character layer; a graphic layer and a specific character layer; any character layer, a graphic layer, and a specific character layer.
[0100] In addition, when the main layer is a preset format image, it is correspondingly stored in the fourth storage area, and the PL can read the main layer data in the fourth storage area later.
[0101] S103: superimposing the superimposed layer data on each frame image of the main data stream, obtaining and outputting the superimposed superimposed data stream, so as to display the superimposed image on the screen to be tested based on the superimposed data stream.
[0102] In an optional embodiment, the main data stream of the main layer is a preset format image (BMP image), and the overlay layer can be one of any character layer, graphic layer and specific character layer, or two or three of them. By using the layer overlay method, a preset format image with graphics and characters can be generated.
[0103] In an optional embodiment, the main data stream of the main layer is a logic diagram, and the overlay layer can be one of any character layer, graphic layer, and specific character layer, or two or three of them. A logic diagram with graphics and characters can be generated by using the layer overlay method.
[0104] In summary, first, the main data stream as the main layer is output; then, the overlay layer data of at least one overlay layer is obtained; finally, the overlay layer data is superimposed on each frame image of the output main data stream to obtain the superimposed overlay data stream, so as to display the overlay image on the screen to be tested based on the overlay data stream. By generating the image to be tested for display on the screen to be tested in a layer overlay manner, multiple overlay layers are set, such as geometric figures, arbitrary characters and specific characters, etc., and at least one overlay layer can be selected to be superimposed as needed, so that the flexibility of generating the image to be displayed is greatly improved; through the main layer (for example, a preset format diagram or a logic diagram) and the optional overlay layer, a conventional preset format image with graphics and / or and characters (such as a BMP format image) or a logic diagram with graphics and / or and characters can be generated at the same time, so that the flexibility of generating the image to be tested is greatly improved, thereby improving the test effect that is beneficial to high-resolution display screens.
[0105] See also Figure 2, which is a flowchart corresponding to another overlay image generation method provided in an embodiment of the present application; before describing the method, the application scenario of the method is described first. The method is applied to an image signal generator, and the image signal generator includes a software part (Processing System hereinafter referred to as PS) and a hardware programmable part (Progarmmable Logic hereinafter referred to as PL). The image signal generator includes multiple video interfaces, and the multiple video interfaces have a preset corresponding connection relationship with multiple processing channels; the multiple processing channels are set in PL, and each processing channel is used to output a main data stream as a main layer and to overlay the overlay layer data on each frame image of the main data stream.
[0106] like Figure 2 As shown, the method includes:
[0107] S201: The PS receives and decompresses the test file package sent by the host computer, and receives the instruction sent by the host computer.
[0108] S2011: PS receives and decompresses the test file package sent by the host computer.
[0109] As an example, the test file package may include: a power timing file, an image list file, an image timing file, and an image set.
[0110] Among them, the power timing file is used to configure the power supply and output the corresponding power timing to the screen to be tested; the image timing signal is used to configure the PL so as to output an image that complies with the video interface protocol of the screen to be tested to detect the screen to be tested; the image set is stored in the corresponding fourth storage area in the DDR under the processor, and preferably, there are at least three pictures in each of the three fourth storage areas, namely the current picture, the previous picture and the next picture, so as to quickly switch pictures.
[0111] In an optional embodiment, the image format in the image set is a preset format. First, the PS splits the preset format image into multiple sub-format images based on the parameters of the screen to be tested, wherein the multiple sub-format images are stored in different storage areas of the fourth storage area of the DDR; then, according to the preset corresponding connection relationship and the multiple current video interfaces, multiple processing channels connected to the multiple current video interfaces are determined, and the multiple processing channels process the multiple sub-format images one by one. Of course, in actual applications, the preset format images of the image set are stored in the fourth storage area, and the PS determines based on the parameters of the screen to be tested that the preset format image needs to be directly output without being divided into multiple processing channels for output, that is, as a complete image output, then the processing channel connected to the current video interface is selected according to the type of the current video interface.
[0112] As an example, the parameter of the screen to be tested can be the number of video interfaces corresponding to the corresponding input signal specifications. For example, when the parameter of the screen to be tested is 4 VBO video interfaces (V-by-one interfaces), and the image to be displayed is a preset format image, the format to be displayed needs to be Figure 1 Divide into four, and obtain four sub-format graphs, each sub-format graph is used as a main layer, and multiple sub-format graphs are output one by one to corresponding processing channels for subsequent data processing.
[0113] As an example, the parameters of the screen to be tested can be determined by the number of video interfaces sent by the host computer (for example, the number of lanes). For example, when the number of video interface lanes of the screen to be tested sent by the host computer is 64 lanes, and each VBO video interface is 16 lanes, then PS can calculate the number of VBO video interfaces required based on this data as 4, and the number of the main layer to be displayed needs to be Figure 1 Divide into four, get four sub-format images, each sub-format image is used as the main layer, and multiple sub-format images are output to multiple processing channels for subsequent data processing; when the parameter sent by the host computer is 32lane, then PS calculates the number of VBO video interfaces required as 2 based on this information, and needs to convert the main layer to be displayed Figure 1 Divide into two, get two sub-format graphs, each sub-format graph is used as the main layer, and the two sub-format graphs are output to two processing channels one by one for subsequent data processing.
[0114] In an optional embodiment, first, PL generates multiple sub-logic diagrams based on the parameters of the screen to be tested; then, according to the preset corresponding connection relationship and multiple current video interfaces, multiple processing channels connected to the multiple current video interfaces are determined, and the multiple processing channels are used to process the multiple sub-logic diagrams in a one-to-one correspondence.
[0115] As an example, the parameter of the screen to be tested can be the number of video interfaces corresponding to the corresponding input signal specifications. For example, when the parameter of the screen to be tested is 4 VBO video interfaces, and the image to be displayed is a logic diagram, PL needs to independently generate four parts that constitute the logic diagram to be displayed, also known as four sub-logic diagrams, each sub-logic diagram as the main layer, and multiple sub-logic diagrams are output to multiple processing channels one by one for subsequent data processing.
[0116] As an example, the parameters of the screen to be tested can be determined by the number of video interfaces sent by the host computer (for example, the number of lanes). For example, when the number of lanes of the video interface of the display screen to be tested sent by the host computer is 64 lanes, and the host computer generates a number representing the logic diagram, the PS configures the PL with the number, and determines that 4 sub-logic diagrams need to be generated based on the number of lanes and configures the PL. The PL generates 4 sub-logic diagrams based on the configured information. The 4 sub-logic diagrams constitute the logic to be displayed of the main layer. Each sub-logic diagram serves as the main layer, and multiple sub-logic diagrams correspond to each other and output multiple processing channels for subsequent data processing.
[0117] See also Figure 3 , which is a schematic diagram of the corresponding relationship between a video interface and a processing channel provided in an embodiment of the present application. Figure 3 In CH0-CH3, there are four processing channels. Figure 3 M0-M6 correspond to video interfaces, among which M0-M3 correspond to 4 VBO format video interfaces, M4 corresponds to LVDS video interface, M5 corresponds to EDP format or the first 4 input signals of HDMI format, and M6 corresponds to EDP format or the last 4 input signals of HDMI format.
[0118] Normally, the number of processing channels should be consistent with the number of video interfaces. This embodiment adopts channel selection and channel multiplexing so that the four processing channels can simultaneously meet the display of four different video specifications of VBO, LVDS, EDP and HDMI, saving PL resources. Specifically, at least two video interfaces in the preset corresponding connection relationship are connected to a processing channel, which is called a multiplexed processing channel. Figure 3 As shown, CH0 is a multiplexed processing channel, which is not only connected to the VBO video interface of M0, but also to the LVDS video interface of M4 and the EDP or HDMI video interface of M5; CH1 is also a multiplexed processing channel, which is not only connected to the VBO video interface of M1, but also to the EDP or HDMI video interface of M4.
[0119] Based on the determined processing channel output, the main data stream of the main layer is used, including:
[0120] When the determined processing channel is a multiplexed processing channel, the multiplexed processing channel is selected to be connected to the current video interface among at least two video interfaces connected to the multiplexed processing channel, and a main data stream as a main layer is output based on the multiplexed processing channel. For example, if the current video interface is a VBO interface, CH0 should be selected to be connected to M0, and CH1 should be selected to be connected to M1.
[0121] S2012: PS receives the instruction sent by the host computer.
[0122] Specifically, the PS generates an overlay layer according to information such as instructions sent by the host computer, wherein the overlay layer may be at least one of any character layer, a graphic layer and a specific character layer.
[0123] As an example, the host computer sends an instruction to generate an arbitrary character layer with the specific information of the arbitrary character, such as "Made in China". The specific information can be written and generated by the user on the host computer, or selected from the character library of the host computer. The so-called arbitrary character layer means that the user can display any character that needs to be displayed in the layer; the specific character layer means that it is pre-set that only a certain type of character can be displayed in the layer (such as the position character and color character of the center point of the cross cursor mentioned above). First, the PS receives the instruction sent by the host computer; then, the software for generating characters is called to generate the specific character layer and store it in the first storage area in the DDR.
[0124] As an example, the host computer sends an instruction to generate a graphic layer and has specific information of the graphic, such as a rectangle, a circle, etc. First, the PS receives the instruction sent by the host computer; then, it calls the software for generating characters to generate the graphic layer of the specific graphic and stores it in the second storage area in the DDR.
[0125] As an example, the specific character layer is composed of a first specific character (position character), and / or a second specific character (color character). The position character represents the character of the position of the center point of the cross cursor. The position character is generated by the processor through the row and column information at the known intersection of the cross cursor, and the obtained position character is saved in the third storage area in the DDR; the color character can be pixel data or the expression symbol corresponding to the pixel data. The pixel data can be an RGB pixel value, such as (255,0,0). The expression symbol corresponding to the pixel data can be the color corresponding to the RGB pixel value, such as (255,0,0) The color corresponding to the color is red, that is, the Chinese expression symbol is "red", and the color character is generated by the processor reading the pixel value of the intersection in the preset register table, and the obtained color character is saved in the third storage area in the DDR. Therefore, in this embodiment, the position character and the color character belonging to the center point of the cross cursor belong to the same specific character layer, which is saved in the third storage area. Of course, in actual applications, the position character and the color character belonging to the center point of the cross cursor can be located in different specific character layers. In this case, two storage areas can be set to store the data of the different specific character layers separately.
[0126] S202: PL outputs the main data stream as the main layer.
[0127] In an optional embodiment, when the main layer is a preset format image, each processing channel in the PL reads the corresponding sub-format image in different areas of the fourth storage area of the DDR, and outputs the sub-format image as the main data stream of the main layer.
[0128] As an example, after step S201, the image to be displayed includes four sub-images, and the first addresses corresponding to the four sub-images are Add1, Add2, Add3 and Add4 respectively. The first processing channel CH0 reads the first sub-image in the fourth storage area of DDR through Add1, and outputs it as the main data stream of the main layer; the second processing channel CH1 reads the second sub-image in the fourth storage area of DDR through Add2, and outputs it as the main data stream of the main layer; the first processing channel CH2 reads the third sub-image in the fourth storage area of DDR through Add3, and outputs it as the main data stream of the main layer; the first processing channel CH3 reads the fourth sub-image in the fourth storage area of DDR through Add3, and outputs it as the main data stream of the main layer.
[0129] In an optional embodiment, when the main layer is a logic diagram, each processing channel in the PL directly obtains the corresponding sub-logic diagram from the logic diagram generation module.
[0130] S203: PL obtains overlay layer data of at least one overlay layer.
[0131] Specifically, each processing channel in the PL reads the corresponding overlay layer in the first storage area, the second storage area, and the third storage area of the DDR.
[0132] When the main layer is a preset format image, the processing channel of PL obtains data of any character layer at the corresponding position of the first storage area, obtains data of the graphic layer at the corresponding position of the second storage area, and obtains data of the corresponding specific character layer at the corresponding position of the third storage area.
[0133] In an optional embodiment, when the main layer is a preset format image, the preset format image is split into multiple sub-format images based on the parameters of the screen to be tested; according to the preset corresponding connection relationship and multiple current video interfaces, multiple processing channels connected to the multiple current video interfaces are determined, and the multiple processing channels are used to process multiple sub-format images one by one; for each selected overlay layer, the partial overlay layer data corresponding to the sub-format image processed by each processing channel is read in the corresponding storage area. Specifically, if the user selects any character layer and determines that 4 processing channels are required, the 4 processing channels read 4 parts of the overlay layer data in the first storage area respectively, the preset format image is divided into 4 sub-format images of the upper left, lower left, upper right and lower right, and the corresponding partial overlay layer data are respectively in the upper left, lower left, upper right and lower right areas, and one processing channel superimposes the read overlay layer data of the upper left part with the main layer data stream of the sub-format image of the upper left part, and the lower left, upper right and lower right are similar, which will not be described in detail here.
[0134] In an optional embodiment, when the main layer is a logic diagram, multiple sub-logic diagrams that can constitute the logic diagram are generated based on the parameters of the screen to be tested; multiple processing channels connected to the multiple current video interfaces are determined according to the preset corresponding connection relationship and multiple current video interfaces, and the multiple processing channels are used to process the multiple sub-logic diagrams one by one; for each selected overlay layer, the partial overlay layer data corresponding to the sub-logic diagram processed by each processing channel is read in the corresponding storage area. Specifically, if the user selects any character layer and determines that 4 processing channels are required, the 4 processing channels read 4 partial overlay layer data in the first storage area respectively, and generate 4 sub-logic diagrams of the upper left, lower left, upper right and lower right. The corresponding partial overlay layer data are the upper left, lower left, upper right and lower right areas respectively. One processing channel overlays the read overlay layer data of the upper left part with the main layer data stream of the sub-logic diagram of the upper left part. The lower left, upper right and lower right are similar, and will not be described in detail here.
[0135] S204: PL superimposes the overlay layer data on each frame image of the main data stream to obtain and output the superimposed overlay data stream.
[0136] Since there is a preset corresponding connection relationship between multiple video interfaces and multiple processing channels; each processing channel is used to output the main data stream as the main layer and superimpose the superimposed layer data on each frame image of the main data stream, therefore, the above step 201 also includes determining the processing channel connected to the current video interface according to the preset corresponding connection relationship and the current video interface; for example, if the current video interface is an LVDS interface, then CH0 connected to the LVDS video interface should be determined as the currently required processing channel according to the above preset corresponding connection relationship, but since CH0 is a multiplexed processing channel, when the determined processing channel is a multiplexed processing channel, the multiplexed processing channel is selected to be connected to the current video interface among at least two video interfaces connected to the multiplexed processing channel, and the main data stream as the main layer is output based on the multiplexed processing channel, therefore, CH0 should be selected to be connected to M4, and disconnected from both M0 and M5.
[0137] In step S204, a main data stream as a main layer is output based on the determined processing channel, and the overlay layer data is overlaid on each frame of the main data stream to obtain and output the overlaid data stream. See above for details.
[0138] In an optional embodiment, each frame image of the main data stream is provided with a cross cursor, that is, by using the intersection position information and color information of the cross cursor, the pixel data at the intersection position of the cross cursor in the main data stream is replaced with the pixel data corresponding to the color information, and the main data stream with the cross cursor is obtained accordingly.
[0139] In an optional embodiment, the superimposed data stream is with a cross cursor, that is, according to the intersection position information and color information of the cross cursor, the pixel data at the intersection position of the superimposed data stream is replaced with the pixel data corresponding to the color information, and the superimposed data stream with a cross cursor is obtained.
[0140] In addition, the transparency of each pixel of the main layer and any overlay layer can be adjusted. If there are parts on the main layer that are not easy to display, the overlay layer can directly cover the corresponding part without replacing the pixel information of the corresponding pixel, thus improving flexibility.
[0141] S205: PS obtains synchronization signals including a line synchronization signal, a field synchronization signal and a valid data selection signal according to the image timing file; obtains video stream data according to the synchronization signal and the superimposed data stream; and converts the video stream data into video stream data corresponding to the video interface protocol.
[0142] S206: The PL flips, translates, and scrolls the superimposed data stream in the horizontal direction and / or the vertical direction.
[0143] In an optional embodiment, the superimposed data stream is flipped, translated and scrolled in the horizontal direction.
[0144] In an optional embodiment, the superimposed data stream is flipped, translated and scrolled in the vertical direction.
[0145] In an optional embodiment, the superimposed data stream after superposition is flipped, translated and scrolled in the horizontal direction, and the superimposed data stream after superposition is flipped, translated and scrolled in the vertical direction. It should be noted that this embodiment does not impose any limitation on the order of the movement in the horizontal direction and the movement in the vertical direction.
[0146] When the size of the image in the superimposed data stream after superposition is smaller than the size of the screen to be tested, if the image in the superimposed data stream after superposition is forcibly spread over the entire screen to be tested, the resolution of the image will be reduced so that the test of the high-resolution screen cannot be implemented. This embodiment implements the test of the entire screen to be tested while keeping the resolution unchanged by enabling the superimposed data stream after superposition to be flipped, translated, and scrolled in the horizontal and vertical directions.
[0147] See also Figure 4 , which is a schematic diagram of the structure of a superimposed image generating device provided in an embodiment of the present application; as shown in 4, the device includes:
[0148] An acquisition module 403 is used to acquire overlay layer data of at least one overlay layer;
[0149] The overlay output module 404 is used to output a main data stream as a main layer, and to overlay the overlay layer data on each frame image of the main data stream to obtain and output the overlay data stream after overlay.
[0150] Among them, the main layer can be a preset format diagram or a logic diagram, and the preset format diagram or the logic diagram is selected as the main layer through the selection module 402; the overlay layer can be at least one of any character layer, graphic layer and specific character layer.
[0151] Optionally, the superposition output module 404 includes: a superposition submodule 4041 and a cross cursor line submodule 4042 .
[0152] The superimposition submodule 4041 is used to output a main data stream as a main layer based on the determined processing channel, and to superimpose the superimposed layer data on each frame image of the main data stream to obtain and output the superimposed superimposed data stream.
[0153] The cross cursor line submodule 4042 is used to replace the pixel data at the intersection position of the cross cursor in the main data stream or the superimposed data stream with the pixel data corresponding to the color information according to the intersection position information and color information of the cross cursor, thereby obtaining the main data stream or superimposed data stream with the cross cursor.
[0154] It should be noted that the positions of the cross cursor line submodule 4042 and the overlay submodule 4041 are not fixed, that is, when the cross cursor line is displayed before the overlay layer, the cross cursor line submodule 4042 is located before the overlay submodule 4041; when the cross cursor line is displayed after the overlay layer, the cross cursor line submodule 4042 is located after the overlay submodule 4041.
[0155] Optionally, at least two of the video interfaces in the preset corresponding connection relationship are connected to one processing channel, which is called a multiplexed processing channel; in this case, the overlay output module 404 also includes: a multiplexed processing channel determination submodule 4043, which is used to select a multiplexed processing channel to be connected to the current video interface from among at least two of the video interfaces connected to the multiplexed processing channel when the determined processing channel is a multiplexed processing channel, and output the main data stream as the main layer based on the multiplexed processing channel.
[0156] Optionally, the device further includes: an action module 405, configured to flip, translate and scroll the superimposed data stream in the horizontal direction and / or the vertical direction.
[0157] Optionally, the device also includes a conversion output module 406, which is used to obtain a synchronization signal including a line synchronization signal, a field synchronization signal and a valid data selection signal according to the image timing file; obtain video stream data according to the synchronization signal and the superimposed data stream; convert the video stream data into video stream data corresponding to the video interface protocol, and output it to the screen to be tested for display.
[0158] Optionally, there is a preset corresponding connection relationship between multiple video interfaces and multiple processing channels; each processing channel is used to output a main data stream as a main layer and to superimpose the superimposed layer data on each frame image of the main data stream. The device also includes: a processing channel determination submodule 409, which is used to determine the processing channel connected to the current video interface based on the preset corresponding connection relationship and the current video interface.
[0159] Optionally, the device also includes a splitting module 407, wherein the logic diagram generation module 401 is used to generate a logic diagram; the splitting module 407 is used to split the preset format diagram into multiple sub-format diagrams based on the parameters of the screen to be tested when the main layer is a preset format diagram. At this time, the processing channel determination submodule 409 is specifically used to determine multiple processing channels connected to multiple current video interfaces according to the preset corresponding connection relationship and multiple current video interfaces, and the multiple processing channels are used to process the multiple sub-format diagrams one by one. In this case, the acquisition module 403 is also used to read part of the overlay layer data corresponding to the sub-format diagram processed by each processing channel in the corresponding storage area for each selected overlay layer.
[0160] The device also includes a logic diagram generation module 401, which is used to generate multiple sub-logic diagrams that can constitute the logic diagram based on the parameters of the screen to be tested when the main layer is a logic diagram; a processing channel determination submodule 409 is also used to determine multiple processing channels connected to multiple current video interfaces according to the preset corresponding connection relationship and multiple current video interfaces, and the multiple processing channels are used to process the multiple sub-logic diagrams one by one; in this case, the acquisition module 403 is also used to read part of the overlay layer data corresponding to the sub-logic diagram processed by each processing channel in the corresponding storage area for each selected overlay layer.
[0161] Optionally, the device also includes: a generation module 408, which is used to generate corresponding overlay layer data and save it to a corresponding storage area based on information of each overlay layer selected from multiple overlay layers, so that the acquisition module 402 reads the overlay layer data in the corresponding storage area for each selected overlay layer.
[0162] Optionally, when the selected overlay layer includes a first specific character layer, and the specific character includes a position character of a cross cursor, the generation module 408 is specifically used to generate layer data of the position character according to the position information of the cross cursor, and save it in a corresponding storage area.
[0163] Optionally, when the selected overlay layer includes a second specific character layer, and the specific character includes a color character of a cross cursor, the generation module 408 is specifically used to determine the pixel data of the intersection of the cross cursor in the data stream according to the position information of the cross cursor; generate layer data of the corresponding color character according to the pixel data of the intersection of the cross cursor, and save it in the corresponding storage area, and the color character is used to express the pixel data.
[0164] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The device described above is only schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0165] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for generating a superimposed image, characterized in that: The method comprises: Acquire overlay layer data of at least one overlay layer selected from a plurality of overlay layers; Outputting a main data stream as a main layer, and superimposing the superimposed layer data on each frame image of the main data stream, obtaining and outputting the superimposed superimposed data stream, so as to flexibly display the superimposed image on the screen to be tested based on the superimposed data stream, and test the screen to be tested; There is a preset corresponding connection relationship between the plurality of video interfaces and the plurality of processing channels; each processing channel is used to output a main data stream as a main layer and to overlay the overlay layer data on each frame image of the main data stream; The output is used as a main data stream of the main layer, and the overlay layer data is superimposed on each frame image of the main data stream to obtain and output the superimposed overlay data stream, specifically including: Determining a processing channel connected to the current video interface according to the preset corresponding connection relationship and the current video interface; Outputting a main data stream as a main layer based on the determined processing channel, and superimposing the superimposed layer data on each frame image of the main data stream to obtain and output the superimposed superimposed data stream; After obtaining and outputting the superimposed data stream, the method further includes: Obtaining synchronization signals including a line synchronization signal, a field synchronization signal and a valid data strobe signal according to the image timing file; Obtaining video stream data according to the synchronization signal and the superimposed data stream; The video stream data is converted into video stream data corresponding to the video interface protocol, and output to the screen to be tested for display.
2. The method according to claim 1, characterized in that The step of obtaining the overlay layer data of at least one overlay layer selected from the plurality of overlay layers comprises: According to the information of each overlay layer selected from the plurality of overlay layers, corresponding overlay layer data is generated and saved in a corresponding storage area; For each selected overlay layer, the overlay layer data is read from the corresponding storage area.
3. The method according to claim 2, characterized in that When the selected overlay layer includes a first specific character layer, and the specific character includes a position character of a cross cursor, generating corresponding overlay layer data and saving it to a corresponding storage area specifically includes: The layer data of the position character is generated according to the position information of the cross cursor and saved in the corresponding storage area.
4. The method according to claim 2, characterized in that When the selected overlay layer includes a second specific character layer, and the specific character includes a color character of a cross cursor, generating corresponding overlay layer data and saving it to a corresponding storage area specifically includes: Determine pixel data of the intersection of the cross cursor in the data stream according to the position information of the cross cursor; The layer data of the corresponding color characters are generated according to the pixel data of the intersection of the cross cursor and stored in the corresponding storage area, wherein the color characters are used to express the pixel data.
5. The method according to claim 4, characterized in that The color character is the pixel data or an expression symbol corresponding to the pixel data.
6. The method according to claim 3 or 4, characterized in that The method further comprises: According to the intersection position information and color information of the cross cursor, the pixel data at the intersection position of the cross cursor in the main data stream or the superimposed data stream is replaced with the pixel data corresponding to the color information, thereby obtaining the main data stream or the superimposed data stream with a cross cursor.
7. The method according to claim 2, characterized in that The method further comprises: When the main layer is a preset format image, splitting the preset format image into a plurality of sub-format images based on the parameters of the screen to be tested; The determining, according to the preset corresponding connection relationship and the current video interface, a processing channel connected to the current video interface specifically includes: According to the preset corresponding connection relationship and the multiple current video interfaces, determining multiple processing channels connected to the multiple current video interfaces, the multiple processing channels are used to process the multiple sub-format images in a one-to-one correspondence; The step of reading the overlay layer data in the corresponding storage area for each selected overlay layer further includes: For each of the selected overlay layers, partial overlay layer data corresponding to the sub-format image processed by each of the processing channels is read in the corresponding storage area.
8. The method according to claim 2, characterized in that The method further comprises: When the main layer is a logic diagram, a plurality of sub-logic diagrams constituting the logic diagram are generated based on the parameters of the screen to be tested; The determining, according to the preset corresponding connection relationship and the current video interface, a processing channel connected to the current video interface specifically includes: According to the preset corresponding connection relationship and the multiple current video interfaces, a plurality of processing channels connected to the multiple current video interfaces are determined, and the multiple processing channels are used to process the multiple sub-logic graphs in a one-to-one correspondence; The step of reading the overlay layer data in the corresponding storage area for each selected overlay layer further includes: For each of the selected overlay layers, partial overlay layer data corresponding to the sub-logic graph processed by each of the processing channels is read in the corresponding storage area.
9. The method according to claim 1, characterized in that At least two of the video interfaces in the preset corresponding connection relationship are connected to one processing channel, which is called a multiplexed processing channel; Based on the determined processing channel output, the main data stream of the main layer is used, including: When the determined processing channel is a multiplexed processing channel, among at least two of the video interfaces connected to the multiplexed processing channel, the multiplexed processing channel is selected to be connected to the current video interface, and the main data stream of the main layer is output based on the multiplexed processing channel.
10. The method according to claim 3 or 4, characterized in that: The overlay layer also includes: any character layer and a graphic layer.
11. The method according to claim 1, characterized in that The method further comprises: in the horizontal direction, and / or The superimposed data stream is flipped, translated and scrolled in the vertical direction.
12. A superimposed image generating device, characterized in that: include An acquisition module, used for acquiring overlay layer data of at least one overlay layer selected from a plurality of overlay layers; The overlay output module is used to output the main data stream as the main layer, and overlay the overlay layer data on each frame image of the main data stream to obtain and output the overlay data stream after overlaying, so as to flexibly display the overlay image on the screen to be tested based on the overlay data stream, and test the screen to be tested; There is a preset corresponding connection relationship between multiple video interfaces and multiple processing channels; Each processing channel is used to output a main data stream as a main layer and to overlay the overlay layer data on each frame image of the main data stream, and the overlay output module further includes: A processing channel determination submodule, used to determine the processing channel connected to the current video interface according to the preset corresponding connection relationship and the current video interface; The overlay submodule is used to output a main data stream as a main layer based on the determined processing channel, and to overlay the overlay layer data on each frame image of the main data stream to obtain and output the overlay data stream after overlaying; The device also includes: The conversion output module is used to obtain a synchronization signal including a line synchronization signal, a field synchronization signal and a valid data selection signal according to an image timing file; obtain video stream data according to the synchronization signal and the superimposed data stream; convert the video stream data into video stream data corresponding to a video interface protocol, and output it to the screen to be tested for display.
13. The device according to claim 12, characterized in that The device also includes: A generating module, used for generating corresponding overlay layer data and saving it to a corresponding storage area according to the information of each overlay layer selected from the multiple overlay layers; The acquisition module is specifically used to read the overlay layer data in the corresponding storage area for each selected overlay layer.
14. The device according to claim 13, characterized in that The acquisition module and the superposition output module are implemented by hardware programming; The generation module is implemented by software.
15. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for generating a superimposed image according to any one of claims 1 to 11 is implemented.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method for generating a superimposed image according to any one of claims 1 to 11.
Citation Information
Patent Citations
ARM (random access memory) camera interface based video collection displaying system
CN104243931A
Character superposition method and device of video image, computer equipment and storage medium
CN111818277A
Video image processing method and device, equipment and storage medium
CN114745520A