A method and device for obtaining color test information of an optical device
By shooting and comparing test images and reference images of optical equipment, color detection is automatically completed, solving the problems of low and unreliable manual detection efficiency in the prior art, achieving efficient and accurate color detection, and improving user experience.
Patent Information
- Application Number
- CN202111484959.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-12-07
Smart Images

Figure CN114046882B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a technology for obtaining color test information of an optical device. Background Art
[0002] With the development and popularization of augmented reality technology, augmented reality devices (such as augmented reality glasses, augmented reality helmets, etc.) and other products with science fiction and avant-garde technology are gradually integrated into people's lives. An important factor affecting augmented reality devices is the optical equipment of augmented reality devices, but most of the devices of optical devices are optical components, which may be defective during the production process and are easily damaged during installation or even transportation. The defective or damaged optical components may cause the degree of color restoration of the image displayed by the optical device to deviate. The color detection of existing optical equipment is carried out manually, which has cumbersome procedures, low detection efficiency, and unreliable results. Summary of the invention
[0003] One object of the present application is to provide a method and device for obtaining color test information of an optical device.
[0004] According to one aspect of the present application, a method for obtaining color test information of an optical device is provided, which is applied to a computer device, wherein the optical device includes a display device, and the display device is used to present a corresponding test image. The method includes:
[0005] capturing, by a camera device, a captured image corresponding to the test image displayed by the optical device, wherein the test image includes one or more test color areas, each test color area being filled with a corresponding test color;
[0006] Acquire a reference image corresponding to the test image, wherein the reference image includes the one or more test color areas;
[0007] Color test information of the optical device is determined according to the captured image and the reference image.
[0008] According to another aspect of the present application, a device for acquiring color test information of an optical device is provided, wherein the optical device includes a display device, and the display device is used to present a corresponding test image. The device includes:
[0009] a module configured to capture an image corresponding to the test image displayed by the optical device through a camera device, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color;
[0010] A module 12 is used to obtain a reference image corresponding to the test image, wherein the reference image includes the one or more test color areas;
[0011] A module 3 is used to determine the color test information of the optical device according to the captured image and the reference image.
[0012] According to one aspect of the present application, a computer device is provided, wherein the device includes:
[0013] Processor; and
[0014] A memory arranged to store computer executable instructions, which when executed cause the processor to perform the steps of any of the methods described above.
[0015] According to one aspect of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored, characterized in that when the computer program / instruction is executed, the system performs the steps of any of the methods described above.
[0016] According to one aspect of the present application, a computer program product is provided, including a computer program / instruction, characterized in that the computer program / instruction implements the steps of any of the above methods when executed by a processor.
[0017] Compared with the prior art, the present application determines the corresponding color test result by comparing the color captured by the optical device with the reference image. The operation method is simple, the execution efficiency is high, the obtained results are accurate and reliable, and the user experience is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0019] Figure 1 A flow chart showing a method for obtaining color test information of an optical device according to an embodiment of the present application is shown;
[0020] Figure 2 The functional modules of a computer device according to another embodiment of the present application are shown;
[0021] Figure 3 An exemplary system is shown that can be used to implement the various embodiments described in this application.
[0022] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0023] The present application is described in further detail below in conjunction with the accompanying drawings.
[0024] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (eg, a central processing unit (CPU)), an input / output interface, a network interface and a memory.
[0025] Memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash memory. Memory is an example of a computer-readable medium.
[0026] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, Phase-Change Memory (PCM), Programmable Random Access Memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of random access memory (RAM), Read-Only Memory (ROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0027] The devices referred to in this application include but are not limited to user devices, network devices, or devices formed by integrating user devices and network devices through a network. The user devices include but are not limited to any mobile electronic products that can interact with users, such as smart phones, tablet computers, etc. The mobile electronic products can use any operating system, such as Android operating system, iOS operating system, etc. Among them, the network device includes an electronic device that can automatically perform numerical calculations and information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field Programmable Gate Array, FPGA), digital signal processors (Digital Signal Processor, DSP), embedded devices, etc. The network devices include but are not limited to computers, network hosts, single network servers, multiple network server sets or multiple servers. The cloud is composed of a large number of computers or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets. The network includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless self-organizing network (Ad Hoc network), etc. Preferably, the device may also be a program running on the user device, the network device, or a device formed by integrating the user device and the network device, the network device, the touch terminal, or the network device and the touch terminal through a network.
[0028] Of course, those skilled in the art should understand that the above-mentioned devices are only examples, and other existing or future devices that are applicable to the present application should also be included in the scope of protection of the present application and are included here by reference.
[0029] In the description of the present application, “plurality” means two or more, unless otherwise clearly and specifically defined.
[0030] Figure 1A method for obtaining color test information of an optical device according to one aspect of the present application is shown, which is applied to a computer device, wherein the optical device includes a display device, and the display device is used to present a corresponding test image. The method includes steps S101, S102, and S103. In step S101, a captured image corresponding to the test image displayed by the optical device is captured by a camera device, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color; in step S102, a reference image corresponding to the test image is obtained, wherein the reference image includes the one or more test color areas; in step S103, the color test information of the optical device is determined according to the captured image and the reference image. Here, the computer device includes but is not limited to a device for processing data, such as a user device or a network device, etc.; wherein the user device includes but is not limited to any electronic product that can perform human-computer interaction with a user, and the network device includes but is not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud composed of multiple servers. The optical device includes but is not limited to a display device for reflecting a corresponding image to the eye, wherein the optical device referred to in this application generally includes an optical device for displaying optical devices, such as a prism, a curved reflector, a Birdbath, an optical waveguide, and an LBS. The optical device may refer to an independent display optical device, or to a human-computer interaction device including the display optical device and an image source device, such as augmented reality glasses or an augmented display helmet, etc. Here, the image source device includes but is not limited to silicon-based liquid crystal, silicon-based OLED, DLP, microLED, etc.
[0031] Specifically, in step S101, a photographic device is used to photograph a photographic image corresponding to the test image displayed by the optical device, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color. For example, the computer device includes a corresponding photographic device for photographing a test image presented by the corresponding optical device through a display optical device, and the photographic device may be a built-in camera of the computer device, or an external photographic device, etc. The optical device stores a corresponding test image, and the test image may be downloaded by the optical device through a command, may be imported by a test user, may be sent to the optical device by a computer device through a communication connection with the optical device, or may be sent to the optical device by other devices through a corresponding communication connection, etc., and may also be generated locally in the optical device according to one or more test colors. The test image includes an image generated by one or more test colors according to a predetermined rule for presentation to an optical device to be tested, wherein the test image includes one or more test color areas, each test color area is filled with a single test color, wherein the area size and shape of the multiple test color areas are the same, for example, the corresponding test color areas are divided by the same square area in the test image, further, each test color area has the same area interval with the adjacent test color area, and there is no area overlap between the test color areas, etc. The number of corresponding captured images includes one or more, for example, a computer device obtains a captured image and calculates the color test information of the captured image according to a reference image, and for another example, a computer device obtains multiple captured images and calculates the color test information of each captured image according to the reference image, if the image test information of the corresponding multiple captured images includes a ratio of qualified images greater than or equal to a ratio threshold (or the number of images is greater than or equal to a number threshold, etc.), then the color test information of the corresponding optical device is determined to be qualified, etc. For another example, a computer device acquires a plurality of captured images, and extracts a certain number of captured images according to a specific rule (such as random extraction or interval extraction, etc.) from the plurality of captured images according to a preset rule, and determines the color test information of the corresponding optical device based on the extracted plurality of captured images and the reference image. After the optical device acquires the corresponding test image, the test image can be presented through a corresponding display optical device based on the user operation of the test user on the optical device, or the test image can be presented based on the image presentation instruction sent by the computer device, or the corresponding test image can be presented based on the image presentation instruction, or the image presentation instruction sent by the computer device, based on the image identification information of the test image contained in the image presentation instruction, etc. The one or more test colors can be corresponding standard color card colors, or can be selected by the computer device from the corresponding standard color card colors according to preset rules, or can be determined from a plurality of standard color card colors based on the input operation of the test user.
[0032] In some cases, in order to ensure that the test image presented by the optical device can form a more accurate comparison effect with the reference image during the shooting process, we usually need to limit the shooting conditions of the optical device and the camera device. In some embodiments, the computer device includes a corresponding fixing device, which is used to place the optical device, and the center of the display device of the optical device is aligned with the center of the camera device. For example, the computing device includes a corresponding fixing device for controlling the device posture of the corresponding optical device, and then controlling the relative posture of the optical device relative to the camera device, wherein the fixing device can be a device integrated with the computer device, or a fixing device separated from the computer, such as a fixture for fixing the device. In some cases, the test user fixes the optical device and the camera device on the fixing device by manual operation. In other cases, the computer device can send a corresponding posture adjustment instruction to the fixing device to adjust the posture information of the optical device and / or the camera device, thereby adjusting the relative posture information of the optical device relative to the camera device. In some cases, the corresponding computing device may obtain and present the relative posture information of the optical device in the corresponding fixture relative to the camera device, and assist the test user in adjusting the posture information of the optical device and / or the camera device in the fixture, etc. In order to better present the test image in the captured image, the center of the display optical device of the optical device in the fixture is usually aligned with the center of the camera device, for example, the center of the display optical device of the optical device (such as the center point of the display screen) and the center of the camera device (such as the optical axis of the camera device, etc.) are kept on the same horizontal line or the same vertical line, etc.
[0033] In addition, in the process of color testing of optical devices, in order to obtain more accurate and reliable test results, we also need to eliminate the interference of other off-site factors. In some embodiments, the optical device and the camera device are in the same mask space. For example, due to the difference in natural light at different time periods, the impact of shooting natural light at different time periods on shooting is also different, which has a certain impact on the color test results. The corresponding optical device and camera device are shielded by corresponding mask devices (for example, sunshades, etc.) to eliminate the influence of natural light or other lighting. The mask device can be manually placed by the test user, or it can communicate with a computer device and mask through the mask instructions of the computer device, or the mask device executes the mask instruction based on the user operation of the test user, so that the optical device and the camera device are in the same mask space.
[0034] In step S102, a reference image corresponding to the test image is obtained, wherein the reference image includes the one or more test color areas. There is no necessary order relationship between the execution of step S101 and the execution of step S102; in order to ensure the consistency of shooting conditions, the corresponding reference optical device presents the corresponding test image, and the test image displayed by the corresponding reference optical device is photographed by a camera device to obtain a reference image. For example, the shooting time of the reference image is consistent with the shooting time of the corresponding photographed image, such as the reference optical device determines the same relative posture information through other fixing devices of the same model, and photographs and obtains the reference image at the same time as the corresponding photographed image. For another example, the reference optical device and the corresponding optical device are photographed on the same fixing device to obtain the reference image, the photographed image, etc., and the corresponding reference image can be photographed first, or the corresponding photographed image can be photographed first, etc., which is not limited here. The reference optical device refers to an optical device that has passed the color detection, and the optical device can be an optical device that is flawless determined by manual screening, etc. Whether the color test of the optical device to be tested is qualified is determined by the reference image corresponding to the reference optical device. For example, in some embodiments, in step S102, a reference image corresponding to the test image displayed by the corresponding reference optical device is captured by a camera device, wherein the reference image includes the one or more test color areas, the reference optical device is placed on the fixture, and the center of the display device of the reference optical device is aligned with the center of the camera device. For example, the center of the display device of the reference optical device is aligned with the center of the corresponding camera device through the same fixture, so that the relative posture of the reference optical device and the camera device is the same as the relative posture of the optical device to be tested and the camera device. Furthermore, the reference optical device and the camera device are in the same mask space, so that the reference image obtained by capturing the reference optical device is in the same external environment as the captured image obtained by capturing the optical device to be tested, thereby avoiding environmental interference.
[0035] In step S103, the color test information of the optical device is determined according to the captured image and the reference image. For example, an image comparison is performed according to the captured image and the reference image, and the color test information of the optical device is determined based on the corresponding comparison result, wherein the color test information is used to indicate whether the optical device is qualified, such as whether the test is qualified or not. For example, the image comparison includes comparison of color parameters between images, for example, the average value or variance of the color pixel values of the RGB channels is used to determine the corresponding difference, and the difference is compared with a preset threshold value. If the difference is less than or equal to the preset threshold value, it is determined that the corresponding color test information includes a qualified test, and if the difference is greater than the preset threshold value, it is determined that the corresponding color test information includes a failed test, etc. Of course, those skilled in the art should understand that the above-mentioned image comparison method is only an example, and other existing or future image comparison methods that may appear, if applicable to the present application, should also be included in the scope of protection of the present application, and are hereby included by reference.
[0036] In some embodiments, the method further includes step S104 (not shown), in which the test image corresponding to one or more test colors is obtained; the test image is transmitted to the corresponding optical device so that the optical device presents the test image through the display device. For example, the corresponding one or more test colors can be predetermined, for example, pre-selected by the test user, or can be screened from a plurality of colors according to a preset rule, or one or more commonly used test colors determined according to big data statistics, or one or more test colors sent by other devices are received, etc. The corresponding computer device can generate a corresponding test image according to the one or more test colors, or the computer device receives a test image of one or more test colors sent by other devices, etc., and transmits the test image to the corresponding optical device.
[0037] In some embodiments, the test image corresponding to one or more test colors is obtained, including: obtaining one or more corresponding test colors, wherein the one or more test colors are included in the standard color card colors; generating the test image according to the one or more test colors, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color. For example, the computer device first obtains the corresponding one or more test colors, then generates the corresponding test image according to the one or more test colors, and transmits the test image to the corresponding optical device and the reference optical device, etc. Among them, the one or more test colors can be determined locally on the computer device, or the computer device can receive data sent by other devices to determine. After the computer device determines the one or more test colors, it generates the corresponding test image according to the one or more colors, for example, the number of pixels of the test image is fixed (the pixel length and pixel width of the image are fixed, etc.), and multiple test color areas and the area position of each test color area are determined according to the number of test colors, and the area position includes the corresponding area size and the area center position, etc. The corresponding area shape can be preset and fixed, such as square, rectangle, circle, etc., or it can be determined according to the number of colors for easy arrangement. After the computer device determines the corresponding test color areas, it fills each test color area with a test color. The specific test color filling order can be random or determined according to the color RGB value arrangement. The test colors are included in the standard color card colors, for example, 24 standard color cards, etc. In some embodiments, in order to reduce the calculation amount of color testing, six corresponding test colors can be selected. In some embodiments, the color card refers to a tool for color selection, comparison, communication and unification of color standards within a certain range.
[0038] In some embodiments, the obtaining of the corresponding one or more test colors includes: obtaining multiple scene images about a real scene, wherein the multiple scene images meet a preset condition; counting the number of pixels of each color in the multiple scene images, and taking the colors with the number of pixels in the multiple scene images arranged in the top N as the corresponding one or more test colors. For example, the computer device obtains multiple scene images related to the real scene, for example, the computer device receives multiple scene images about the real scene taken by any camera device, or the computer device crawls multiple scene images about the real scene from a network device, or the computer device imports multiple scene images from a storage device based on the import operation of the test user, or the computer device obtains multiple scene images about the real scene from other devices, etc. In order to make the test results applicable to complex and changeable real scenes, corresponding preset conditions are set for multiple scene images, for example, the image covers multiple real scenes as much as possible, that is, covers multiple actual application scenes as much as possible; for example, the image contains images under multiple lighting (for example, dark light, strong light, etc.); for example, the image of the same real scene contains images taken from multiple angles, etc.; for example, the number of images taken by each scene is kept consistent to ensure the universality of the test results for different types of real scenes. After the computer device obtains the corresponding multiple scene images, it counts the number of pixels of each color card color in the multiple scene images, sorts the color card colors according to the number of pixels, and takes the top N (N is a positive integer) color card colors as corresponding test colors, etc. For example, the top six color card colors are taken as test colors, and a test image containing six color test areas is generated.
[0039] In some embodiments, the preset conditions include but are not limited to: the number of scenes of the real scenes corresponding to the multiple scene images is greater than or equal to the preset number of scenes; the number of real scene images corresponding to each real scene in the multiple scene images is greater than or equal to the preset number of scene images; the number of real scene images corresponding to each real scene in the multiple scene images is the same; the real scene images corresponding to each real scene in the multiple scene images include at least two real scene images corresponding to different camera posture information; the real scene images corresponding to each real scene in the multiple scene images include at least two real scene images corresponding to different lighting information. For example, the preset conditions include that the number of scenes of the real scenes corresponding to the multiple scene images is greater than or equal to the preset number of scenes (for example, 5 or 10, etc.), so that the sources of the scene images are as wide and diverse as possible, avoiding the scene images of a single scene from having a more obvious bias in the color selection results, thereby causing deviations in the test results, etc. For example, the preset condition includes that the number of real scene images corresponding to each real scene in the multiple scene images is greater than or equal to the number of preset scene images (for example, 6 or 10, etc.). By obtaining scene images greater than or equal to the predetermined number in each real scene, the reliability of the data source in the data statistics is guaranteed, and the universality and reliability of the test color selection are improved. For example, the preset condition includes that the real scene image corresponding to each real scene in the multiple scene images includes at least two real scene images corresponding to different camera posture information. By obtaining scene images at multiple angles in the real scene, more comprehensive and reliable data in the real scene can be obtained, thereby ensuring the stability of the test results. For example, the preset condition includes that the real scene image corresponding to each real scene in the multiple scene images includes at least two real scene images corresponding to different lighting information, thereby eliminating the influence of different lighting conditions on the optical device, and improving the adaptability of the test results of the optical device under different lighting conditions. Here, the preset condition can be a combination of one or more of the above, etc., and this application is not limited.
[0040] In some embodiments, the pixel ratio of the test image presented in the display device of the optical device is greater than or equal to the first ratio threshold, and less than or equal to the second ratio threshold. For example, in order to ensure that the corresponding test image in the captured image acquired by the camera device is clear and complete enough, it is usually necessary to ensure that the pixel ratio of the test image in the display optical device is greater than or equal to the first ratio threshold (for example, the test image occupies 50% of the normal display area of the display optical device, etc.), and less than or equal to the second ratio threshold (for example, the test image occupies 80% of the normal display area of the display optical device, etc.). In some embodiments, the second ratio threshold can be 100%. Preferably, the test image is fixedly displayed in the center of the display optical device. Among them, the first ratio threshold is obviously less than the second ratio threshold.
[0041] In some embodiments, in step S103, image preprocessing is performed on the captured image and the reference image to determine a corresponding test captured image and a test reference image, wherein the test captured image includes a color pixel area corresponding to each test color of one or more test colors, and the test reference image includes a reference color pixel area corresponding to each test color of the one or more test colors; a test parameter corresponding to each test color is determined based on the color pixel area and the reference color pixel area; if the test parameter meets the corresponding test parameter threshold, it is determined that the corresponding color test information includes a passed test; if not, it is determined that the color test information includes a failed test. For example, after the computer device acquires the corresponding captured image and reference image, it can first perform relevant preprocessing on the captured image and the reference image (for example, smoothing and sharpening the image, or converting it into a required image mode, or selecting a suitable value range, etc.), and obtain the corresponding test captured image and test reference image, wherein the test captured image includes a color pixel area corresponding to each test color, wherein the color pixel area includes a pixel value range corresponding to the test color in the captured image, and the pixel value range can be all pixel areas of the test color in the captured image, or a partial area, etc. Similarly, the test reference image includes a reference color pixel area corresponding to each test color, wherein the reference color pixel area includes a pixel value range corresponding to the test color in the reference image, and the pixel value range can be all pixel areas of the test color in the reference image, or a partial area, etc.
[0042] After the computer device determines the corresponding test shooting image and the test reference image, the parameter value of the test parameter corresponding to each test color can be calculated according to the color pixel area of each test color and the corresponding reference color pixel area. For example, the variance, average, etc. of the pixel in different channels are calculated as the corresponding test parameter, and compared with the test parameter threshold. If the test parameter meets the corresponding test parameter threshold, it is determined that the optical device corresponding color test information includes a qualified test. In some cases, the test parameter meeting the corresponding test parameter threshold may mean that the test parameters corresponding to all test colors meet the specified threshold, or it may mean that the type / ratio of the test colors whose test parameters meet the specified threshold is greater than or equal to the preset type threshold / preset ratio threshold, etc., which is not limited here. In other cases, the test parameters corresponding to each test color include multiple parameters, and the test parameters corresponding to the corresponding test color meet the test parameter threshold may mean that each test parameter corresponding to the test color meets the specified threshold, or the type / ratio of the test parameters that meet the specified threshold among the multiple test parameters corresponding to the test color is greater than or equal to the preset type threshold / preset ratio threshold, etc. Correspondingly, if the test parameter does not meet the corresponding test parameter threshold, it is determined that the optical device corresponding color test information is a test failure.
[0043] In some embodiments, the image preprocessing includes but is not limited to: changing the corresponding image into a Lab image; taking a predetermined proportion area of each color area in one or more test color areas in the corresponding image as a color pixel area corresponding to each test color.
[0044] For example, in order to ensure the accuracy and efficiency of calculation, the preprocessing includes converting the captured image and the reference image into a Lab image, and then taking a predetermined proportion area (e.g., 50%) of each color area in one or more test color areas in the corresponding image as the color pixel area corresponding to each test color. For example, since the display position of the test image in the optical device and the relative position between the camera device and the optical device are fixed, the position and size of each test color in the captured image are also fixed. The computer device can select 50% of the area in the middle of each test color area in the corresponding Lab image (e.g., the center coordinates of the corresponding test color area, etc.) as the pixel value area according to the position information of each test color. For example, the captured image is converted into a Lab image, and the 50% area in the middle of each test color area in the corresponding Lab image is selected as the color pixel area of each test color. Similarly, the reference image is converted into a Lab image, and the 50% area in the middle of each test color area in the corresponding Lab image is selected as the reference color pixel area of each test color.
[0045] For example, the Lab image includes an image corresponding to the three color elements of the Lab color model, where L represents luminosity, which is equivalent to brightness and corresponds to the brightness channel image; a represents the range from red to green, corresponding to the red-green channel image; b represents the range from blue to yellow, corresponding to the yellow-blue channel image. The value range of L is from 0 to 100, and when L=50, it is equivalent to 50% black; the value ranges of a and b are both from +120 to -120, where +120a is red, and gradually transitions to -120a when it becomes green; in the same principle, +120b is yellow, and -120b is blue, and all colors can be composed by the interactive changes of these three values. In some embodiments, the image preprocessing includes changing the corresponding image into a Lab image, and the Lab image includes a brightness channel image, a red and green channel image, and a yellow and blue channel image; wherein, determining the test parameters corresponding to each test color according to the color pixel area and the reference color pixel area includes: determining the test parameters corresponding to each test color according to at least one of the brightness channel image, the red and green channel image, and the yellow and blue channel image corresponding to the color pixel area, and at least one of the brightness channel image, the red and green channel image, and the yellow and blue channel image corresponding to the reference color pixel area.
[0046] Here, according to at least one of the brightness channel image, the red and green channel image, and the yellow and blue channel image, at least one of the corresponding brightness difference, the red and green channel difference, and the yellow and blue channel difference can be calculated, so as to judge whether the test parameters corresponding to the multiple test colors meet the conditions according to the corresponding parameters and the preset parameter thresholds. If they meet the conditions, it is determined that the color test information of the optical device includes the qualified test. For example, the saturation of each test color can be calculated according to the red and green channel image and the yellow and blue channel image, and the color test information can be determined according to the saturation. For example, on the basis of the saturation, the color deviation of each test color can be calculated according to the red and green channel image and the yellow and blue channel image, and the color test information can be determined according to the color deviation. For example, the color deviation containing brightness of each test color can be calculated according to the brightness channel image, the red and green channel image, and the yellow and blue channel image, and the color test information can be determined according to the color difference deviation containing brightness. Here, the above determination of the test parameters corresponding to each test color is only an example and is not limited here. Specifically, in some embodiments, the test parameters include but are not limited to: saturation; color deviation without brightness; color deviation containing brightness.
[0047] For example, the saturation of each test color can be calculated and determined based on the color pixel area of the test color and the red and green channel images and the yellow and blue channel images corresponding to the reference color pixel area. The specific formula is as follows:
[0048]
[0049] Among them, a mean is the mean value of the red and green channels in the image captured by the optical device, b mean is the mean of the yellow and blue channels in the captured image, a_model mean is the mean of the red and green channels in the reference image corresponding to the reference optical device, b_model mean is the mean of the yellow and blue channels in the reference image.
[0050] Correspondingly, the color deviation without brightness of each test color can be calculated by the following formula:
[0051]
[0052] Wherein, sat is the saturation corresponding to the test color, and the color deviation excluding brightness is calculated based on the corresponding saturation.
[0053] Similarly, the color deviation including brightness of each test color is calculated by the following formula:
[0054] eabErr=sqrt((L mean -L_model mean )*(L mean -L_model mean )+(a mean -a_model mean )*(a mean -a_model mean )+(b mean -b_model mean )*(b mean -b_model mean )) (3)
[0055] Among them, L mean is the mean value of the brightness channel of the captured image, L_model mean is the mean of the luminance channel of the reference image.
[0056] Of course, those skilled in the art should understand that the above test parameters are only examples, and other existing or future test parameters that may appear, if applicable to the present application, should also be included in the scope of protection of the present application and are included here by reference.
[0057] The above mainly introduces the specific embodiments corresponding to the method for obtaining color test information of an optical device of the present application. In addition, the present application also provides a computer device capable of implementing the above embodiments. Figure 2 Make an introduction.
[0058] Figure 2 A computer device for obtaining color test information of an optical device according to one aspect of the present application is shown, wherein the optical device includes a display device, and the display device is used to present a corresponding test image, and the computer device includes a first module 101, a second module 102, and a third module 103. The first module 101 is used to capture a captured image corresponding to the test image displayed by the optical device through a camera device, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color; the first module 102 is used to obtain a reference image corresponding to the test image, wherein the reference image includes the one or more test color areas; and the third module 103 is used to determine the color test information of the optical device according to the captured image and the reference image.
[0059] In some embodiments, the computer device includes a corresponding fixing device, which is used to place the optical device, and the center of the optical device display device is aligned with the center of the camera device.
[0060] In some embodiments, the optical device and the camera device are in the same mask space.
[0061] In some embodiments, module 102 is used to capture a reference image corresponding to the test image displayed by a corresponding reference optical device through a camera device, wherein the reference image includes the one or more test color areas, the reference optical device is placed on the fixing device, and the center of the reference optical device display device is aligned with the center of the camera device.
[0062] In some embodiments, the first three modules 103 are used to perform image preprocessing on the captured image and the reference image to determine the corresponding test captured image and the test reference image, wherein the test captured image includes a color pixel area corresponding to each test color in one or more test colors, and the test reference image includes a reference color pixel area corresponding to each test color in the one or more test colors; determine the test parameters corresponding to each test color according to the color pixel area and the reference color pixel area; if the test parameters meet the corresponding test parameter threshold, determine that the corresponding color test information includes a qualified test; if not, determine that the color test information includes a failed test. In some embodiments, the image preprocessing includes but is not limited to: changing the corresponding image to a Lab image; taking a predetermined proportion of each color area in one or more test color areas in the corresponding image as the color pixel area corresponding to each test color. In some embodiments, the image preprocessing includes changing the corresponding image into a Lab image, wherein the Lab image includes a brightness channel image, a red-green channel image, and a yellow-blue channel image; wherein the test parameters corresponding to each test color are determined according to the color pixel area and the reference color pixel area, including: determining the test parameters corresponding to each test color according to at least one of the brightness channel image, the red-green channel image, and the yellow-blue channel image corresponding to the color pixel area, and at least one of the brightness channel image, the red-green channel image, and the yellow-blue channel image corresponding to the reference color pixel area. In some embodiments, the test parameters include, but are not limited to: saturation; color deviation without brightness; color deviation with brightness.
[0063] Here, the Figure 2 The specific implementations corresponding to the one-to-one module 101, the one-to-two module 102, and the one-to-three module 103 are the same as those described above. Figure 1 The illustrated embodiments of step S101 , step S102 , and step S103 are the same or similar, and thus are not described in detail and are included herein by reference.
[0064] In some embodiments, the computer device further includes a module (not shown) for acquiring the test image corresponding to one or more test colors; transmitting the test image to the corresponding optical device so that the optical device presents the test image through the display device. In some embodiments, acquiring the test image corresponding to one or more test colors includes: acquiring the corresponding one or more test colors, wherein the one or more test colors are included in the standard color card colors; generating the test image according to the one or more test colors, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color. In some embodiments, acquiring the corresponding one or more test colors includes: acquiring multiple scene images about a real scene, wherein the multiple scene images meet preset conditions; counting the number of pixels of each color in the multiple scene images, and taking the colors with the top N pixel numbers in the multiple scene images as the corresponding one or more test colors. In some embodiments, the preset conditions include but are not limited to: the number of scenes of the real scenes corresponding to the multiple scene images is greater than or equal to the preset number of scenes; the number of real scene images corresponding to each real scene in the multiple scene images is greater than or equal to the preset number of scene images; the number of real scene images corresponding to each real scene in the multiple scene images is the same; the real scene images corresponding to each real scene in the multiple scene images include at least two real scene images corresponding to different camera posture information; the real scene images corresponding to each real scene in the multiple scene images include at least two real scene images corresponding to different lighting information. In some embodiments, the pixel ratio of the test image presented in the display device of the optical device is greater than or equal to the first ratio threshold, and less than or equal to the second ratio threshold.
[0065] Here, the specific implementation corresponding to the one-four modules is the same as or similar to the embodiment of the aforementioned step S104, and thus will not be described in detail and is included herein by reference.
[0066] In addition to the methods and devices described in the above embodiments, the present application also provides a computer-readable storage medium, which stores computer code. When the computer code is executed, the method described in any of the preceding items is executed.
[0067] The present application also provides a computer program product. When the computer program product is executed by a computer device, the method described in any of the preceding items is executed.
[0068] The present application also provides a computer device, the computer device comprising:
[0069] one or more processors;
[0070] a memory for storing one or more computer programs;
[0071] When the one or more computer programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any of the preceding items.
[0072] Figure 3 An exemplary system that can be used to implement various embodiments described in this application is shown;
[0073] like Figure 3 In some embodiments shown, the system 300 can be any of the above-mentioned devices in each of the described embodiments. In some embodiments, the system 300 may include one or more computer-readable media (e.g., system memory or NVM / storage device 320) with instructions and one or more processors (e.g., (one or more) processors 305) coupled to the one or more computer-readable media and configured to execute instructions to implement modules to perform the actions described in this application.
[0074] For one embodiment, system control module 310 may include any suitable interface controller to provide any suitable interface to at least one of processor(s) 305 and / or any suitable device or component in communication with system control module 310 .
[0075] The system control module 310 may include a memory controller module 330 to provide an interface to the system memory 315. The memory controller module 330 may be a hardware module, a software module, and / or a firmware module.
[0076] The system memory 315 may be used, for example, to load and store data and / or instructions for the system 300. For one embodiment, the system memory 315 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the system memory 315 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0077] For one embodiment, system control module 310 may include one or more input / output (I / O) controllers to provide interfaces to NVM / storage device 320 and communication interface(s) 325 .
[0078] For example, NVM / storage device 320 may be used to store data and / or instructions. NVM / storage device 320 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0079] NVM / storage device 320 may include storage resources that are physically part of the device on which system 300 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 320 may be accessed over a network via communication interface(s) 325.
[0080] Communication interface(s) 325 may provide an interface for system 300 to communicate over one or more networks and / or with any other suitable devices. System 300 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.
[0081] For one embodiment, at least one of the processor(s) 305 may be packaged together with the logic of one or more controllers of the system control module 310 (e.g., the memory controller module 330). For one embodiment, at least one of the processor(s) 305 may be packaged together with the logic of one or more controllers of the system control module 310 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with the logic of one or more controllers of the system control module 310. For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with the logic of one or more controllers of the system control module 310 to form a system on chip (SoC).
[0082] In various embodiments, the system 300 may be, but is not limited to: a server, a workstation, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the system 300 may have more or fewer components and / or a different architecture. For example, in some embodiments, the system 300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application specific integrated circuit (ASIC), and a speaker.
[0083] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0084] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0085] Communication media include media by which communication signals containing, for example, computer readable instructions, data structures, program modules, or other data are transmitted from one system to another. Communication media may include guided transmission media such as cables and wires (e.g., fiber optic, coaxial, etc.) and wireless (unguided transmission) media that can propagate energy waves, such as acoustic, electromagnetic, RF, microwave, and infrared. Computer readable instructions, data structures, program modules, or other data may be embodied as a modulated data signal in, for example, a wireless medium such as a carrier wave or similar mechanism such as embodied as part of spread spectrum technology. The term "modulated data signal" refers to a signal whose one or more characteristics are changed or set in such a manner as to encode information in the signal. Modulation may be analog, digital, or a hybrid modulation technique.
[0086] By way of example and not limitation, computer-readable storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memory, such as random access memory (RAM, DRAM, SRAM); and non-volatile memory, such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic / ferroelectric memories (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, magnetic tapes, CDs, DVDs); or other media now known or later developed that can store computer-readable information / data for use by a computer system.
[0087] Here, according to an embodiment of the present application, a device is included, which includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the device is triggered to run the methods and / or technical solutions based on the aforementioned multiple embodiments of the present application.
[0088] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for obtaining color test information of an optical device, applied to a computer device, wherein: The optical device comprises a display device, the display device is used to present a corresponding test image, and the method comprises: Taking a photographic image corresponding to the test image displayed by the optical device by a camera device, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color; Acquire a reference image corresponding to the test image, wherein the reference image includes the one or more test color areas; determining color test information of the optical device according to the captured image and the reference image; The one or more test colors corresponding to the one or more test color areas are determined by the following steps: Acquire a plurality of scene images about a real scene, wherein the plurality of scene images meet a preset condition; The number of pixels of each color in the multiple scene images is counted, and the colors whose pixel numbers are ranked in the top N in the multiple scene images are selected as the corresponding one or more test colors.
2. The method according to claim 1, wherein: The computer device comprises a corresponding fixing device, which is used to place the optical device, and the center of the display device of the optical device is aligned with the center of the camera device.
3. The method according to claim 2, wherein: The optical device and the camera apparatus are located in the same mask space.
4. The method according to claim 2 or 3, wherein: The obtaining of a reference image corresponding to the test image comprises: A reference image corresponding to the test image displayed by a corresponding reference optical device is captured by a camera device, wherein the reference image includes the one or more test color areas, the reference optical device is placed on the fixing device, and the center of the reference optical device display device is aligned with the center of the camera device.
5. The method according to claim 1, wherein: The method further comprises: Acquire the test image corresponding to one or more test colors; The test image is transmitted to a corresponding optical device so that the optical device presents the test image through the display device.
6. The method according to claim 5, wherein: The obtaining the test image corresponding to one or more test colors includes: Obtaining one or more corresponding test colors, wherein the one or more test colors are included in the standard color card colors; The test image is generated according to the one or more test colors, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color.
7. The method according to claim 1, wherein: The preset condition includes at least one of the following: The number of real scenes corresponding to the multiple scene images is greater than or equal to the preset number of scenes; The number of real scene images corresponding to each real scene in the multiple scene images is greater than or equal to the number of preset scene images; The number of real scene images corresponding to each real scene in the multiple scene images is the same; The real scene image corresponding to each real scene in the multiple scene images includes at least two real scene images corresponding to different camera posture information; The real scene images corresponding to each real scene in the multiple scene images include at least two real scene images corresponding to different illumination information.
8. The method according to claim 1, wherein: The pixel ratio of the test image presented in the display device of the optical equipment is greater than or equal to a first ratio threshold and less than or equal to a second ratio threshold.
9. The method according to claim 1, wherein: The step of determining the color test information of the optical device according to the captured image and the reference image includes: Performing image preprocessing on the captured image and the reference image to determine a corresponding test captured image and a test reference image, wherein the test captured image includes a color pixel area corresponding to each test color of one or more test colors, and the test reference image includes a reference color pixel area corresponding to each test color of the one or more test colors; Determine a test parameter corresponding to each test color according to the color pixel area and the reference color pixel area; If the test parameter satisfies the corresponding test parameter threshold, it is determined that the corresponding color test information includes a test pass; if not, it is determined that the color test information includes a test fail.
10. The method according to claim 9, wherein: The image preprocessing includes at least one of the following: Change the corresponding image to a Lab image; A predetermined proportion area of each color area in one or more test color areas in the corresponding image is taken as a color pixel area corresponding to each test color.
11. The method according to claim 10, wherein: The image preprocessing includes changing the corresponding image into a Lab image, wherein the Lab image includes a brightness channel image, a red and green channel image, and a yellow and blue channel image; wherein determining the test parameters corresponding to each test color according to the color pixel area and the reference color pixel area includes: Determine the test parameters corresponding to each test color based on at least one of the brightness channel image, red-green channel image, and yellow-blue channel image corresponding to the color pixel area, and at least one of the brightness channel image, red-green channel image, and yellow-blue channel image corresponding to the reference color pixel area.
12. The method according to claim 9 or 11, wherein: The test parameters include at least one of the following: Saturation; Color deviation without brightness; Color deviation including brightness.
13. A device for obtaining color test information of an optical device, wherein: The optical device comprises a display device, wherein the display device is used to present a corresponding test image, and the device comprises: a module configured to capture an image corresponding to the test image displayed by the optical device through a camera device, wherein the test image includes one or more test color areas, and each test color area is filled with a corresponding test color; A module 12 is used to obtain a reference image corresponding to the test image, wherein the reference image includes the one or more test color areas; A module 3, used for determining color test information of the optical device according to the captured image and the reference image; The one or more test colors corresponding to the one or more test color areas are determined by the following steps: Acquire a plurality of scene images about a real scene, wherein the plurality of scene images meet a preset condition; The number of pixels of each color in the multiple scene images is counted, and the colors whose pixel numbers are ranked in the top N in the multiple scene images are selected as the corresponding one or more test colors.
14. A computer device, wherein: The equipment includes: Processor; and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the steps of the method as claimed in any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: The computer program / instructions, when executed, cause the system to perform the steps of the method as claimed in any one of claims 1 to 12.
16. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
