Parallax stereo imaging method and equipment

By splitting and identifying 3D film and television images, and refreshing the display according to the vertical synchronization signal, the problem that ordinary devices cannot achieve 3D stereoscopic imaging is solved, and efficient 3D stereoscopic imaging effect on ordinary display devices is achieved.

CN119094718AActive Publication Date: 2024-12-06BEIJING HAMMER & AUK ENERGY-EFFICIENT EQUIP CO LTD

Patent Information

Application Number
CN202411159349.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-06
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

The existing technology cannot realize 3D stereo imaging on ordinary computers or TVs, resulting in the rich feeling brought by ordinary families experiencing 3D videos that require purchasing equipment with 3D display functions, which is relatively high, resulting in 3D stereo imaging technology not being used in the home and personal fields. Get vigorously developed.

Method used

By obtaining the target 3D film and television image set, split it into two film and television images in left and right or upper and lower formats, and adding different logos, refresh the display according to the vertical synchronization signal of the display device, and form a parallax effect to achieve 3D stereoscopic imaging according to the vertical synchronization signal of the display device, it is possible to achieve 3D three-dimensional imaging according to the preset frequency. .

Benefits of technology

Even on devices without 3D display functions, 3D stereo imaging can be realized, providing the same stereo effects as 3D-function TVs, projectors or VR glasses, allowing more people to experience the rich experience of 3D video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094718A_ABST
    Figure CN119094718A_ABST
Patent Text Reader

Abstract

The invention discloses a parallax stereo imaging method and equipment, and relates to the field of 3D stereo imaging, and the method comprises the steps: splitting any 3D film and television image in a target 3D film and television image set into two film and television images according to a left-right format or an up-down format; adding different identifiers to the two film and television images to obtain an identifier image group; on the basis of a vertical synchronizing signal of a screen of the display equipment, refreshing identification image groups corresponding to the 3D film and television images in the target 3D film and television image set according to a preset frequency, and displaying the identification image groups on the screen of the display equipment at the same time; and the two identified movie and television images in the same identification image group form a parallax effect on a screen of the display equipment, so that 3D stereo imaging is realized. According to the invention, parallax stereo imaging can be realized, and the method can be applied to display equipment without a 3D function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of 3D stereoscopic imaging, and in particular to a parallax stereoscopic imaging method and device. Background Art

[0002] At present, the playing principle of 3D stereoscopic movies in cinemas is: when showing, the vibration direction of light is used to overlap two pictures on the screen to achieve projection, and through special polarized 3D glasses, the left and right eyes of people receive different images, forming a parallax effect, and then achieving a 3D effect. However, the polarized 3D mentioned above cannot be realized on ordinary computers or TVs. If ordinary families want to experience the rich feelings brought by 3D videos, they must pay more costs to buy TVs, projectors or VR glasses with their own 3D display functions. However, due to cost and other reasons, products based on the field of stereoscopic videos for families and individuals have not been vigorously developed. In other words, there is currently no 3D stereoscopic imaging technology applied to ordinary display devices (display devices without 3D functions). Summary of the invention

[0003] The purpose of the present application is to provide a parallax stereoscopic imaging method and device, which can realize parallax stereoscopic imaging and can be applied to display devices without 3D functions.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a parallax stereoscopic imaging method, comprising:

[0006] Obtain target 3D video image set;

[0007] For any 3D video image in the target 3D video image set, split the 3D video image into two video images in a left-right format or a top-bottom format;

[0008] adding different labels to the two video images to obtain a label image group;

[0009] Get the vertical synchronization signal of the screen of the display device;

[0010] Based on the vertical synchronization signal, the identification image group corresponding to each 3D video image in the target 3D video image set is refreshed at a preset frequency and displayed on the screen of the display device at the same time; two identified video images in the same identification image group form a parallax effect on the screen of the display device to achieve 3D stereoscopic imaging.

[0011] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the parallax stereoscopic imaging method.

[0012] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0013] The present application provides a parallax stereoscopic imaging method and device, which splits the 3D film and television images in the target 3D film and television image set into two film and television images in a left-right format or a top-down format, and then adds different identifiers to obtain an identifier image group; at this point, the original film and television images that need to be supported by the 3D display function are split, so that even a display device without a 3D display function can display it, and the two split images are distinguished by adding an identifier to facilitate subsequent display calls. When the display device displays, according to the vertical synchronization signal of the screen of the display device, the identifier image group corresponding to each 3D film and television image in the target 3D film and television image set is refreshed at a preset frequency and displayed on the screen at the same time. Since the two identified film and television images in the same identifier image group form a parallax effect on the screen, 3D stereoscopic imaging is achieved. In short, the method of the present application splits and processes each frame of the film and television (left-right format or top-down format) into two frames of images with identifiers, and displays them on an ordinary display screen at a fixed frequency in a certain order to achieve the effect of parallax stereoscopic imaging. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 This is a diagram of an application environment of a parallax stereoscopic imaging method in an embodiment of the present application;

[0016] Figure 2 A schematic diagram of a process flow of a parallax stereoscopic imaging method provided in one embodiment of the present application;

[0017] FIG3 is a flowchart of a multi-threaded parallax stereoscopic imaging method provided by an embodiment of the present application; FIG3(a) is a flowchart of an image decoding thread, FIG3(b) is a flowchart of an image processing thread, and FIG3(c) is a flowchart of an image display thread;

[0018] Figure 4A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] There are two ways to store video images in 3D movies: left-right format and top-bottom format. The left-right format is a picture played on a playback device without 3D stereo function, divided vertically in half from the middle, and looks like it is composed of two almost identical pictures side by side on the left and right. The top-bottom format is a picture played on a playback device without 3D stereo function, divided horizontally in half from the middle, and looks like it is composed of two almost identical pictures side by side on the top and bottom. People can achieve the effect of 3D movies by wearing devices that can recognize left-right images or top-bottom images and using the principle of parallax.

[0021] Based on this principle, the present application provides a parallax stereoscopic imaging method and device, which can achieve the same stereoscopic effect as a 3D-enabled TV, projector or VR glasses on an ordinary screen with a screen refresh rate of 120hz or above, allowing more people to experience the richness brought by 3D video.

[0022] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The parallax stereoscopic imaging method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the target 3D film and television image set to the server 104, and the server 104 splits the 3D film and television images in the target 3D film and television image set into two film and television images in a left-right format or a top-bottom format, and then adds different logos; the server 104 obtains the vertical synchronization signal of the screen of the display device in real time, and refreshes the logo image group corresponding to each 3D film and television image according to the preset frequency based on the monitored signal, and displays it on the screen at the same time to form a parallax effect, thereby realizing 3D stereoscopic imaging. In addition, in some embodiments, the parallax stereoscopic imaging method can be implemented by the server 104 or the terminal 102 alone, or the server 104 can obtain the target 3D film and television image set from the data storage system and perform corresponding processing.

[0024] The terminal 102 may be, but is not limited to, various common display devices without 3D functions, such as desktop computers, laptop computers, tablet computers, and televisions. The server 104 may be implemented as an independent server or a server cluster composed of multiple servers, or may be a cloud server.

[0025] In an exemplary embodiment, Figure 2 As shown, a parallax stereoscopic imaging method is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or can be executed by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used for explanation, and the steps include the following steps 201 to 205.

[0026] Step 201: Acquire a target 3D video image set.

[0027] In an actual application, step 201 includes: 1) acquiring a target video; 2) decapsulating the target video using a decoder to obtain a target encoded video; 3) decompressing the target encoded video to obtain a target 3D video image set.

[0028] Among them, a decoder is a program or device that can compress or decompress digital video. Video file formats include but are not limited to MP4 (MPEG-4 Part 14), MKV (MKV is the file extension of Matroska), FLV (FLV is the abbreviation of FLASHVIDEO), AVI (Audio Video Interleave), etc. These are containers for storing encoded data, and the decapsulation used is to take the compressed data out of the above containers. In order to reduce the capacity of the video file, the original data (RGB data, PCM data) needs to be encoded by H264, AAC and other encoding technologies to encode the sound and image data and put them into a storage container (such as MP4, AVI, etc.), so decompression is required, which is also called decoding. The main operation is to decode the encoded data into the original data RGB, PCM, etc.

[0029] The 3D video images in the target 3D video image set obtained after decompression may be image data in ARGB_8888 format, image data in ARGB_4444 format, or image data in RGB_565 format. In the specific application of the present application, in order to be more widely applicable to common display devices such as televisions in existing households, so that the final image information volume is larger and the image effect is better, image data in ARGB_8888 format is used. That is, the image data is decoded to form image data in ARGB_8888 format.

[0030] Image data in ARGB_8888 format is available for program calls in the form of byte arrays in memory. It should be noted that image data is formed by pixels, and each pixel is composed of four channel values ​​of ARGB. That is to say, for image data in ARGB_8888 format, each pixel is composed of 4 bytes with a total of 32 bits, of which 8 bits are used to represent the Alpha channel (transparency), 8 bits are used to represent the red channel, 8 bits are used to represent the green channel, and 8 bits are used to represent the blue channel. In memory, the pixel storage order of the ARGB_8888 bitmap is from high to low, namely Alpha, red, green, and blue, that is, ARGB_8888. Each channel of A, R, G, and B occupies one byte in memory, so the number of bytes occupied by each row of pixels is equal to the width of the image multiplied by 4, and the number of bytes occupied by the entire image in memory is equal to the number of bytes occupied by each row of pixels multiplied by the height of the image.

[0031] Step 202 : for any 3D video image in the target 3D video image set, split the 3D video image into two video images in a left-right format or a top-bottom format.

[0032] The step of splitting the 3D video image into two video images in a left-right format includes:

[0033] 11) For any row of pixel data in the 3D video image, obtain the storage address of the pixel in the first column in the memory and use it as the row start address. It should be noted that this address is allocated by the system when the storage array is created in the memory.

[0034] 12) Taking the pixel byte data at the row head address as the starting point, a first number of pixel byte data is stored in the left frame array. The first number = (width of the 3D video image / 2) × 4.

[0035] 13) Determine the right frame pixel start address based on the row start address and the first number; specifically, (row start address plus the width of the 3D video image / 2)×4 to obtain the right frame pixel start address.

[0036] 14) Taking the pixel byte data at the first pixel address of the right frame as the starting point, a first number of pixel byte data are stored in the right frame array.

[0037] 15) The left frame array corresponding to the multiple rows of pixel data in the 3D video image constitutes a left frame video image, and the right frame array corresponding to the multiple rows of pixel data constitutes a right frame video image. Specifically, through the recursive processing of the above steps 11) to 14), the left frame array and the right frame array corresponding to the second row, the third row, ..., the Nth row (N represents the height pixel value of the image) are obtained, and then respectively placed in the corresponding storage array, thereby realizing the separation operation of the left and right format images.

[0038] The step of splitting the 3D video image into two video images in a top-bottom format includes:

[0039] 21) Obtaining the storage address of the pixel in the first row and first column of the 3D video image in the memory as the pixel first address.

[0040] 22) Taking the pixel byte data at the pixel first address as the starting point, store a second number of pixel byte data into the upper frame array; wherein the second number = the width of the 3D video image × 4 × (the height of the 3D video image / 2).

[0041] 23) Determine a next frame pixel first address based on the pixel first address and the second number.

[0042] 24) Taking the pixel byte data at the first address of the lower frame pixel as the starting point, a second number of pixel byte data is stored in the lower frame array; the upper frame array constitutes an upper frame video image, and the lower frame array constitutes a lower frame video image.

[0043] Step 203, adding different logos to the two video images to obtain a logo image group. The logo is generally a watermark image, and its size and shape can be set as needed. In order to efficiently add the logo to the image, the background color of the logo must be transparent.

[0044] In an application example, step 203 includes:

[0045] 31) For any video image, obtain the corresponding identifier.

[0046] 32) Loop through the pixels in the identifier to obtain the transparent channel value, red channel value, green channel value and blue channel value of each pixel.

[0047] 33) Normalizing the transparent channel values ​​of all pixels in the logo.

[0048] 34) Determine the starting position of the logo on the video image; specifically, first obtain the first address of the logo in the memory and the first address of the video image in the memory, and then superimpose the logo and the video image. In this process, the superimposition rules can be set as needed, such as: aligning the logo with the bottom of the video image, aligning the logo with the left end of the video image, etc. Based on the superimposed position of the two, determine the starting position of the logo on the video image. In a specific application, the starting position is generally assumed to be the upper right corner of the video image.

[0049] 35) Based on the starting position, all pixels in the identifier are synthesized one by one with the corresponding pixels in the film and television image according to the red channel value, green channel value, blue channel value and normalized transparent channel value of each pixel in the identifier to obtain a plurality of synthesized pixels.

[0050] Among them, the synthesis calculation formula of the RGB value of the synthesized pixel is: new RGB component = (1-alpha_normal)*picture component (R / G / B)+alpha_normal*identification component (R / G / B); among them, alpha_normal is the transparent channel value of any pixel in the identification after normalization; the identification component (R / G / B) represents the red channel value, green channel value or blue channel value of the pixel in the identification; the picture component (R / G / B) represents the red channel value, green channel value or blue channel value of the pixel corresponding to the film and television image; the new RGB component represents the red channel value, green channel value or blue channel value of the synthesized pixel.

[0051] 36) After the synthesized pixel passes the boundary detection, the pixel at the corresponding position in the video image is updated to the synthesized pixel to obtain a marked video image; the marked video images corresponding to the two video images constitute a marked image group.

[0052] Among them, the passing condition for boundary detection is: 0 < each channel value of R / G / B < 255.

[0053] Step 204, obtain the vertical synchronization signal of the screen of the display device. It should be noted that in order to ensure that the image is not torn when displayed on the screen, only when the screen sends the VSync signal can rendering start to achieve a better display effect. Since the operation of setting the picture is performed on the main thread, and the operation of providing image data runs on a worker thread, to ensure synchronization between the two threads, a synchronization lock must be added to the object corresponding to the memory area of the operation. To ensure that the image can be refreshed at a certain order and frequency, the present application provides two implementation methods.

[0054] Step 205, based on the vertical synchronization signal, refresh each group of identification images corresponding to the target 3D movie images in the target 3D movie image set at a preset frequency, and simultaneously display them on the screen of the display device; two identified movie images in the same group of identification images form a parallax effect on the screen of the display device to achieve 3D stereoscopic imaging.

[0055] Corresponding to the two implementation methods mentioned in step 204 above, in one of the present applications, the update operation of image data is directly implemented by listening to the VSync signal; in another of the present applications, the update operation of image data is implemented by registering a frame animation effect. It should be noted that the underlying principle of registering a frame animation effect is also to listen to the VSync signal, that is, register a frame animation based on the vertical synchronization signal. However, many operations in registering a frame animation are completed by the system, and developers only need to agree on the rules; while the method of directly listening to the VSync signal requires developers to determine the logic.

[0056] In addition, it should be noted that a frame animation is a relatively traditional animation, which is created by a series of different images and played in sequence. A frame animation can be agreed with the system: loop playback or single playback, and the display time of each frame image. The vertical synchronization signal is a signal provided externally before the screen is refreshed. The host side selects an appropriate strategy to complete the screen refresh according to this signal to avoid the situation of data refresh and screen scanning mismatch (tearing).

[0057] Specifically, directly implementing the update operation of image data by listening to the VSync signal includes:

