Optimal object distance detection method, system and device, camera and medium
By measuring the modulation and transmission functional value of the image in the image of the VR product, the actual best distance of the VR product is determined, the traditional method is difficult to adapt to the problem of all VR products, and the clear imaging of each VR product is realized. Essence
Patent Information
- Application Number
- CN202411463233.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art is difficult to accurately measure the actual optimal object distance of VR products, which makes it difficult for traditional object distance compensation to adapt to all VR products and cannot make all VR products clearly image.
By obtaining the image of the optical target map card after the VR product to be tested, determine the modulation and transfer function value of the corresponding modulation and transmission of each image. Essence
The actual best distance detection of VR products based on image modulation and transmission functions is realized. It can make up for personalized spacing for each VR product, so that each VR product can be clearly imaged.
Smart Images

Figure CN119374861A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of VR product technology, and in particular to an optimal object distance detection method, system, device, camera and medium. Background Art
[0002] In the production process of VR (Virtual Reality) products, screen calibration and assembly are key steps. However, usually, errors will occur during the calibration and assembly process of the screen, resulting in the inability to clearly image the assembled VR product even at the set optimal object distance.
[0003] Nowadays, VR products can be imaged clearly by compensating for the object distance. Specifically, for a batch of VR products, the object distance can be compensated by 0.1% to 1%, and then the compensated object distance with the clearest imaging is selected as the target object distance to compensate for the object distance of all VR products. However, the errors corresponding to different VR products are different. Therefore, the traditional method of compensating for the target object distance is difficult to adapt to all VR products, and it is also difficult to make all VR products have clear images.
[0004] Therefore, how to measure the actual optimal object distance of the VR product to compensate for the actual optimal object distance of the VR product is a technical problem that needs to be solved by those skilled in the art. Summary of the invention
[0005] The main purpose of this application is to provide an optimal object distance detection method, system, device, camera and medium, aiming to solve the technical problem of how to measure the actual optimal object distance of a VR product to compensate for the actual optimal object distance of the VR product.
[0006] To achieve the above object, the present application proposes an optimal object distance detection method, which is applied to a camera and includes:
[0007] Acquire an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances;
[0008] Determine the modulation transfer function value corresponding to each of the images;
[0009] The maximum value among the modulation transfer function values is determined, and the set object distance corresponding to the maximum value is used as the actual optimal object distance of the VR product to be tested.
[0010] In one embodiment, the step of determining the modulation transfer function value corresponding to each of the images comprises:
[0011] Dividing each of the images into pixel regions respectively;
[0012] The grayscale values corresponding to the pixel regions are determined, and the modulation transfer function values corresponding to the images are determined according to the grayscale values corresponding to the images.
[0013] In one embodiment, the step of determining the modulation transfer function value corresponding to each of the images according to the grayscale values corresponding to each of the images comprises:
[0014] Performing least square fitting on the grayscale values corresponding to the images to obtain edge diffusion function formulas corresponding to the images;
[0015] Based on the edge spread functions, obtaining the frequency spectrum corresponding to each of the images;
[0016] Respectively extracting the modulus of each frequency component in each of the frequency spectra, and performing normalization processing on each of the moduli;
[0017] The normalized modules are used as modulation transfer function values corresponding to the images.
[0018] In one embodiment, after the step of taking the set object distance corresponding to the maximum value as the actual optimal object distance, the method further includes:
[0019] Obtaining an object distance setting value, and determining an error range according to the object distance setting value and a preset error coefficient, wherein the object distance setting value is an optimal object distance design value of the VR product to be tested;
[0020] If it is detected that the actual optimal object distance falls within the error range, the VR product to be tested is determined to be qualified;
[0021] If it is detected that the actual optimal object distance does not fall within the error range, the VR product to be tested is determined to be unqualified.
[0022] In one embodiment, the method further comprises:
[0023] Obtain product parameters of the camera, and obtain the interval distance between the VR product to be tested and the camera;
[0024] Detecting whether the spacing distance is qualified according to the product parameters;
[0025] If it is detected that the spacing distance is qualified, the step of acquiring the image of the optical target chart after the VR product to be tested passes is performed.
[0026] In one embodiment, before the step of determining the modulation transfer function value corresponding to each of the images, the method further comprises:
[0027] Acquire the image mode corresponding to each of the images;
[0028] When it is detected that the image mode is the RGB mode, grayscale processing is performed on each of the images;
[0029] The step of determining the modulation transfer function value corresponding to each of the images comprises:
[0030] Determine the modulation transfer function value corresponding to each of the images after the grayscale processing.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes an optimal object distance detection system, the optimal object distance detection system comprising:
[0032] An image acquisition module, used to acquire an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances;
[0033] An MTF (Modulation Transfer Function) value calculation module, used to determine the modulation transfer function value corresponding to each of the images;
[0034] The object distance determination module is used to determine the maximum value among the modulation transfer function values, and use the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes an optimal object distance detection device, which includes: a target moving module, a VR product carrying module and a test module; wherein the target moving module, the VR product carrying module and the test module are connected in sequence;
[0036] The target moving module includes an optical target chart and a first electric cylinder slide rail, and is used to control the optical target chart to slide on the first electric cylinder slide rail;
[0037] The VR product carrying module includes a product carrying tooling and a second electric cylinder slide rail, which is used to control the product carrying tooling to slide on the second electric cylinder slide rail when it is detected that the VR product to be tested is on the product carrying tooling;
[0038] The test module includes a camera, which is used to obtain an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances; it is also used to determine the modulation transfer function value corresponding to each of the images; it is also used to determine the maximum value among the modulation transfer function values, and use the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a camera, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the optimal object distance detection method as described above.
[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the optimal object distance detection method as described above are implemented.
[0041] In the present application, an image of an optical target chart is obtained after passing through a VR product to be tested, wherein in different images, the optical target chart is at different set object distances, and images of the optical target chart at different set object distances can be obtained by photographing the imaging of the VR product with a camera; then, a modulation transfer function value corresponding to each of the images is determined, and the modulation transfer function value corresponding to each of the images can be determined based on the image information, thereby determining the image clarity of each image; then, a maximum value among the modulation transfer function values is determined, and the set object distance corresponding to the maximum value is used as the actual optimal object distance of the VR product to be tested, and the set object distance corresponding to the image with the highest clarity can be used as the actual optimal object distance of the VR product.
[0042] Therefore, the present application can determine the actual optimal object distance of the VR product based on the modulation transfer function value of the image, and thus, can compensate for the object distance based on the actual optimal object distance of each VR product, so that each VR product can be imaged clearly. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 A schematic diagram of the optimal object distance detection device proposed in this application;
[0046] Figure 2 This is a schematic diagram of an optical target chart;
[0047] Figure 3A schematic diagram of a flow chart provided for the first embodiment of the optimal object distance detection method of the present application;
[0048] Figure 4 A schematic diagram of a flow chart of calculating a modulation transfer function value in accordance with an embodiment of an optimal object distance detection method of the present application;
[0049] Figure 5 This is a schematic diagram of the module structure of the optimal object distance detection system according to an embodiment of the present application;
[0050] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the optimal object distance detection method in the embodiment of the present application.
[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] In the production process of VR products, screen calibration and assembly are key steps. However, usually, errors will occur during the calibration and assembly process, resulting in the inability to clearly image the assembled VR product even at the set optimal object distance.
[0055] Nowadays, VR products can be imaged clearly by compensating for the object distance. Specifically, for a batch of VR products, the object distance can be compensated by 0.1% to 1%, and then the compensated object distance with the clearest imaging is selected as the target object distance to compensate for the object distance of all VR products. However, the errors corresponding to different VR products are different. Therefore, the traditional method of compensating for the target object distance is difficult to adapt to all VR products, and it is also difficult to make all VR products have clear images.
[0056] Therefore, how to measure the actual optimal object distance of the VR product to compensate for the actual optimal object distance of the VR product is a technical problem that needs to be solved by those skilled in the art.
[0057] In order to solve the above problem, in the present application, an image of an optical target chart is obtained after passing through the VR product to be tested, wherein in different images, the optical target chart is at different set object distances, and the images of the optical target chart at different set object distances can be obtained by photographing the imaging of the VR product with a camera; then, the modulation transfer function value corresponding to each of the images is determined, and the modulation transfer function value corresponding to each of the images can be determined based on the image information, thereby determining the image clarity of each image; then, the maximum value of each of the modulation transfer function values is determined, and the set object distance corresponding to the maximum value is used as the actual optimal object distance of the VR product to be tested, and the set object distance corresponding to the image with the highest clarity can be used as the actual optimal object distance of the VR product.
[0058] Therefore, the present application can determine the actual optimal object distance of the VR product based on the modulation transfer function value of the image, and thus, can compensate for the object distance based on the actual optimal object distance of each VR product, so that each VR product can be imaged clearly.
[0059] It should be noted that the execution subject of the optimal object distance detection method of the present application can be a camera with data processing, network communication and program running functions. The following takes a camera as an example to illustrate various embodiments of the optimal object distance detection method of the present application.
[0060] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the optimal object distance detection device proposed in this application. 100 represents a target moving module, 200 represents a VR product carrying module, and 300 represents a test module; the target moving module 100, the VR product carrying module 200 and the test module 300 are connected in sequence;
[0061] The target moving module 100 includes an optical target chart 101 and a first electric cylinder slide rail 102, and is used to control the optical target chart 101 to slide on the first electric cylinder slide rail 102;
[0062] The VR product carrying module 200 includes a product carrying tool 201 and a second electric cylinder slide rail 202, and is used to control the product carrying tool 201 to slide on the second electric cylinder slide rail 202 when it is detected that the VR product to be tested is on the product carrying tool 201;
[0063] The test module 300 includes a camera 301, which is used to obtain an image of the optical target chart 101 after the VR product to be tested passes through it, wherein in different images, the optical target chart 101 is at different set object distances; it is also used to determine the modulation transfer function value corresponding to each of the images; it is also used to determine the maximum value among the modulation transfer function values, and use the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
[0064] Specifically, Figure 2 The specific contents of the optical target chart are shown. Figure 2 In the optical target chart shown, the chart is divided into two charts, the left and the right, wherein both the left and the right charts have black and white blade edges inclined at 5°.
[0065] It is understandable that the optimal object distance of each VR product is different. Therefore, it is difficult to make the imaging of each VR product clear by the traditional method of uniformly compensating the object distance. Therefore, the present application proposes an optimal object distance detection device, through which the actual optimal object distance of each VR product can be quickly detected.
[0066] Specifically, when testing with the above-mentioned optimal object distance detection device, it is necessary to place the VR product that needs to be tested on the carrying fixture, then start the VR product, and move the VR product to the preset test position through the carrying fixture. Then, light up the optical target chart, and control the optical target chart to move along the Z direction within a preset range. When the optical target chart moves to the preset object distance, the image of the optical target chart after the VR product passes through can be captured by a camera, and then based on the different images corresponding to different object distances, the modulation transfer function values corresponding to each image are calculated, and then the actual optimal object distance of the VR product can be determined based on the modulation transfer function value.
[0067] Based on the optimal object distance detection device proposed above, the present application provides an optimal object distance detection method, referring to Figure 3 , Figure 3 Schematic diagram of the flow chart of the first embodiment of the optimal object distance detection method of the present application.
[0068] In this embodiment, the optimal object distance detection method includes steps S10 to S30:
[0069] Step S10, obtaining an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances;
[0070] It is understandable that, in the process of moving the optical target chart, the camera can capture the image of the optical target chart after it passes through the VR lens of the VR product to be tested. Thus, after the optical target chart moves from the starting position to the ending position, images of the optical target chart at different set object distances can be obtained.
[0071] Step S20, determining the modulation transfer function value corresponding to each of the images;
[0072] In this embodiment, when the optical target chart is a hypotenuse, for each image, a line perpendicular to the hypotenuse can be taken along the hypotenuse direction, and the pixel grayscale distribution on this line can be measured to obtain the edge spread function corresponding to each image. Then, the line spread function corresponding to each image can be obtained by deriving the edge spread function. Then, each line spread function can be Fourier transformed to obtain its frequency domain representation, that is, the optical transfer function. Since MTF is the modulus part of the optical transfer function, the modulation transfer function value corresponding to each image can be obtained by calculating the amplitude of the optical transfer function.
[0073] Step S30, determining the maximum value among the modulation transfer function values, and taking the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
[0074] In this embodiment, after obtaining the modulation transfer function values corresponding to each image, the maximum value can be determined among the modulation transfer function values, and then the set object distance corresponding to the maximum value is used as the actual optimal object distance of the VR product to be tested.
[0075] In the present application, an image of an optical target chart is obtained after passing through a VR product to be tested, wherein in different images, the optical target chart is at different set object distances, and images of the optical target chart at different set object distances can be obtained by photographing the imaging of the VR product with a camera; then, a modulation transfer function value corresponding to each of the images is determined, and the modulation transfer function value corresponding to each of the images can be determined based on the image information, thereby determining the image clarity of each image; then, a maximum value among the modulation transfer function values is determined, and the set object distance corresponding to the maximum value is used as the actual optimal object distance of the VR product to be tested, and the set object distance corresponding to the image with the highest clarity can be used as the actual optimal object distance of the VR product.
[0076] Therefore, the present application can determine the actual optimal object distance of the VR product based on the modulation transfer function value of the image, and thus, can compensate for the object distance based on the actual optimal object distance of each VR product, so that each VR product can be imaged clearly.
[0077] Furthermore, based on the above-mentioned first embodiment of the optimal object distance detection method of the present application, a second embodiment of the optimal object distance detection method of the present application is proposed.
[0078] In this embodiment, the above step S20 includes:
[0079] Step S201, dividing each of the images into pixel regions;
[0080] It is understandable that the pixel region refers to the smallest unit after the image is divided, and the present application does not limit the number of pixel regions. Specifically, the more the number of pixel regions, the more accurate the actual optimal object distance calculated.
[0081] Step S202, determining the grayscale value corresponding to each of the pixel regions, and determining the modulation transfer function value corresponding to each of the images according to the grayscale value corresponding to each of the images.
[0082] It is understandable that after each image is divided into a plurality of pixel regions, the grayscale values corresponding to each pixel region can be calculated respectively. Furthermore, the modulation transfer function values corresponding to each image can be calculated based on the plurality of grayscale values corresponding to each image.
[0083] Compared with the method of calculating the modulation transfer function value by a line perpendicular to the hypotenuse in the above-mentioned first embodiment, the present application divides the image into various pixel areas, so that the grayscale value of the entire image can be included in the calculation process of the modulation transfer function value, so that the calculated modulation transfer function value is more accurate.
[0084] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a flow chart of calculating the modulation transfer function value in an embodiment of the optimal object distance detection method of the present application. In a feasible implementation manner, the above step S202 includes:
[0085] Step S2021, performing least square fitting on the grayscale values corresponding to the images to obtain edge diffusion function formulas corresponding to the images;
[0086] Specifically, in Figure 4 In the example, each image is divided into 9 pixel regions. After calculating the grayscale values corresponding to the 9 pixel regions, the 9 pixel values can be fitted with a least squares method to fit the 9 pixel values to a straight line, and the function corresponding to the straight line is used as the edge diffusion function corresponding to the image. Based on the same method, the edge diffusion functions corresponding to other images can be obtained.
[0087] Step S2022, obtaining a frequency spectrum corresponding to each of the images based on each of the edge spread functions;
[0088] In this embodiment, for each edge spread function, the expression of the line spread function can be obtained by derivation. Then, the spectrum corresponding to each image can be obtained by truncating, sampling, and performing fast Fourier transformation on the line spread function.
[0089] Step S2023, extracting the modulus of each frequency component in each of the frequency spectra respectively, and performing normalization processing on each of the moduli;
[0090] Step S2024: taking the normalized moduli as modulation transfer function values corresponding to the images.
[0091] In this embodiment, for the spectrum graphs corresponding to each image, the modulus of each frequency component in each spectrum graph can be extracted respectively, and normalized based on the modulus at 0 frequency. Thus, each modulus after normalization can be used as the modulation transfer function value corresponding to each image.
[0092] Therefore, the present application can calculate the modulation transfer function value corresponding to each image based on the image taken by the camera, and further, the actual optimal object distance of each VR product can be calculated based on the modulation transfer function value.
[0093] Furthermore, based on the first embodiment or the second embodiment of the optimal object distance method of the present application, a third embodiment of the optimal object distance method of the present application is proposed.
[0094] In this embodiment, after the above step S30, the method further includes:
[0095] Step S40, obtaining an object distance setting value, and determining an error range according to the object distance setting value and a preset error coefficient, wherein the object distance setting value is an optimal object distance design value of the VR product to be tested;
[0096] It should be noted that the object distance setting value can be obtained by reading the parameters of the VR product to be tested, and the error coefficient is pre-set.
[0097] Exemplarily, if the object distance setting value is d2, and the error coefficient is 0.1, then the above error range is: [d2-10%*d2, d2+10%*d2].
[0098] Step S50, if it is detected that the actual optimal object distance belongs to the error range, then the VR product to be tested is determined to be qualified;
[0099] Step S60: If it is detected that the actual optimal object distance does not fall within the error range, the VR product to be tested is determined to be unqualified.
[0100] It is understandable that although the object distance of VR products can be compensated, if the gap between the actual optimal object distance of VR products and the object distance setting value is too large, it will greatly increase the time to compensate the object distance. Therefore, in order to quickly screen out VR products that can complete the object distance compensation in a shorter time, it is necessary to determine whether the measured actual optimal object distance is within the error range.
[0101] Therefore, in this embodiment, on the basis of calculating the actual optimal object distance of the VR product, it is also possible to quickly screen out VR products that meet the time compensation requirements by judging whether the actual optimal object distance is within the error range, thereby improving the screening efficiency of VR products.
[0102] Furthermore, based on the first to third embodiments of the optimal object distance detection method of the present application, a fourth embodiment of the optimal object distance detection method of the present application is proposed.
[0103] In this embodiment, the method includes:
[0104] Step S70, obtaining product parameters of the camera, and obtaining the interval distance between the VR product to be tested and the camera;
[0105] Step S80, detecting whether the spacing distance is qualified according to the product parameters;
[0106] Step S90, if it is detected that the spacing distance is qualified, the step of obtaining the image of the optical target chart after the VR product to be tested passes is executed.
[0107] It is understandable that when the camera is used to take a picture of the optical target chart after the VR product passes through it and the actual optimal object distance of the VR product is calculated, the product parameters of the camera will affect the clarity of the picture. Therefore, it is necessary to judge the distance between the VR product and the camera through the product parameters of the camera, so that when the distance is detected to be qualified, the steps of taking pictures can be performed, and when the distance is detected to be unqualified, the position of the product carrying tooling can be automatically adjusted to make the distance qualified.
[0108] In this embodiment, the present application greatly reduces the probability of the camera taking invalid images by detecting whether the distance between the camera and the VR product is qualified, thereby improving the efficiency of the present application in detecting the actual optimal object distance of the VR product.
[0109] Furthermore, based on all the above-mentioned embodiments of the optimal object distance detection method of the present application, a fifth embodiment of the optimal object distance detection method of the present application is proposed.
[0110] In this embodiment, before the above step S20, the method further includes:
[0111] Step S100, obtaining the image mode corresponding to each of the images;
[0112] Step S110, when it is detected that the image mode is the RGB mode, grayscale processing is performed on each of the images;
[0113] Based on this, the above step S20 also includes:
[0114] Step S203, determining the modulation transfer function value corresponding to each of the images after the grayscale processing.
[0115] It can be understood that the image mode includes an RGB mode and an L mode, wherein the RGB mode represents an image as a color image, and the L mode represents an image as a grayscale image.
[0116] In this embodiment, if the optical target chart in the image is detected to be in color, the color image needs to be grayscaled to avoid interference of various color information in the color image with the process of calculating the modulation transfer function value, thereby resulting in the problem that the calculation process needs to process more data and takes longer time.
[0117] Therefore, the present application can reduce the amount of data processing for calculating the modulation transfer function value based on the color optical target chart by graying the color image, thereby improving the efficiency of calculating the modulation transfer function value through the color image.
[0118] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the optimal object distance detection method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0119] The present application also provides an optimal object distance detection system, which is applied to a camera. Please refer to Figure 5 , the optimal object distance detection system comprises:
[0120] An image acquisition module 10 is used to acquire an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances;
[0121] An MTF value calculation module 20, used to determine the modulation transfer function value corresponding to each of the images;
[0122] The object distance determination module 30 is used to determine the maximum value among the modulation transfer function values, and use the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
[0123] In one embodiment, the MTF value calculation module 20 is further used for:
[0124] Dividing each of the images into pixel regions respectively;
[0125] The grayscale values corresponding to the pixel regions are determined, and the modulation transfer function values corresponding to the images are determined according to the grayscale values corresponding to the images.
[0126] In one embodiment, the MTF value calculation module 20 is further used for:
[0127] Performing least square fitting on the grayscale values corresponding to the images to obtain edge diffusion function formulas corresponding to the images;
[0128] Based on the edge spread functions, obtaining the frequency spectrum corresponding to each of the images;
[0129] Respectively extracting the modulus of each frequency component in each of the frequency spectra, and performing normalization processing on each of the moduli;
[0130] The normalized modules are used as modulation transfer function values corresponding to the images.
[0131] In one embodiment, the optimal object distance detection system further includes:
[0132] A range determination module, used to obtain an object distance setting value, and determine an error range according to the object distance setting value and a preset error coefficient, wherein the object distance setting value is an optimal object distance design value of the VR product to be tested;
[0133] A qualified detection module, used for determining that the VR product to be tested is qualified if it is detected that the actual optimal object distance falls within the error range;
[0134] The unqualified detection module is used to determine that the VR product to be tested is unqualified if it is detected that the actual optimal object distance does not fall within the error range.
[0135] In one embodiment, the optimal object distance detection system further includes:
[0136] A parameter acquisition module, used to acquire product parameters of the camera and to acquire the interval distance between the VR product to be tested and the camera;
[0137] A distance judgment module, used to detect whether the interval distance is qualified according to the product parameters;
[0138] The adapter module is used to execute the step of acquiring the image of the optical target chart after the VR product to be tested passes if it is detected that the spacing distance is qualified.
[0139] In one embodiment, the optimal object distance detection system further includes:
[0140] A mode acquisition module, used to acquire the image mode corresponding to each of the images;
[0141] A grayscale module, used for performing grayscale processing on each of the images when it is detected that the image mode is an RGB mode;
[0142] Based on this, the MTF value calculation module 20 is also used for:
[0143] Determine the modulation transfer function value corresponding to each of the images after the grayscale processing.
[0144] The optimal object distance detection system provided by the present application adopts the optimal object distance detection method in the above embodiment, which can solve the technical problem of how to measure the actual optimal object distance of the VR product to compensate for the actual optimal object distance of the VR product. Compared with the prior art, the beneficial effects of the optimal object distance detection system provided by the present application are the same as the beneficial effects of the optimal object distance detection method provided by the above embodiment, and other technical features of the optimal object distance detection system are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0145] The present application provides a camera, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the optimal object distance detection method in the above-mentioned embodiment 1.
[0146] Reference below Figure 6 , which shows a schematic structural diagram of a camera suitable for implementing an embodiment of the present application. Figure 6 The camera shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0147] like Figure 6As shown, the camera may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for camera operation are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the camera to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a camera with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0148] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0149] The camera provided by the present application adopts the optimal object distance detection method in the above embodiment, which can solve the technical problem of how to measure the actual optimal object distance of the VR product to compensate for the actual optimal object distance of the VR product. Compared with the prior art, the beneficial effects of the camera provided by the present application are the same as the beneficial effects of the optimal object distance detection method provided by the above embodiment, and the other technical features in the camera are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0150] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0151] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0152] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the optimal object distance detection method in the above-mentioned embodiment.
[0153] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0154] The computer-readable storage medium may be included in the camera, or may exist independently without being installed in the camera.
[0155] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the camera, the camera: obtains an image of the optical target chart after passing through the VR product to be tested, wherein in different images, the optical target chart is at different set object distances; determines the modulation transfer function value corresponding to each image; determines the maximum value among the modulation transfer function values, and uses the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
[0156] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0157] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0158] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0159] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned optimal object distance detection method, and can solve the technical problem of how to measure the actual optimal object distance of VR products to compensate for the actual optimal object distance of VR products. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the optimal object distance detection method provided in the above-mentioned embodiment, and will not be repeated here.
[0160] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An optimal object distance detection method, characterized in that: The optimal object distance detection method is applied to a camera, and the optimal object distance detection method includes: Acquire an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances; Determine the modulation transfer function value corresponding to each of the images; The maximum value among the modulation transfer function values is determined, and the set object distance corresponding to the maximum value is used as the actual optimal object distance of the VR product to be tested.
2. The optimal object distance detection method according to claim 1, characterized in that: The step of determining the modulation transfer function value corresponding to each of the images comprises: Dividing each of the images into pixel regions respectively; The grayscale values corresponding to the pixel regions are determined, and the modulation transfer function values corresponding to the images are determined according to the grayscale values corresponding to the images.
3. The optimal object distance detection method as claimed in claim 2, characterized in that: The step of determining the modulation transfer function value corresponding to each of the images according to the grayscale values corresponding to each of the images comprises: Performing least square fitting on the grayscale values corresponding to the images to obtain edge diffusion function formulas corresponding to the images; Based on the edge spread functions, obtaining the frequency spectrum corresponding to each of the images; Respectively extracting the modulus of each frequency component in each of the frequency spectra, and performing normalization processing on each of the moduli; The normalized modules are used as modulation transfer function values corresponding to the images.
4. The optimal object distance detection method according to any one of claims 1 to 3, characterized in that: After the step of taking the set object distance corresponding to the maximum value as the actual optimal object distance, the method further includes: Obtaining an object distance setting value, and determining an error range according to the object distance setting value and a preset error coefficient, wherein the object distance setting value is an optimal object distance design value of the VR product to be tested; If it is detected that the actual optimal object distance falls within the error range, the VR product to be tested is determined to be qualified; If it is detected that the actual optimal object distance does not fall within the error range, the VR product to be tested is determined to be unqualified.
5. The optimal object distance detection method as claimed in claim 1, characterized in that: The method further comprises: Obtain product parameters of the camera, and obtain the interval distance between the VR product to be tested and the camera; Detecting whether the spacing distance is qualified according to the product parameters; If it is detected that the spacing distance is qualified, the step of acquiring the image of the optical target chart after the VR product to be tested passes is performed.
6. The optimal object distance detection method as claimed in claim 1, characterized in that: Before the step of determining the modulation transfer function values corresponding to the images, the method further comprises: Acquire the image mode corresponding to each of the images; When it is detected that the image mode is the RGB mode, grayscale processing is performed on each of the images; The step of determining the modulation transfer function value corresponding to each of the images comprises: Determine the modulation transfer function value corresponding to each of the images after the grayscale processing.
7. An optimal object distance detection system, characterized in that: The optimal object distance detection system is applied to a camera, and the optimal object distance detection system comprises: An image acquisition module, used to acquire an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances; An MTF value calculation module is used to determine the modulation transfer function value corresponding to each of the images; The object distance determination module is used to determine the maximum value among the modulation transfer function values, and use the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
8. An optimal object distance detection device, characterized in that: The optimal object distance detection device comprises: a target moving module, a VR product carrying module and a test module; wherein the target moving module, the VR product carrying module and the test module are connected in sequence; The target moving module includes an optical target chart and a first electric cylinder slide rail, and is used to control the optical target chart to slide on the first electric cylinder slide rail; The VR product carrying module includes a product carrying tooling and a second electric cylinder slide rail, which is used to control the product carrying tooling to slide on the second electric cylinder slide rail when it is detected that the VR product to be tested is on the product carrying tooling; The test module includes a camera, which is used to obtain an image of the optical target chart after the VR product to be tested passes through, wherein in different images, the optical target chart is at different set object distances; it is also used to determine the modulation transfer function value corresponding to each of the images; it is also used to determine the maximum value among the modulation transfer function values, and use the set object distance corresponding to the maximum value as the actual optimal object distance of the VR product to be tested.
9. A camera, characterized in that: The camera comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the optimal object distance detection method according to any one of claims 1 to 6.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the optimal object distance detection method according to any one of claims 1 to 6 are implemented.