WO2017092341A1 - 一种测试方法和装置 - Google Patents
一种测试方法和装置 Download PDFInfo
- Publication number
- WO2017092341A1 WO2017092341A1 PCT/CN2016/089350 CN2016089350W WO2017092341A1 WO 2017092341 A1 WO2017092341 A1 WO 2017092341A1 CN 2016089350 W CN2016089350 W CN 2016089350W WO 2017092341 A1 WO2017092341 A1 WO 2017092341A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- pixel
- determining
- chromaticity
- difference
- target image
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/04—Diagnosis, testing or measuring for television systems or their details for receivers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/02—Diagnosis, testing or measuring for television systems or their details for colour television signals
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30168—Image quality inspection
Definitions
- the present invention relates to the field of information technology, and in particular, to a test method and apparatus.
- VR Virtual Reality
- the helmet display As a virtual reality display device, the helmet display has the characteristics of small size and strong sealing, and has wide applications in military training, virtual driving, virtual city and other projects.
- the display principle of the VR helmet is that the left and right eye screens respectively display images with different left and right eyes, so that the human eye can obtain such a difference information and generate a stereoscopic feeling in the mind.
- the inventors have found that since the screen lens has different refractive indexes for different wavelengths, the image formed by the screen lens will cause dispersion phenomenon, thereby reducing the image quality observed by the human eye and affecting the image.
- the user's visual experience requires designing an algorithm and pre-processing the VR image output by the VR helmet and the image before the screen lens by using a software method, thereby reducing the dispersion error of the image caused by the lens and improving the user experience.
- the embodiment of the invention provides a testing method and device for solving the defect that the preprocessing algorithm cannot obtain the preprocessing result of the preprocessing algorithm for the VR image, so as to implement the preprocessing of the preprocessing algorithm. Fruit test.
- the embodiment of the invention provides a testing method, including:
- the target image is an image formed by a preset pre-processing algorithm outputted to the screen after the lens, and the preset pre-processing algorithm is used in the virtual reality helmet Image is preprocessed;
- a degree of dispersion of the target image is determined according to the ratio.
- An embodiment of the present invention provides a testing apparatus, including:
- a first determining unit configured to determine a number of dispersive pixel points in the target image; wherein the target image is an image that is output by the preset pre-processing algorithm to the screen and is processed by the lens, and the preset pre-processing algorithm Used to preprocess images in a virtual reality helmet;
- a second determining unit configured to determine, according to the number of the scattered pixel points, a ratio of the dispersed pixel point to a total pixel point of the target image
- a third determining unit configured to determine a degree of dispersion of the target image according to the ratio.
- Embodiments of the present invention provide a computer program comprising computer readable code that, when executed on an electronic device, causes the electronic device to perform the test method described above.
- Embodiments of the present invention provide a computer readable medium in which the above computer program is stored.
- a test method and apparatus may determine a dispersion degree of a target image according to a ratio of pixel points of an entire target image occupied by a dispersive pixel point, because the dispersive pixel point is caused by dispersion, Therefore, it can be considered that the larger the proportion of the dispersed pixel points, the greater the dispersion degree of the target image, the less ideal the preset preprocessing algorithm; conversely, the smaller the proportion of the dispersive pixel points, the target image.
- the embodiment of the present invention can test the degree of dispersion of the image formed by the screen lens and the preset preprocessing algorithm, that is, the pre-processing result of the pre-processing algorithm can be tested.
- FIG. 1 is a flow chart showing the steps of a first embodiment of a testing method according to the present invention
- FIG. 2 is a flow chart of steps of a second embodiment of a testing method according to the present invention.
- FIG. 3 is a schematic diagram of a black and white checkerboard image formed by a screen lens after preprocessing by a preset preprocessing algorithm according to the present invention
- FIG. 4 is a schematic structural view of a first embodiment of a testing device according to the present invention.
- FIG. 5 is a schematic structural diagram of Embodiment 2 of a testing apparatus according to the present invention.
- FIG. 6 is a schematic structural view of a third embodiment of a testing device according to the present invention.
- Figure 7 shows schematically a block diagram of an electronic device for performing the method according to the invention.
- Fig. 8 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
- FIG. 1 a flow chart of a first embodiment of a test method of the present invention is shown, which may specifically include:
- Step 101 Determine a number of dispersive pixel points in the target image, where the target image is an image that is output by the preset pre-processing algorithm to the screen and is processed by the lens, and the preset pre-processing algorithm is used to The image in the realistic helmet is preprocessed;
- the embodiment of the present invention can be applied to the field of VR technology, and is used for testing the chromaticity of the VR helmet outputted by the preset preprocessing algorithm and passing through the screen lens.
- the specific process may include: the VR helmet generates a virtual VR. After the image is processed by the preset pre-processing algorithm, the VR image is processed and output to the screen lens, and then passed through the screen lens to become a target image that can be acquired by the user. In the embodiment of the present invention, the degree of dispersion of the target image is tested.
- the preset pre-processing algorithm may specifically be an algorithm for eliminating or compensating for chromatic dispersion according to factors such as screen size, resolution, and related parameters of the screen lens, for example, a pulsar achromatic dispersion algorithm, and a coherence.
- the apochromatic algorithm, the fiber polarization mode dispersion compensation algorithm and the like are not specifically limited in the embodiment of the present invention.
- the dispersing pixel point may specifically be a pixel point in the target image that is different from the color of the pixel point in the target image in the case where the dispersion is not generated in an ideal state, for example, the target image is a black and white checkerboard image.
- the color of the pixel points in the target image includes: black and white; then the pixel points distinguished from the above two colors in the target image are dispersion pixel points, wherein, different from the above
- the black and white colors may include red, orange, pink, green, blue, purple, and yellow colors.
- Step 102 Determine, according to the number of the scattered pixel points, a ratio of the dispersed pixel point to a total pixel point of the target image;
- the ratio of the dispersive pixel points to the total pixel points of the target image may be determined by using the following formula (1):
- the P may represent a ratio of the dispersive pixel points to a total pixel point of the target image; the C may represent the number of the dispersive pixel points; the W may represent a width of the target image; A height of the target image may be represented; the W x H may represent a total pixel point of the target image.
- Step 103 Determine a degree of dispersion of the target image according to the ratio.
- the ratio of the above-mentioned dispersion pixel points to the total pixel points of the target image it may be determined that the degree of dispersion of the target image is smaller; when the above-mentioned dispersion pixel points occupy the target image The larger the ratio of the total pixel points, the greater the degree of dispersion of the target image.
- the degree of dispersion of the target image may be determined according to the ratio of the pixel points of the overall target image occupied by the dispersive pixel points. Since the dispersive pixel points are caused by dispersion, it may be considered that the dispersive pixel points are The larger the proportion, the larger the dispersion degree of the target image, the less ideal the pre-processing algorithm is. The smaller the proportion of the dispersion pixel is, the smaller the dispersion of the target image is.
- the pre-processing algorithm is more ideal; therefore, the embodiment of the present invention can test the degree of dispersion of the image formed by the screen lens and the pre-processing algorithm, that is, the pre-processing result of the pre-processing algorithm can be implemented. Test.
- FIG. 2 a flow chart of the steps of the second embodiment of the testing method of the present invention is shown.
- Step 201 traverse the pixel points in the target image, and determine whether the current pixel point is a dispersive pixel point;
- Step 202 Count the number of dispersive pixel points in the target image to obtain a target image.
- Step 203 Determine, according to the number of the scattered pixel points, a ratio of the dispersed pixel point to a total pixel point of the target image;
- Step 204 Determine a degree of dispersion of the target image according to the ratio.
- the step of determining the number of the scattered pixel points in the target image is refined by the step 201 and the step 202, so that whether or not the dispersion of all the pixel points of the target image can be performed is performed.
- the determination of the pixel points which in turn determines the dispersion pixel points in the target avatar, and obtains the number of dispersion pixel points in the target avatar.
- the step of determining whether the current pixel point is a dispersive pixel point may specifically include:
- Step S1 determining a chromaticity of the current pixel point according to values of red R, green G, and blue B of the current pixel point;
- Step S2 determining whether the difference between the chromaticity of the current pixel and the target chromaticity is greater than a first difference threshold; wherein the target chromaticity is a color of the pixel in the case where the target image is in an ideal state and no chromatic dispersion is generated. degree;
- Step S3 When the difference between the chromaticity of the current pixel and the target chromaticity is greater than the first difference threshold, determine that the current pixel is a dispersive pixel.
- the first difference threshold is 10°
- the pixel is not red, that is, the pixel is red, that is, the target chromaticity is 0°
- the values of the red, green, and blue B of the current pixel are determined to be 9°, and the difference between the chromaticity of the current pixel and the target chromaticity is: 9°, that is, If the difference between the chromaticity of the current pixel and the target chromaticity of 0° is less than 10°, it may be determined that the current pixel is a non-dispersive pixel; if the values of the red, green, and blue B of the current pixel are Determined current pixel
- the chromaticity of the point is 19°
- the difference between the chromaticity of the current pixel and the target chromaticity is: 19°, that is, the difference between the chromaticity of the current pixel and the target chromaticity of 0°
- first difference threshold value is only one example of the first difference threshold value in the embodiment of the present invention, and is not understood as a limitation on the first difference threshold value in the embodiment of the present invention.
- the first difference threshold may be any other value, for example, 9°, 11°, 13°, etc., and the first difference threshold is not specifically limited in the embodiment of the present invention.
- the step of determining the chrominance of the current pixel point according to the values of the red, green, and blue B of the current pixel point may specifically include:
- Step A1 determining a maximum value and a minimum value among three values of red R, green G, and blue B of the current pixel point;
- the maximum value and the minimum value among the three values of red R, green G, and blue B of the current pixel point may be determined by the following formula (2) and formula (3);
- the Max may represent a maximum value of three values of red R, green G, and blue B of the current pixel
- Min may represent a minimum value of three values of red R, green G, and blue B of the current pixel
- (R, G, B) can represent the maximum of the three values of red R, green G, and blue B
- MIN (R, G, B) to represent the three values of red R, green G, and blue B Minimum value.
- Step A2 if the difference between the maximum value and the minimum value is less than the second difference threshold, the chromaticity of the pixel is 0°;
- the second difference threshold is 10, if the current pixel The point (R, G, B) is the pixel point A (220, 220, 220), and the maximum value of the three values of the red R, the green G, and the blue B is 220, and the minimum value is 220, and the maximum value is The difference from the minimum value is 0, which is smaller than the second difference threshold 10, so that the chromaticity of the current pixel point can be determined to be 0°; if the current pixel point (R, G, B) is the pixel point Q (215, 214, 210), the maximum value of the three values of red R, green G, and blue B is 215, and the minimum value is 210, and the difference between the maximum value and the minimum value is 5, which is smaller than the second difference.
- the value threshold is 10, so it can be determined that the chrominance of the current pixel is 0°.
- the foregoing second difference threshold value is only one example of the second difference threshold value in the embodiment of the present invention, and is not understood as a limitation on the second difference threshold value in the embodiment of the present invention.
- the second difference threshold may be any other value, for example, 9°, 11°, 13°, etc., and the second difference threshold is not specifically limited in the embodiment of the present invention.
- Step A3 If the maximum value is R and G is greater than or equal to B, the chromaticity of the pixel may be determined by using a first determining manner;
- the step of determining the chromaticity of the pixel by using the first determining manner may specifically include:
- Step A31 calculating a difference between the G and B, and a difference between the maximum value and the minimum value
- Step A32 Calculate a first ratio between the first difference between the G and B and the second difference between the maximum value and the minimum value;
- Step A33 calculating a first product of the first ratio and 60°
- Step A34 determining that the first product is the chromaticity of the pixel
- the chromaticity of the pixel point may be determined by using the following formula (4):
- H 1 may represent a chromaticity of the pixel when the maximum value is R and G is greater than or equal to B;
- the current pixel point (R, G, B) is the pixel point W (230, 45, 10)
- the chromaticity of the above pixel point W (230, 45, 10) is:
- Step A4 if the maximum value is R and G is less than B, the chromaticity of the pixel point may be determined by using a second determining manner;
- the step of determining the chromaticity of the pixel by using the second determining manner may specifically include:
- Step A41 Calculate a difference between the G and B, and a difference between the maximum value and the minimum value;
- Step A42 Calculate a first ratio between the first difference between the G and B and the second difference between the maximum value and the minimum value;
- Step A43 calculating a first product of the first ratio and 60°
- Step A44 determining that the sum of the first product and 360° is the chromaticity of the pixel
- the chromaticity of the pixel point may be determined by using the following formula (5):
- H 2 may represent a chromaticity of the pixel point when the maximum value is R and G is less than B;
- the current pixel point (R, G, B) is a pixel point T (230, 10, 45)
- the maximum of the three values of red R, green G, and blue B is R230
- the minimum value is G10
- G10 is less than B45
- the chromaticity is:
- Step A5 If the maximum value is G, the chromaticity of the pixel may be determined by a third determining manner;
- the step of determining the chromaticity of the pixel by using the third determining manner may specifically include:
- Step A51 Calculate a difference between the B and R, and a difference between the maximum value and the minimum value;
- Step A52 Calculate a second ratio between the third difference between the B and R and the second difference between the maximum value and the minimum value;
- Step A53 calculating a second product of the second ratio and 60°
- Step A54 determining that the sum of the second product and 120° is the chromaticity of the pixel
- the chromaticity of the pixel point may be determined by using the following formula (6):
- H 3 may represent a chromaticity of the pixel when the maximum value is G;
- the current pixel point (R, G, B) is the pixel point Y (10, 230, 45)
- the minimum value is R10
- the chromaticity of the above pixel point Y (10, 230, 45) is:
- Step A6 If the maximum value is B, the chromaticity of the pixel may be determined by using a fourth determining manner:
- the step of determining the chromaticity of the pixel by using the fourth determining manner may specifically include:
- Step A61 calculating a difference between the R and the G, and a difference between the maximum value and the minimum value
- Step A62 Calculate a third ratio between the fourth difference between the R and G and the second difference between the maximum value and the minimum value;
- Step A63 calculating a third product of the third ratio and 60°
- Step A64 determining that the sum of the third product and 240° is the chromaticity of the pixel
- the chromaticity of the pixel point may be determined by using the following formula (7):
- the current pixel point (R, G, B) is the pixel point X (10, 45, 230)
- the chromaticity of the above pixel point Y (10, 230, 45) is:
- the target image may specifically be a black and white checkerboard image.
- the black and white checkerboard image since the ideal state, that is, the case where no dispersion occurs, the black and white checkerboard image has only two colors of black and white. There is no other color, so it is convenient to observe and find the scattered pixel points in the image after the dispersion of the black and white checkerboard image occurs;
- the black and white checkerboard image is symmetrical in the horizontal and vertical directions, it is at the black and white boundary. The place is easy to observe the dispersion, and is convenient for subsequent evaluation and the like; in the embodiment of the present invention, it is recommended that the black and white grids have the same size, are square, and the whole black and white checkerboard image is also a square black and white checkerboard image.
- FIG. 3 a schematic diagram of a black and white checkerboard image formed by a screen lens after preprocessing by a preset preprocessing algorithm is illustrated.
- the acquired image in an ideal state, should be a black and white checkerboard, that is, only pixels having a color of black and white; traversing the pixels in the black and white checkerboard to determine other than black and white.
- the pixel of the color is a dispersive pixel, the number of the dispersive pixel is counted, and the ratio of the above-mentioned dispersive pixel to the total pixel of the whole black and white checkerboard image is calculated, thereby testing the dispersion degree of the black and white checkerboard to evaluate the above pre Set the advantages and disadvantages of the preprocessing algorithm.
- FIG. 4 a schematic structural diagram of a first embodiment of a test apparatus according to the present invention is shown, which may include: a first determining unit 401, a second determining unit 402, and a third determining unit 403;
- the first determining unit 401 may be configured to determine a number of the scattered pixel points in the target image, where the target image is an image that is output by the preset preprocessing algorithm to the screen and is formed by the lens, and the preset is The preprocessing algorithm is used to preprocess the image in the virtual reality helmet;
- the second determining unit 402 is configured to determine, according to the number of the scattered pixel points, a ratio of the dispersed pixel point to a total pixel point of the target image;
- a third determining unit 403 configured to determine a dispersion range of the target image according to the ratio degree.
- FIG. 5 a schematic structural diagram of a second embodiment of a test apparatus according to the present invention is shown, which may include: a first determining unit 501, a second determining unit 502, and a third determining unit 503;
- the first determining unit 501 may be configured to determine a number of the dispersed pixel points in the target image, where the target image is an image that is output by the preset preprocessing algorithm to the screen and is formed by the lens, and the preset is The preprocessing algorithm is used to preprocess the image in the virtual reality helmet;
- the second determining unit 502 is configured to determine, according to the number of the scattered pixel points, a ratio of the scattered pixel points to a total pixel point of the target image;
- the third determining unit 503 is configured to determine a degree of dispersion of the target image according to the ratio
- the first determining unit 501 may specifically include:
- the traversing sub-unit 5011 can be used to traverse the pixel points in the target image and determine whether the current pixel point is a dispersive pixel point;
- the counting subunit 5012 can be configured to count the number of dispersive pixel points in the target image to obtain the number of the dispersive pixel points in the target image.
- FIG. 6 a schematic structural diagram of a third embodiment of a test apparatus according to the present invention is shown, which may include: a first determining unit 601, a second determining unit 602, and a third determining unit 603;
- the first determining unit 601 may be configured to determine a number of dispersive pixel points in the target image, where the target image is an image that is output by the preset preprocessing algorithm to the screen and is formed by the lens, and the preset is The preprocessing algorithm is used to preprocess the image in the virtual reality helmet;
- the second determining unit 602 is configured to determine, according to the number of the scattered pixel points, a ratio of the scattered pixel points to a total pixel point of the target image;
- the third determining unit 603 is configured to determine a degree of dispersion of the target image according to the ratio
- the foregoing first determining unit 601 may specifically include:
- the traversing sub-unit 6011 can be used to traverse the pixel points in the target image and determine whether the current pixel point is a dispersive pixel point;
- a counting subunit 6012 configured to count the number of dispersive pixel points in the target image to obtain the number of the dispersive pixel points in the target image;
- the traversing sub-unit 6011 may specifically include:
- the chrominance determining module 60111 is configured to determine a chromaticity of the current pixel point according to values of red R, green G, and blue B of the current pixel point;
- the determining module 60112 may be configured to determine whether a difference between the chrominance of the current pixel and the target chromaticity is greater than a first difference threshold; wherein the target chromaticity is that the target image is in an ideal state without generating chromatic dispersion.
- the dispersive pixel point determining module 60113 may be configured to determine that the current pixel point is a dispersive pixel point when a difference between the chrominance of the current pixel point and the target chromaticity is greater than the first difference threshold;
- the chromaticity determining module 60111 may specifically include:
- the chrominance determining sub-module can be used to determine a maximum value and a minimum value of three values of red R, green G, and blue B of the current pixel point;
- the first chrominance calculation sub-module may be configured to determine that a chrominance of the pixel is 0° if a difference between the maximum value and the minimum value is less than a second difference threshold;
- a second chrominance calculation sub-module configured to determine, by the first determining manner, a chromaticity of the pixel point if the maximum value is R and G is greater than or equal to B;
- the third chrominance calculation sub-module may be configured to determine, according to the second determining manner, the chromaticity of the pixel point if the maximum value is R and G is less than B;
- the fourth chrominance calculation sub-module may be configured to determine, if the maximum value is G, the chromaticity of the pixel point by using a third determining manner;
- the fifth chrominance calculation sub-module may be configured to determine the chrominance of the pixel point by the fourth determining manner if the maximum value is B.
- the foregoing second chromaticity calculation sub-module may specifically include:
- a first calculation submodule configured to calculate a difference between the G and B, and a difference between the maximum value and the minimum value
- a second calculation submodule configured to calculate a first ratio between the first difference between the G and B and the second difference between the maximum and minimum values
- a third calculation submodule configured to calculate the first product of the first ratio and 60°
- the second determining submodule may be configured to determine that the first product is the chrominance of the pixel.
- the third chromaticity calculation sub-module may specifically include:
- a fourth calculation submodule configured to calculate a first ratio between the first difference between the G and B and the second difference between the maximum and minimum values
- a fifth calculation submodule configured to calculate the first product of the first ratio and 60°
- a third determining submodule configured to determine that the sum of the first product and 360° is the chromaticity of the pixel.
- the fourth chromaticity calculation sub-module may specifically include:
- a sixth calculation submodule configured to calculate a second ratio between the third difference between the B and R and the second difference between the maximum and minimum values
- a seventh calculation submodule configured to calculate the second ratio and the second product of 60°
- the fourth determining submodule may be configured to determine that the sum of the second product and 120° is the chromaticity of the pixel.
- the foregoing fifth chromaticity calculation sub-module may specifically include:
- An eighth calculation submodule configured to calculate a third ratio between the fourth difference between the R and G and the first difference between the maximum and minimum values
- a ninth calculation submodule which can be used to calculate a third product of the third ratio and 60°;
- a fifth determining submodule configured to determine that the sum of the third product and 240° is the chromaticity of the pixel.
- the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
- the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
- Figure 7 illustrates an electronic device, such as the VR helmet described above, that can be implemented in accordance with the present invention.
- the electronic device conventionally includes a processor 710 and a computer program product or computer readable medium in the form of a memory 720.
- Memory 720 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
- Memory 720 has a memory space 730 for program code 731 for performing any of the method steps described above.
- storage space 730 for program code may include various program code 731 for implementing various steps in the above methods, respectively.
- the program code can be read from or written to one or more computer program products.
- Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
- Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
- the storage unit may have a storage section, a storage space, and the like arranged similarly to the memory 720 in the electronic device of FIG.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit includes computer readable code 731', ie, code readable by a processor, such as 710, that when executed by an electronic device causes the electronic device to perform each of the methods described above step.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
本发明实施例提供一种测试方法和装置,其中的方法具体包括:确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;根据所述比例确定所述目标图像的色散程度。本发明实施例能够实现对预处理算法的预处理结果的测试。
Description
本申请要求在2015年12月3日提交中国专利局、申请号为201510883622.8、发明名称为“一种测试方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及信息技术领域,特别是涉及一种测试方法和装置。
VR(Virtual Reality,虚拟现实)头盔是最早的虚拟现实显示器,其可以利用头盔显示器将人的对外界的视觉、听觉封闭,引导用户产生一种身在虚拟环境中的感觉。头盔显示器作为虚拟现实的显示设备,具有小巧和封闭性强的特点,在军事训练,虚拟驾驶,虚拟城市等项目中具有广泛的应用。
VR头盔的显示原理是左右眼屏幕分别显示具有差异的、左右眼的图像,以使人眼获取这种带有差异的信息后在脑海中产生立体感。发明人在实现本发明的过程中发现:由于屏幕透镜对于不同波长的折射率不同,因此经屏幕透镜后所成的图像后会产生色散现象,从而降低了人眼观测到的图像质量,影响了用户的视觉体验,需要设计算法并利用软件的方法预先对VR头盔输出的VR图像、透过屏幕透镜之前的图像进行预处理,从而减少透镜所造成的图像的色散误差,提升用户体验。
目前存在多种预处理算法,但几乎所有的预处理算法都难以百分百消除色散,因而需要一种测试方法来测试上述各种预处理算法对VR图像的预处理结果,以比较上述各种算法的优劣。
发明内容
本发明实施例提供一种测试方法和装置,用以解决现有方法无法获得预处理算法对VR图像的预处理结果的缺陷,以实现对预处理算法的预处理结
果的测试。
本发明实施例提供一种测试方法,包括:
确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;
依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;
根据所述比例确定所述目标图像的色散程度。
本发明实施例提供一种测试装置,包括:
第一确定单元,用于确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;
第二确定单元,用于依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;及
第三确定单元,用于根据所述比例确定所述目标图像的色散程度。
本发明实施例提供一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在电子装置上运行时,导致所述电子装置执行上述的测试方法。
本发明实施例提供一种计算机可读介质,其中存储了上述的计算机程序。
综上,本发明实施例提供的一种测试方法和装置,可以根据色散像素点所占的整体目标图像的像素点的比例进而确定目标图像的色散程度,由于色散像素点是由于色散造成的,故可以认为,色散像素点所占的比例越大,所述目标图像的色散程度越大,则预设预处理算法越不理想;反之,色散像素点所占的比例越小,所述目标图像的色散程度越小,则预设预处理算法越理
想;因此本发明实施例可以据此对透过屏幕透镜所成的图像的色散程度及预设预处理算法的优劣进行测试,也即能够实现预处理算法的预处理结果的测试。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明的一种测试方法实施例一的步骤流程图;
图2为本发明的一种测试方法实施例二的步骤流程图;
图3为本发明一种虚拟现实头盔经过预设预处理算法预处理后、经过屏幕透镜所成的黑白棋盘格图像示意图;
图4为本发明的一种测试装置实施例一的结构示意图;
图5为本发明的一种测试装置实施例二的结构示意图;及
图6为本发明的一种测试装置实施例三的结构示意图;
图7示意性地示出了用于执行根据本发明的方法的电子装置的框图;以及
图8示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
方法实施例一
参照图1,示出了本发明的一种测试方法实施例一的步骤流程图,具体可以包括:
步骤101、确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;
本发明实施例可应用于VR技术领域中,用以对VR头盔经预设预处理算法输出、透过屏幕透镜后的图像的色散程度进行测试,其具体过程可以包括:VR头盔产生虚拟的VR图像后,利用预设预处理算法对VR图像进行相应的处理后输出至屏幕透镜,透过屏幕透镜后成为用户可以获取的目标图像,本发明实施例即对上述目标图像的色散程度进行测试。
本发明实施例中,上述预设预处理算法具体可以为根据屏幕尺寸、分辨率、屏幕透镜的相关参数等因素设计的、用于消除或者补偿色散的算法,例如:脉冲星消色散算法、相干消色散算法、光纤偏振模色散补偿算法等等算法,本发明实施例对上述预设预处理算法不做具体限制。
本发明实施例中,上述色散像素点具体可以为目标图像中区别于在理想状态、没有产生色散的情况下目标图像中的像素点颜色的像素点,例如:目标图像为黑白棋盘格图像,则在理想状态、没有产生色散的情况下,目标图像中的像素点的颜色包括:黑色和白色;则在目标图像中区别于上述两种颜色的像素点即为色散像素点,其中,区别于上述黑色和白色的颜色具体可以包括:红色、橙色、桃红色、绿色、蓝色,紫色、和黄色等等颜色。
步骤102、依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;
本发明实施例中,可以利用如下公式(1)确定所述色散像素点占所述目标图像的总像素点的比例:
其中,上述P可以表示所述色散像素点占所述目标图像的总像素点的比例;上述C可以表示所述色散像素点的数目;所述W可以表示所述目标图像的宽度;所述H可以表示所述目标图像的高度;所述W×H可以表示所述目标图像的总像素点。
步骤103、根据所述比例确定所述目标图像的色散程度。
本发明实施例中,当上述所述色散像素点占所述目标图像的总像素点的比例越小时,则可以确定目标图像的色散程度越小;当上述所述色散像素点占所述目标图像的总像素点的比例越大时,则可以确定目标图像的色散程度越大。
综上,本发明实施例中可以根据色散像素点所占的整体目标图像的像素点的比例进而确定目标图像的色散程度,由于色散像素点是由于色散造成的,故可以认为,色散像素点所占的比例越大,所述目标图像的色散程度越大,则预设预处理算法越不理想;反之,色散像素点所占的比例越小,所述目标图像的色散程度越小,则预设预处理算法越理想;因此本发明实施例可以据此对透过屏幕透镜所成的图像的色散程度及预设预处理算法的优劣进行测试,也即能够实现预处理算法的预处理结果的测试。
方法实施例二
参照图2,示出了本发明一种测试方法实施例二的步骤流程图,具体可以包括:
步骤201、遍历目标图像中的像素点,并判断当前像素点是否为色散像素点;
步骤202、对目标图像中色散像素点的数目进行计数,以得到目标图像
中的色散像素点的数目;
步骤203、依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;
步骤204、根据所述比例确定所述目标图像的色散程度。
相对于方法实施例一,本发明实施例通过步骤201和步骤202对确定目标图像中的色散像素点的数目的步骤进行了细化,以使得可以通过对目标图像的所有像素点进行是否为色散像素点的判断,继而确定目标头像中的色散像素点,并得到目标头像中的色散像素点的数目。
本发明的一种可选实施例中,上述判断当前像素点是否为色散像素点的步骤,具体可以包括:
步骤S1、根据当前像素点的红R、绿G、蓝B的值,确定当前像素点的色度;
步骤S2、判断当前像素点的色度与目标色度的差值是否大于第一差值阈值;其中,所述目标色度为目标图像在理想状态、没有产生色散的情况下的像素点的色度;
步骤S3、当当前像素点的色度与目标色度的差值大于所述第一差值阈值时,确定当前像素点为色散像素点。
在本发明的一种应用示例中,假设上述第一差值阈值为10°,假设目标图像在理想状态、没有产生色散的情况下的像素点为红色,即目标色度为0°;若根据当前的像素点的红R、绿G、蓝B的值,确定的当前像素点的色度为9°,则当前的像素点的色度与目标色度的差值为:9°,也即当前的像素点的色度与目标色度0°的差值小于10°,则可以确定当前像素点为非色散像素点;若根据当前的像素点的红R、绿G、蓝B的值,确定的当前像素
点的色度为19°,则当前的像素点的色度与目标色度的差值为:19°,也即当前的像素点的色度与目标色度0°的差值大于10°,则可以确定当前像素点为色散像素点。
可以理解,上述第一差值阈值为10°仅作为本发明实施例中第一差值阈值的一种示例,而不理解为是对本发明实施例中的第一差值阈值的一种限定,实际上,第一差值阈值还可以为其他任意值,例如:9°,11°,13°等等值,本发明实施例对第一差值阈值不做具体限定。
本发明的一种可选实施例中,上述根据当前像素点的红R、绿G、蓝B的值,确定当前像素点的色度的步骤,具体可以包括:
步骤A1、确定当前像素点的红R、绿G、蓝B三个值中的最大值及最小值;
本发明实施例中,可以通过下述公式(2)和公式(3)确定当前像素点的红R、绿G、蓝B三个值中的最大值及最小值;
Max=MAX(R,G,B) (2)
Min=MIN(R,G,B) (3)
其中,上述Max可以表示当前像素点的红R、绿G、蓝B三个值中的最大值;Min可以表示当前像素点的红R、绿G、蓝B三个值中的最小值;MAX(R,G,B)可以表示求红R、绿G、蓝B三个值中的最大值;MIN(R,G,B)以表示求红R、绿G、蓝B三个值中的最小值。
步骤A2、若所述最大值与所述最小值的差值小于第二差值阈值,则所述像素点的色度为0°;
在本发明的一种应用示例中,假设上述第二差值阈值为10,若当前像素
点(R,G,B)为像素点A(220,220,220),则上述红R、绿G、蓝B三个值中的最大值为220、最小值为220,则所述最大值与所述最小值的差值为0,小于第二差值阈值10,因此可以确定当前像素点的色度为0°;若当前像素点(R,G,B)为像素点Q(215,214,210),则上述红R、绿G、蓝B三个值中的最大值为215、最小值为210,则所述最大值与所述最小值的差值为5,小于第二差值阈值10,因此可以确定当前像素点的色度为0°。
可以理解,上述第二差值阈值为10°仅作为本发明实施例中第二差值阈值的一种示例,而不理解为是对本发明实施例中的第二差值阈值的一种限定,实际上,第二差值阈值还可以为其他任意值,例如:9°,11°,13°等等值,本发明实施例对第二差值阈值不做具体限定。
步骤A3、若所述最大值为R且G大于等于B,则可以通过第一确定方式确定所述像素点的色度;
在本发明的一种可选实施例中,上述通过第一确定方式确定所述像素点的色度的步骤,具体可以包括:
步骤A31、计算所述G与B的差值、及所述最大值与最小值的差值;
步骤A32、计算所述G与B的第一差值与所述最大值与最小值的第二差值之间的第一比值;
步骤A33、计算所述第一比值与60°的第一乘积;
步骤A34、确定所述第一乘积为所述像素点的色度;
本发明实施例中,若所述最大值为R且G大于等于B,可以利用如下公式(4)确定所述像素点的色度:
其中,上述H1可以表示若所述最大值为R且G大于等于B时的所述像素
点的色度;
在本发明的一种应用示例中,若当前像素点(R,G,B)为像素点W(230,45,10),则上述红R、绿G、蓝B三个值中的最大值为R230,最小值为B10,且G45大于等于B10,则上述像素点W(230,45,10)的色度为:
步骤A4、若所述最大值为R且G小于B,则可以通过第二确定方式确定所述像素点的色度;
在本发明的一种可选实施例中,上述通过第二确定方式确定所述像素点的色度的步骤,具体可以包括:
步骤A41、计算所述G与B的差值、及所述最大值与最小值的差值;
步骤A42、计算所述G与B的第一差值与所述最大值与最小值的第二差值之间的第一比值;
步骤A43、计算所述第一比值与60°的第一乘积;
步骤A44、确定所述第一乘积与360°的和为所述像素点的色度;
本发明实施例中,若所述最大值为R且G小于B,可以利用如下公式(5)确定所述像素点的色度:
其中,上述H2可以表示若所述最大值为R且G小于B时的所述像素点的色度;
在本发明的一种应用示例中,若当前像素点(R,G,B)为像素点
T(230,10,45),则上述红R、绿G、蓝B三个值中的最大值为R230,最小值为G10,且G10小于B45,则上述像素点T(230,10,45)的色度为:
步骤A5、若所述最大值为G,则可以通过第三确定方式确定所述像素点的色度;
在本发明的一种可选实施例中,上述通过第三确定方式确定所述像素点的色度的步骤,具体可以包括:
步骤A51、计算所述B与R的差值、及所述最大值与最小值的差值;
步骤A52、计算所述B与R的第三差值与所述最大值与最小值的第二差值之间的第二比值;
步骤A53、计算所述第二比值与60°的第二乘积;
步骤A54、确定所述第二乘积与120°的和为所述像素点的色度;
本发明实施例中,若所述最大值为G,可以利用如下公式(6)确定所述像素点的色度:
其中,上述H3可以表示若所述最大值为G时的所述像素点的色度;
在本发明的一种应用示例中,若当前像素点(R,G,B)为像素点Y(10,230,45),则上述红R、绿G、蓝B三个值中的最大值为G230,最小值为R10,则上述像素点Y(10,230,45)的色度为:
步骤A6、若所述最大值为B,则可以通过第四确定方式确定所述像素点的色度:
在本发明的一种可选实施例中,上述通过第四确定方式确定所述像素点的色度的步骤,具体可以包括:
步骤A61、计算所述R与G的差值、及所述最大值与最小值的差值;
步骤A62、计算所述R与G的第四差值与所述最大值与最小值的第二差值之间的第三比值;
步骤A63、计算所述第三比值与60°的第三乘积;
步骤A64、确定所述第三乘积与240°的和为所述像素点的色度;
本发明实施例中,若所述最大值为B,可以利用如下公式(7)确定所述像素点的色度:
在本发明的一种应用示例中,若当前像素点(R,G,B)为像素点X(10,45,230),则上述红R、绿G、蓝B三个值中的最大值为B230,最小值为R10,则上述像素点Y(10,230,45)的色度为:
一、本发明的一种可选实施例中,上述目标图像具体可以为黑白棋盘格图像,一方面,由于在理想状态、也即没有发生色散的情况下,黑白棋盘格图像只有黑白两种颜色,不存在其他色彩,因而便于观察和寻找黑白棋盘格图像发生色散后图像中的色散像素点;
另一方面,由于黑白棋盘格图像沿水平和垂直方向对称因而在黑白交界
的地方很容易观察到色散,便于后续的评价等处理;本发明实施例中推荐黑格和白格尺寸相同、均为正方形、且整幅黑白棋盘格图像也为正方形的黑白棋盘格图像。
参照图3,示出了本发明一种虚拟现实头盔经过预设预处理算法预处理后、经过屏幕透镜所成的黑白棋盘格图像示意图;
本发明实施例中,理想状态下,获取的图像应为黑白棋盘格,即只含有颜色为黑色、白色的像素点;对上述黑白棋盘格中的像素点进行遍历,确定除了黑色和白色以外的颜色的像素点为色散像素点,统计色散像素点的数目,并计算上述色散像素点占整幅黑白棋盘格图像的总像素的比例,以此测试上述黑白棋盘格的色散程度,以评价上述预设预处理算法的优劣。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
装置实施例一
参照图4,示出了本发明一种测试装置实施例一的结构示意图,具体可以包括:第一确定单元401、第二确定单元402及第三确定单元403;其中,
上述第一确定单元401,可以用于确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;
第二确定单元402,可以用于依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;
第三确定单元403,可以用于根据所述比例确定所述目标图像的色散程
度。
装置实施例二
参照图5,示出了本发明一种测试装置实施例二的结构示意图,具体可以包括:第一确定单元501、第二确定单元502及第三确定单元503;其中,
上述第一确定单元501,可以用于确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;
第二确定单元502,可以用于依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;
第三确定单元503,可以用于根据所述比例确定所述目标图像的色散程度;
其中,上述第一确定单元501,具体可以包括:
遍历子单元5011,可以用于遍历目标图像中的像素点,并判断当前像素点是否为色散像素点;
计数子单元5012,可以用于对所述目标图像中色散像素点的数目进行计数,以得到目标图像中的所述色散像素点的数目。
装置实施例三
参照图6,示出了本发明一种测试装置实施例三的结构示意图,具体可以包括:第一确定单元601、第二确定单元602及第三确定单元603;其中,
上述第一确定单元601,可以用于确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;
第二确定单元602,可以用于依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;
第三确定单元603,可以用于根据所述比例确定所述目标图像的色散程度;
其中,上述第一确定单元601,具体可以包括:
遍历子单元6011,可以用于遍历目标图像中的像素点,并判断当前像素点是否为色散像素点;
计数子单元6012,可以用于对所述目标图像中色散像素点的数目进行计数,以得到目标图像中的所述色散像素点的数目;
其中,上述遍历子单元6011,具体可以包括:
色度确定模块60111,可以用于根据当前像素点的红R、绿G、蓝B的值,确定当前像素点的色度;
判断模块60112,可以用于判断当前像素点的色度与目标色度的差值是否大于第一差值阈值;其中,所述目标色度为目标图像在理想状态、没有产生色散的情况下的像素点的色度;
色散像素点确定模块60113,可以用于当当前像素点的色度与目标色度的差值大于所述第一差值阈值时,确定当前像素点为色散像素点;
在本发明的一种可选实施例中,上述色度确定模块60111,具体可以包括:
色度确定子模块,可以用于确定当前像素点的红R、绿G、蓝B三个值中的最大值及最小值;
第一色度计算子模块,可以用于若所述最大值与所述最小值的差值小于第二差值阈值,则确定所述像素点的色度为0°;
第二色度计算子模块,可以用于若所述最大值为R且G大于等于B,则通过第一确定方式确定所述像素点的色度;
第三色度计算子模块,可以用于若所述最大值为R且G小于B,则通过第二确定方式确定所述像素点的色度;
第四色度计算子模块,可以用于若所述最大值为G,则通过第三确定方式确定所述像素点的色度;
第五色度计算子模块,可以用于若所述最大值为B,则通过第四确定方式确定所述像素点的色度。
在本发明的一种可选实施例中,上述第二色度计算子模块,具体可以包括:
第一计算子模块,可以用于计算所述G与B的差值、及所述最大值与最小值的差值;
第二计算子模块,可以用于计算所述G与B的第一差值与所述最大值与最小值的第二差值之间的第一比值;
第三计算子模块,可以用于计算所述第一比值与60°的第一乘积;
第二确定子模块,可以用于确定所述第一乘积为所述像素点的色度。
在本发明的一种可选实施例中,上述第三色度计算子模块,具体可以包括:
第四计算子模块,可以用于计算所述G与B的第一差值与所述最大值与最小值的第二差值之间的第一比值;
第五计算子模块,可以用于计算所述第一比值与60°的第一乘积;
第三确定子模块,可以用于确定所述第一乘积与360°的和为所述像素点的色度。
在本发明的一种可选实施例中,上述第四色度计算子模块,具体可以包括:
第六计算子模块,可以用于计算所述B与R的第三差值与所述最大值与最小值的第二差值之间的第二比值;
第七计算子模块,可以用于计算所述第二比值与60°的第二乘积;
第四确定子模块,可以用于确定所述第二乘积与120°的和为所述像素点的色度。
在本发明的一种可选实施例中,上述第五色度计算子模块,具体可以包括:
第八计算子模块,可以用于计算所述R与G的第四差值与所述最大值与最小值的第一差值之间的第三比值;
第九计算子模块,可以用于计算所述第三比值与60°的第三乘积;
第五确定子模块,可以用于确定所述第三乘积与240°的和为所述像素点的色度。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实
施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
例如,图7示出了可以实现根据本发明的电子装置,例如上述的VR头盔。该电子装置传统上包括处理器710和以存储器720形式的计算机程序产品或者计算机可读介质。存储器720可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器720具有用于执行上述方法中的任何方法步骤的程序代码731的存储空间730。例如,用于程序代码的存储空间730可以包括分别用于实现上面的方法中的各种步骤的各个程序代码731。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图8所述的便携式或者固定存储单元。该存储单元可以具有与图7的电子装置中的存储器720类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码731’,即可以由例如诸如710之类的处理器读取的代码,这些代码当由电子装置运行时,导致该电子装置执行上面所描述的方法中的各个步骤。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技
术方案的本质脱离本发明各实施例技术方案的精神和范围。
Claims (14)
- 一种测试方法,其特征在于,所述方法包括:确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;根据所述比例确定所述目标图像的色散程度。
- 根据权利要求1所述的方法,其特征在于,所述确定目标图像中的色散像素点的数目的步骤,包括:遍历目标图像中的像素点,并判断当前像素点是否为色散像素点;对所述目标图像中色散像素点的数目进行计数,以得到目标图像中的所述色散像素点的数目。
- 根据权利要求2所述的方法,其特征在于,所述判断当前像素点是否为色散像素点的步骤,包括:根据当前像素点的红R、绿G、蓝B的值,确定当前像素点的色度;判断当前像素点的色度与目标色度的差值是否大于第一差值阈值;其中,所述目标色度为目标图像在理想状态、没有产生色散的情况下的像素点的色度;当当前像素点的色度与目标色度的差值大于所述第一差值阈值时,确定当前像素点为色散像素点。
- 根据权利要求3所述的方法,其特征在于,所述根据当前像素点的红 R、绿G、蓝B的值,确定当前像素点的色度的步骤,包括:确定当前像素点的红R、绿G、蓝B三个值中的最大值及最小值;若所述最大值与所述最小值的差值小于第二差值阈值,则确定所述像素点的色度为0°;若所述最大值为R且G大于等于B,则通过第一确定方式确定所述像素点的色度;若所述最大值为R且G小于B,则通过第二确定方式确定所述像素点的色度;若所述最大值为G,则通过第三确定方式确定所述像素点的色度;若所述最大值为B,则通过第四确定方式确定所述像素点的色度。
- 根据权利要求4所述的方法,其特征在于,所述通过第一确定方式确定所述像素点的色度的步骤,包括:计算所述G与B的差值、及所述最大值与最小值的差值;计算所述G与B的第一差值与所述最大值与最小值的第二差值之间的第一比值;计算所述第一比值与60°的第一乘积;确定所述第一乘积为所述像素点的色度。
- 根据权利要求4所述的方法,其特征在于,所述通过第二确定方式确定所述像素点的色度的步骤,包括:计算所述G与B的第一差值与所述最大值与最小值的第二差值之间的第一比值;计算所述第一比值与60°的第一乘积;确定所述第一乘积与360°的和为所述像素点的色度。
- 根据权利要求4所述的方法,其特征在于,所述通过第三确定方式确定所述像素点的色度的步骤,包括:计算所述B与R的第三差值与所述最大值与最小值的第二差值之间的第二比值;计算所述第二比值与60°的第二乘积;确定所述第二乘积与120°的和为所述像素点的色度。
- 根据权利要求4所述的方法,其特征在于,所述通过第四确定方式确定所述像素点的色度的步骤,包括:计算所述R与G的第四差值与所述最大值与最小值的第一差值之间的第三比值;计算所述第三比值与60°的第三乘积;确定所述第三乘积与240°的和为所述像素点的色度。
- 一种测试装置,其特征在于,包括:第一确定单元,用于确定目标图像中的色散像素点的数目;其中,所述目标图像为预设预处理算法输出到屏幕上、经透镜后所成的图像,所述预设预处理算法用于对虚拟现实头盔中的图像进行预处理;第二确定单元,用于依据所述色散像素点的数目,确定所述色散像素点占所述目标图像的总像素点的比例;及第三确定单元,用于根据所述比例确定所述目标图像的色散程度。
- 根据权利要求9所述的装置,其特征在于,所述第一确定单元,包括:遍历子单元,用于遍历目标图像中的像素点,并判断当前像素点是否为色散像素点;及计数子单元,用于对所述目标图像中色散像素点的数目进行计数,以得到目标图像中的所述色散像素点的数目。
- 根据权利要求10所述的装置,其特征在于,所述遍历子单元,包括:色度确定模块,用于根据当前像素点的红R、绿G、蓝B的值,确定当前像素点的色度;判断模块,用于判断当前像素点的色度与目标色度的差值是否大于第一差值阈值;其中,所述目标色度为目标图像在理想状态、没有产生色散的情况下的像素点的色度;色散像素点确定模块,用于当当前像素点的色度与目标色度的差值大于所述第一差值阈值时,确定当前像素点为色散像素点。
- 根据权利要求11所述的装置,其特征在于,所述色度确定模块,包括:色度确定子模块,用于确定当前像素点的红R、绿G、蓝B三个值中的最大值及最小值;第一色度计算子模块,用于若所述最大值与所述最小值的差值小于第二差值阈值,则确定所述像素点的色度为0°;第二色度计算子模块,用于若所述最大值为R且G大于等于B,则通过第一确定方式确定所述像素点的色度;第三色度计算子模块,用于若所述最大值为R且G小于B,则通过第二确定方式确定所述像素点的色度;第四色度计算子模块,用于若所述最大值为G,则通过第三确定方式确 定所述像素点的色度;及第五色度计算子模块,用于若所述最大值为B,则通过第四确定方式确定所述像素点的色度。
- 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子装置上运行时,导致所述电子装置执行根据权利要求1-8中的任一个所述的测试方法。
- 一种计算机可读介质,其中存储了如权利要求13所述的计算机程序。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/249,859 US20170161583A1 (en) | 2015-12-03 | 2016-08-29 | Testing device and method thereof |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510883622.8 | 2015-12-03 | ||
| CN201510883622.8A CN105979252A (zh) | 2015-12-03 | 2015-12-03 | 一种测试方法和装置 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/249,859 Continuation US20170161583A1 (en) | 2015-12-03 | 2016-08-29 | Testing device and method thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017092341A1 true WO2017092341A1 (zh) | 2017-06-08 |
Family
ID=56988245
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/089350 Ceased WO2017092341A1 (zh) | 2015-12-03 | 2016-07-08 | 一种测试方法和装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20170161583A1 (zh) |
| CN (1) | CN105979252A (zh) |
| WO (1) | WO2017092341A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20210209741A1 (en) * | 2020-01-07 | 2021-07-08 | Pegatron Corporation | Light guide image processing method and apparatus |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106384118A (zh) * | 2016-10-24 | 2017-02-08 | 乐视控股(北京)有限公司 | 虚拟现实中确定色散程度的方法或装置 |
| CN108121068A (zh) * | 2016-11-30 | 2018-06-05 | 深圳市虚拟现实技术有限公司 | 虚拟现实头盔景深激光设置优化显示的方法及装置 |
| CN108022544B (zh) * | 2017-11-28 | 2021-05-25 | 中国电子技术标准化研究院 | 一种虚拟现实设备显示质量的检测方法及系统 |
| CN111340894B (zh) * | 2019-09-27 | 2023-07-14 | 杭州海康慧影科技有限公司 | 图像处理方法、装置和计算机设备 |
| CN111292222B (zh) * | 2020-01-22 | 2023-05-12 | 中国科学院新疆天文台 | 一种脉冲星消色散装置及方法 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1783207A (zh) * | 2004-12-01 | 2006-06-07 | 财团法人工业技术研究院 | 一种解决显示器色散的驱动装置 |
| CN101996617A (zh) * | 2010-11-15 | 2011-03-30 | 华映视讯(吴江)有限公司 | 减轻色序法显示器色分离的模式自动切换方法与系统 |
| US20120106847A1 (en) * | 2010-10-29 | 2012-05-03 | Qualcomm Incorporated | Systems and methods to improve feature generation in object recognition |
| US20140266985A1 (en) * | 2013-03-15 | 2014-09-18 | Lockheed Martin Corporation | System and method for chromatic aberration correction for an image projection system |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100349456C (zh) * | 2003-10-30 | 2007-11-14 | 光宝科技股份有限公司 | 影像色差补偿方法 |
| JP4864835B2 (ja) * | 2007-08-21 | 2012-02-01 | Kddi株式会社 | 色補正装置、方法及びプログラム |
| CN104754313B (zh) * | 2013-12-31 | 2017-09-29 | 联想(北京)有限公司 | 一种图像获取方法及电子设备 |
| CN104020565B (zh) * | 2014-06-19 | 2016-03-23 | 青岛歌尔声学科技有限公司 | 具有光学透镜和显示屏的显示系统及其图像显示方法 |
-
2015
- 2015-12-03 CN CN201510883622.8A patent/CN105979252A/zh active Pending
-
2016
- 2016-07-08 WO PCT/CN2016/089350 patent/WO2017092341A1/zh not_active Ceased
- 2016-08-29 US US15/249,859 patent/US20170161583A1/en not_active Abandoned
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1783207A (zh) * | 2004-12-01 | 2006-06-07 | 财团法人工业技术研究院 | 一种解决显示器色散的驱动装置 |
| US20120106847A1 (en) * | 2010-10-29 | 2012-05-03 | Qualcomm Incorporated | Systems and methods to improve feature generation in object recognition |
| CN101996617A (zh) * | 2010-11-15 | 2011-03-30 | 华映视讯(吴江)有限公司 | 减轻色序法显示器色分离的模式自动切换方法与系统 |
| US20140266985A1 (en) * | 2013-03-15 | 2014-09-18 | Lockheed Martin Corporation | System and method for chromatic aberration correction for an image projection system |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20210209741A1 (en) * | 2020-01-07 | 2021-07-08 | Pegatron Corporation | Light guide image processing method and apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| US20170161583A1 (en) | 2017-06-08 |
| CN105979252A (zh) | 2016-09-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017092341A1 (zh) | 一种测试方法和装置 | |
| JP7612723B2 (ja) | 眼追跡に基づく動的ディスプレイ較正 | |
| US10403036B2 (en) | Rendering glasses shadows | |
| CN108648254B (zh) | 一种图像渲染方法及装置 | |
| US10147390B2 (en) | Sub-pixel rendering method | |
| CN112954304B (zh) | 一种显示面板Mura缺陷评估方法 | |
| Machado et al. | Real‐time temporal‐coherent color contrast enhancement for dichromats | |
| CN112241933A (zh) | 人脸图像处理方法、装置、存储介质及电子设备 | |
| WO2018019282A1 (zh) | 双目全景图像获取方法,装置及存储介质 | |
| CN104702929B (zh) | 修正图像交叠区的失真的方法、记录介质和执行装置 | |
| KR20100079532A (ko) | 색수차 검출 및 보정 방법, 이를 이용한 영상 처리 장치 및그 방법 | |
| Lai et al. | Computational models and experimental investigations of effects of balance and symmetry on the aesthetics of text-overlaid images | |
| JP2011059681A (ja) | 表示画像の調整方法およびコンピューター読み取り可能な記憶媒体 | |
| Hincapié-Ramos et al. | SmartColor: real-time color and contrast correction for optical see-through head-mounted displays | |
| WO2021017396A1 (zh) | 投影仪振镜测试单元图像的提取方法、装置及电子设备 | |
| CN111595554A (zh) | 测量方法、系统、装置及终端设备 | |
| US9508317B2 (en) | Display evaluation device, display evaluation method, and non-transitory computer readable medium | |
| CN104517264B (zh) | 图像处理方法及装置 | |
| CN108426702B (zh) | 增强现实设备的色散测量装置及方法 | |
| WO2017084424A1 (zh) | 液晶显示屏的色度调节方法和装置 | |
| Spencer et al. | Minimum required angular resolution of smartphone displays for the human visual system | |
| Wang et al. | The influence of chromatic aberration on demosaicking | |
| CN117979003A (zh) | 一种双目融合度的测试方法及测试系统 | |
| WO2015184971A1 (en) | Method and apparatus for generating human portrait material image | |
| TWI687898B (zh) | 影像正規化方法及影像處理裝置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16869654 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16869654 Country of ref document: EP Kind code of ref document: A1 |