[0058] 51) Initialize the memory array; the memory array is used to store two identified movie images in the same group of identification images, and assign different index values to the two identified movie images.

[0059] In an application example, a memory array with a capacity of 2 is initialized to store two frames of split and marked video images, and to define the index of the image currently being refreshed. The default value is 0, which is the first element of the memory array.

[0060] 52) Register the VSync signal monitoring callback interface; when a signal arrives, the server will call this interface.

[0061] 53) When the VSync signal monitoring callback interface monitors the arrival of the vertical synchronization signal, the current refresh image index of the display device is 0, then the marked film and television image with an index value of 0 is obtained from the memory array and displayed on the screen of the display device, and the current refresh image index is increased by one; if the current refresh image index of the display device is 1, then the marked film and television image with an index value of 1 is obtained from the memory array and displayed on the screen of the display device, and the current refresh image index is reset to 0.

[0062] Among them, the identification image groups corresponding to each 3D video image in the target 3D video image set continuously enter the memory array in the form of a blocking queue, and the display of different images is refreshed accompanied by the vertical synchronization signal; when the identification image groups corresponding to all 3D video images in the target 3D video image set are displayed, the VSync signal monitoring callback interface is deregistered.

[0063] Registering the frame animation to implement the image data update operation (i.e., based on the frame animation, refreshing the identification image group corresponding to each 3D video image in the target 3D video image set according to a preset frequency and displaying it on the screen of the display device at the same time), including:

[0064] 61) Initialize the frame animation API, determine the display time of each video image (unit: milliseconds) and the number of display frames required for one loop (when there is no data, two black background frames can be initialized), and set whether an infinite loop is required. In this application, it is set to require an infinite loop and start the animation; the loop can only be exited when the animation is stopped, and then the animation can be registered to the UI component of the server.

[0065] 62) Since data update and data display are completed in different threads, data synchronization is generally required. However, in the application of this frame animation, data synchronization has been completed by the bottom layer of the system. In actual application, you only need to obtain the first element of the corresponding frame animation, and then put the left (upper) image in; then obtain the second element of the corresponding frame animation, and then put the right (lower) image in, so as to realize data update.

[0066] 63) When you need to exit the playback interface, stop the frame animation and stop the data update thread.

[0067] In order to explain the threads mentioned above in more detail, in another exemplary embodiment of the present application, different from the existing scene swapping (shutter glasses) method of left-right format stereoscopic video playback, and in order to achieve faster implementation, provide users with a more streamlined 3D experience, and achieve functional optimization, as shown in FIG3, the present application also implements parallax stereoscopic imaging in a multi-threaded manner, as shown below:

[0068] (1) Image decoding thread: As shown in FIG3(a), the decoder decapsulates and decompresses the movie (left-right format or top-bottom format) to obtain the original data (i.e., the target 3D video image set) and puts it into the blocking queue A.

[0069] (2) Image processing thread: As shown in Figure 3(b), the original data in the blocking queue A is obtained; it is determined whether there is data in the blocking queue A; when there is data in the blocking queue A, the original data is split into two frames horizontally or vertically according to the movie format, and different labels are added to the two frames after the split to distinguish the order, and then the images are put into the blocking queue B.

[0070] (3) Image display thread: As shown in Figure 3(c), this stage mainly ensures the timely update of the image and displays the previous left eye image and right eye image in a fixed order and fixed frequency when there is no image update, forming a parallax effect to facilitate the recognition of the wearable device and thus achieve a 3D stereoscopic imaging effect.

[0071] Specifically, get the original data in blocking queue B; determine whether there is data in blocking queue B; when there is data in blocking queue B, take out the image data from blocking queue B, and then call the image update interface to save the data in the memory cache for use by the display system. If there is content in the cache, replace it directly. The operating system will monitor the signal: register the VSync signal monitoring callback interface or initialize the frame animation properties (loop playback, single frame display time). When the VSync signal is monitored or the single frame display time of the frame animation is reached, get the image data from the memory cache and encapsulate it into the encapsulation format required for setting the display, assign it and refresh it.

