CN116382993B - VGA interface testing method, VGA interface testing device, computer equipment and storage medium - Google Patents

VGA interface testing method, VGA interface testing device, computer equipment and storage medium Download PDF

Info

Publication number
CN116382993B
CN116382993B CN202310604306.7A CN202310604306A CN116382993B CN 116382993 B CN116382993 B CN 116382993B CN 202310604306 A CN202310604306 A CN 202310604306A CN 116382993 B CN116382993 B CN 116382993B
Authority
CN
China
Prior art keywords
color
vga
value
voltage value
pixel point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310604306.7A
Other languages
Chinese (zh)
Other versions
CN116382993A (en
Inventor
王海萍
陈金龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310604306.7A priority Critical patent/CN116382993B/en
Publication of CN116382993A publication Critical patent/CN116382993A/en
Application granted granted Critical
Publication of CN116382993B publication Critical patent/CN116382993B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

The application relates to a VGA interface testing method, a VGA interface testing device, computer equipment and a storage medium. The method comprises the following steps: outputting VGA signals of the target VGA picture to a VGA signal acquisition device through a VGA interface; the target VGA picture comprises color blocks; receiving VGA signal sampling data obtained by sampling VGA signals by a VGA signal acquisition device through a data transmission interface; establishing a VGA digital model according to VGA signal sampling data; obtaining color block position information and color block area information which respectively represent the position and the area of the color block in a target VGA picture according to VGA digital model analysis; and determining the test result of the VGA interface according to the color block position information and the color block area information. The embodiment of the application can realize automatic testing of VGA interfaces, improves the testing efficiency and the testing coverage rate, and reduces the testing cost.

Description

VGA interface testing method, VGA interface testing device, computer equipment and storage medium
Technical Field
The present application relates to the field of VGA interface testing, and in particular, to a VGA interface testing method, apparatus, computer device, and storage medium.
Background
Servers and PC (Personal Computer) products typically have VGA (Video Graphics Array ) interfaces on their motherboard. In order to ensure the shipment quality of the main board, various functional tests are generally performed on the produced main board, and the test on the VGA interface is an essential test item.
The testing of the VGA interface in the related art is mainly completed through manual observation, taking the VGA interface on the testing server as an example, the VGA interface of the server is connected with a terminal display screen during testing, the control server outputs VGA signals of specific pictures to the display screen through the VGA interface, the display screen displays pictures based on the received VGA signals, whether the pictures displayed by the display screen are consistent with the specific pictures or not is manually observed, and whether the VGA signals output by the VGA interface are correct or not is judged based on observation results.
The related technology is easy to cause test leakage due to artificial reasons during implementation, and has low test efficiency and high test cost.
Disclosure of Invention
Aiming at the defects or shortcomings, the application provides a VGA interface testing method, a VGA interface testing device, a VGA interface testing computer device and a VGA interface storage medium.
According to a first aspect, the application provides a VGA interface testing method, in some embodiments, the method is applied to an upper computer provided with a VGA interface and a data transmission interface, and the upper computer is connected with a VGA signal acquisition device through the VGA interface and the data transmission interface; the method comprises the following steps:
Outputting VGA signals of the target VGA picture to a VGA signal acquisition device through a VGA interface; the target VGA picture comprises color blocks;
receiving VGA signal sampling data obtained by sampling VGA signals by a VGA signal acquisition device through a data transmission interface;
establishing a VGA digital model according to VGA signal sampling data;
obtaining color block position information and color block area information which respectively represent the position and the area of the color block in a target VGA picture according to VGA digital model analysis;
and determining the test result of the VGA interface according to the color block position information and the color block area information.
In some embodiments, the VGA signal sampling data includes voltage data corresponding to n×m pixels in the target VGA picture;
establishing a VGA digital model according to VGA signal sampling data, comprising:
determining a color indication value corresponding to each pixel point according to voltage data corresponding to each pixel point in VGA signal sampling data; the color indication value corresponding to each pixel point is used for indicating the color type of each pixel point;
and establishing a VGA digital model according to the color indicated value corresponding to each pixel point.
In some embodiments, determining the color indication value corresponding to each pixel point according to the voltage data corresponding to each pixel point in the VGA signal sampling data includes:
Determining standard RGB information corresponding to each pixel point according to the voltage data corresponding to each pixel point;
converting standard RGB information corresponding to each pixel point into HSV information;
and determining a color indicated value corresponding to each pixel point according to the HSV information corresponding to each pixel point.
In some embodiments, the voltage data corresponding to each pixel point includes an R-channel voltage value, a G-channel voltage value, and a B-channel voltage value;
determining standard RGB information corresponding to each pixel point according to the voltage data corresponding to each pixel point, wherein the standard RGB information comprises:
obtaining a red standard voltage value, a green standard voltage value and a blue standard voltage value;
converting voltage data corresponding to each pixel point into standard voltage data according to the red standard voltage value, the green standard voltage value and the blue standard voltage value;
and converting the standard voltage data corresponding to each pixel point into standard RGB information.
In some embodiments, before obtaining the red standard voltage value, the green standard voltage value, and the blue standard voltage value, the method further comprises:
VGA signals of a standard red picture, a standard green picture and a standard blue picture are respectively output to a VGA signal acquisition device through VGA interfaces;
the VGA signal acquisition device is respectively used for receiving first sampling data, second sampling data and third sampling data which are obtained by sampling VGA signals of a standard red picture, a standard green picture and a standard blue picture through a data transmission interface;
Extracting voltage data of one or more rows of pixel points from the first sampling data, the second sampling data and the third sampling data respectively to serve as samples, so as to obtain a first sample, a second sample and a third sample;
a red standard voltage value is calculated from the first sample, a green standard voltage value is calculated from the second sample, and a blue standard voltage value is calculated from the third sample.
In some embodiments, calculating the red standard voltage value from the first sample includes:
calculating an average R channel voltage value according to the R channel voltage value corresponding to each pixel point in the first sample;
acquiring a peak voltage when a VGA signal is output by a preset upper computer and a reference standard voltage when a VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the R channel according to the peak voltage and the reference standard voltage to obtain a red standard voltage value.
In some embodiments, calculating the green standard voltage value from the second sample comprises:
calculating according to the G channel voltage value corresponding to each pixel point in the second sample to obtain a G channel average voltage value;
acquiring a peak voltage when a VGA signal is output by a preset upper computer and a reference standard voltage when a VGA signal acquisition device works;
And carrying out standard voltage conversion on the average voltage value of the G channel according to the peak voltage and the reference standard voltage to obtain a green standard voltage value.
In some embodiments, calculating the blue standard voltage value from the third sample includes:
calculating a B channel average voltage value according to the B channel voltage value corresponding to each pixel point in the third sample;
acquiring a peak voltage when a VGA signal is output by a preset upper computer and a reference standard voltage when a VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the B channel according to the peak voltage and the reference standard voltage to obtain a blue standard voltage value.
In some embodiments, the standard voltage data corresponding to each pixel point includes an R-channel standard voltage value, a G-channel standard voltage value, and a B-channel standard voltage value;
converting voltage data corresponding to each pixel point into standard voltage data according to the red standard voltage value, the green standard voltage value and the blue standard voltage value, including:
converting the R channel voltage value of each pixel point into an R channel standard voltage value according to the red standard voltage value;
converting the G channel voltage value of each pixel point into a G channel standard voltage value according to the green standard voltage value;
And converting the B-channel voltage value of each pixel point into a B-channel standard voltage value according to the blue standard voltage value.
In some embodiments, the HSV information corresponding to each pixel point includes a hue value, a saturation value, and a brightness value; determining a color indication value corresponding to each pixel point according to the HSV information corresponding to each pixel point comprises the following steps:
acquiring a plurality of color intervals corresponding to different color indicated values;
acquiring a tone value corresponding to each pixel point;
and acquiring a color indication value corresponding to a color interval in which the tone value corresponding to each pixel point is located as a color indication value corresponding to each pixel point.
In some embodiments, the VGA digital model is a two-dimensional array of n rows and m columns; establishing a VGA digital model according to the color indicated value corresponding to each pixel point, including:
creating a two-dimensional array;
and storing the color indication value of each pixel point into a two-dimensional array according to the row and column information of each pixel point to obtain a VGA digital model comprising n x m color indication values.
In some embodiments, the VGA digital model includes color indication values for at least three color types; obtaining color block position information and color block area information respectively representing the position and the area of a color block in a target VGA picture according to VGA digital model analysis, wherein the method comprises the following steps:
Analyzing the dominant color, the differential color and the interference color corresponding to the VGA digital model; the dominant color and the differential color refer to the color type of the at least three color types that has the largest number of corresponding color indication values and the second largest number of corresponding color indication values, respectively, and the disturbing color refers to a color type of the at least three color types that is not the dominant color or the differential color;
detecting whether each color indicated value belonging to the differential color or the interference color in the VGA digital model accords with a preset filtering rule, and filtering each color indicated value which accords with the preset filtering rule to obtain a first optimized VGA digital model;
detecting whether a color indication value belonging to interference colors exists in the first optimized VGA digital model;
in response to the detection result being nonexistent, determining a two-dimensional area to be detected in the first optimized VGA digital model, detecting whether a specific column or each column of color indication values of the two-dimensional area to be detected meet a preset offset judgment rule, filtering each column of color indication values meeting the preset offset judgment rule, and integrating each column of color indication values not meeting the preset offset judgment rule to obtain a second optimized VGA digital model;
and determining a differential color area in the second optimized VGA digital model, and obtaining color block position information and color block area information according to the differential color area.
In some embodiments, the above method further comprises:
and responding to the detection result as existence, and determining that the test result of the VGA interface is that the test fails.
In some embodiments, detecting whether each color indication value belonging to a differential color or an interference color in the VGA digital model meets a preset filtering rule includes:
for each color indication value belonging to the difference color or the interference color, detecting whether the color indication value is the same as the previous color indication value or the same as the next color indication value, if not, determining that the color indication value meets a preset filtering rule; and/or the number of the groups of groups,
for each color indication value belonging to the difference color or the interference color, detecting whether the total number of the same color indication values continuously appearing in front of and behind the color indication value is smaller than a preset value, if so, determining that the color indication value meets a preset filtering rule.
In some embodiments, determining the two-dimensional region to be measured in the first optimized VGA digital model includes:
determining a target row and a target column of a color indication value belonging to different colors in the first optimized VGA digital model;
and determining a two-dimensional area formed by the target row and the target column as a two-dimensional area to be measured.
In some embodiments, detecting whether the color indication value of the specific column or each column of the two-dimensional region to be detected meets a preset offset determination rule includes:
For each column of color indication values of the two-dimensional area to be detected, detecting whether the number of the color indication values belonging to the different colors in the column of color indication values is smaller than a preset number threshold value, and if so, determining that the column of color indication values accords with a preset deviation judging rule; or alternatively, the first and second heat exchangers may be,
for each column of color indication values of the two-dimensional area to be detected, detecting whether the duty ratio of the color indication value belonging to the difference color in the column of color indication values is smaller than a preset proportion threshold value, and if yes, determining that the column of color indication values accords with a preset deviation judging rule.
In some embodiments, filtering is performed on each column of color indication values that meet a preset offset determination rule, including:
for each column of color indication values conforming to a preset offset determination rule, each color indication value belonging to a different color in the column of color indication values is adjusted so that each color indication value in the column of color indication values belongs to a main color.
In some embodiments, performing the integration process on each column of color indication values that do not meet the preset offset determination rule includes:
for each column of color indication values which do not meet the preset offset judgment rule, adjusting each color indication value belonging to the main color in the column of color indication values so that each color indication value in the column of color indication values belongs to the differential color.
In some embodiments, deriving the patch position information and the patch area information from the difference region includes:
acquiring the output frequency of the upper computer to the VGA signal and the sampling frequency of the VGA signal acquisition device to the VGA signal;
determining equal-proportion conversion information according to the output frequency and the sampling frequency;
acquiring row and column information of a starting point and row information of an ending point of the differential color region;
and calculating the color block position information and the color block area information according to the equal-proportion conversion information, the line information of the starting point and the line information of the ending point.
In some embodiments, determining the test result of the VGA interface based on the color patch position information and the color patch area information includes:
acquiring preset position information and preset area information respectively representing the position and the area of the color block in the target VGA picture;
calculating the position difference degree according to the preset position information and the color block position information;
calculating the area difference degree according to the preset area information and the color lump area information;
when the position difference degree and the area difference degree do not exceed the preset difference threshold value, determining that the test result of the VGA interface is that the test is passed;
and when the position difference degree or the area difference degree exceeds a preset difference threshold, determining that the test result of the VGA interface is that the test fails.
According to a second aspect, the present application provides a VGA interface test device, in some embodiments, the device being provided with a VGA interface and a data transmission interface, the device being connected to a VGA signal acquisition device by the VGA interface and the data transmission interface; the device comprises:
the signal output module is used for outputting VGA signals of the target VGA picture to the VGA signal acquisition device through the VGA interface; the target VGA picture comprises color blocks;
the data receiving module is used for receiving VGA signal sampling data obtained by sampling VGA signals by the VGA signal acquisition device through the data transmission interface;
the model building module is used for building a VGA digital model according to VGA signal sampling data;
the analysis module is used for analyzing and obtaining color block position information and color block area information which respectively represent the position and the area of the color block in the target VGA picture according to the VGA digital model;
and the test result determining module is used for determining the test result of the VGA interface according to the color block position information and the color block area information.
According to a third aspect, the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the VGA interface test method provided in any of the embodiments described above when executing the computer program.
According to a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a VGA interface test method provided in any of the embodiments described above.
In the above embodiment of the present application, the VGA signal acquisition device is used to acquire the VGA signal of the target VGA picture output by the upper computer through the VGA interface, then the acquired VGA signal sampling data is transmitted back to the upper computer, the upper computer converts the VGA signal sampling data into the VGA signal model, and the VGA signal model is analyzed to detect whether the VGA signal output by the VGA interface is normal, so as to determine the testing result of the VGA interface. The embodiment can realize automatic testing of VGA interfaces, improves testing efficiency and testing coverage rate, and reduces testing cost.
In addition, the embodiment uses the upper computer where the VGA interface to be tested is located to test the VGA interface to be tested, namely uses self-test, and does not need to refer to extra equipment or establish extra data transmission links, so that the testing efficiency can be improved, the error rate can be reduced, and the testing cost can be saved.
Drawings
FIG. 1 is an application environment diagram of a VGA interface testing method according to one or more embodiments of the present application;
FIG. 2 is a flow diagram of a VGA interface testing method according to one or more embodiments of the application;
FIG. 3 is a diagram of a target VGA screen according to one or more embodiments of the application;
FIG. 4 is a schematic diagram of an output sequence of VGA signals for outputting a frame of picture according to one or more embodiments of the present application;
FIG. 5 is a schematic diagram illustrating a sampling operation of a VGA signal acquisition device according to one or more embodiments of the present application;
FIG. 6 is a schematic diagram of a correspondence between VGA signal sample data and VGA digital model data provided in accordance with one or more embodiments of the present application;
FIG. 7 is a schematic flow diagram of a VGA digital model building process according to one or more embodiments of the present application;
FIG. 8 is a flow diagram of converting voltage data into standard RGB information according to one or more embodiments of the present application;
FIG. 9 is a flow diagram of calculating standard voltage values for each standard color according to one or more embodiments of the present application;
FIG. 10 is a flowchart illustrating a method for determining color indication values corresponding to pixels according to one or more embodiments of the present application;
FIGS. 11-1, 11-2, and 11-3 are schematic diagrams of three different VGA digital models provided in accordance with one or more embodiments of the present application;
FIG. 12 is a schematic flow diagram of an analytical VGA digital model provided in accordance with one or more embodiments of the application;
FIG. 13 is a flow diagram of computing patch position information and patch area information provided in accordance with one or more embodiments of the present application;
FIG. 14 is a block diagram illustrating a VGA interface testing device according to one or more embodiments of the present application;
FIG. 15 is an internal block diagram of a computer device provided in accordance with one or more embodiments of the present application;
FIG. 16 is a color gamut distribution diagram provided in accordance with one or more embodiments of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings. It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims.
In the description of the present application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Aiming at the problems of easy leakage, low test efficiency, high test cost and the like of the related technology, the application provides a VGA interface test method, which can realize automatic test of VGA interfaces, improve the test speed of the VGA interfaces, simultaneously can not leak out to test the VGA interfaces, can judge VGA pictures more accurately, improve the test accuracy of the VGA interfaces, and finally can realize the improvement of the test efficiency and the test coverage rate and the reduction of the test cost based on the effects.
In some embodiments, the VGA interface testing method provided by the present application can be applied to the application environment shown in fig. 1. The server or PC product (hereinafter, collectively referred to as an upper computer) is provided with a VGA interface to be tested and a data transmission interface, the VGA signal acquisition device (hereinafter, may be referred to as a lower computer) is provided with a VGA signal acquisition interface in butt joint with the VGA interface and a data transmission interface in butt joint with the data transmission interface, and the connection relationship between the upper computer and the lower computer can be specifically shown in fig. 1. The VGA interface test method provided by the present application is described below based on the application environment shown in fig. 1.
As shown in fig. 2, the method includes steps S110 to S150, and each step is described below by taking an example that the method is applied to a host computer.
S110: outputting VGA signals of the target VGA picture to a VGA signal acquisition device through a VGA interface; the target VGA picture contains color blocks.
When testing, the upper computer randomly generates a target VGA picture, and then outputs VGA signals of the target VGA picture to the VGA signal acquisition device through the VGA interface.
Typically, the target VGA picture contains one color block, the target VGA picture contains two colors, the color block corresponds to one color, and the other areas in the target VGA picture correspond to the other color. In order to reduce the calculation amount of the subsequent processing and thus to improve the test efficiency, the shape of the color patch is generally set to be rectangular. For example, the target VGA picture can be shown in fig. 3, where most of the area is black and the color block in the upper right corner of the picture is red.
The VGA signal is an analog signal, in particular, it is voltage data. In the VGA display principle, each pixel point in the image corresponds to one RGB data, RGB is a color standard in industry, and includes three colors of red (R), green (G) and blue (B), and all colors displayed on the VGA image are generated by simulating the three colors in different proportions. The RGB data corresponding to each pixel includes R, G, and B values of each pixel. When the VGA signal is output, the R value, the G value and the B value of each pixel point are expressed by one voltage value, wherein the voltage values corresponding to the R value, the G value and the B value of each pixel point can be respectively recorded as the R channel voltage value, the G channel voltage value and the B channel voltage value, and the three voltage values corresponding to each pixel point are the voltage data of each pixel point.
Further, the upper computer outputs the VGA signal according to a fixed refresh rate, wherein the refresh rate refers to the number of times that the electron beam repeatedly scans the picture on the screen, and the unit is hertz (Hz), and 1 Hz indicates that one second displays one frame of picture. In the principle of VGA display, when the VGA picture is displayed, the VGA picture works in a progressive scanning mode, that is, a frame picture can be regarded as being formed by a plurality of rows and columns of pixels, and the VGA signal for outputting the VGA picture is to output the voltage data of each pixel, and it should be noted that, when the VGA signal of a frame picture is output, the voltage data of each row of pixels is specifically output from top to bottom, wherein, after the voltage data of one row of pixels is output from left to right, a period of time is required to be paused according to the regulation of the VGA picture output standard, and then the next row is changed to continue to output.
S120: and receiving VGA signal sampling data obtained by sampling the VGA signal by the VGA signal acquisition device through the data transmission interface.
The VGA signal acquisition device is used for sampling VGA signals output by the VGA interface. Because the data volume of a picture is very big, in order to improve the collection efficiency, VGA signal acquisition device does not do any processing to the data that its gathered, and it is only responsible for data acquisition and transmission to the host computer, utilizes the performance of host computer to carry out subsequent analysis processing. Specifically, the VGA signal acquisition device is a hardware module, which may be an ADC (Analog-to-Digital Converter) chip, which is a converter chip capable of converting an Analog signal into a digital signal, for example.
When the refresh rate employed by the upper computer is fixed, the period of time during which the upper computer outputs the voltage data of one line of pixels (hereinafter, this period of time will be referred to as a horizontal scanning time) is fixed regardless of the change in resolution of the screen. The VGA signal acquisition device also has fixed sampling frequency for acquiring VGA signals, so that when the resolutions of pictures are different, the acquired data amounts are different, but the processing process of the upper computer on the acquired data is the same. For example, assuming that the resolution of the frame is n×k, that is, the frame is formed by n rows and k columns of pixels, the VGA signal acquisition device will acquire voltage data of m pixels when the upper computer outputs voltage data of one row of pixels (including k pixels) each time, and after the upper computer finishes inputting the whole frame, the VGA signal acquisition device will acquire voltage data of n×m (i.e., n rows and m columns) pixels. The sampling frequency of the VGA signal acquisition device is generally smaller than the output frequency of the upper computer, so that m < k. The sampling frequency represents how many pixel voltage data are collected in a horizontal scanning time, and the output frequency represents how many pixel voltage data are output in a horizontal scanning time. The sampling process of the VGA signal acquisition device can be seen in fig. 5, wherein each upper box in the drawing represents the voltage data of a row of pixel points output by the upper computer, and each lower box represents the voltage data of a row of pixel points acquired by the VGA signal acquisition device.
And the VGA signal acquisition device transmits the voltage data of one row of pixel points to the upper computer every time the VGA signal acquisition device acquires the voltage data of the last row of pixel points of the target VGA picture, and the upper computer starts to execute analysis operation after transmitting the voltage data of the last row of pixel points of the acquired target VGA picture to the upper computer. Further, the upper computer can pause for a period of time after the voltage data of a row of pixel points are output, and the VGA signal acquisition device can not execute acquisition operation in the time of temporary output of the upper computer so as to ensure that the acquired voltage data are all effective data.
S130: and establishing a VGA digital model according to the VGA signal sampling data.
The step converts the target VGA picture into a corresponding digital model, namely the VGA digital model, by utilizing the voltage data (namely the VGA signal sampling data) acquired by the VGA signal acquisition device. The VGA digital model is a two-dimensional array, which comprises a plurality of color indication values, and the color indication values have a one-to-one correspondence with voltage data included in VGA signal sampling data. For example, assuming that the VGA signal sampling data includes n rows by m columns of voltage data, the VGA digital model includes n rows by m columns of color indication values, and the correspondence between the two can be seen in fig. 6. The color indication value corresponding to the pixel point is used for indicating the color type (such as black, yellow, green, etc.) corresponding to the pixel point. The color indication value in the VGA digital model can indicate the color type corresponding to the pixel point, so that the color block position information and the color block area information which characterize the position and the area of the color block in the target VGA picture can be determined through analysis of the VGA digital model, and whether the VGA signal of the target VGA picture output by the VGA interface is correct or not can be detected by utilizing the color block position information and the color block area information.
Step S130 is described in detail below.
In some embodiments, it is assumed that the VGA signal sampling data includes voltage data corresponding to n×m pixels in the target VGA picture, and accordingly, as shown in fig. 7, step S130 includes step S131 and step S132.
Step S131 is described first: and determining a color indication value corresponding to each pixel point according to the voltage data corresponding to each pixel point in the VGA signal sampling data.
In some embodiments, when the upper computer determines the color indication value corresponding to each pixel point according to the voltage data corresponding to each pixel point in the VGA signal sampling data, the upper computer may directly convert the voltage data corresponding to each pixel point into RGB information, and then determine the color indication value corresponding to each pixel point according to the RGB information corresponding to each pixel point.
In other embodiments, considering that the peak voltage of the VGA signal is usually 1V, however, in actual situations, the peak voltages of different products (refer to an upper computer) are slightly different, so that in order to perform logic calculation in a unified manner when the VGA digital model is analyzed later, further to improve analysis efficiency, the embodiment determines standard RGB information corresponding to each pixel according to voltage data corresponding to each pixel, then determines a color indication value corresponding to each pixel according to the standard RGB information corresponding to each pixel, that is, converts the standard RGB information corresponding to each pixel into HSV information, and then determines the color indication value corresponding to each pixel according to the HSV information corresponding to each pixel.
In some embodiments, regarding the above-described operation of determining the standard RGB information corresponding to each pixel point according to the voltage data corresponding to each pixel point, the operation may be implemented through steps 210 to 230 as shown in fig. 8, wherein the details of the steps are as follows.
S210: and obtaining a red standard voltage value, a green standard voltage value and a blue standard voltage value.
The above-mentioned red standard voltage value, green standard voltage value and blue standard voltage value can represent the true voltage levels of standard red, standard green and standard blue in the current environment, respectively.
As described above, the peak voltage of the VGA signal is usually 1V, however, in actual situations, the peak voltages of different products (referred to as the upper computer) are slightly different, so that the embodiment specifically uses the pre-calculated red standard voltage value, the pre-calculated green standard voltage value and the pre-calculated blue standard voltage value to perform data calibration on the voltage data of each pixel point collected by the VGA signal collecting device, so as to ensure that the logic calculation can be uniformly performed in the subsequent process of analyzing the VGA digital model, and further improve the analysis efficiency.
For the calculation process of the red standard voltage value, the green standard voltage value, and the blue standard voltage value, see step S201-step S204 shown in fig. 9, namely:
S201: and VGA signals of the standard red picture, the standard green picture and the standard blue picture are respectively output to the VGA signal acquisition device through VGA interfaces.
S202: the VGA signal acquisition device is respectively used for receiving first sampling data, second sampling data and third sampling data which are obtained by sampling VGA signals of a standard red picture, a standard green picture and a standard blue picture through a data transmission interface;
s203: extracting voltage data of one or more rows of pixel points from the first sampling data, the second sampling data and the third sampling data respectively to serve as samples, so as to obtain a first sample, a second sample and a third sample;
s204: a red standard voltage value is calculated from the first sample, a green standard voltage value is calculated from the second sample, and a blue standard voltage value is calculated from the third sample.
Wherein, the upper computer calculates the red standard voltage value, the green standard voltage value and the blue standard voltage value in turn. Taking calculating the red standard voltage value as an example, the upper computer outputs a VGA signal of a standard red picture to the VGA signal acquisition device, the VGA signal acquisition device executes the sampling operation described in the embodiment, the acquired first sampling data is transmitted to the upper computer, the upper computer extracts voltage data of one or more rows of pixel points from the first sampling data as samples, and finally the red standard voltage value is calculated according to the first samples. And then, continuing to calculate the standard voltage values of other standard colors such as standard blue or standard green, and referring to the process of calculating the red standard voltage value for the related calculation process. The upper computer can also sequentially output VGA signals of a standard red picture, a standard green picture and a standard blue picture to the VGA signal acquisition device, and after receiving the first sampling data, the second sampling data and the third sampling data transmitted back by the VGA signal acquisition device, the upper computer can respectively process the sampling data.
When the samples are extracted from the above-mentioned sampling data (such as the first sampling data), it is preferable to extract the voltage data of the pixels in the middle line or the continuous lines of the frame as the samples, so as to obtain more accurate standard voltage values.
When the red standard voltage value is calculated according to the first sample, the R channel average voltage value is calculated according to the R channel voltage value corresponding to each pixel point in the first sample, the peak voltage when the VGA signal is output by the preset upper computer and the reference standard voltage when the VGA signal acquisition device works are obtained, and then the R channel average voltage value is subjected to standard voltage conversion according to the peak voltage and the reference standard voltage, so that the red standard voltage value can be obtained.
When the green standard voltage value is calculated according to the second sample, the G channel average voltage value is calculated according to the G channel voltage value corresponding to each pixel point in the second sample, the peak voltage when the VGA signal is output by the preset upper computer and the reference standard voltage when the VGA signal acquisition device works are obtained, and then the standard voltage conversion is carried out on the G channel average voltage value according to the peak voltage and the reference standard voltage, so that the green standard voltage value can be obtained.
Similarly, when calculating the blue standard voltage value according to the third sample, calculating to obtain a B channel average voltage value according to the B channel voltage value corresponding to each pixel point in the third sample, obtaining the peak voltage when the VGA signal is output by the preset upper computer and the reference standard voltage when the VGA signal acquisition device works, and then carrying out standard voltage conversion on the B channel average voltage value according to the peak voltage and the reference standard voltage to obtain the blue standard voltage value.
The process of calculating the standard voltage value of the standard color is described below by way of one example.
Taking the standard voltage value of the standard red as an example, in the present example, an 8-bit ADC chip is used as the VGA signal acquisition device, the reference standard voltage of the ADC chip during operation is 1.8V, and at this time, the voltage value corresponding to the R value of 1 unit is 1.8/256V. After the upper computer outputs VGA signals of standard red pictures, the ADC chip acquires first sample data, then takes middle line voltage data from the first sample data, R channel voltage values in each voltage data in the line can be respectively marked as a1, a2, a3 … an, average values of a1, a2 and a3 … an are counted, and the average value is marked as Ar. Assuming that ar=100, the standard voltage representing the current environment output standard red is 100×1.8/256=0.7v. Assuming a peak voltage of 1V, it is necessary to operate at 0.7V: a ratio of 1V to convert 0.7V to a standard voltage, a red standard voltage value=1V/0.7V can be calculated. In summary, the following formula can be used to calculate the red standard voltage value, vrb=1/(ar×1.8/256), where Vrb is the red standard voltage value and Ar is the average value described above (for convenience of distinction, may be referred to as red average value).
The R-channel voltage value in each voltage data acquired from the VGA signal of the target VGA picture is required to be multiplied by the red standard voltage value.
The green standard voltage value (noted Vgb) and the blue standard voltage value (noted Vbb) can also be calculated based on the operations shown in the above examples. That is, vgb=1/(ag×1.8/256), vbb=1/(ab×1.8/256); ag and Ab are green and blue averages, respectively.
S220: and converting the voltage data corresponding to each pixel point into standard voltage data according to the red standard voltage value, the green standard voltage value and the blue standard voltage value.
The standard voltage data corresponding to each pixel point comprises an R channel standard voltage value, a G channel standard voltage value and a B channel standard voltage value; correspondingly, when the voltage data corresponding to each pixel point is converted into standard voltage data according to the red standard voltage value, the green standard voltage value and the blue standard voltage value, the R channel voltage value of each pixel point is converted into the R channel standard voltage value according to the red standard voltage value, the G channel voltage value of each pixel point is converted into the G channel standard voltage value according to the green standard voltage value, and the B channel voltage value of each pixel point is converted into the B channel standard voltage value according to the blue standard voltage value.
S230: and converting the standard voltage data corresponding to each pixel point into standard RGB information.
For the standard voltage data corresponding to each pixel point, the standard voltage data can be calculated according to 1V:255 into 24-bit standard RGB information (consisting of 8-bit R values + 8-bit G values + 8-bit B values) that can be used for subsequent calculation processing.
For example, assuming that a voltage data is collected as [ Vr1, vg1, vb1], a standard voltage is first obtained by converting:
[ vsr1=vr1 (1.8/256) ×vrb, vsg1=vg1 (1.8/256) ×vgb, vsb1=vb1 (1.8/256) ×vbb ], and is denoted as [ Vsr1, vsg1, vsb1].
Then [ Vsr1, vsg1, vsb1] is converted into standard RGB information, which can be obtained:
[ r1=vsr1×255, g1=vsg1×255, vsb1×255], denoted as [ R1, G1, B1].
Through the above flow, standard RGB information corresponding to [ Vr1, vg1, vb1] can be calculated as [ R1, G1, B1]. And calculating the standard RGB information corresponding to the acquired voltage data of each pixel point according to the same flow.
In some embodiments, regarding the above-mentioned operation of converting the standard RGB information corresponding to each pixel point into HSV information, the present embodiment converts the standard RGB information corresponding to each pixel point into HSV information in a manner of converting RGB into HSV.
The above HSV refers to an HSV (Hue, saturation, value) color Model, which is a color space created according to visual characteristics of colors, and is also called a hexagonal pyramid Model (hexacone Model). The HSV color model is a subset of visible light in a three-dimensional color space of H (hue), S (saturation), V (brightness), which contains all the colors of a certain color gamut.
Specifically, the standard RGB information corresponding to each pixel point may be converted into HSV information, i.e., a hue value (i.e., an H value), a saturation value (i.e., an S value), and a brightness value (i.e., a V value) using the following formula.
Wherein, the (R, G, B) refers to the R channel standard voltage value, the G channel standard voltage value and the B channel standard voltage value in the pixel point respectively.
In some embodiments, regarding the above-mentioned operation of determining the color indication value corresponding to each pixel point according to the HSV information corresponding to each pixel point, the operation may be implemented through steps S310 to S330 shown in fig. 10, that is:
s310: acquiring a plurality of color intervals corresponding to different color indicated values;
s320: acquiring a tone value corresponding to each pixel point;
s330: and acquiring a color indication value corresponding to a color interval in which the tone value corresponding to each pixel point is located as a color indication value corresponding to each pixel point.
In this embodiment, the value range of the H value is divided into a plurality of color intervals corresponding to a plurality of color indication values, so that after the HSV information corresponding to the pixel point is obtained, it is determined which color interval the H value corresponding to the pixel point falls into, and the color indication value corresponding to the color interval is used as the color indication value corresponding to the pixel point.
By way of example, after converting standard RGB information into HSV information, a color gamut distribution diagram as shown in fig. 16 may be obtained, where the value range of the H value is [0 ° -360 ° ] (note: 360 ° -that is, 0 °) and in one example, the value range of the H value and the color indication value corresponding to each color interval are divided into 8 color intervals as follows:
(1) Color indication value: 1, red, color interval: (0-30 DEG) and (330-0 DEG)
(2) Color indication value: 2, which represents yellow, color interval: (30-90 DEG)
(3) Color indication value: 3, green, color interval: (90 DEG to 150 DEG)
(4) Color indication value: 4, cyan (light green), color interval: (150 DEG to 210 DEG)
(5) Color indication value: 5, blue, color interval: (210 DEG-250 DEG)
(6) Color indication value: 6, purple, color interval: (250 DEG to 280 DEG)
(7) Color indication value: 7, magenta, color interval: (280-330 DEG)
(8) Color indication value: 0, black, color interval: 0 deg.. If the H value corresponding to the pixel is 0, it may be determined that the color indication value corresponding to the pixel is 0.
Step S132 is described below: and establishing a VGA digital model according to the color indicated value corresponding to each pixel point. In some embodiments, when the upper computer establishes the VGA digital model according to the color indication value corresponding to each pixel point, a two-dimensional array is created first, then the color indication value of each pixel point is stored in the two-dimensional array according to the row and column information of each pixel point, and after the color indication values of all the pixel points are stored in the two-dimensional array, the VGA digital model can be obtained.
If the VGA signal sample data includes n rows by m columns of voltage data, then the VGA digital model is a two-dimensional array including n by m color indication values. If the upper computer outputs a VGA signal of the picture shown in fig. 3, the VGA signal sampling DATA collected by the VGA signal collecting device includes 40 lines of voltage DATA, each line includes 25 voltage DATA, the VGA digital model built based on the VGA signal sampling DATA will include 40 lines of color indication values, each line includes 25 color indication values, and if the VGA digital model is hsv_data [ column ] [ line ], the content can be shown in fig. 11-1, 11-2 or 11-3.
S140: and analyzing according to the VGA digital model to obtain color block position information and color block area information which respectively represent the position and the area of the color block in the target VGA picture.
As described above, the target VGA picture generally only contains two colors, and when the VGA signal output by the VGA interface is normal, only color indication values of two color types exist in the VGA digital model. Thus, in some embodiments, it may be determined whether the VGA signal output by the VGA interface is normal by detecting how many color-type color indication values are included in the VGA digital model, i.e., wherein if only one color-type color indication value is included or more than two color-type color indication values are included, it is determined that the VGA interface is not detected, wherein if two color-type color indication values are included, step S140 is further performed to analyze the color patch position information and the color patch area information, and step S150 is performed to determine the test result of the VGA interface. Optionally, there is a case where the occurrence probability is low, that is, the VGA digital model contains color indication values of two color types, but the two color types are not all the two color types originally contained in the target VGA picture, for this case, it may be determined whether the two color types are the two color types originally contained in the target VGA picture in the case that the VGA digital model contains the color indication values of the two color types, and if so, step S140 to step S150 are executed to further improve the accuracy of the test result.
It should be noted that in the actual test, the established VGA digital model may have deviation due to interference, sampling, etc., so that in the case that the VGA signal output by the VGA interface is normal, the finally established VGA digital model also has color indication values of more than two color types. In addition, the higher the sampling frequency of the VGA signal acquisition device to the VGA signal, the larger the data volume of the sampled VGA signal data is, and correspondingly, the larger the data volume of the VGA digital model is, which can cause the excessive calculation pressure in the process of analyzing the VGA digital model, and simultaneously can cause the slowing of the test speed, in order to reduce the calculation pressure and improve the test speed, the sampling frequency of the VGA signal acquisition device to the VGA signal can be regulated down, but the sampling frequency can not be too low, the too low sampling frequency can cause the established VGA digital model to not accurately reflect the target VGA picture, and further, the accuracy of the test result obtained based on the VGA digital model is not high, therefore, the proper sampling frequency can be set according to the actual requirement in the actual test, so as to realize the reduction of the calculation pressure and the improvement of the test speed, and simultaneously the accuracy of the test result is considered. The sampling frequency of the VGA signal acquisition device to the VGA signal is generally smaller than the output frequency of the upper computer to the VGA signal, and the sampling frequency and the output frequency are different, so that the voltage data acquired by the VGA signal acquisition device can deviate by a certain amount, and a color indication value of a certain amount of deviation can correspondingly appear in the VGA digital model. The above-mentioned redundant color types (the colors not belonging to the two colors originally included in the target VGA picture belong to the redundant color types) of color indication values and offset color indication values interfere with the determination of the test result. For the above-mentioned situation, in some embodiments, assuming that the upper computer determines that the VGA digital model includes color indication values of at least three color types, the above-mentioned operations for obtaining the color patch position information and the color patch area information, which respectively represent the position and the area of the color patch in the target VGA picture, according to the VGA digital model analysis include steps S141-S145 shown in fig. 12, and details of each step are as follows.
S141: and analyzing the dominant color, the differential color and the interference color corresponding to the VGA digital model.
The primary color and the differential color refer to the color type with the largest number of corresponding color indication values and the second largest number of corresponding color indication values in at least three color types, and the interference color refers to the color type which is not the primary color or the differential color in the at least three color types. It is understood that both the primary and differential colors are of one color type, while the interference colors may be of one or more color types.
In this embodiment, when the upper computer analyzes that the VGA digital model includes color indication values of more than two color types, it does not directly determine that the VGA interface test fails, but analyzes the dominant color, the differential color and the interference color corresponding to the VGA digital model, and then performs the related process for eliminating interference on the VGA digital model, that is, the related operation in step S142.
S142: detecting whether each color indicated value belonging to the differential color or the interference color in the VGA digital model accords with a preset filtering rule, and filtering each color indicated value which accords with the preset filtering rule to obtain a first optimized VGA digital model.
The upper computer can filter the difference color or the interference color which are independently generated, and can also filter the difference color or the interference color which continuously generated but the frequency of the occurrence of the difference color or the interference color is not more than a preset value. If the VGA digital model is shown in fig. 11-1, the first optimized VGA digital model processed in step S142 can be shown in fig. 11-2.
In some embodiments, it may be detected whether each color indication value belonging to a differential color or an interference color in the VGA digital model meets a preset filtering rule through the following operation (1) and operation (2).
(1) For each color indication value belonging to the difference color or the interference color, detecting whether the color indication value is the same as the previous color indication value or the same as the next color indication value, if not, determining that the color indication value meets the preset filtering rule. If yes, determining that the color indicated value does not meet a preset filtering rule.
Operation (1) is for detecting a difference color or an interference color that occurs alone. Wherein the color types representing the two color indication values are different if the two color indication values are different, whereas the color types representing the two color indication values are the same if the two color indication values are the same. For any color indication value, if the color indication value is different from the previous color indication value and is different from the next color indication value, the upper level opportunity determines that the color indication value is a single occurrence of a difference color or interference color.
(2) For each color indication value belonging to the difference color or the interference color, detecting whether the total number of the same color indication values continuously appearing in front of and behind the color indication value is smaller than a preset value, if so, determining that the color indication value meets a preset filtering rule. If not, determining that the color indication value does not meet the preset filtering rule.
Operation (2) is for detecting a differential color or an interference color which continuously appears but the number of occurrences does not exceed a preset value. The same color indication value appearing before (or after) the above-described color indication value refers to a color indication value of the same color type as the color indication value appearing before (or after) the color indication value.
Further, when the VGA digital model data amount is large, the correlation processing for eliminating the interference can be sequentially performed on each line color instruction value in the VGA digital model. For example, for any line of color indication values in the VGA digital model, counting how many color indication values of the color types are included in the line of color indication values, determining the color type with the largest number of corresponding color indication values as a dominant color, traversing each color indication value of the line, if the color indication value does not belong to the dominant color (namely, belongs to a differential color or an interference color), comparing the color indication value with a previous color indication value and a next color indication value respectively, and if the color indication value is different from the previous color indication value and different from the next color indication value, determining that the color indication value is a single occurrence of differential color or interference color by an upper computer, and adjusting the value of the color indication value to belong to the dominant color; if the color indication value is the same as the previous color indication value or the same as the next color indication value, detecting how many color values are the same in front of the color indication value, detecting how many color indication values are the same in back of the color indication value, comparing the total number with a preset value, and if the total number is smaller than the preset value, the upper computer also adjusts the value so as to make the upper computer belong to the main color. For example, assuming that a line color instruction value to be measured is "00100110000000011110", assuming that a preset value is 4, the first three "1" s from the left are filtered out when performing the operation of eliminating interference, and the line color instruction value is "00000000000000011110" finally.
S143: and detecting whether a color indication value belonging to the interference color exists in the first optimized VGA digital model.
Since the interference color has been determined before, each color indication value in the VGA digital model can be traversed, if the traversed color indication value is not equal to the color indication value corresponding to the dominant color or the differential color, the detection result is determined to be present, otherwise, the detection result is determined to be absent.
Wherein, the method further comprises the following steps: and responding to the detection result as existence, and determining that the test result of the VGA interface is that the test fails.
The first optimized VGA digital model is actually the VGA digital model after performing the interference rejection correlation process. If the colors except the main color and the differential color still exist in the VGA digital model after the related processing of eliminating the interference is executed, the upper computer determines that the test result of the VGA interface is that the test fails.
Further, if only the dominant color and the differential color exist in the VGA digital model after the related process of eliminating the interference is performed, the upper computer needs to detect whether the color indication value of the offset exists in the VGA digital model, and perform the filtering process or the integrating process on the detected color indication value of the offset according to the specific situation, and the related process can refer to step S144.
S144: and in response to the detection result being that the two-dimensional region to be detected in the first optimized VGA digital model does not exist, detecting whether a specific column or each column of color indication values of the two-dimensional region to be detected meet a preset offset judgment rule, filtering each column of color indication values meeting the preset offset judgment rule, and integrating each column of color indication values not meeting the preset offset judgment rule to obtain a second optimized VGA digital model.
Wherein the second optimized VGA digital model is actually the VGA digital model after performing the interference rejection related process and performing the filtering process and/or the integration process.
With respect to the shifted color indication values, see fig. 11-2, a difference region (i.e. a region in the square frame where the color indication values are all color indication values belonging to different colors) is seen, and the color indication values belonging to different colors on the left and right sides of the difference region are both shifted color indication values (indicated by arrows in the figure).
The upper computer selects a two-dimensional area to be detected first, and then uses the two-dimensional area to be detected to judge whether filtering processing or integration processing needs to be executed.
When the upper computer determines a two-dimensional area to be detected in the first optimized VGA digital model, determining a target row and a target column of a color indication value belonging to different colors in the first optimized VGA digital model, and then determining the two-dimensional area formed by the target row and the target column as the two-dimensional area to be detected.
For example, referring to fig. 11-2, the target rows in the first optimized VGA digital model where the color indication values belonging to different colors appear are the 3 rd-7 th rows and the target columns are the 11 th-17 th columns, and the two-dimensional area to be measured is the area formed by intersecting the 3 rd-7 th rows and the 11 th-17 th columns.
After the two-dimensional area to be detected is determined, the upper computer can identify a specific column of the two-dimensional area to be detected, then only detect whether the color indication value of the specific column accords with a preset offset judgment rule, or directly detect whether the color indication value of each column accords with the preset offset judgment rule. Regarding a specific column, in a two-dimensional area to be measured, if a column of color instruction values contains both a color instruction value of a differential color and a color instruction value of a dominant color, then the upper level will recognize the column of color instruction values as a specific column.
There are various implementations of the above-described operation of detecting whether the color indication value of a specific column or each column of the two-dimensional area to be detected meets the preset offset determination rule. The following is presented by way of two examples.
For example, one possible implementation manner is to detect, for a specific column or each column of color indication values of the two-dimensional area to be detected, whether the number of color indication values belonging to different colors in the column of color indication values is smaller than a preset number threshold, and if so, determine that the column of color indication values accords with a preset offset determination rule.
In another possible implementation manner, for a specific column or each column of color indication values of the two-dimensional area to be detected, whether the duty ratio of the color indication value belonging to the different color in the column of color indication values is smaller than a preset proportion threshold value is detected, and if yes, it is determined that the column of color indication values accords with a preset offset judgment rule.
The preset number threshold and the preset proportion threshold may be set according to practical situations, and the embodiment is not specifically limited.
For each column of color indication values conforming to the preset offset determination rule, the upper computer performs a process of adjusting each of the color indication values belonging to the different colors in the column of color indication values so that each of the color indication values in the column of color indication values belongs to the dominant color.
For each column of color indication values that do not meet the preset offset determination rule, the upper computer performs a process of adjusting each of the color indication values belonging to the dominant color in the column of color indication values for each column of color indication values that do not meet the preset offset determination rule so that each of the color indication values in the column of color indication values belongs to the differential color.
For example, assuming that the above-mentioned preset number threshold is 3 or assuming that the preset ratio threshold is 50%, the second optimized VGA digital model obtained by performing the processing of step S144 on the first optimized VGA digital model shown in fig. 11-1 may be as shown in fig. 11-3.
S145: and determining a differential color area in the second optimized VGA digital model, and obtaining color block position information and color block area information according to the differential color area.
After step S144, the color indication value belonging to the interference color and the offset color indication value do not exist in the second optimized VGA digital model, so that the operation of determining the differential color region in the second optimized VGA digital model is similar to the operation of determining the two-dimensional region to be measured described above, that is, the target row and the target column of the color indication value belonging to the differential color appear in the second optimized VGA digital model are determined first, and then the two-dimensional region formed by the target row and the target column is determined as the differential color region.
Regarding the operation of obtaining patch position information and patch area information from the difference region, this operation can be achieved by the steps shown in fig. 13:
s1451: acquiring the output frequency of the upper computer to the VGA signal and the sampling frequency of the VGA signal acquisition device to the VGA signal;
S1452: determining equal-proportion conversion information according to the output frequency and the sampling frequency;
s1453: acquiring row and column information of a starting point and row information of an ending point of the differential color region;
s1454: and calculating the color block position information and the color block area information according to the equal-proportion conversion information, the line information of the starting point and the line information of the ending point.
As can be seen from the above, the acquisition frequency and the output frequency are different, and the horizontal scanning time is fixed, so that there is an equal proportion relation between the target VGA picture and the VGA digital model, for example, the target VGA picture includes 720 rows and 1080 columns of pixels, the output frequency is 1080, the sampling frequency is 500, that is, the upper computer outputs 1080 pixels of voltage data in one horizontal scanning time, the VGA signal acquisition device acquires 500 pixels of voltage data in one horizontal scanning time, and if the VGA signal acquisition device acquires the x-th pixel of voltage data, it can be determined that the voltage data is the y-th pixel of the corresponding row in the target VGA picture. y=x, wherein the equal proportion conversion information=output frequency/sampling frequency=1080/500. It should be noted that y must be an integer, and therefore, if the result of x×1080/500 includes a decimal fraction, rounding is performed again.
Further, the starting point and the ending point of the differential color region may be an upper left end point and a lower right end point of the differential color region, and may be an upper left end point and an upper right end point. The row and column information includes row information, which is the number of rows of the color indication value in the second optimized VGA digital model, and column information, which is the number of columns of the color indication value in the second optimized VGA digital model. Taking fig. 11-3 as an example, the column and row information of the upper left end point of the differential color region is (3, 11), indicating the 3 rd row and 11 th column.
When the color block position information and the color block area information are obtained according to the equal proportion conversion information, the line information of the starting point and the line information of the ending point are multiplied by the equal proportion conversion information to obtain new line information, and then the converted line information of the starting point and the ending point (which contains the original line information and the new line information) is used for determining the color block position information and the color block area information. Wherein the color block position information comprises row and column information of the converted starting point and the converted ending point. The color block area information is calculated based on the row and column information of the starting point and the ending point after conversion, and the related calculation process belongs to the conventional technology and is not described herein.
S150: and determining the test result of the VGA interface according to the color block position information and the color block area information.
When the upper computer randomly generates the target VGA picture, the upper computer records the related information of the position and the area of the color block in the picture, namely the preset position information and the preset area information respectively representing the position and the area of the color block in the target VGA picture. Therefore, when determining the test result of the VGA interface according to the color block position information and the color block area information, the upper computer acquires the preset position information and the preset area information, calculates the position difference degree according to the preset position information and the color block position information, calculates the area difference degree according to the preset area information and the color block area information, and then judges whether the position difference degree exceeds the corresponding preset difference threshold value and judges whether the area difference degree exceeds the corresponding preset difference threshold value. When the position difference degree and the area difference degree do not exceed the preset difference threshold, determining that the test result of the VGA interface is test passing, and when the position difference degree or the area difference degree exceeds the preset difference threshold, determining that the test result of the VGA interface is test failing. The preset difference threshold may be set according to actual situations.
When calculating the position difference according to the preset position information and the color block position information, two areas can be determined in the target VGA picture based on the preset position information and the color block position information, and then the non-overlapping degree of the two areas is calculated as the position difference.
It should be noted that, regarding the steps included in the VGA interface test method provided in any of the above embodiments, the steps are not strictly limited to the order of execution unless explicitly stated herein, and the steps may be executed in other orders. Moreover, at least some of these steps may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
Based on the same inventive concept, the present application also provides a VGA interface test device (hereinafter simply referred to as the above device), in some embodiments, the above device is provided with a VGA interface and a data transmission interface, and the above device is connected with a VGA signal acquisition device through the VGA interface and the data transmission interface; as shown in fig. 14, the VGA interface testing device includes the following modules:
The signal output module 110 is used for outputting VGA signals of the target VGA picture to the VGA signal acquisition device through the VGA interface; the target VGA picture comprises color blocks;
the data receiving module 120 is configured to receive VGA signal sampling data obtained by sampling the VGA signal by the VGA signal acquisition device through the data transmission interface;
the model building module 130 is configured to build a VGA digital model according to VGA signal sampling data;
the analysis module 140 is used for obtaining color block position information and color block area information which respectively represent the position and the area of the color block in the target VGA picture according to VGA digital model analysis;
and the test result determining module 150 is configured to determine a test result of the VGA interface according to the color patch position information and the color patch area information.
In some embodiments, the VGA signal sampling data includes voltage data corresponding to n×m pixels in the target VGA picture;
the model building module 130 includes:
the color determining submodule is used for determining a color indication value corresponding to each pixel point according to the voltage data corresponding to each pixel point in VGA signal sampling data; the color indication value corresponding to each pixel point is used for indicating the color type of each pixel point;
and the model building sub-module is used for building a VGA digital model according to the color indicated value corresponding to each pixel point.
In some embodiments, the color determination sub-module includes:
the RGB determining unit is used for determining standard RGB information corresponding to each pixel point according to the voltage data corresponding to each pixel point;
the information conversion unit is used for converting the standard RGB information corresponding to each pixel point into HSV information;
and the color determining unit is used for determining a color indicated value corresponding to each pixel point according to the HSV information corresponding to each pixel point.
In some embodiments, the voltage data corresponding to each pixel point includes an R-channel voltage value, a G-channel voltage value, and a B-channel voltage value; an RGB determining unit for performing the following operations:
obtaining a red standard voltage value, a green standard voltage value and a blue standard voltage value;
converting voltage data corresponding to each pixel point into standard voltage data according to the red standard voltage value, the green standard voltage value and the blue standard voltage value;
and converting the standard voltage data corresponding to each pixel point into standard RGB information.
In some embodiments, the apparatus further comprises a sampling module and a standard voltage value calculation module.
The signal output module 110 is further configured to output VGA signals of a standard red picture, a standard green picture and a standard blue picture to the VGA signal acquisition device through the VGA interface;
The data receiving module 120 is further configured to receive, through a data transmission interface, first sample data, second sample data, and third sample data obtained by sampling VGA signals of the standard red frame, the standard green frame, and the standard blue frame by the VGA signal acquisition device;
the sampling module is used for respectively extracting voltage data of one row or a plurality of rows of pixel points from the first sampling data, the second sampling data and the third sampling data to serve as samples, so as to obtain a first sample, a second sample and a third sample;
and the standard voltage value calculation module is used for calculating a red standard voltage value according to the first sample, calculating a green standard voltage value according to the second sample and calculating a blue standard voltage value according to the third sample.
In some embodiments, when the standard voltage value calculation module calculates the red standard voltage value from the first sample, the standard voltage value calculation module is configured to:
calculating an average R channel voltage value according to the R channel voltage value corresponding to each pixel point in the first sample;
acquiring a preset peak voltage when the VGA signal is output by the device and a reference standard voltage when the VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the R channel according to the peak voltage and the reference standard voltage to obtain a red standard voltage value.
In some embodiments, the standard voltage value calculation module, when calculating the green standard voltage value from the second sample, is to:
calculating according to the G channel voltage value corresponding to each pixel point in the second sample to obtain a G channel average voltage value;
acquiring a preset peak voltage when the VGA signal is output by the device and a reference standard voltage when the VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the G channel according to the peak voltage and the reference standard voltage to obtain a green standard voltage value.
In some embodiments, the standard voltage value calculation module, when calculating the blue standard voltage value from the third sample, is to:
calculating a B channel average voltage value according to the B channel voltage value corresponding to each pixel point in the third sample;
acquiring a preset peak voltage when the VGA signal is output by the device and a reference standard voltage when the VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the B channel according to the peak voltage and the reference standard voltage to obtain a blue standard voltage value.
In some embodiments, the standard voltage data corresponding to each pixel point includes an R-channel standard voltage value, a G-channel standard voltage value, and a B-channel standard voltage value;
The RGB determining unit is configured to, when converting voltage data corresponding to each pixel point into standard voltage data according to the red standard voltage value, the green standard voltage value, and the blue standard voltage value:
converting the R channel voltage value of each pixel point into an R channel standard voltage value according to the red standard voltage value;
converting the G channel voltage value of each pixel point into a G channel standard voltage value according to the green standard voltage value;
and converting the B-channel voltage value of each pixel point into a B-channel standard voltage value according to the blue standard voltage value.
In some embodiments, the HSV information corresponding to each pixel point includes a hue value, a saturation value, and a brightness value;
when the color determining unit determines a color indication value corresponding to each pixel according to the HSV information corresponding to each pixel, the color determining unit is configured to:
acquiring a plurality of color intervals corresponding to different color indicated values;
acquiring a tone value corresponding to each pixel point;
and acquiring a color indication value corresponding to a color interval in which the tone value corresponding to each pixel point is located as a color indication value corresponding to each pixel point.
In some embodiments, the VGA digital model is a two-dimensional array of n rows and m columns; a model building sub-module comprising:
An array creation unit for creating a two-dimensional array;
and the instruction value storing unit is used for storing the color instruction value of each pixel point into a two-dimensional array according to the row and column information of each pixel point to obtain a VGA digital model comprising n x m color instruction values.
In some embodiments, the VGA digital model includes color indication values for at least three color types; an analysis module 140 comprising:
the color analysis sub-module is used for analyzing the main color, the differential color and the interference color corresponding to the VGA digital model; the dominant color and the differential color respectively refer to the color type with the largest number of corresponding color indication values and the second largest number of corresponding color indication values in at least three color types, and the interference color refers to the color type which is not the dominant color or the differential color in at least three color types;
the filtering sub-module is used for detecting whether each color indicated value belonging to the differential color or the interference color in the VGA digital model accords with a preset filtering rule, and filtering each color indicated value which accords with the preset filtering rule to obtain a first optimized VGA digital model;
the interference color detection sub-module is used for detecting whether a color indication value belonging to interference colors exists in the first optimized VGA digital model;
the offset processing submodule is used for determining a two-dimensional area to be detected in the first optimized VGA digital model in response to the absence of a detection result, detecting whether a specific column or each column of color indication values of the two-dimensional area to be detected meet a preset offset judgment rule, filtering each column of color indication values meeting the preset offset judgment rule, and integrating each column of color indication values not meeting the preset offset judgment rule to obtain a second optimized VGA digital model;
And the position area calculation sub-module is used for determining a difference color area in the second optimized VGA digital model and obtaining color block position information and color block area information according to the difference color area.
In some embodiments, the test result determining module 150 is further configured to determine, in response to the detection result being present, that the test result of the VGA interface is that the test fails.
In some embodiments, the filtering submodule includes a filtering rule checking unit. The filtering rule checking unit is used for executing the following operations:
for each color indication value belonging to the difference color or the interference color, detecting whether the color indication value is the same as the color type corresponding to the previous color indication value or the same as the next color indication value, if not, determining that the color indication value meets a preset filtering rule;
for each color indication value belonging to the difference color or the interference color, detecting whether the total number of the same color indication values continuously appearing in front of and behind the color indication value is smaller than a preset value, if so, determining that the color indication value meets a preset filtering rule.
In some embodiments, the offset processing sub-module includes a region under test determination unit. The area to be measured determining unit is used for executing the following operations:
Determining a target row and a target column of a color indication value belonging to different colors in the first optimized VGA digital model;
and determining a two-dimensional area formed by the target row and the target column as a two-dimensional area to be measured.
In some embodiments, the offset processing sub-module further comprises an offset determination unit. The offset determination unit is configured to perform the following operations:
for each column of color indication values of the two-dimensional area to be detected, detecting whether the number of the color indication values belonging to the different colors in the column of color indication values is smaller than a preset number threshold value, and if so, determining that the column of color indication values accords with a preset deviation judging rule; or alternatively, the first and second heat exchangers may be,
for each column of color indication values of the two-dimensional area to be detected, detecting whether the duty ratio of the color indication value belonging to the difference color in the column of color indication values is smaller than a preset proportion threshold value, and if yes, determining that the column of color indication values accords with a preset deviation judging rule.
In some embodiments, the offset processing sub-module further comprises a filtering unit. The filtering unit is used for executing the following operations:
for each column of color indication values conforming to a preset offset determination rule, each color indication value belonging to a different color in the column of color indication values is adjusted so that each color indication value in the column of color indication values belongs to a main color.
In some embodiments, the offset processing sub-module further comprises an integration unit. The integration unit is used for executing the following operations:
for each column of color indication values which do not meet the preset offset judgment rule, adjusting each color indication value belonging to the main color in the column of color indication values so that each color indication value in the column of color indication values belongs to the differential color.
In some embodiments, when the position area calculation submodule obtains color patch position information and color patch area information according to the differential color area, the position area calculation submodule is used for:
obtaining the output frequency of the VGA signal by the device and the sampling frequency of the VGA signal by the VGA signal acquisition device;
determining equal-proportion conversion information according to the output frequency and the sampling frequency;
acquiring row and column information of a starting point and row information of an ending point of the differential color region;
and calculating the color block position information and the color block area information according to the equal-proportion conversion information, the line information of the starting point and the line information of the ending point.
In some embodiments, the test result determination module 150 includes:
the preset information acquisition sub-module is used for acquiring preset position information and preset area information which respectively represent the position and the area of the color block in the target VGA picture;
The position difference calculating sub-module is used for calculating the position difference degree according to preset position information and color block position information;
the area difference calculating sub-module is used for calculating the area difference degree according to preset area information and color lump area information;
the test result judging sub-module is used for determining that the test result of the VGA interface is passing when the position difference degree and the area difference degree do not exceed the preset difference threshold; and when the position difference degree or the area difference degree exceeds a preset difference threshold value, determining that the test result of the VGA interface is that the test fails.
For specific limitation of the VGA interface test device, reference may be made to the limitation of the VGA interface test method hereinabove, and the description thereof will not be repeated here. The above-mentioned various modules in the VGA interface test device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In some embodiments, the present application provides a computer device, the internal structure of which may be as shown in FIG. 15. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data such as preset position information and preset area information for representing the position and the area of the color block in the target VGA picture, and the specific stored data can be also referred to the limitation in the embodiment of the method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a VGA interface testing method.
It will be appreciated by those skilled in the art that the structure shown in fig. 15 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
The present application also provides, in some embodiments, a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the steps of the VGA interface test method provided in any of the embodiments above.
The present application also provides in some embodiments a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the VGA interface test method provided in any of the embodiments above.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
Those skilled in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the method embodiments described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (22)

1. The VGA interface testing method is characterized by being applied to an upper computer provided with a VGA interface and a data transmission interface, wherein the upper computer is connected with a VGA signal acquisition device through the VGA interface and the data transmission interface; the method comprises the following steps:
outputting VGA signals of a target VGA picture to the VGA signal acquisition device through the VGA interface; the target VGA picture comprises color blocks;
Receiving VGA signal sampling data obtained by sampling the VGA signal by the VGA signal acquisition device through the data transmission interface;
establishing a VGA digital model according to the VGA signal sampling data;
obtaining color block position information and color block area information which respectively represent the position and the area of the color block in the target VGA picture according to the VGA digital model analysis;
determining a test result of the VGA interface according to the color block position information and the color block area information;
determining a test result of the VGA interface according to the color block position information and the color block area information, wherein the test result comprises the following steps:
acquiring preset position information and preset area information respectively representing the position and the area of the color block in the target VGA picture;
calculating a position difference degree according to the preset position information and the color block position information;
calculating area difference degree according to the preset area information and the color lump area information;
when the position difference degree and the area difference degree do not exceed a preset difference threshold, determining that the test result of the VGA interface is test passing;
and when the position difference degree or the area difference degree exceeds a preset difference threshold, determining that the test result of the VGA interface is that the test fails.
2. The method of claim 1, wherein the VGA signal sampling data includes voltage data corresponding to n x m pixels in the target VGA picture;
establishing a VGA digital model according to the VGA signal sampling data, including:
determining a color indication value corresponding to each pixel point according to the voltage data corresponding to each pixel point in the VGA signal sampling data; the color indication value corresponding to each pixel point is used for indicating the color type of each pixel point;
and establishing a VGA digital model according to the color indicated value corresponding to each pixel point.
3. The method of claim 2, wherein determining a color indication value for each pixel point from voltage data for each pixel point in the VGA signal sampling data comprises:
determining standard RGB information corresponding to each pixel point according to the voltage data corresponding to each pixel point;
converting standard RGB information corresponding to each pixel point into HSV information;
and determining a color indication value corresponding to each pixel point according to the HSV information corresponding to each pixel point.
4. A method as claimed in claim 3, wherein the voltage data corresponding to each pixel point comprises an R-channel voltage value, a G-channel voltage value and a B-channel voltage value;
Determining standard RGB information corresponding to each pixel point according to the voltage data corresponding to each pixel point comprises the following steps:
obtaining a red standard voltage value, a green standard voltage value and a blue standard voltage value;
converting voltage data corresponding to each pixel point into standard voltage data according to the red standard voltage value, the green standard voltage value and the blue standard voltage value;
and converting the standard voltage data corresponding to each pixel point into standard RGB information.
5. The method of claim 4, wherein prior to obtaining the red, green, and blue standard voltage values, the method further comprises:
VGA signals of a standard red picture, a standard green picture and a standard blue picture are respectively output to the VGA signal acquisition device through the VGA interface;
the first sampling data, the second sampling data and the third sampling data which are obtained by sampling VGA signals of the standard red picture, the standard green picture and the standard blue picture by the VGA signal acquisition device are respectively received through the data transmission interface;
extracting voltage data of one or more rows of pixel points from the first sampling data, the second sampling data and the third sampling data respectively to serve as samples, so as to obtain a first sample, a second sample and a third sample;
And calculating a red standard voltage value according to the first sample, calculating a green standard voltage value according to the second sample, and calculating a blue standard voltage value according to the third sample.
6. The method of claim 5, wherein calculating a red standard voltage value from the first sample comprises:
calculating an average R channel voltage value according to the R channel voltage value corresponding to each pixel point in the first sample;
acquiring a preset peak voltage when the upper computer outputs VGA signals and a preset reference standard voltage when the VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the R channel according to the peak voltage and the reference standard voltage to obtain a red standard voltage value.
7. The method of claim 5, wherein calculating a green standard voltage value from the second sample comprises:
calculating according to the G channel voltage value corresponding to each pixel point in the second sample to obtain a G channel average voltage value;
acquiring a preset peak voltage when the upper computer outputs VGA signals and a preset reference standard voltage when the VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the G channel according to the peak voltage and the reference standard voltage to obtain a green standard voltage value.
8. The method of claim 5, wherein calculating a blue-standard voltage value from the third sample comprises:
calculating a B channel average voltage value according to the B channel voltage value corresponding to each pixel point in the third sample;
acquiring a preset peak voltage when the upper computer outputs VGA signals and a preset reference standard voltage when the VGA signal acquisition device works;
and carrying out standard voltage conversion on the average voltage value of the B channel according to the peak voltage and the reference standard voltage to obtain a blue standard voltage value.
9. The method of claim 4, wherein the standard voltage data corresponding to each pixel point includes an R-channel standard voltage value, a G-channel standard voltage value, and a B-channel standard voltage value;
converting voltage data corresponding to each pixel point into standard voltage data according to the red standard voltage value, the green standard voltage value and the blue standard voltage value, wherein the voltage data comprises the following components:
converting the R channel voltage value of each pixel point into an R channel standard voltage value according to the red standard voltage value;
converting the G channel voltage value of each pixel point into a G channel standard voltage value according to the green standard voltage value;
And converting the B-channel voltage value of each pixel point into a B-channel standard voltage value according to the blue standard voltage value.
10. The method of claim 3, wherein the HSV information for each of the pixels includes a hue value, a saturation value, and a brightness value;
determining a color indication value corresponding to each pixel point according to the HSV information corresponding to each pixel point, including:
acquiring a plurality of color intervals corresponding to different color indicated values;
acquiring a tone value corresponding to each pixel point;
and acquiring a color indication value corresponding to a color interval in which the tone value corresponding to each pixel point is located as a color indication value corresponding to each pixel point.
11. The method of claim 2, wherein the VGA digital model is a two-dimensional array of n rows and m columns;
establishing a VGA digital model according to the color indicated value corresponding to each pixel point, including:
creating a two-dimensional array;
and storing the color indication value of each pixel point into the two-dimensional array according to the row and column information of each pixel point to obtain a VGA digital model comprising n x m color indication values.
12. The method of claim 11, wherein the VGA digital model includes color indication values for at least three color types; obtaining color block position information and color block area information respectively representing the position and the area of the color block in the target VGA picture according to the VGA digital model analysis, wherein the color block position information and the color block area information comprise:
Analyzing the dominant color, the differential color and the interference color corresponding to the VGA digital model; the dominant color and the differential color respectively refer to the color type with the largest number of corresponding color indication values and the second largest number of corresponding color indication values in the at least three color types, and the interference color refers to the color type which is not the dominant color or the differential color in the at least three color types;
detecting whether each color indicated value belonging to the difference color or the interference color in the VGA digital model accords with a preset filtering rule, and filtering each color indicated value which accords with the preset filtering rule to obtain a first optimized VGA digital model;
detecting whether a color indication value belonging to the interference color exists in the first optimized VGA digital model;
determining a two-dimensional area to be detected in the first optimized VGA digital model in response to the absence of a detection result, detecting whether each column of color indication values of the two-dimensional area to be detected accords with a preset offset judgment rule, filtering each column of color indication values which accord with the preset offset judgment rule, and integrating each column of color indication values which do not accord with the preset offset judgment rule to obtain a second optimized VGA digital model;
And determining a differential color area in the second optimized VGA digital model, and obtaining the color block position information and the color block area information according to the differential color area.
13. The method of claim 12, wherein the method further comprises:
and responding to the detection result as existence, and determining that the test result of the VGA interface is that the test fails.
14. The method of claim 12, wherein detecting whether each color indication value belonging to the difference color or the interference color in the VGA digital model meets a preset filtering rule comprises:
for each color indication value belonging to the difference color or the interference color, detecting whether the color indication value is the same as a previous color indication value or the same as a next color indication value, if not, determining that the color indication value meets the preset filtering rule; and/or the number of the groups of groups,
for each color indication value belonging to the difference color or the interference color, detecting whether the total number of the same color indication values continuously appearing in front of and behind the color indication value is smaller than a preset value, if so, determining that the color indication value meets the preset filtering rule.
15. The method of claim 12, wherein determining the two-dimensional region to be measured in the first optimized VGA digital model comprises:
Determining a target row and a target column of the color indication value belonging to the different colors in the first optimized VGA digital model;
and determining a two-dimensional area formed by the target row and the target column as a two-dimensional area to be measured.
16. The method of claim 12, wherein detecting whether each column of color indication values of the two-dimensional region to be measured meets a preset offset determination rule comprises:
for each column of color indication values of the two-dimensional area to be detected, detecting whether the number of the color indication values belonging to the difference color in the column of color indication values is smaller than a preset number threshold value, and if so, determining that the column of color indication values accords with the preset deviation judging rule; or alternatively, the first and second heat exchangers may be,
and for each column of color indication values of the two-dimensional area to be detected, detecting whether the duty ratio of the color indication value belonging to the difference color in the column of color indication values is smaller than a preset proportion threshold value, and if so, determining that the column of color indication values accords with the preset offset judgment rule.
17. The method of claim 12, wherein performing filtering processing on each column of color indication values that meet the preset offset determination rule comprises:
And for each column of color indication values conforming to the preset offset judgment rule, adjusting each color indication value belonging to the different color in the column of color indication values so that each color indication value in the column of color indication values belongs to the main color.
18. The method of claim 12, wherein performing an integration process on each column of color indication values that do not meet the preset offset determination rule comprises:
and for each column of color indication values which do not accord with the preset offset judgment rule, adjusting each color indication value belonging to the main color in the column of color indication values so that each color indication value in the column of color indication values belongs to the difference color.
19. The method of claim 12, wherein deriving the color patch position information and the color patch area information from the difference region comprises:
acquiring the output frequency of the upper computer to VGA signals and the sampling frequency of the VGA signal acquisition device to VGA signals;
determining equal-proportion conversion information according to the output frequency and the sampling frequency;
acquiring row and column information of a starting point and row information of an ending point of the difference region;
And calculating the color block position information and the color block area information according to the equal proportion conversion information, the row and column information of the starting point and the row and column information of the ending point.
20. The VGA interface testing device is characterized in that a VGA interface and a data transmission interface are arranged on the device, and the device is connected with a VGA signal acquisition device through the VGA interface and the data transmission interface; the device comprises:
the signal output module is used for outputting VGA signals of a target VGA picture to the VGA signal acquisition device through the VGA interface; the target VGA picture comprises color blocks;
the data receiving module is used for receiving VGA signal sampling data obtained by sampling the VGA signal by the VGA signal acquisition device through the data transmission interface;
the model building module is used for building a VGA digital model according to the VGA signal sampling data;
the analysis module is used for analyzing and obtaining color block position information and color block area information which respectively represent the position and the area of the color block in the target VGA picture according to the VGA digital model;
the test result determining module is used for determining a test result of the VGA interface according to the color block position information and the color block area information;
The test result determining module is specifically configured to:
acquiring preset position information and preset area information respectively representing the position and the area of the color block in the target VGA picture;
calculating a position difference degree according to the preset position information and the color block position information;
calculating area difference degree according to the preset area information and the color lump area information;
when the position difference degree and the area difference degree do not exceed a preset difference threshold, determining that the test result of the VGA interface is test passing;
and when the position difference degree or the area difference degree exceeds a preset difference threshold, determining that the test result of the VGA interface is that the test fails.
21. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 19 when the computer program is executed.
22. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 19.
CN202310604306.7A 2023-05-26 2023-05-26 VGA interface testing method, VGA interface testing device, computer equipment and storage medium Active CN116382993B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310604306.7A CN116382993B (en) 2023-05-26 2023-05-26 VGA interface testing method, VGA interface testing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310604306.7A CN116382993B (en) 2023-05-26 2023-05-26 VGA interface testing method, VGA interface testing device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116382993A CN116382993A (en) 2023-07-04
CN116382993B true CN116382993B (en) 2023-08-15

Family

ID=86975386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310604306.7A Active CN116382993B (en) 2023-05-26 2023-05-26 VGA interface testing method, VGA interface testing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116382993B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843575A (en) * 2011-06-22 2012-12-26 鸿富锦精密工业(深圳)有限公司 VGA (Video Graphics Array) port test device and test method thereof
KR101609353B1 (en) * 2014-12-05 2016-04-21 전주대학교 산학협력단 Interface method and device for controlling screen
CN106713904A (en) * 2016-12-20 2017-05-24 郑州云海信息技术有限公司 VGA interface test method, apparatus and system
CN114066823A (en) * 2021-10-27 2022-02-18 随锐科技集团股份有限公司 Method for detecting color block and related product thereof
CN115048252A (en) * 2022-06-16 2022-09-13 江苏航天龙梦信息技术有限公司 VGA display effect test method based on digital image
CN115866153A (en) * 2022-11-24 2023-03-28 珠海奔图电子有限公司 Image color correction method, device, storage medium and image forming device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554488B (en) * 2015-12-07 2017-10-27 深圳市华星光电技术有限公司 Signal conversion method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843575A (en) * 2011-06-22 2012-12-26 鸿富锦精密工业(深圳)有限公司 VGA (Video Graphics Array) port test device and test method thereof
KR101609353B1 (en) * 2014-12-05 2016-04-21 전주대학교 산학협력단 Interface method and device for controlling screen
CN106713904A (en) * 2016-12-20 2017-05-24 郑州云海信息技术有限公司 VGA interface test method, apparatus and system
CN114066823A (en) * 2021-10-27 2022-02-18 随锐科技集团股份有限公司 Method for detecting color block and related product thereof
CN115048252A (en) * 2022-06-16 2022-09-13 江苏航天龙梦信息技术有限公司 VGA display effect test method based on digital image
CN115866153A (en) * 2022-11-24 2023-03-28 珠海奔图电子有限公司 Image color correction method, device, storage medium and image forming device

Also Published As

Publication number Publication date
CN116382993A (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN101771823B (en) Image processing apparatus, image capture apparatus, image output apparatus, and method for these apparatus
WO2020173177A1 (en) Object color difference defect detection method, device, computer device, and storage medium
US7936377B2 (en) Method and system for optimizing an image for improved analysis of material and illumination image features
CN108234824B (en) Shadow correction detection parameter determination method, shadow correction detection device, storage medium and fisheye camera
CN115082400B (en) Image processing method, device, computer equipment and readable storage medium
CN103828345A (en) Apparatus, method, and program for image processing, storage medium, and image pickup apparatus
US4963828A (en) Picture quality testing method and apparatus for color cathode-ray tube
US11228723B2 (en) Pixel correction
CN110740314B (en) Method and system for correcting defective pixel of color line array camera
CN115063342A (en) Lens dead pixel detection method and device, electronic equipment and storage medium
CN113039577A (en) Product testing method and device, computer readable storage medium and electronic equipment
CN113362270A (en) Method and device for monitoring abnormal display of display screen picture
CN116382993B (en) VGA interface testing method, VGA interface testing device, computer equipment and storage medium
US8019153B2 (en) Wide luminance range colorimetrically accurate profile generation method
CN114119842B (en) Rendering method and system based on SSIM (structural similarity) and PSNR (Peak Signal to noise ratio) algorithm and computer readable storage medium
CN112801112B (en) Image binarization processing method, device, medium and equipment
CN115546141A (en) Small sample Mini LED defect detection method and system based on multi-dimensional measurement
CN118175282B (en) Color reproduction test method, system and storage medium
CN114788266A (en) Method, device and system for analyzing and displaying video color gamut and computer equipment
KR102655139B1 (en) Camera module false feature classification method and system according to image segmentation inspection
JP7106318B2 (en) Image processing device, image processing method and program
CN109255765B (en) Remote sensing image color correction method based on image type analysis
TW201424343A (en) Method and apparatus for testing video signals
JP2807031B2 (en) Color image signal evaluation method and color image signal evaluation apparatus using this evaluation method
JP2948291B2 (en) Evaluation device for color image signal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant