Mobile terminal screen-out naked-eye 3D stereoscopic imaging method and device

By performing depth assignment and light and shadow matching for portrait partitioning on mobile terminals, naked-eye 3D stereoscopic image display is achieved off-screen, solving the problems of narrow device compatibility and insufficient stereoscopic layering in existing technologies, and providing a stable and portable stereoscopic display effect.

CN123185331APending Publication Date: 2026-11-27JINHUA MAIZI ANGEL ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611569764.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-12
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing naked-eye 3D stereoscopic imaging technology for mobile terminals requires external optical hardware or involves a large amount of computation, resulting in a narrow range of device compatibility, inconvenience in use, and high cost. In addition, insufficient depth processing leads to weak stereoscopic layering and image distortion.

Method used

By extracting the subject of the portrait and assigning depth values ​​to different areas on the mobile terminal, combined with light and shadow matching and perspective distortion correction, the three-dimensional spatial coordinate mapping of the two-dimensional image on the outside of the screen and the naked-eye 3D stereoscopic image display are realized. The mobile terminal's built-in hardware and software algorithms eliminate the need for external optical hardware.

Benefits of technology

It achieves naked-eye 3D stereoscopic image display outside the screen, improves the sense of stereoscopic layering, reduces image distortion, provides portability and stability, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185331A_ABST
    Figure CN123185331A_ABST
Patent Text Reader

Abstract

The application discloses a kind of mobile terminal screen out naked eye 3D stereoscopic imaging method and device, belong to mobile terminal image processing and stereoscopic display technical field.The method includes: the input two-dimensional portrait image is extracted and partitioned depth assignment to portrait subject, obtain layered portrait data carrying pixel coordinates and partitioned depth parameter;According to partitioned depth parameter, the two-dimensional plane pixel coordinates of corresponding pixel are converted into the three-dimensional space coordinates of mobile terminal screen outside airspace, obtain image intermediate data;According to the three-dimensional space coordinates in image intermediate data, carry out light and shadow matching and perspective distortion correction, output rendering instruction to drive mobile terminal screen to display naked eye 3D stereoscopic image in mobile terminal screen outside airspace.The system includes successively communicated imaging program module, conversion program module and light and shadow perspective program module.The application does not need external optical hardware, can improve portrait stereoscopic level, reduce picture deformation, improve light and shadow effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile terminal image processing and stereoscopic display technology, specifically to a method and device for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal. Background Technology

[0002] With the continuous development of mobile terminal display technology, users' requirements for image display effects are increasing, and stereoscopic image display has gradually become one of the research hotspots in the field of mobile terminal image processing.

[0003] Currently, 3D imaging technologies for mobile terminals mainly fall into two categories. One is hardware-assisted glasses-free 3D solutions, which typically require external optical components such as gratings and lenses to be installed on the mobile terminal. These optical structures modulate the light emitted from the screen to create a stereoscopic effect. This type of solution requires additional optical hardware, resulting in a narrow range of device compatibility, inconvenience in carrying and using the device, and increased user costs. The other category is general 2D-to-3D software algorithm solutions, which generate a stereoscopic image within the mobile terminal's screen display area by performing depth estimation and parallax processing on 2D images. While this type of solution does not require external optical hardware, its imaging range is usually limited to the area inside the screen, and it cannot create stereoscopic images in the space outside the mobile terminal screen.

[0004] Furthermore, existing 2D-to-3D conversion algorithms have shortcomings in depth processing. On the one hand, most algorithms assign a uniform depth value to the human figure area, making it difficult to distinguish the differences in spatial depth between different body parts such as the head, torso, and limbs. This results in a flattened human figure image with weak three-dimensional depth. On the other hand, existing solutions lack a continuous and complete data processing chain between image segmentation, depth assignment, coordinate transformation, lighting matching, and perspective correction. This easily leads to jagged edges on the human figure contours, perspective distortion in areas of depth variation, or inconsistent lighting transitions, affecting the final stereoscopic display effect.

[0005] Meanwhile, some existing alternatives use neural network models to automatically predict human depth. These methods require a large number of samples for training, resulting in significant computational demands. They are prone to lag on mobile devices with limited performance, and the depth prediction results are subject to uncertainty due to the randomness of the model training data and the algorithm itself. Other methods rely on external optical hardware for off-screen imaging. These require additional accessories, increasing costs and hindering portability on mobile devices.

[0006] Therefore, there is currently a lack of a technical solution that relies solely on the mobile terminal's native hardware, without requiring additional peripherals, and uses software programs to process ordinary two-dimensional human images to generate naked-eye 3D stereoscopic images in the spatial domain outside the mobile terminal screen. The shortcomings of the aforementioned existing technologies, to some extent, limit the widespread application of naked-eye 3D stereoscopic imaging technology on mobile terminals. Summary of the Invention

[0007] The purpose of this invention is to provide a method and device for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal, which does not require external optical hardware, can improve the stereoscopic layering of human images, reduce image distortion, and improve the lighting and shadow effects.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal includes: Step 1: Extract the subject of the portrait and assign partition depth values ​​to the input 2D portrait image to obtain layered portrait data carrying pixel coordinates and partition depth parameters; Step 2: Based on the partition depth parameters in the layered portrait data, convert the two-dimensional plane pixel coordinates of the corresponding pixels into three-dimensional spatial coordinates in the spatial domain outside the mobile terminal screen to obtain intermediate image data. Step 3: Based on the three-dimensional spatial coordinates in the intermediate image data, perform light and shadow matching and perspective distortion correction, and output rendering commands to drive the mobile terminal screen to display naked-eye 3D stereoscopic images in the spatial domain outside the mobile terminal screen.

[0009] Further, in step 1, the input two-dimensional portrait image is processed by extracting the main subject and assigning partition depth values ​​to obtain layered portrait data carrying pixel coordinates and partition depth parameters, specifically: Set a grayscale threshold, and determine the pixels with grayscale values ​​less than or equal to the grayscale threshold as background pixels and remove them to obtain the subject of the portrait; The human figure area is divided into a head area, a torso area, and a limbs area, and depth parameters for the first, second, and third partitions are set respectively. A bilinear interpolation algorithm is used to perform weighted interpolation on four adjacent pixels of the human figure outline to repair the jagged edges of the human figure outline. Output layered portrait data carrying pixel coordinates and partition depth parameters.

[0010] Furthermore, in step 2, the two-dimensional planar pixel coordinates of the corresponding pixel are converted into three-dimensional spatial coordinates in the spatial domain outside the mobile terminal screen, specifically as follows: Using the plane where the mobile terminal screen is located as the Z=0 reference plane, obtain the X and Y coordinates of the original pixels; Calculate the pixel horizontal parallax offset based on the partition depth parameter and the preset conversion factor; The Z-axis spatial distance is calculated based on the horizontal parallax offset of pixels and the physical pixel spacing of the mobile terminal screen to obtain the three-dimensional spatial coordinates within a preset range of the spatial domain outside the mobile terminal screen. Pixels with Z-axis values ​​less than or equal to 0 are removed to ensure that all imaging pixels are located in the airspace outside the mobile terminal screen.

[0011] Further, in step 3, the light and shadow matching includes: Establish a mapping relationship between partition depth parameters and shadow grayscale; Adjust the shadow grayscale based on the Z-axis value corresponding to the pixel, where the larger the Z-axis value, the darker the shadow grayscale; The adjusted shadow grayscale is overlaid onto the RGB channel of the corresponding pixel.

[0012] Furthermore, in step 3, the perspective distortion correction includes: scaling the pixel size according to a preset ratio based on the distance between the pixel and the mobile terminal screen, wherein the farther away from the screen, the greater the reduction ratio of the pixel size.

[0013] Furthermore, step 3 also includes: For the boundary positions of adjacent partitions in the head region, torso region, and limb regions, the mean filter is applied to the 8 neighboring pixels around the boundary to eliminate the boundary lines between different partitions.

[0014] The present invention also provides a mobile terminal off-screen naked-eye 3D stereoscopic imaging device, applied to the above-mentioned mobile terminal off-screen naked-eye 3D stereoscopic imaging method, comprising: The imaging program module, conversion program module, and light and shadow perspective program module are connected in sequence via communication. The imaging program module is used to extract the subject of the human image and assign partition depth values ​​to the input two-dimensional human image to obtain layered human image data carrying pixel coordinates and partition depth parameters. The conversion module is used to convert the two-dimensional plane pixel coordinates of the corresponding pixels into three-dimensional spatial coordinates of the outer spatial domain of the mobile terminal screen according to the partition depth parameters in the layered portrait data, so as to obtain intermediate image data. The light and shadow perspective program module is used to perform light and shadow matching and perspective distortion correction based on the three-dimensional spatial coordinates in the intermediate image data, and output rendering instructions to drive the mobile terminal screen to display naked-eye 3D stereoscopic images in the spatial domain outside the mobile terminal screen.

[0015] Furthermore, the imaging program module includes a background segmentation unit, a depth assignment unit, and an edge repair unit; The background segmentation unit is used to set a grayscale threshold, and to identify and remove pixels with grayscale values ​​less than or equal to the grayscale threshold as background pixels. The depth assignment unit is used to divide the human image area into a head area, a torso area and a limbs area, and set the first partition depth parameter, the second partition depth parameter and the third partition depth parameter respectively. The edge repair unit is used to perform weighted interpolation on four adjacent pixels of the portrait outline edge using a bilinear interpolation algorithm to repair the jagged edges of the portrait outline edge.

[0016] Furthermore, the conversion program module includes a parallax conversion unit and an off-screen constraint unit; The parallax conversion unit is used to obtain the X and Y coordinates of the original pixels with the plane where the mobile terminal screen is located as the Z=0 reference plane, calculate the horizontal parallax offset of the pixels according to the partition depth parameters and the preset conversion coefficient, and calculate the Z-axis spatial distance according to the horizontal parallax offset of the pixels and the physical pixel spacing of the mobile terminal screen, so as to obtain the three-dimensional spatial coordinates located in the preset range of the spatial domain outside the mobile terminal screen. The off-screen constraint unit is used to remove pixels whose calculated Z-axis values ​​are less than or equal to 0, so as to ensure that all imaging pixels are located in the spatial domain outside the mobile terminal screen.

[0017] Furthermore, the light and shadow perspective program module includes a light and shadow matching unit, a perspective distortion correction unit, and a boundary smoothing unit; The light and shadow matching unit is used to establish a mapping relationship between partition depth parameters and shadow grayscale, adjust the shadow grayscale according to the Z-axis value of the pixel, where the larger the Z-axis value, the darker the shadow grayscale, and superimpose the adjusted shadow grayscale onto the RGB channel of the corresponding pixel. The perspective distortion correction unit is used to scale the pixel size according to a preset ratio based on the distance between the pixel and the mobile terminal screen, wherein the farther away from the screen, the greater the reduction ratio of the pixel size. The boundary smoothing unit is used to perform mean filtering on the boundary positions of adjacent partitions in the head region, torso region and limb region, taking the 8 neighboring pixels around the boundary to eliminate the boundary lines between different partitions.

[0018] In summary, the present invention has at least one of the following beneficial technical effects: First, this invention requires no external optical hardware such as gratings or lenses; it can achieve naked-eye 3D stereoscopic imaging outside the screen solely using the mobile terminal's built-in screen and processor. By mapping two-dimensional human image pixels onto the spatial domain outside the mobile terminal screen through software calculations, it eliminates the reliance on external optical accessories found in traditional naked-eye 3D solutions, lowers the barrier to entry for users, and improves the device's versatility and portability.

[0019] Secondly, this invention assigns differentiated depth values ​​to different regions of the portrait, setting different partition depth parameters for the head, torso, and limbs of the portrait, so that different body parts have differentiation in spatial depth. This is different from the uniform depth assignment method in general algorithms, which can make the portrait image present a more obvious three-dimensional sense of layering and avoid the flattening of the portrait image.

[0020] Third, this invention enables images to detach from the mobile terminal screen and present a floating, three-dimensional effect in the space outside the screen. Compared with traditional software solutions that can only generate 3D images within the screen display area, this invention expands the display space, providing users with a more intuitive off-screen three-dimensional viewing experience.

[0021] Fourth, this invention combines light and shadow matching with perspective distortion correction. It performs shadow grayscale matching based on the depth information corresponding to the pixel and performs perspective correction on the pixel size based on the distance between the pixel and the screen. This can reduce the stretching and distortion of distant images caused by depth differences, making the light and shadow transition of the generated image more natural and reducing the degree of image distortion.

[0022] Fifth, the present invention employs neighborhood mean filtering at the boundary of depth partitions, which can smooth the boundaries between depth partitions of different body parts, reduce boundary marks caused by differences in partition depth parameters, and improve the overall smoothness and visual effect of the image.

[0023] Sixth, the method of the present invention executes the imaging program, conversion program and light and shadow perspective program in a fixed order. The key parameters in each step are predetermined parameters. The operation process is standardized and there is no random parameter fluctuation. Therefore, the imaging process has good repeatability and stability, which is conducive to its promotion and application on different mobile terminals. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0026] like Figure 1 As shown, the present invention provides a method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal, comprising: Step 1: Extract the subject of the portrait and assign partition depth values ​​to the input 2D portrait image to obtain layered portrait data carrying pixel coordinates and partition depth parameters; Step 2: Based on the partition depth parameters in the layered portrait data, convert the two-dimensional plane pixel coordinates of the corresponding pixels into three-dimensional spatial coordinates in the spatial domain outside the mobile terminal screen to obtain intermediate image data. Step 3: Based on the three-dimensional spatial coordinates in the intermediate image data, perform light and shadow matching and perspective distortion correction, and output rendering commands to drive the mobile terminal screen to display naked-eye 3D stereoscopic images in the spatial domain outside the mobile terminal screen.

[0027] In this invention, the mobile terminal off-screen naked-eye 3D stereoscopic imaging method is executed by the mobile terminal processor. The mobile terminal processor sequentially runs an imaging program, a conversion program, and a light and shadow perspective program, performing serial calculations on the two-dimensional portrait image to achieve region depth assignment, planar pixel spatial coordinate conversion, and light and shadow distortion correction, ultimately generating a naked-eye visible suspended 3D stereoscopic image in the spatial domain outside the mobile terminal screen. The mobile terminal can be a smartphone or other portable electronic device with a display screen and processor.

[0028] Next, the present invention will provide a detailed description of the above method.

[0029] Step 1: Extract the subject and assign depth values ​​to the partitions of the input 2D portrait image to obtain layered portrait data carrying pixel coordinates and partition depth parameters, specifically: The mobile terminal processor executes an imaging program, receiving the imported two-dimensional portrait image. The RGB color image is converted into a single-channel grayscale image, with a grayscale threshold set to 65. Pixels with grayscale values ​​less than or equal to this threshold are identified as background pixels and removed, automatically eliminating irrelevant background elements such as walls and floors to obtain the main body area of ​​the portrait. The portrait area is then divided into a head region, a torso region, and limb regions, with separate depth parameters set for the first, second, and third partitions. The first partition depth parameter corresponds to the head region and has a value of 28; the second partition depth parameter corresponds to the torso region and has a value of 16; and the third partition depth parameter corresponds to the limb regions and has a value of 8. It should be noted that this invention uses a human keypoint detection algorithm to automatically divide the portrait region. The aforementioned partition depth parameters represent the total depth value corresponding to a single portrait pixel, with different body parts directly using their corresponding fixed depth values. Next, a standard bilinear interpolation algorithm is used to perform weighted interpolation on four adjacent pixels along the contour edge of the portrait. The weights are linearly distributed according to the distance from the pixel to the target point. A general standard bilinear interpolation formula is used to repair jagged edges on the portrait contour edge. The final output is layered portrait data carrying pixel coordinates and partition depth parameters.

[0030] Step 1 completes the extraction of the human subject and spatial depth layering, giving the human subject differentiated depth information and providing basic data for subsequent 3D coordinate conversion.

[0031] Step 2: Based on the partition depth parameters in the layered portrait data, convert the two-dimensional planar pixel coordinates of the corresponding pixels into three-dimensional spatial coordinates in the spatial domain outside the mobile terminal screen to obtain intermediate image data, specifically: The mobile terminal processor executes the conversion program, receiving the layered portrait data output in step 1. Using the plane where the mobile terminal screen is located as the Z=0 reference plane, the X and Y coordinates of the original pixels are obtained. The pixel horizontal disparity offset is calculated based on the partition depth parameter and a preset conversion factor, using the formula: Pixel horizontal disparity offset = -0.42 × Partition depth parameter. Here, the preset conversion factor is 0.42, which is the fixed conversion factor of this system. Based on the partition depth parameter d, the pixel horizontal disparity offset D is calculated using the disparity conversion formula: D = 0.42 × d; where D is the pixel horizontal disparity offset, d is the partition depth parameter corresponding to the pixel, and 0.42 is the fixed conversion factor. Then, combining the physical pixel spacing of the mobile terminal screen, the Z-axis spatial distance is calculated based on the calculated pixel horizontal disparity offset D, thereby converting the two-dimensional screen pixel coordinates into three-dimensional spatial coordinates within the 0.15m to 0.6m range outside the mobile terminal screen. The Z-axis spatial distance is calculated jointly by the pixel horizontal parallax offset and the physical spacing between screen pixels. The Z value represents the spatial distance in front of the screen. The X-axis coordinate uses the original pixel X-coordinate, the Y-axis coordinate uses the original image Y-pixel coordinate, and the Z-axis coordinate is converted according to the above mapping relationship. Furthermore, the converted 3D spatial coordinates are subject to off-screen constraints: the Z-axis value is forced to be greater than 0, representing the area in front of the screen; if the calculated Z-axis value is less than or equal to 0, the pixel is removed, and the remaining pixels are not rearranged; when the removed pixels create image gaps, interpolation is used to fill the gaps, ensuring the integrity of the image and avoiding image loss, thus ensuring that all imaging pixels are located in the spatial domain outside the mobile terminal screen. The final output is intermediate image data with 3D spatial coordinates.

[0032] Step 2 maps the planar image to the physical space in front of the mobile terminal screen, realizing the basic transformation of off-screen imaging and enabling two-dimensional pixels to obtain spatial three-dimensional occupancy information.

[0033] Step 3: Based on the 3D spatial coordinates in the intermediate image data, perform lighting matching and perspective distortion correction, and output rendering commands to drive the mobile terminal screen to display the naked-eye 3D stereoscopic image in the spatial domain outside the mobile terminal screen. Specifically: This invention achieves off-screen suspended naked-eye 3D images based on the principle of binocular parallax, without using holographic projection or light field hardware. By assigning different Z-depths to human image pixels, the horizontal parallax offset of the pixels is calculated, and a parallax-infused image is rendered on a regular mobile terminal 2D screen. When the left and right eyes view the screen, they receive the parallax-infused image. After the brain fuses the images, a suspended stereoscopic image is perceived in the airspace 0.15m to 0.6m in front of the screen. A pixel-by-pixel rendering algorithm is used, the pixel arrangement follows the original pixel matrix of the screen, and a conventional RGB display mode is used.

[0034] The mobile terminal processor executes the light and shadow perspective program and receives the intermediate image data with three-dimensional spatial coordinates output from step 2.

[0035] The light and shadow matching process includes: establishing a mapping relationship between partition depth parameters and shadow grayscale, with piecewise linear mapping used for shadow grayscale mapping. A larger partition depth parameter (representing greater distance from the screen) results in a larger shadow grayscale value and a darker shadow; a smaller partition depth parameter (closer to the screen) results in a smaller shadow grayscale value and a lighter shadow. Grayscale assignment is performed according to a piecewise linear function. The shadow grayscale is adjusted based on the Z-axis value of the corresponding pixel. A larger Z-axis value indicates a greater distance from the mobile terminal screen, resulting in a corresponding increase in shadow grayscale value and a darker shadow; a smaller Z-axis value indicates a closer proximity to the mobile terminal screen, resulting in a decrease in shadow grayscale value. The calculated shadow grayscale is then superimposed onto the corresponding pixel's RGB channel to complete automatic shadow depth matching.

