Disclosure of Invention
The invention aims to provide a method, a storage medium, equipment and a system for determining 3D display calibration parameters, so as to solve the problem that the existing 3D display device brings great dizzy feeling when the viewing position is wrong.
In order to solve the above problem, the present invention provides a method for determining 3D display calibration parameters, which is applicable to a 2D display device configured with a camera, wherein a 3D optical panel is detachably disposed on a display screen of the 2D display device, the 3D optical panel includes a substrate and a microlens array, and the method for determining 3D display calibration parameters includes:
acquiring a calibration table and a preset image coordinate system, wherein the calibration table comprises a plurality of calibration parameters, each calibration parameter corresponds to a preset range set, and each preset range set comprises a plurality of preset coordinate ranges;
shooting through the camera to obtain a human eye image, and acquiring a human eye coordinate through the preset image coordinate system and the human eye image;
and if the target preset range set comprises the human eye coordinates, acquiring target calibration parameters corresponding to the target preset range set, and storing the target calibration parameters as optimal calibration parameters.
As a further improvement of the present invention, the step of obtaining the eye image by shooting through the camera and obtaining the eye coordinate through the preset image coordinate system and the eye image includes:
shooting through the camera to obtain a human eye image;
dividing the human eye image to obtain a square grid image under the preset image coordinate system, wherein the square grid image comprises a plurality of squares with the same size;
and if the human eyes in the human eye image fall into the target square grids, taking the coordinate information corresponding to the target square grids as human eye coordinates.
As a further improvement of the present invention, before the step of acquiring the calibration table and the preset image coordinate system, the method includes:
acquiring a preset characteristic 3D image and a plurality of preset interweaving parameters, wherein the preset characteristic 3D image comprises two bilaterally symmetrical regions or two vertically symmetrical regions which are respectively filled with different colors;
the preset characteristic 3D image is subjected to interweaving processing by utilizing each preset interweaving parameter to obtain a plurality of interweaving images, and each interweaving image is projected to the inner wall of the darkroom through the micro-lens array to form a projection so as to obtain a plurality of projections;
shooting each projection through the camera to obtain a projection image with different color stripes in staggered arrangement so as to obtain a plurality of projection images;
obtaining a first range set according to each projection image and the preset image coordinate system so as to obtain a plurality of first range sets, wherein each first range set corresponds to one preset interweaving parameter, each first range set comprises a plurality of central area coordinate ranges, and the coordinate information corresponding to the central area of each stripe in the projection images corresponds to one central area coordinate range;
the preset interleaving parameters and the first range sets form the calibration table.
As a further improvement of the invention, each projection is shot by the camera to obtain a projection image with different color stripes in staggered arrangement, so that the step of obtaining a plurality of projection images is preceded by the following steps:
and starting the camera and fixing camera parameters of the camera.
As a further improvement of the present invention, after the steps of obtaining target calibration parameters corresponding to the target preset range set and storing the target calibration parameters as optimal calibration parameters if the target preset range set includes the human eye coordinates, the method further includes:
receiving a 3D image to be displayed;
acquiring the optimal calibration parameter;
and carrying out interweaving processing on the 3D image to be displayed according to the optimal calibration parameters, and outputting and displaying the image after the interweaving processing.
In order to solve the above problem, the present invention further provides a storage medium suitable for a 2D display device configured with a camera, wherein a 3D optical panel is detachably disposed on a display screen of the 2D display device, the 3D optical panel includes a substrate and a microlens array, and the storage medium is used for storing a program, wherein the program performs the following steps when the program is executed:
acquiring a calibration table and a preset image coordinate system, wherein the calibration table comprises a plurality of calibration parameters, each calibration parameter corresponds to a preset range set, and each preset range set comprises a plurality of preset coordinate ranges;
shooting through the camera to obtain a human eye image, and acquiring a human eye coordinate through the preset image coordinate system and the human eye image;
and if the target preset range set comprises the human eye coordinates, acquiring target calibration parameters corresponding to the target preset range set, and storing the target calibration parameters as optimal calibration parameters.
As a further improvement of the present invention, the program further performs the following steps when running:
shooting through the camera to obtain a human eye image;
dividing the human eye image to obtain a square grid image under the preset image coordinate system, wherein the square grid image comprises a plurality of squares with the same size;
and if the human eyes in the human eye image fall into the target square grids, taking the coordinate information corresponding to the target square grids as human eye coordinates.
As a further improvement of the present invention, the program further performs the following steps when running:
acquiring a preset characteristic 3D image and a plurality of preset interweaving parameters, wherein the preset characteristic 3D image comprises two bilaterally symmetrical regions or two vertically symmetrical regions which are respectively filled with different colors;
the preset characteristic 3D image is subjected to interweaving processing by utilizing each preset interweaving parameter to obtain a plurality of interweaving images, and each interweaving image is projected to the inner wall of the darkroom through the micro-lens array to form a projection so as to obtain a plurality of projections;
shooting each projection through the camera to obtain a projection image with different color stripes in staggered arrangement so as to obtain a plurality of projection images;
obtaining a first range set according to each projection image and the preset image coordinate system so as to obtain a plurality of first range sets, wherein each first range set corresponds to one preset interweaving parameter, each first range set comprises a plurality of central area coordinate ranges, and the coordinate information corresponding to the central area of each stripe in the projection images corresponds to one central area coordinate range;
the preset interleaving parameters and the first range sets form the calibration table.
As a further improvement of the present invention, the program further performs the following steps when running:
and starting the camera and fixing camera parameters of the camera.
As a further improvement of the present invention, the program further performs the following steps when running:
the receiving module is used for receiving a 3D image to be displayed;
acquiring the optimal calibration parameter;
and the display module is used for carrying out interweaving processing on the 3D image to be displayed according to the optimal calibration parameters and outputting and displaying the image after the interweaving processing.
In order to solve the above problem, the present invention further provides a 2D display device, where the 2D display device is configured with a camera, a 3D optical panel is detachably disposed on a display screen of the 2D display device, the 3D optical panel includes a substrate and a microlens array, and the 2D display device includes:
a processor;
a memory for storing processor-executable instructions;
the memory stores instructions, and the instructions are executed by the processor to perform the steps of the method for determining the calibration parameters for 3D display.
In order to solve the above problem, the present invention further provides a 3D display system, which includes the above 2D display device, and a 3D optical panel detachably disposed on a display screen of the 2D display device, where the 3D optical panel includes a substrate and a microlens array, and the 2D display device is provided with a camera.
Compared with the prior art, the display method of the naked eye 3D display device provided by the invention has the advantages that the human eye image is shot through the camera, the human eye coordinate is obtained according to the human eye image, the optimal calibration parameter matched with the human eye coordinate is obtained from the calibration table, the 3D image to be displayed is processed according to the optimal calibration parameter and then output and displayed, so that a user can watch the 3D projection at the optimal visual angle, meanwhile, the problem of poor 3D display effect caused by 3D attaching error and camera assembling error is effectively solved, the calibration process is automatically completed, and the use is convenient.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 illustrates an embodiment of the method for determining the calibration parameters in the 3D display according to the present invention. In this embodiment, the method for determining the 3D display calibration parameters is applicable to a 3D display device, the 3D display device includes a camera, a microlens array and a display screen, the microlens array covers the display screen, and at present, 3D display can be applied to a terminal with a display screen, such as a television, a mobile phone, and a flat panel lamp. In this embodiment, as shown in fig. 1, the method for determining the 3D display calibration parameter includes:
step S10, a calibration table and a preset image coordinate system are obtained, the calibration table comprises a plurality of calibration parameters, each calibration parameter corresponds to a preset range set, and each preset range set comprises a plurality of preset coordinate ranges.
Specifically, the calibration table includes a series of calibration parameters, each calibration parameter corresponds to a preset range set, each preset range set includes a plurality of preset coordinate ranges, and all the preset range sets are distributed in the whole preset image coordinate system, so that the whole preset image coordinate system is completely covered.
And step S11, obtaining a human eye image through camera shooting, and obtaining human eye coordinates through a preset image coordinate system and the human eye image.
Specifically, the 3D display device comprises a camera, when a user uses the 3D display device, the camera shoots human eye images, the size specification of the human eye images is matched with a preset image coordinate system, and the positions of the human eyes falling into the preset image coordinate system are analyzed by combining the preset image coordinate system so as to obtain the coordinate positions of the human eyes in the preset image coordinate system, namely human eye coordinates.
And step S12, if the target preset range set contains the coordinates of human eyes, acquiring target calibration parameters corresponding to the target preset range set, and storing the target calibration parameters as the optimal calibration parameters.
Specifically, after the human eye coordinate is obtained through analysis of a preset image coordinate system, the human eye coordinate is analyzed to fall into which preset coordinate range, a preset range set including the preset coordinate range is obtained according to the preset coordinate range, and then calibration parameters corresponding to the preset range set are obtained according to the preset range set, wherein the calibration parameters are the optimal calibration parameters.
In the embodiment, the watching angle of the user is judged according to the eye coordinate, the optimal calibration parameter is obtained according to the eye coordinate, and then the 3D display device is calibrated, so that the user can watch the 3D image from the watching angle to obtain the optimal watching effect, meanwhile, the problem of poor 3D display effect caused by 3D attaching errors and camera assembling errors is effectively solved, the calibration process is automatically completed, the use is convenient, and the user experience is good.
When the method for determining the calibration parameters for 3D display of the present invention is used in a process of using a 3D display device, in order to determine the coordinates of the human eyes conveniently, in another embodiment based on the above embodiment, referring to fig. 2, step S11 includes the following sub-steps:
and step S101, shooting through a camera to obtain a human eye image.
In particular, the 3D display device comprises a camera, which may be used for taking images of the human eye.
Step S102, dividing the image of the person eye to obtain a grid image under a preset image coordinate system, wherein the grid image comprises a plurality of grids with the same size.
Specifically, as shown in fig. 3, in order to determine coordinates of human eyes conveniently, an image of a human eye may be divided to obtain a grid image, the grid image includes a plurality of grids with the same size, and the grid image matches with a preset image coordinate system, according to an area where human eyes fall on the grids, coordinates of human eyes, such as the grids where eyes 1 and 2 are located in fig. 3, are determined quickly, and then the coordinates of human eyes are determined according to the grids.
Step S103, if the human eyes in the human eye image fall into the target square grids, the coordinate information corresponding to the target square grids is used as human eye coordinates.
In this embodiment, the image of the person eye is divided under the preset image coordinate system to obtain the grid image, and then the coordinates of the person eye are quickly determined according to the target grid in the grid image, into which the person eye falls.
When the method for determining the 3D display calibration parameters is used in the use process of the 3D display device, a calibration table needs to be generated firstly. Therefore, on the basis of the above embodiment, in other embodiments, the 3D display device is placed in a dark room and includes a microlens array, and referring to fig. 4, before step S10, the method further includes the following steps:
step S201, obtaining a preset feature 3D image and a plurality of preset interleaving parameters, where the preset feature 3D image includes two left and right symmetric regions or two up and down symmetric regions, and the two regions are respectively filled with different colors.
Specifically, a preset feature 3D image is provided in the 3D display device, the preset feature 3D image includes two left-right symmetric regions or two up-down symmetric regions, and the two regions are respectively filled with different colors, for example, the two regions are respectively filled with black and white or red and blue, etc. The preset interlacing parameter is a parameter for controlling the interlacing arrangement rule of the pixels, and is obtained by interlacing a series of parameters such as the arrangement pitch, the change rate, the inclination direction and the initial position.
Step S202, the preset characteristic 3D image is subjected to interweaving processing by utilizing each preset interweaving parameter to obtain a plurality of interweaving images, and each interweaving image is projected to the inner wall of the darkroom through the micro-lens array to form a projection so as to obtain a plurality of projections.
Specifically, the 3D display device is placed in a darkroom, so that the interlaced images are projected onto the inner wall of the darkroom through the microlens array to form a plurality of projections, wherein each projection corresponds to the interlaced image one by one, that is, each projection corresponds to the preset interlacing parameter one by one.
Step S203, shooting each projection through a camera to obtain a projection image with different color stripes arranged in a staggered mode, so that a plurality of projection images are obtained.
Specifically, the preset feature 3D image includes two left and right symmetric regions or two up and down symmetric regions, and the two regions are filled with different colors respectively, and are subjected to interleaving processing by preset interleaving parameters and then projected onto the inner wall of the darkroom to form different color stripe interleaved projections, so that the projected image is a different color stripe interleaved image.
Step S204, a first range set is obtained according to each projection image and a preset image coordinate system, so that a plurality of first range sets are obtained, each first range set corresponds to one preset interweaving parameter, the first range set comprises a plurality of central area coordinate ranges, and coordinate information corresponding to a central area of each stripe in the projection images corresponds to one central area coordinate range.
Specifically, the projection images are images with different color stripes staggered, each projection image comprises a plurality of stripes, the edge cohesion of the stripes is low, the cohesion of the central area is high, and in order to further improve the 3D display effect, therefore, the central area of each stripe is set as a central area coordinate range, the central area coordinate ranges of the stripes of each projection image form a first range set, and each projection image corresponds to one preset interlacing parameter, so each first range set corresponds to one preset interlacing parameter.
In step S205, a calibration table is formed by the plurality of preset interleaving parameters and the plurality of first range sets.
Specifically, a calibration table is formed by storing a plurality of preset interleaving parameters, i.e., calibration parameters, and a plurality of first range sets, i.e., preset range sets, corresponding relationships between the preset interleaving parameters and the first range sets, i.e., preset coordinate ranges.
In this embodiment, a preset characteristic 3D image is interleaved by a plurality of preset interleaving parameters, then output and displayed, and projected onto an inner wall of a darkroom through a microlens array to form a plurality of projections, then a plurality of projections are shot by a camera of the 3D display device to obtain a plurality of projection images, coordinate information of a central area of a fringe of each projection image is respectively obtained to obtain a central area coordinate range corresponding to the projection image, the plurality of central area coordinate ranges form a first range set of the projection image, each first range set corresponds to one preset interleaving parameter, and a calibration table is obtained according to the first range set and the preset interleaving parameters, where the preset interleaving parameters are calibration parameters, the first range set is a preset range set, and the central area coordinate range is a preset coordinate range. When the 3D display device is used by a user, the preset range set corresponding to the human eye coordinates can be quickly confirmed according to the human eye coordinates and the calibration table, so that the optimal calibration parameters are further confirmed, when the 3D display device displays a 3D image, the 3D image is processed according to the optimal calibration parameters, and the user can be ensured to obtain the optimal 3D viewing effect.
When the method for determining the 3D display calibration parameters is used in the using process of the 3D display device, the parameters of a camera of the 3D display device need to be determined, and the projection images are ensured to be shot under the same condition. Therefore, on the basis of the above embodiment, in another embodiment, referring to fig. 5, before step S203, the method further includes:
and S301, starting the camera and fixing camera parameters of the camera.
In this embodiment, in order to prevent the parameters of the camera from changing when the camera acquires the projected image, thereby causing errors to the final result, the parameters of the camera need to be fixed during calibration, and the projected image is ensured to be obtained under the same condition.
When the method for determining the 3D display calibration parameters is used in the use process of a 3D display device, before the projection image is displayed, the 3D image to be displayed needs to be processed through the optimal calibration parameters and then output for display. Therefore, on the basis of the above embodiment, in another embodiment, referring to fig. 6, after step S12, the method further includes:
step S401, receiving a 3D image to be displayed.
And step S402, reading the optimal calibration parameters.
And S403, performing interleaving processing on the 3D image to be displayed according to the optimal calibration parameters, and outputting and displaying the interleaved image.
In this embodiment, when the calibrated 3D display device is used to output a to-be-displayed 3D image, the stored optimal calibration parameter is obtained first, then the interleaving processing is performed on the to-be-displayed 3D image according to the optimal calibration parameter, and the to-be-displayed 3D image is output and displayed after the interleaving processing, so that a good 3D display effect and a good user experience effect of the output to-be-displayed 3D image are ensured.
An embodiment of the storage medium of the present invention. In this embodiment, the storage medium is suitable for a 2D display device configured with a camera, a 3D optical panel is detachably disposed on a display screen of the 2D display device, the 3D optical panel includes a substrate and a microlens array, and the storage medium is used for storing a program, wherein the program performs the following steps when the program is executed:
acquiring a calibration table and a preset image coordinate system, wherein the calibration table comprises a plurality of calibration parameters, each calibration parameter corresponds to a preset range set, and each preset range set comprises a plurality of preset coordinate ranges;
shooting by a camera to obtain a human eye image, and acquiring a human eye coordinate through a preset image coordinate system and the human eye image;
and if the target preset range set comprises the human eye coordinates, acquiring target calibration parameters corresponding to the target preset range set, and storing the target calibration parameters as the optimal calibration parameters.
As a further improvement of the embodiment of the present invention, the program further performs the following steps when running:
shooting through a camera to obtain a human eye image;
dividing the image of the person eye to obtain a grid image under a preset image coordinate system, wherein the grid image comprises a plurality of grids with the same size;
and if the human eyes in the human eye image fall into the target square grids, taking the coordinate information corresponding to the target square grids as human eye coordinates.
As a further improvement of the embodiment of the present invention, the program further performs the following steps when running:
acquiring a preset characteristic 3D image and a plurality of preset interweaving parameters, wherein the preset characteristic 3D image comprises two bilaterally symmetrical regions or two vertically symmetrical regions which are respectively filled with different colors;
the preset characteristic 3D image is subjected to interweaving processing by utilizing each preset interweaving parameter to obtain a plurality of interweaving images, and each interweaving image is projected to the inner wall of the darkroom through the micro lens array to form a projection so as to obtain a plurality of projections;
shooting each projection through a camera to obtain a projection image with different color stripes in staggered arrangement so as to obtain a plurality of projection images;
obtaining a first range set according to each projection image and a preset image coordinate system so as to obtain a plurality of first range sets, wherein each first range set corresponds to one preset interweaving parameter and comprises a plurality of central area coordinate ranges, and coordinate information corresponding to a central area of each stripe in the projection image corresponds to one central area coordinate range;
and the plurality of preset interleaving parameters and the plurality of first range sets form a calibration table.
As a further improvement of the embodiment of the present invention, the program further performs the following steps when running:
and starting the camera and fixing camera parameters of the camera.
As a further improvement of the embodiment of the present invention, the program further performs the following steps when running:
the receiving module is used for receiving a 3D image to be displayed;
obtaining an optimal calibration parameter;
and the display module is used for performing interweaving processing on the 3D image to be displayed according to the optimal calibration parameters and outputting and displaying the image subjected to the interweaving processing.
For other details of the specific implementation technical solution in the storage medium of the above embodiment, reference may be made to the description of the method for determining the 3D display calibration parameter in the above embodiment, and details are not repeated here.
Fig. 7 shows an embodiment of the 2D display device of the invention. In this embodiment, this 2D display device is configured with the camera, can dismantle on its display screen and set up 3D optical panel, 3D optical panel includes base plate and microlens array, 2D display device includes:
a processor;
a memory for storing processor-executable instructions;
wherein the memory has stored thereon instructions which, when executed by the processor, implement the steps of the method for determining calibration parameters for 3D display as described in embodiments 1-5.
In some embodiments, the invention further discloses a 3D display system, which includes the above 2D display device, and a 3D optical panel detachably disposed on a display screen of the 2D display device, where the 3D optical panel includes a substrate and a microlens array, and the 2D display device is provided with a camera.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The embodiments of the present invention have been described in detail, but the present invention is only exemplary and is not limited to the embodiments described above. It will be apparent to those skilled in the art that any equivalent modifications or substitutions can be made within the scope of the present invention, and thus, equivalent changes and modifications, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the scope of the present invention.