Parallax stereoscopic imaging method and device
By splitting and identifying 3D movie images and refreshing them using vertical synchronization signals, the problem of ordinary display devices being unable to achieve 3D stereoscopic imaging was solved, enabling 3D stereoscopic imaging on ordinary display devices, reducing costs and improving the user experience.
Patent Information
- Application Number
- PCT/CN2025/108342
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-22
- Filing Date
- 2025-07-14
- Publication Date
- 2026-02-26
AI Technical Summary
Existing technologies cannot achieve 3D stereoscopic imaging on ordinary display devices, making it inconvenient for families and individuals to experience 3D video effects, and the cost is also high.
By splitting the target 3D film image into a horizontal or vertical format, adding different markers, and using the vertical synchronization signal of the display device to refresh the image at a preset frequency, a parallax effect is created, thus achieving 3D stereoscopic imaging.
Achieving 3D stereoscopic imaging effects on display devices without 3D display capabilities reduces equipment costs and improves the 3D video experience for ordinary families.
Smart Images

Figure CN2025108342_26022026_PF_FP_ABST
Abstract
Description
Parallax stereoscopic imaging method and device TECHNICAL FIELD
[0001] The present application relates to the field of 3D stereoscopic imaging, in particular to a parallax stereoscopic imaging method and device. BACKGROUND
[0002] At present, the playing principle of 3D stereoscopic movies in a cinema is as follows: during projection, two pictures are overlapped on a screen by using the vibration direction of light to realize projection, and through a specially-made polarized 3D glasses, different images are received by the left and right eyes of a person, a parallax effect is formed, and then 3D effect is realized. However, the above-mentioned polarized 3D cannot be realized on an ordinary computer or television. In order for an ordinary family to experience the rich feeling brought by 3D video, more cost must be paid to purchase a television, a projector or a VR glasses and the like which have a 3D display function. Due to cost and other reasons, products in the field of stereoscopic video based on families and individuals have not been developed vigorously. In other words, at present, there is no 3D stereoscopic imaging technology applied to ordinary display devices (display devices without 3D function). SUMMARY
[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 function.
[0004] In order to achieve the above-mentioned purpose, the present application provides the following solutions.
[0005] In a first aspect, the present application provides a parallax stereoscopic imaging method, comprising:
[0006] acquiring a target 3D video image set;
[0007] for any 3D video image in the target 3D video image set, splitting the 3D video image into two video images according to a left-right format or an up-down format;
[0008] adding different marks to the two video images to obtain a marked image group;
[0009] acquiring a vertical synchronization signal of a screen of a display device;
[0010] based on the vertical synchronization signal, refreshing the marked image groups corresponding to each 3D video image in the target 3D video image set according to a preset frequency, and displaying the marked image groups on the screen of the display device; the two marked video images in the same marked image group form a parallax effect on the screen of the display device, and 3D stereoscopic imaging is realized.
[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 capable of running on the processor, wherein the processor executes the computer program to implement the parallax stereoscopic imaging method.
[0012] According to the embodiments provided in the present application, the following technical effects are disclosed.
[0013] The present application provides a parallax stereoscopic imaging method and device, which splits a 3D movie image in a target 3D movie image set into two movie images according to left-right format or top-bottom format, and then adds different marks to obtain a mark image group. Thus, the original movie image which needs to be displayed by a 3D display function is split, so that even a display device without 3D display function can display, and the two split images are distinguished by adding marks, so as to be called in subsequent display. When the display device displays, according to the vertical synchronization signal of the screen of the display device, the mark image group corresponding to each 3D movie image in the target 3D movie image set is refreshed at a preset frequency and displayed on the screen. Since the two marked movie images in the same mark image group form a parallax effect on the screen, 3D stereoscopic imaging is realized. In summary, the present application splits and processes each frame of movie image (left-right format or top-bottom format) into two frames of images with marks, and displays on the ordinary display screen according to a certain fixed frequency to achieve the effect of parallax stereoscopic imaging. BRIEF DESCRIPTION OF DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0015] FIG. 1 is an application environment diagram of a parallax stereoscopic imaging method according to an embodiment of the present application;
[0016] FIG. 2 is a flowchart of a parallax stereoscopic imaging method according to an embodiment of the present application;
[0017] FIG. 3 is a flowchart of a multi-threaded parallax stereoscopic imaging method according to an embodiment of the present application; wherein FIG. 3(a) is a flowchart of an image decoding thread, FIG. 3(b) is a flowchart of an image processing thread, and FIG. 3(c) is a flowchart of an image display thread;
[0018] FIG. 4 is a structural diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0020] There are two storage modes of the image of the 3D movie: left-right format and top-bottom format. The left-right format is to play one picture on a playing device without 3D function, which is vertically divided into two halves from the middle, and looks like two almost identical pictures arranged side by side. The top-bottom format is to play one picture on a playing device without 3D function, which is horizontally divided into two halves from the middle, and looks like two almost identical pictures arranged side by side. People can experience the effect of 3D movie by wearing a device capable of identifying left-right images or top-bottom images and using the principle of parallax.
[0021] Based on the principle, the present application provides a parallax stereoscopic imaging method and device, which can achieve the same stereoscopic effect as a 3D function television, a projector or a VR glasses on a common screen with a refresh rate of 120hz or above, so that more people can experience the richness brought by 3D video.
[0022] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0023] The parallax stereoscopic imaging method provided by the embodiments of the present application can be applied in the application environment as shown in FIG. 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be separately arranged, or can be integrated on the server 104, or can be placed on the cloud or other servers. The terminal 102 can send a target 3D image set to the server 104. The server 104 splits the 3D image in the target 3D image set into two images according to the left-right format or the top-bottom format, and then adds different identifiers. The server 104 acquires the vertical synchronization signal of the screen of the display device in real time, and refreshes the identifier image group corresponding to each 3D image according to a preset frequency based on the listened signal, and displays on the screen to form a parallax effect, thereby realizing 3D stereoscopic imaging. In addition, in some embodiments, the parallax stereoscopic imaging method can be realized by the server 104 or the terminal 102 alone, or the server 104 can obtain the target 3D image set from the data storage system and perform corresponding processing.
[0024] The terminal 102 can be, but is not limited to, various desktop computers, notebook computers, tablet computers, televisions, and other ordinary display devices without 3D function. The server 104 can be implemented by a single server or a server cluster composed of multiple servers, and can also be a cloud server.
[0025] In an exemplary embodiment, as shown in FIG. 2, a parallax stereoscopic imaging method is provided, which is executed by a computer device, specifically, 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 embodiments of the present application, the method is applied to the server 104 in FIG. 1 as an example, and includes the following steps 201 to 205.
[0026] Step 201: Obtain a target 3D video image set.
[0027] In an actual application, step 201 includes: 1) obtaining a target video; 2) using a decoder to unpack the target video to obtain a target encoded video; and 3) decompressing the target encoded video to obtain a target 3D video image set.
[0028] The decoder is a program or device capable of compressing or decompressing digital video. The video file format includes, but is not limited to, MP4 (MPEG-4 Part 14), MKV (MKV is the file extension of Matroska), FLV (FLV is the abbreviation of FLASH VIDEO), AVI (Audio Video Interleave), and the like. These are all containers for storing encoded data. The unpacking is to take the compressed data out of these containers. In order to reduce the file size of the video, the original data (RGB data, PCM data) and the like are encoded by H264, AAC, and the like to encode the sound and image data and then put into a storage container (such as MP4, AVI, and the like). Therefore, decompression, also called decoding, is needed, and the main operation is to decode the encoded data into original data RGB, PCM, and the like.
[0029] The 3D video image in the target 3D video image set obtained after decompression can be ARGB_8888 format image data, ARGB_4444 format image data, or RGB_565 format image data. In the specific application of the present application, in order to more widely apply to ordinary display devices such as televisions in existing families, so that the amount of image information presented is larger and the image effect is better, ARGB_8888 format image data is used. That is, the image data is decoded to form ARGB_8888 format image data.
[0030] The image data in ARGB_8888 format is in the form of byte array in the memory for program calling. It is known that the image data is formed by pixel points, and each pixel point is composed of four channel values of ARGB, that is, for the image data in ARGB_8888 format, each pixel point is composed of 4 bytes, i.e. 32 bits, in 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 the memory, the storage order of the pixels of the ARGB_8888 bitmap is Alpha, red, green, blue from high bit to low bit, i.e. ARGB_8888. Each channel of A, R, G and B occupies one byte in the 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 the 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 movie image in the target 3D movie image set, the 3D movie image is split into two movie images in left-right format or top-bottom format.
[0032] In the step of splitting the 3D movie image into two movie images in left-right format, the step includes:
[0033] 11) For any row of pixel data in the 3D movie image, the storage address of the pixel in the first column in the memory is obtained and taken as the head address of the row. It is known that the address is allocated by the system when the storage array is created in the memory.
[0034] 12) Taking the pixel byte data at the head address of the row as the starting point, the first number of pixel byte data is stored into the left frame array. The first number = (width of the 3D movie image / 2) x 4.
[0035] 13) The right frame pixel head address is determined based on the head address of the row and the first number, specifically, (the head address of the row plus the width of the 3D movie image / 2) x 4, so that the right frame pixel head address is obtained.
[0036] 14) Taking the pixel byte data at the right frame pixel head address as the starting point, the first number of pixel byte data is stored into the right frame array.
[0037] 15) The left frame arrays corresponding to the plurality of rows of pixel data in the 3D movie image constitute a left frame movie image, and the right frame arrays corresponding to the plurality of rows of pixel data constitute a right frame movie 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 of the image) are obtained, and then are respectively put into the corresponding storage array, so that the separation operation of the left-right format image is realized.
[0038] wherein the step of splitting the 3D video image into two video images in top-bottom format comprises:
[0039] 21) obtaining the storage address of the pixel in the first row and the first column in the 3D video image in the memory as the first address of the pixel.
[0040] 22) storing the second number of pixel byte data to the upper frame array starting from the pixel byte data at the first address of the pixel; wherein the second number = the width of the 3D video image x 4 x (the height of the 3D video image / 2).
[0041] 23) determining the first address of the lower frame pixel based on the first address of the pixel and the second number.
[0042] 24) storing the second number of pixel byte data to the lower frame array starting from the pixel byte data at the first address of the lower frame pixel; 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 marks to the two video images to obtain a marked image group. The mark is generally a watermark image, and its size and shape can be set as needed. In order to efficiently add the mark to the image, the background color of the mark must be transparent.
[0044] In one application example, step 203 comprises:
[0045] 31) obtaining the corresponding mark for any video image.
[0046] 32) looping through the pixels in the mark to obtain the transparent channel value, the red channel value, the green channel value and the blue channel value of each pixel.
[0047] 33) normalizing the transparent channel value of all pixels in the mark.
[0048] 34) determining the starting position of the mark on the video image; specifically, the first address of the mark in the memory and the first address of the video image in the memory are first obtained, and then the mark and the video image are superimposed, in which process, the superimposition rule can be set as needed, such as aligning the bottom of the mark with the video image, aligning the left of the mark with the video image, etc., based on the superimposition position of the two, the starting position of the mark on the video image is determined. In one specific application, the starting position is generally the upper right corner of the video image by default.
[0049] 35) 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 logo, all pixels in the logo are synthesized with the corresponding pixels in the video image one by one to obtain a plurality of synthesized pixels.
[0050] Wherein, 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*logo component (R / G / B); Wherein, alpha_normal is the normalized transparent channel value of any pixel in the logo; Logo component (R / G / B) represents the red channel value or green channel value or blue channel value of the pixel in the logo; Picture component (R / G / B) represents the red channel value or green channel value or blue channel value of the corresponding pixel in the video image; New RGB component represents the red channel value or green channel value or blue channel value of the synthesized pixel.
[0051] 36) After the synthesized pixel is detected by the boundary, the pixel at the corresponding position in the video image is updated to the synthesized pixel to obtain a logo video image; the logo video images corresponding to the two video images constitute a logo image group.
[0052] Wherein, the passing condition of the 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 displayed on the screen is not torn, only when the screen sends the VSync signal, the rendering and drawing can be started, so that better display effect can be achieved. Since the operation of setting the picture is performed in the main thread, and the operation of providing image data is performed in a working thread, in order to ensure the synchronization between the two threads, a synchronization lock must be added to the object corresponding to the memory area of the operation. In order to ensure that the image can be refreshed in a certain order and frequency, the present application provides two implementation modes.
[0054] Step 205, based on the vertical synchronization signal, refresh the logo image group corresponding to each 3D video image in the target 3D video image set according to the preset frequency, and display on the screen of the display device; the two logo video images in the same logo image group form a parallax effect on the screen of the display device, realizing 3D stereoscopic imaging.
[0055] Corresponding to the two implementations mentioned in step 204 above, one of the applications directly realizes the updating operation of image data by listening to the VSync signal; the other application realizes the updating operation of image data 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, to register a frame animation based on the vertical synchronization signal. However, many operations in the registered frame animation are completed by the system, and the developer only needs to agree on the rules; the method of directly listening to the VSync signal needs the developer to determine the logic.
[0056] In addition, it should be noted that the frame animation is a relatively traditional animation, which is created by a series of different images, played in sequence, and the frame animation can be agreed with the system: loop or single play, display time of each frame image. The vertical synchronization signal is a signal provided externally before screen refresh, and the host end selects the appropriate strategy to complete the screen refresh according to this signal to avoid the mismatch (tearing) of data refresh and screen scanning.
[0057] Specifically, the updating operation of image data is realized by directly listening to the VSync signal, which includes:
[0058] 51) Initialize a memory array; the memory array is used to store two identified movie images in the same identification image group, and different index values are assigned to the two identified movie images.
[0059] In an application example, a memory array with a capacity of 2 is initialized to store two split and identified movie images, and the index of the currently refreshing image is defined as 0 by default, that is, the first element of the memory array.
[0060] 52) Register a VSync signal listening callback interface; when a signal arrives, the server will call this interface.
[0061] 53) When the VSync signal listening callback interface listens to the arrival of the vertical synchronization signal, if the current refreshing image index of the display device is 0, the identified movie 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 refreshing image index is incremented by 1; if the current refreshing image index of the display device is 1, the identified movie 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 refreshing image index is reset to 0.
[0062] The identification image groups corresponding to each 3D movie image in the target 3D movie image set continuously enter the memory array in the form of a blocking queue, and the display refresh of different images is performed along with the vertical synchronization signal; when all the identification image groups corresponding to the 3D movie images in the target 3D movie image set are displayed, the VSync signal monitoring callback interface is deregistered.
[0063] Registering a frame animation to implement the updating operation of image data (i.e., based on the frame animation, refreshing the identification image groups corresponding to each 3D movie image in the target 3D movie image set at a preset frequency, and simultaneously displaying on the screen of the display device), comprising:
[0064] 61) Initialize the frame animation API, determine the display time (unit: millisecond) of each movie image and the number of display frames required for one cycle (when there is no data, two black background frames can be initialized), and set whether infinite loop is required, which is set to require infinite loop in this application, and the animation is started; only when the stop animation is called can the loop be exited, and then the animation can be registered to the UI component of the server.
[0065] 62) Since data updating and data display are completed in different threads, data synchronization is generally required, but in the application of this frame animation, data synchronization has been completed by the system bottom layer, and in actual application, only the first element corresponding to the frame animation is obtained, and then the left (upper) image is put in; then the second element corresponding to the frame animation is obtained, and then the right (lower) image is put in, so as to realize data updating.
[0066] 63) When it is required to exit the playback interface, stop the frame animation and stop the data updating thread.
[0067] In order to more specifically describe the thread mentioned in the foregoing, in another exemplary embodiment of the present application, unlike the scene exchange (shutter glasses) mode of the existing left-right format stereoscopic video playback, and in order to more quickly realize, provide users with a more streamlined 3D experience, and optimize the function, as shown in FIG. 3, the present application also realizes parallax stereoscopic imaging in a multi-threaded manner, which is specifically as follows:
[0068] (1) Image decoding thread: as shown in FIG. 3(a), the raw data (i.e., target 3D movie image set) is obtained by unpacking and decompressing the movie (left-right format or top-bottom format) through the decoder and placed in the blocking queue A.
[0069] (2) Image processing thread: as shown in FIG. 3(b), the original data in the blocking queue A is acquired; it is judged 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 of images according to the horizontal or vertical movie format, the two frames of images after splitting are added with different labels respectively to distinguish the order, and then are put into the blocking queue B.
[0070] (3) Image display thread: as shown in FIG. 3(c), this stage mainly guarantees timely updating of images and displaying the last left eye image and right eye image according to fixed order and fixed frequency when there is no image updating, forms a parallax effect, facilitates recognition of the wearable device, and thus realizes a 3D stereoscopic imaging effect.
[0071] Specifically, the original data in the blocking queue B is acquired; it is judged whether there is data in the blocking queue B; when there is data in the blocking queue B, the image data is taken out from the blocking queue B, and then an image updating interface is called to save the data in a memory cache for use by a display system. If there is content in the cache, the content is directly replaced. The operating system will listen to signals: a VSync signal listening callback interface is registered or frame animation attributes (cyclic playing, single frame display time) are initialized. When the VSync signal or the single frame display time of the frame animation is listened to, the image data is acquired from the memory cache, encapsulated into an encapsulation format required for setting display, assigned and refreshed.
[0072] Further, when there is a signal, it is judged whether there is data in the memory array. If there is no data, no operation is performed. If there is data, it is judged whether the index of the current refreshed image is 0. If the index is 0, the first element in the array is directly acquired, the first element is set as a display background, and the index is operated by 1. If the index is 1, the second element in the array is directly acquired, the second element is set as a display background, and the index is operated by 0. In this way, display refreshing of fixed order and fixed frequency can be realized.
[0073] Since the image processing and the image display run in different threads, association and thread synchronization are required. When the memory array is not used, the left (upper) image in the identification image group is directly put into the first element in the memory array, and the right (lower) image is put into the second element in the memory array. If the image display thread is using an element in the memory array, the thread is waited to be used up, and then new image data (i.e. the next identification image group) is updated. When it is required to exit the playing interface, the VSync signal callback interface is deregistered and the data updating thread is stopped.
[0074] The application also provides an application scenario, which applies the above-mentioned parallax stereoscopic imaging method and also needs to be matched with corresponding glasses. That is, the application can realize fixed sequence and fixed frequency display and refresh left eye and right eye images saved in the memory buffer by listening to the vertical synchronization signal VSync of the screen or setting the frame animation, and then the personnel wearing the device capable of identifying image marks (such as liquid crystal glasses) can see or receive the final effect of parallax stereoscopic imaging. The application enables ordinary display devices without 3D function to also play stereoscopic images, and even for display devices with 3D function, another way of stereoscopic imaging can be realized by the application method.
[0075] In an exemplary embodiment, a computer device, which can be a server or a terminal, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 4. The computer device includes a processor, a memory, an input / output interface (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 configured 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 running the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a parallax stereoscopic imaging method.
[0076] Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of part of the structure related to the scheme of the application, and does not constitute a limitation on the computer device to which the scheme of the application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement. In an exemplary embodiment, a computer device is provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-mentioned method embodiments.
[0077] In an exemplary embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned method embodiments.
[0078] In an exemplary embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned method embodiments.
[0079] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0080] A person 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 related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of each method can be included. In the embodiments provided in the present application, any reference to memory, database or other medium can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
[0081] The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0082] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0083] The principles and implementations of the present application are described in detail with specific examples in this paper, and the above examples are only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A parallax stereoscopic imaging method characterized by, The parallax stereoscopic imaging method comprises: acquiring a target 3D image set; for any 3D image in the target 3D image set, the 3D image is split into two images in left-right format or top-bottom format; different labels are added to the two images to obtain a labeled image set; the step of adding different labels to the two images to obtain a labeled image set comprises: for any image, the corresponding label is acquired; the pixels in the label are traversed to obtain the transparent channel value, red channel value, green channel value and blue channel value of each pixel; the transparent channel value of all pixels in the label is normalized; the starting position of the label on the image is determined; based on the starting position, all pixels in the label are synthesized with the corresponding pixels in the image according to the red channel value, green channel value, blue channel value and normalized transparent channel value of each pixel in the label to obtain a plurality of synthesized pixels; after the synthesized pixels are detected by a boundary, the pixels at the corresponding position in the image are updated to the synthesized pixels to obtain a labeled image; the labeled images corresponding to the two images constitute a labeled image set; a vertical synchronization signal of a screen of a display device is acquired; based on the vertical synchronization signal, the labeled image sets corresponding to each 3D image in the target 3D image set are refreshed at a preset frequency and displayed on the screen of the display device; the two labeled images in the same labeled image set form a parallax effect on the screen of the display device, realizing 3D stereoscopic imaging.
2. The parallax stereoscopic imaging method according to claim 1, characterized by, The step of acquiring a target 3D image set comprises: acquiring a target video; using a decoder to unpack the target video to obtain a target encoded video; decompressing the target encoded video to obtain a target 3D image set.
3. The parallax stereoscopic imaging method of claim 1, wherein, The 3D images in the target 3D image set are all ARGB_8888 format image data.
4. The parallax stereoscopic imaging method according to claim 3, wherein, The step of splitting the 3D image into two images in left-right format comprises: for any row of pixel data in the 3D image, the storage address of the pixel in the first column in the memory is acquired as a first address; starting from the pixel byte data at the first address, a first number of pixel byte data is stored in a left frame array; based on the first address and the first number, a right frame pixel first address is determined; starting from the pixel byte data at the right frame pixel first address, a first number of pixel byte data is stored in a right frame array; wherein the first number=(width of the 3D image / 2)×4; the left frame arrays corresponding to the plurality of rows of pixel data in the 3D image constitute a left frame image, and the right frame arrays corresponding to the plurality of rows of pixel data constitute a right frame image.
5. The parallax stereoscopic imaging method according to claim 3, wherein, The step of splitting the 3D image into two images in top-bottom format comprises: the storage address of the pixel in the first row and the first column in the 3D image in the memory is acquired as a first address; Store a second number of pixel byte data to the upper frame array starting from the pixel byte data at the pixel first address; Determine a lower frame pixel first address based on the pixel first address and the second number; Store a second number of pixel byte data to the lower frame array starting from the pixel byte data at the lower frame pixel first address; wherein the second number = 3D movie image width x 4 x (3D movie image height / 2); the upper frame array constitutes an upper frame movie image, and the lower frame array constitutes a lower frame movie image.
6. The parallax stereoscopic imaging method of claim 1, wherein, 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*marker component (R / G / B); Wherein, alpha_normal is the transparent channel value of any pixel in the marker after normalization processing; marker component (R / G / B) represents the red channel value or green channel value or blue channel value of the pixel in the marker; picture component (R / G / B) represents the red channel value or green channel value or blue channel value of the pixel in the movie image; new RGB component represents the red channel value or green channel value or blue channel value of the synthesized pixel.
7. The parallax stereoscopic imaging method of claim 1, wherein, Based on the vertical synchronization signal, the steps of refreshing the marker image group corresponding to each 3D movie image in the target 3D movie image set according to a preset frequency and displaying on the screen of the display device simultaneously, comprising: Initialize a memory array; the memory array is used to store two marked movie images in the same marker image group and assign different index values to the two marked movie images; Register a VSync signal listening callback interface; When the VSync signal listening callback interface listens to the arrival of the vertical synchronization signal, if the current refresh image index of the display device is 0, the marked movie image with index value 0 is obtained from the memory array and displayed on the screen of the display device, and the current refresh image index is incremented by 1; if the current refresh image index of the display device is 1, the marked movie image with index value 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; Wherein, the marker image group corresponding to each 3D movie image in the target 3D movie image set constantly enters the memory array in the form of a blocking queue, and different images are displayed and refreshed with the vertical synchronization signal; when all the marker image groups corresponding to the 3D movie images in the target 3D movie image set are displayed, the VSync signal listening callback interface is deregistered.
8. The parallax stereoscopic imaging method of claim 1, wherein, Based on the vertical synchronization signal, register a frame animation; Based on the frame animation, an identified image group corresponding to each 3D video image in the target 3D video image set is refreshed at a preset frequency and displayed on a screen of the display device.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the parallax stereoscopic imaging method of any one of claims 1-8.
Citation Information
Patent Citations
Playback device, playback method and program
CN102308589A
Signal processor, signal processing method, display device and program product
CN102387386A
Continuous depth-ordered image compositing
CN108604389A
Parallax stereo imaging method and equipment
CN119094718A
Stereoscopic 3D Images and Video on a Non-Stereoscopic 3D Capable Screen
US20120019636A1