[0036] The perspective distortion correction process includes: scaling the pixel size according to a preset ratio based on the distance between the pixel and the mobile terminal screen, where the pixel output size = original pixel size × (1 - k × Z); k is the scaling ratio coefficient, which is fixed at 0.8, and Z is the spatial distance along the Z-axis in meters. The farther away from the mobile terminal screen, the greater the reduction in pixel size, thereby eliminating distortion caused by magnification of distant images.

[0037] In addition, it also includes boundary smoothing processing: for the boundary positions of adjacent partitions in the head region, torso region and limb regions, the mean filtering processing is performed on the 8 neighboring pixels around the boundary to eliminate obvious boundary lines caused by the splicing of partitions at different depths.

[0038] Finally, based on the corrected 3D coordinates, pixel size, and shadow grayscale parameters, rendering instructions are output to drive the mobile terminal screen, generating a 3D stereoscopic image that can be viewed directly with the naked eye in the spatial domain outside the mobile terminal screen.

[0039] Step 3 corrects the imaging distortion, matches the real lighting and shadow effects, and outputs the final off-screen stereoscopic image.

[0040] The above three steps are executed sequentially in a fixed order, without any random parameter fluctuations, thus ensuring that the entire operation process is standardized, reproducible, and produces stable imaging results.

[0041] This invention also provides an off-screen naked-eye 3D stereoscopic imaging device for mobile terminals. The system is deployed within the mobile terminal processor and includes an imaging program module, a conversion program module, and a light and shadow perspective program module that are sequentially connected in communication. The three modules operate serially in a fixed order to jointly achieve the off-screen naked-eye 3D stereoscopic imaging function.

[0042] The imaging module is used to extract the main subject and assign depth values ​​to different regions of the input 2D portrait image, resulting in layered portrait data carrying pixel coordinates and depth parameters. Specifically, the imaging module includes a background segmentation unit, a depth assignment unit, and an edge repair unit. The background segmentation unit sets a grayscale threshold of 65, classifying pixels with grayscale values ​​less than or equal to 65 as background pixels and removing them to obtain the main subject area. The depth assignment unit divides the portrait area into a head region, a torso region, and limb regions, setting depth parameters of 28 for the first region, 16 for the second region, and 8 for the third region, respectively. The edge repair unit uses a bilinear interpolation algorithm to perform weighted interpolation on four adjacent pixels along the portrait contour edge to repair jagged edges. The imaging module outputs layered portrait data carrying pixel coordinates and depth parameters.

[0043] The conversion module, connected to the imaging module, converts the two-dimensional planar pixel coordinates of corresponding pixels into three-dimensional spatial coordinates in the spatial domain outside the mobile terminal screen, based on the partition depth parameters in the layered portrait data, thus obtaining intermediate image data. Specifically, the conversion module includes a parallax conversion unit and an off-screen constraint unit. The parallax conversion unit uses the plane where the mobile terminal screen is located as the Z=0 reference plane to obtain the X and Y coordinates of the original pixels. It calculates the horizontal parallax offset of the pixels based on the partition depth parameters and a preset conversion coefficient of 0.42, and calculates the Z-axis spatial distance based on the horizontal parallax offset and the physical pixel spacing of the mobile terminal screen, obtaining the three-dimensional spatial coordinates within the 0.15m to 0.6m range in the spatial domain outside the mobile terminal screen. The off-screen constraint unit removes pixels with calculated Z-axis values ​​less than or equal to 0 to ensure that all imaging pixels are located in the spatial domain outside the mobile terminal screen. The conversion module outputs intermediate image data with three-dimensional spatial coordinates.