[0072] To be more specific, when a signal arrives, it is determined whether there is data in the memory array. If there is no data, no operation is performed. If there is data, the index of the current refresh image is determined. If it is 0, the first element in the array is directly obtained, the first element is set as the display background, and the index is incremented by 1. If it is 1, the second element in the array is directly obtained, the second element is set as the display background, and the index is returned to 0. In this way, a fixed order and fixed frequency display refresh can be achieved.

[0073] Since image processing and image display run in different threads, association and thread synchronization are required. Put the identification image group into the memory array. When the memory array is not in use, directly put the left (upper) image in the identification image group into the first element of the memory array, and put the right (lower) image into the second element of the memory array; if the image display thread is using an element of the memory array, wait until the thread is finished using it before updating the new image data (that is, the next identification image group). When you need to exit the playback interface, unregister the VSync signal callback interface and stop the data update thread.

[0074] The present application also provides an application scenario, which applies the above-mentioned parallax stereoscopic imaging method and also requires pairing corresponding glasses. That is, the present application can realize the display of fixed order and fixed frequency and refresh the left eye and right eye images stored in the memory cache by monitoring the vertical synchronization signal VSync of the screen or setting frame animation, and then the personnel wearing the device that can recognize the image identification (such as liquid crystal glasses, etc.) can see or receive the final effect of parallax stereoscopic imaging. The present application enables ordinary display devices without 3D function to play stereoscopic images. Even display devices with 3D function can realize another kind of stereoscopic imaging through the method of the present application.

[0075] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 4As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a parallax stereoscopic imaging method is implemented.

[0076] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0077] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0078] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0080] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0081] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0082] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0083] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A parallax stereoscopic imaging method, characterized in that: The parallax stereoscopic imaging method comprises: Obtain target 3D video image set; For any 3D video image in the target 3D video image set, split the 3D video image into two video images in a left-right format or a top-bottom format; adding different labels to the two video images to obtain a label image group; Get the vertical synchronization signal of the screen of the display device; Based on the vertical synchronization signal, the identification image group corresponding to each 3D video image in the target 3D video image set is refreshed at a preset frequency and displayed on the screen of the display device at the same time; two identified video images in the same identification image group form a parallax effect on the screen of the display device to achieve 3D stereoscopic imaging.

2. The parallax stereoscopic imaging method according to claim 1, characterized in that: The steps of obtaining a target 3D video image set include: Get the target video; Decapsulating the target video using a decoder to obtain the target encoded video; The target encoded video is decompressed to obtain a target 3D video image set.

3. The parallax stereoscopic imaging method according to claim 1, characterized in that: The 3D video images in the target 3D video image set are all image data in ARGB_8888 format.

4. The parallax stereoscopic imaging method according to claim 3, characterized in that: The step of splitting the 3D video image into two video images in a left-right format comprises: For any row of pixel data in the 3D video image, obtain the storage address of the pixel in the first column in the memory and use it as the row start address; Taking the pixel byte data at the row head address as the starting point, storing a first number of pixel byte data into the left frame array; Determine a right frame pixel start address based on the row start address and the first number; Taking the pixel byte data at the first address of the right frame pixel as the starting point, storing a first number of pixel byte data into the right frame array; wherein the first number=(width of the 3D video image / 2)×4; A left frame array corresponding to a plurality of rows of pixel data in the 3D video image constitutes a left frame video image, and a right frame array corresponding to a plurality of rows of pixel data constitutes a right frame video image.

5. The parallax stereoscopic imaging method according to claim 3, characterized in that: The step of splitting the 3D video image into two video images in an up-and-down format comprises: Obtaining the storage address of the pixel in the first row and first column of the 3D video image in the memory as the pixel first address; Taking the pixel byte data at the pixel first address as the starting point, storing the second amount of pixel byte data into the upper frame array; Determine a pixel first address of a next frame based on the pixel first address and the second number; Taking the pixel byte data at the first address of the lower frame pixel as the starting point, a second number of pixel byte data is stored in the lower frame array; wherein the second number = the width of the 3D video image × 4 × (the height of the 3D video image / 2); the upper frame array constitutes the upper frame video image, and the lower frame array constitutes the lower frame video image.

