Disclosure of Invention
In order to improve the film watching effect, the application provides a display method, a display system and computer equipment of a 3D display screen based on artificial intelligence.
In a first aspect, the application provides a display method of a 3D display screen based on artificial intelligence, which adopts the following technical scheme:
the display method of the 3D display screen based on the artificial intelligence comprises the following steps:
acquiring an original picture of each frame of the 2D video;
analyzing the original picture, extracting the depth information of the original picture, and generating a corresponding depth map according to the depth information;
combining the depth map with the original picture to generate a new view, combining the new view with the original picture to generate a binocular view, and performing video synthesis and compression on binocular views of continuous frames to obtain a 3D video;
acquiring attribute information of a 2D video;
and adjusting the image quality of the 3D video according to the attribute information.
By adopting the technical scheme, the original picture of each frame of the 2D video is obtained, the original picture is processed, the depth map of the original picture is correspondingly generated, the binocular view is generated according to the depth map and the original picture, and the binocular view of the continuous frames is subjected to video synthesis and compression to generate the 3D video. And finally, analyzing the attribute information of the 2D video, and adjusting the image quality of the 3D video according to the attribute information to ensure that the image quality is more suitable, thereby effectively improving the effect of viewing the video.
Preferably, the acquiring of the attribute information of the 2D video includes:
dividing the 2D video into a plurality of time-period videos according to the duration of the 2D video;
and acquiring an original picture in the time-period video, analyzing the tone of the original picture, and determining the attribute information of the 2D video according to the analysis result.
By adopting the technical scheme, the 2D video is divided into the videos in the time periods, and the attribute information of the corresponding time period is determined according to the original picture, so that the judgment of the attribute information is more reasonable.
Preferably, the attribute information includes cool tone, neutral tone, and warm tone.
By adopting the technical scheme, the attribute information is classified, the image quality can be conveniently adjusted according to different attribute information in the follow-up process, and the method and the device are convenient and practical.
Preferably, the obtaining an original picture in the time-period video, analyzing the color tone of the original picture, and determining the attribute information of the 2D video according to the analysis result includes:
acquiring original pictures of different time points in a time period video;
analyzing the color attributes of the original picture, and calculating the number ratio of each color attribute, wherein the color attribute with the largest number ratio is the attribute information of the 2D video.
By adopting the technical scheme, the original pictures at different time points in the time period video are selected, and the attribute information of the 2D video is further determined by calculating the quantity ratio of the color attributes, so that the determination of the attribute information is more reasonable and accurate.
Preferably, the adjusting the image quality of the 3D video according to the attribute information includes:
acquiring image quality parameters corresponding to the attribute information in a table look-up mode;
and adjusting the image quality of the 3D video according to the image quality parameters.
By adopting the technical scheme, the adjustment of the image quality is more convenient and faster due to the different image quality parameters corresponding to different attribute information.
Preferably, after the adjusting the image quality of the 3D video according to the attribute information, the method further includes:
acquiring a first portrait of a user when playing is started;
acquiring a second portrait of the user at fixed time;
and comparing the second portrait with the first portrait, judging whether the user is in a fatigue state, and if so, reducing the current brightness and volume.
By adopting the technical scheme, the state of the user is judged, and when the user is in a fatigue state, the rest of the user is facilitated by reducing the current brightness and volume.
In a second aspect, the present application provides a display system of a 3D display screen based on artificial intelligence, which adopts the following technical solution:
display system based on artificial intelligence's 3D display screen includes:
a first obtaining module: the method comprises the steps of obtaining an original picture of each frame of the 2D video;
an AI module: the depth information extraction module is used for analyzing the original picture, extracting the depth information of the original picture and generating a corresponding depth map according to the depth information;
a generation module: combining the depth map with the original picture to generate a new view, combining the new view with the original picture to generate a binocular view, and performing video synthesis and compression on binocular views of continuous frames to obtain a 3D video;
a second obtaining module: the attribute information is used for acquiring the attribute information of the 2D video;
the image quality adjusting module: and the image quality of the 3D video is adjusted according to the attribute information.
By adopting the technical scheme, the original picture of each frame of the 2D video is obtained, the original picture is processed, the depth map of the original picture is correspondingly generated, the binocular view is generated according to the depth map and the original picture, and the binocular view of the continuous frames is subjected to video synthesis and compression to generate the 3D video. And finally, analyzing the attribute information of the 2D video, and adjusting the image quality of the 3D video according to the attribute information to ensure that the image quality is more suitable, thereby effectively improving the effect of viewing the video.
In a third aspect, the present application provides a computer device, which adopts the following technical solution:
a computer device comprising a memory and a processor, the memory having stored thereon a computer program that can be loaded by the processor and executed to perform any of the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium storing a computer program that can be loaded by a processor and executed to perform any of the methods described above.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the binocular view is generated according to the depth map and the original picture, the binocular view of the continuous frames generates the 3D video through video synthesis and compression, then the attribute information of the 2D video is analyzed, and the image quality of the 3D video is adjusted according to the attribute information, so that the image quality is more appropriate, and the effect of viewing the images can be effectively improved.
2. Selecting original pictures at different time points in a time period video, and determining attribute information of the 2D video by calculating the quantity ratio of color attributes, so that the determination of the attribute information is more reasonable and accurate;
3. and judging the state of the user, and when the user is in a fatigue state, reducing the current brightness and volume to be beneficial to the user to have a rest.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to fig. 1-4 and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application discloses a display method of a 3D display screen based on artificial intelligence, and with reference to FIG. 1, the display method comprises the following steps:
s1: an original picture of each frame of the 2D video is acquired.
Specifically, since a video is formed by a plurality of frames of pictures repeatedly appearing in sequence under the principle of persistence of vision, it is necessary to perform stereoscopic processing on each frame of picture to convert a 2D video into a 3D video.
S2: and analyzing the original picture, extracting the depth information of the original picture, and generating a corresponding depth map according to the depth information.
Specifically, the original picture is analyzed by using an AI module, the AI module is a neural network module, and the neural network module is configured by a pre-loaded trained artificial intelligence model.
The depth map of the picture is a two-dimensional function giving depth information of each picture coordinate, and the value of each pixel point is the depth of the pixel point, and is usually expressed as a gray map. Each pixel value of the depth map has a range of [0,255], and the pixel value represents the depth of the corresponding pixel in the original picture, for example, if the depth value is 0, the object corresponding to the pixel is farthest from the camera, and if the depth value is 255, the object corresponding to the pixel is closest to the camera. Obtaining a depth picture from an original picture is a mature technology and is not described herein again.
S3: and combining the depth map with the original picture to generate a new view, combining the new view with the original picture to generate a binocular view, and performing video synthesis and compression on the binocular views of the continuous frames to obtain a 3D video.
Specifically, in this embodiment, the original picture may be regarded as a left view, and the generated new view may be regarded as a right view, and the new view is synthesized from the depth map and the original image, so that there is parallax between the new view and the original picture, and the combined binocular view can give a stereoscopic effect. And (3) performing video synthesis and compression on the binocular images of the continuous frames to obtain the 3D video.
S4: attribute information of the 2D video is acquired.
Specifically, the attribute information includes a cool tone, a neutral tone, and a warm tone, and the attribute information is obtained by identifying a tone of an original picture of the 2D video.
S5: and adjusting the image quality of the 3D video according to the attribute information.
Specifically, the image quality of the 3D video is adjusted by image quality parameters, wherein the image quality parameters include brightness and red gain.
Referring to fig. 2, optionally, in this embodiment, in step S4, that is, acquiring the attribute information of the 2D video, the method includes the following sub-steps:
s41: and dividing the 2D video into a plurality of time period videos according to the time length of the 2D video.
S42: and acquiring an original picture in the time-period video, analyzing the tone of the original picture, and determining the attribute information of the 2D video according to the analysis result.
Specifically, the 2D video may be divided into a plurality of time period videos on average, or the 2D video may be divided into a plurality of time period videos according to a predetermined time length, for example, the duration of the 2D video is 2 hours, the 2D video may be divided into 4 segments on average, and the length of each time period video is 0.5 hour; the 2D video may also be divided into 10 segments with a length of 0.2 hours. The tone of the original picture comprises a cool tone, a center tone and a warm tone, and the tone of the original picture can be recognized by inputting the original picture into a trained neural network model, and the result of the tone is output.
Optionally, in this embodiment, in step S42, acquiring an original picture in the time-segment video, analyzing a color tone of the original picture, and determining attribute information of the 2D video according to an analysis result, including the following sub-steps:
s421: and acquiring original pictures of different time points in the time-period video.
S422: analyzing the color attributes of the original picture, and calculating the number ratio of each color attribute, wherein the color attribute with the largest number ratio is the attribute information of the 2D video.
Specifically, the color attributes include cool, neutral, and warm colors, for example, the cool colors are blue, green, and purple; and neutral colors are black and white; while the warm colors are red, yellow and orange. Dividing the 2D video into a plurality of time period videos, and then randomly acquiring original pictures at different time points in the time period videos, wherein the number of the original pictures in each time period video can be two or more. And identifying the tone of the original picture, wherein the largest tone ratio is the attribute information of the 2D video.
Referring to fig. 3, for example, a 2D video is divided into A, B, C, D four-segment time-period videos, and two original pictures a1 and a2 are acquired from an a video at two time points a1 and a2, respectively; acquiring two original pictures B1 and B2 at two time points of B1 and B2 from a B video respectively; acquiring two original pictures C1 and C2 at two time points of C1 and C2 from the C video respectively; two original pictures D1 and D2 are acquired from the D video at two time points of D1 and D2, respectively. The attribute information of the 2D video is a cool tone if the color attributes of a1 and a2 are cool, the color attribute of b1 is cool, the color attribute of b2 is neutral, the color attribute of D1 is neutral, the color attribute of D2 is warm, the proportion of cool is 0.5, the proportion of neutral is 1/3, and the proportion of cool is 1/6.
Optionally, in this embodiment, in step S5, namely, adjusting the image quality of the 3D video according to the attribute information, the method includes the following sub-steps:
s51: and acquiring the image quality parameters corresponding to the attribute information in a table look-up mode.
S52: and adjusting the image quality of the 3D video according to the image quality parameters.
Specifically, the image quality parameters include brightness and red gain, in this embodiment, three sets of image quality parameters are provided, and the three sets of image quality parameters are respectively in one-to-one correspondence with the attribute information, for example, when the attribute information is a cold tone, the image quality of the 3D video is adjusted according to the parameter of the image quality parameter 1; when the attribute information is neutral tone, adjusting the image quality of the 3D video according to the parameter of the image quality parameter 2; and when the attribute information is warm tone, adjusting the image quality of the 3D video according to the parameter of the image quality parameter 3.
Optionally, in this embodiment, after step S5, that is, after the image quality of the 3D video is adjusted according to the attribute information, the method further includes:
s6: a first portrait of a user at the beginning of playback is obtained.
S7: and acquiring a second portrait of the user at fixed time.
S8: and comparing the second portrait with the first portrait, judging whether the user is in a fatigue state, and if so, reducing the current brightness and volume.
Specifically, the display screen may be an OLED screen, and the display screen may be a flat panel display screen, and the portrait of the user is obtained through a camera on the flat panel. When the video starts to play, the portrait of the user can be shot by the camera within a certain time period after the video starts to play, and the portrait is stored, wherein the portrait is the first portrait. During the video playing process, the portrait of the user is obtained at a predetermined time interval, and the portrait is the second portrait, for example, the predetermined time interval may be 20 minutes. And comparing the second portrait with the first portrait, identifying the face, and judging that the user is in a fatigue state if the eyes are in a closed state when the second portrait is compared with the first portrait. Face recognition belongs to a mature technology, and is not described in detail herein. In order to improve the accuracy, the first person images of two adjacent second person images can be compared, and if the eye parts of the two times are in the closed state, the user is judged to be in the fatigue state. The user can restore the brightness and sound to normal by clicking the screen again.
Referring to fig. 4, an embodiment of the present application further discloses a display system of an artificial intelligence based 3D display screen, including:
a first obtaining module: for obtaining an original picture of each frame of the 2D video.
An AI module: the depth information extraction module is used for analyzing the original picture, extracting the depth information of the original picture and generating a corresponding depth map according to the depth information.
A generation module: and combining the depth map with the original picture to generate a new view, combining the new view with the original picture to generate a binocular view, and performing video synthesis and compression on the binocular views of the continuous frames to obtain a 3D video.
A second obtaining module: for obtaining attribute information of the 2D video.
The image quality adjusting module: and the image quality of the 3D video is adjusted according to the attribute information.
For specific limitations of the display system of the artificial intelligence based 3D display screen, reference may be made to the above limitations of the display method of the artificial intelligence based 3D display screen, which are not described herein again. The modules in the artificial intelligence based 3D display screen display system may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The embodiment of the application also discloses computer equipment which comprises a memory and a processor, wherein the memory is stored with a computer program which can be loaded by the processor and can execute the display method of the artificial intelligence based 3D display screen.
The embodiment of the application also discloses a computer readable storage medium, which stores a computer program capable of being loaded by a processor and executing the display method of the artificial intelligence based 3D display screen.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, the computer program can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink), DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
A processor in the present application may include one or more processing cores. The processor executes or executes the instructions, programs, code sets, or instruction sets stored in the memory, calls data stored in the memory, performs various functions of the present application, and processes the data. The Processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above.