[0044] The light and shadow perspective program module is connected to the conversion program module. It performs light and shadow matching and perspective distortion correction based on the 3D spatial coordinates in the intermediate image data, and outputs rendering commands to drive the mobile terminal screen to display naked-eye 3D stereoscopic images in the spatial domain outside the screen. Specifically, the light and shadow perspective program module includes a light and shadow matching unit, a perspective distortion correction unit, and a boundary smoothing unit. The light and shadow matching unit establishes the mapping relationship between the partition depth parameters and shadow grayscale, adjusting the shadow grayscale according to the Z-axis value of the pixel. A larger Z-axis value results in a darker shadow grayscale, and the adjusted shadow grayscale is superimposed on the corresponding pixel's RGB channel. The perspective distortion correction unit scales the pixel size according to a preset ratio based on the distance between the pixel and the mobile terminal screen. The farther the distance from the screen, the greater the pixel size reduction ratio. The boundary smoothing unit performs mean filtering on the boundary positions of adjacent partitions in the head, torso, and limb regions, taking the 8 neighboring pixels around the boundary to eliminate the dividing lines between different partitions. The light and shadow perspective program module ultimately outputs rendering instructions, driving the mobile terminal screen to generate a 3D stereoscopic image that can be viewed directly with the naked eye in the airspace outside the mobile terminal screen.

[0045] Embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0046] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0047] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0048] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0049] Contents not described in detail in this specification are prior art known to those skilled in the art. It is hereby indicated that the above description is intended to help those skilled in the art understand this invention, but does not limit the scope of protection of this invention. Any equivalent substitutions, modifications, improvements, or simplifications of the above descriptions that do not depart from the essential content of this invention fall within the scope of protection of this invention.

Claims

1. A method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal, characterized in that, include: Step 1: Extract the subject of the portrait and assign partition depth values ​​to the input 2D portrait image to obtain layered portrait data carrying pixel coordinates and partition depth parameters; Step 2: Based on the partition depth parameters in the layered portrait data, convert the two-dimensional plane pixel coordinates of the corresponding pixels into three-dimensional spatial coordinates in the spatial domain outside the mobile terminal screen to obtain intermediate image data. Step 3: Based on the three-dimensional spatial coordinates in the intermediate image data, perform light and shadow matching and perspective distortion correction, and output rendering commands to drive the mobile terminal screen to display naked-eye 3D stereoscopic images in the spatial domain outside the mobile terminal screen.

2. The method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal according to claim 1, characterized in that, In step 1, the input 2D portrait image is processed to extract the main subject and assign partition depth values, resulting in layered portrait data carrying pixel coordinates and partition depth parameters. Specifically: Set a grayscale threshold, and determine the pixels with grayscale values ​​less than or equal to the grayscale threshold as background pixels and remove them to obtain the subject of the portrait; The human figure area is divided into a head area, a torso area, and a limbs area, and depth parameters for the first, second, and third partitions are set respectively. A bilinear interpolation algorithm is used to perform weighted interpolation on four adjacent pixels of the human figure outline to repair the jagged edges of the human figure outline. Output layered portrait data carrying pixel coordinates and partition depth parameters.

3. The method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal according to claim 1, characterized in that, In step 2, the two-dimensional planar pixel coordinates of the corresponding pixel are converted into three-dimensional spatial coordinates in the spatial domain outside the mobile terminal screen, specifically as follows: Using the plane where the mobile terminal screen is located as the Z=0 reference plane, obtain the X and Y coordinates of the original pixels; Calculate the pixel horizontal parallax offset based on the partition depth parameter and the preset conversion factor; The Z-axis spatial distance is calculated based on the horizontal parallax offset of pixels and the physical pixel spacing of the mobile terminal screen to obtain the three-dimensional spatial coordinates within a preset range of the spatial domain outside the mobile terminal screen. Pixels with Z-axis values ​​less than or equal to 0 are removed to ensure that all imaging pixels are located in the airspace outside the mobile terminal screen.

4. The method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal according to claim 1, characterized in that, In step 3, the light and shadow matching includes: Establish a mapping relationship between partition depth parameters and shadow grayscale; Adjust the shadow grayscale based on the Z-axis value corresponding to the pixel, where the larger the Z-axis value, the darker the shadow grayscale; The adjusted shadow grayscale is overlaid onto the RGB channel of the corresponding pixel.