6. The parallax stereoscopic imaging method according to claim 3, characterized in that: The step of adding different labels to the two video images to obtain a label image group includes: For any video image, obtain the corresponding identifier; Loop through the pixels in the mark to obtain the transparent channel value, red channel value, green channel value and blue channel value of each pixel; Normalizing the transparent channel values ​​of all pixels in the logo; Determine the starting position of the mark on the video image; Based on the starting position, according to the red channel value, green channel value, blue channel value and normalized transparent channel value of each pixel in the mark, all pixels in the mark are synthesized one by one with the corresponding pixels in the film and television image to obtain a plurality of synthesized pixels; After the synthesized pixel passes the boundary detection, the pixel at the corresponding position in the video image is updated to the synthesized pixel to obtain the marked video image; the marked video images corresponding to the two video images constitute a marked image group.

7. The parallax stereoscopic imaging method according to claim 6, characterized in that: The synthesis calculation formula of the RGB value of the synthesized pixel is: New RGB component = (1-alpha_normal)*picture component (R / G / B)+alpha_normal*identification component (R / G / B); Among them, alpha_normal is the normalized transparent channel value of any pixel in the logo; the logo component (R / G / B) represents the red channel value, green channel value, or blue channel value of the pixel in the logo; the picture component (R / G / B) represents the red channel value, green channel value, or blue channel value of the corresponding pixel in the film and television image; the new RGB component represents the red channel value, green channel value, or blue channel value of the synthesized pixel.

8. The parallax stereoscopic imaging method according to claim 1, characterized in that: Based on the vertical synchronization signal, the steps of refreshing the identification image groups corresponding to the respective 3D video images in the target 3D video image set at a preset frequency and displaying them on the screen of the display device at the same time include: Initialize a memory array; the memory array is used to store two marked video images in the same marked image group, and assign different index values ​​to the two marked video images; Register VSync signal monitoring callback interface; When the VSync signal monitoring callback interface monitors the arrival of the vertical synchronization signal, the current refresh image index of the display device is 0, then the marked video image with an index value of 0 is obtained from the memory array and displayed on the screen of the display device, and the current refresh image index is increased by one; if the current refresh image index of the display device is 1, the marked video image with an index value of 1 is obtained from the memory array and displayed on the screen of the display device, and the current refresh image index is reset to 0; Among them, the identification image groups corresponding to each 3D video image in the target 3D video image set continuously enter the memory array in the form of a blocking queue, and the display of different images is refreshed accompanied by the vertical synchronization signal; when the identification image groups corresponding to all 3D video images in the target 3D video image set are displayed, the VSync signal monitoring callback interface is deregistered.

9. The parallax stereoscopic imaging method according to claim 1, characterized in that: Based on the vertical synchronization signal, the steps of refreshing the identification image groups corresponding to the respective 3D video images in the target 3D video image set at a preset frequency and displaying them on the screen of the display device at the same time include: Registering frame animation based on the vertical synchronization signal; Based on the frame animation, the identification image groups corresponding to the respective 3D video images in the target 3D video image set are refreshed at a preset frequency and displayed on the screen of the display device at the same time.

10. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the parallax stereoscopic imaging method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Stereoscopic image display and driving method thereof

    CN101754041A

  • Display method and display device

    CN102685521A

  • Live video sending method and device, storage medium and electronic device

    CN112291577A

  • Method for executing drawing operation by application and electronic equipment

    CN113553130A

  • Liquid crystal display device driving method and liquid crystal display device

    WO2015139219A1

Cited By

  • Parallax stereoscopic imaging method and device

    WO2026040699A1