5. A method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal according to claim 1, characterized in that, In step 3, the perspective distortion correction includes: scaling the pixel size according to a preset ratio based on the distance between the pixel and the mobile terminal screen, wherein the farther away from the screen, the greater the reduction ratio of the pixel size.

6. The method for naked-eye 3D stereoscopic imaging outside the screen of a mobile terminal according to claim 1, characterized in that, Step 3 also includes: For the boundary positions of adjacent partitions in the head region, torso region, and limb regions, the mean filter is applied to the 8 neighboring pixels around the boundary to eliminate the boundary lines between different partitions.

7. A mobile terminal off-screen naked-eye 3D stereoscopic imaging device, applied to the mobile terminal off-screen naked-eye 3D stereoscopic imaging method according to any one of claims 1-6, characterized in that, include: The imaging program module, conversion program module, and light and shadow perspective program module are connected in sequence via communication. The imaging program module is used to extract the subject of the human image and assign partition depth values ​​to the input two-dimensional human image to obtain layered human image data carrying pixel coordinates and partition depth parameters. The conversion module is used to convert the two-dimensional plane pixel coordinates of the corresponding pixels into three-dimensional spatial coordinates of the outer spatial domain of the mobile terminal screen according to the partition depth parameters in the layered portrait data, so as to obtain intermediate image data. The light and shadow perspective program module is used to perform light and shadow matching and perspective distortion correction based on the three-dimensional spatial coordinates in the intermediate image data, and output rendering instructions to drive the mobile terminal screen to display naked-eye 3D stereoscopic images in the spatial domain outside the mobile terminal screen.

8. A mobile terminal off-screen naked-eye 3D stereoscopic imaging device according to claim 7, characterized in that, The imaging program module includes a background segmentation unit, a depth assignment unit, and an edge repair unit; The background segmentation unit is used to set a grayscale threshold, and to identify and remove pixels with grayscale values ​​less than or equal to the grayscale threshold as background pixels. The depth assignment unit is used to divide the human image area into a head area, a torso area and a limbs area, and set the first partition depth parameter, the second partition depth parameter and the third partition depth parameter respectively. The edge repair unit is used to perform weighted interpolation on four adjacent pixels of the portrait outline edge using a bilinear interpolation algorithm to repair the jagged edges of the portrait outline edge.

9. A mobile terminal off-screen naked-eye 3D stereoscopic imaging device according to claim 7, characterized in that, The conversion program module includes a parallax conversion unit and an off-screen constraint unit; The parallax conversion unit is used to obtain the X and Y coordinates of the original pixels with the plane where the mobile terminal screen is located as the Z=0 reference plane, calculate the horizontal parallax offset of the pixels according to the partition depth parameters and the preset conversion coefficient, and calculate the Z-axis spatial distance according to the horizontal parallax offset of the pixels and the physical pixel spacing of the mobile terminal screen, so as to obtain the three-dimensional spatial coordinates located in the preset range of the spatial domain outside the mobile terminal screen. The off-screen constraint unit is used to remove pixels whose calculated Z-axis values ​​are less than or equal to 0, so as to ensure that all imaging pixels are located in the spatial domain outside the mobile terminal screen.

10. A mobile terminal off-screen naked-eye 3D stereoscopic imaging device according to claim 7, characterized in that, The light and shadow perspective program module includes a light and shadow matching unit, a perspective distortion correction unit, and a boundary smoothing unit; The light and shadow matching unit is used to establish a mapping relationship between partition depth parameters and shadow grayscale, adjust the shadow grayscale according to the Z-axis value of the pixel, where the larger the Z-axis value, the darker the shadow grayscale, and superimpose the adjusted shadow grayscale onto the RGB channel of the corresponding pixel. The perspective distortion correction unit is used to scale the pixel size according to a preset ratio based on the distance between the pixel and the mobile terminal screen, wherein the farther away from the screen, the greater the reduction ratio of the pixel size. The boundary smoothing unit is used to perform mean filtering on the boundary positions of adjacent partitions in the head region, torso region and limb region, taking the 8 neighboring pixels around the boundary to eliminate the boundary lines between different partitions.