Electronic device and stereoscopic image display method thereof
By detecting specific style borders in the display frame in an electronic device, generating and displaying stereoscopic format images, the problem of 3D displays being unable to recognize image formats is solved, and the automatic provision of stereoscopic visual effects is achieved.
Patent Information
- Application Number
- CN202411160231.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2026-03-03
AI Technical Summary
Existing 3D displays cannot correctly recognize the 3D image format of the image content, resulting in an inability to provide effective stereoscopic visual effects.
By detecting specific style borders in the displayed image frame in the electronic device, the image format is determined, and the stereoscopic display is controlled to enter stereoscopic display mode based on the detection results, generating and displaying stereoscopic format images.
It achieves accurate detection of stereoscopic image formats and automatically provides stereoscopic display functions, ensuring that viewers can experience 3D visual effects.
Smart Images

Figure CN121603640A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an image processing technology, and more particularly to an electronic device and a method for displaying stereoscopic images thereon. Background Technology
[0002] With advancements in display technology, stereoscopic displays supporting stereoscopic vision technology have become increasingly common. Stereoscopic vision technology allows viewers to experience the three-dimensionality of images, such as the three-dimensional features of a person and depth of field, effects that traditional 2D images cannot achieve. The principle of stereoscopic vision technology is to allow the viewer's left eye to see the left-eye image and their right eye to see the right-eye image, thus creating a 3D visual effect. 3D displays can provide separate left-eye and right-eye images to the viewer's left and right eyes respectively, providing a visually immersive experience. It is known that for image content of a specific 3D image format, a 3D display must employ corresponding 3D display technology to achieve the desired 3D visual effect. In other words, if a 3D display cannot correctly identify the 3D image format of the content, it will be unable to successfully provide a 3D visual effect. Summary of the Invention
[0003] This disclosure provides an electronic device and a method for displaying stereoscopic images that can effectively solve the above-mentioned problems.
[0004] An exemplary embodiment of this disclosure provides a method for displaying a stereoscopic image, applicable to an electronic device including a stereoscopic display, and includes the following steps: Acquiring a display frame including a streaming image; Detecting a specific style border surrounding the streaming image in the display frame by performing a line detection; In response to the appearance of the specific style border in the display frame, generating a stereoscopic format image based on the display frame and the specific style border; In response to the appearance of the specific style border in the display frame, controlling the stereoscopic display to operate in a stereoscopic display mode to display the stereoscopic format image.
[0005] Another exemplary embodiment of this disclosure provides an electronic device including a transceiver, a stereoscopic display, and at least one processor. The processor is coupled to the transceiver and the stereoscopic display and configured to: acquire a display frame including a streaming image; detect a specific style border surrounding the streaming image in the display frame by performing a line detection; generate a stereoscopic image based on the display frame and the specific style border in response to the appearance of the specific style border in the display frame; and control the stereoscopic display to operate in a stereoscopic display mode to display the stereoscopic image in response to the appearance of the specific style border in the display frame.
[0006] Based on the above, in this embodiment of the disclosure, after acquiring a display frame including a streaming image, it is possible to detect whether a specific style border appears around the streaming image in the display frame. If the specific style border appears in the display frame, it can be determined that the streaming image is stereoscopic streaming content conforming to a stereoscopic image format. Then, a stereoscopic format image including a left-eye image and a right-eye image can be generated based on the specific style border and the display frame, and the stereoscopic display is controlled to operate in stereoscopic display mode to display the stereoscopic format image. Therefore, by embedding a specific style border in the stereoscopic format image, it is possible to accurately detect that the display frame includes a streaming image conforming to a stereoscopic image format, thereby controlling the stereoscopic display to automatically provide stereoscopic display functionality. Attached Figure Description
[0007] Figure 1 This is a schematic diagram of an electronic device according to an embodiment of the present disclosure;
[0008] Figure 2 This is a schematic diagram of a stereoscopic display according to an embodiment of the present disclosure;
[0009] Figure 3 This is a flowchart of a stereoscopic image display method according to an embodiment of the present disclosure;
[0010] Figure 4A and Figure 4B This is a schematic diagram of a specific style border according to an embodiment of the present disclosure;
[0011] Figure 5 This is a flowchart of detecting a specific style border according to an embodiment of the present disclosure;
[0012] Figure 6 This is a schematic diagram illustrating the detection of a specific style border according to an embodiment of this disclosure;
[0013] Figure 7 This is a flowchart of detecting a specific style border in a display frame according to an embodiment of the present disclosure;
[0014] Figure 8 This is a schematic diagram illustrating the detection of a specific style border according to an embodiment of this disclosure;
[0015] Figure 9 This is a flowchart illustrating the generation of a stereoscopic format image according to an embodiment of the present disclosure;
[0016] Figure 10 This is a schematic diagram illustrating the generation of a stereoscopic format image and a woven pattern frame according to an embodiment of the present disclosure;
[0017] Figure 11 This is a flowchart illustrating the generation of a stereoscopic format image according to an embodiment of the present disclosure;
[0018] Figure 12This is a schematic diagram illustrating the generation of a stereoscopic image by replicating user interface elements according to an embodiment of the present disclosure;
[0019] Figure 13A and Figure 13B This is a flowchart of a stereoscopic image display method according to an embodiment of the present disclosure;
[0020] Figure 14 This is a schematic diagram illustrating the generation of a stereoscopic format image based on an occluded object according to an embodiment of the present disclosure;
[0021] Figure 15 This is a flowchart of a stereoscopic image display method according to an embodiment of the present disclosure. Detailed Implementation
[0022] Reference will now be made in detail to exemplary embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same component reference numerals are used in the drawings and description to denote the same or similar parts.
[0023] Figure 1 This is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Please refer to... Figure 1 The electronic device 100 can be implemented as, for example, an electronic device with image processing and computing capabilities, such as a laptop computer, tablet computer, personal computer, game console, portable electronic device, desktop computer, or other electronic device. The electronic device 100 includes a transceiver 110, a stereoscopic display 120, a storage device 130, and at least one processor 140.
[0024] Transceiver 110 can transmit and receive signals wirelessly or via a wired connection. The transceiver can also perform operations such as low-noise amplification, impedance matching, mixing, up- or down-frequency conversion, filtering, amplification, and similar functions. Electronic device 100 can receive and transmit data via transceiver 110, such as receiving streaming images from video streams. In some embodiments, electronic device 100 may also include an antenna (not shown) for receiving wireless radio frequency signals.
[0025] The stereoscopic display 120 allows users to experience a stereoscopic visual effect. To enable users to experience 3D visual effects through the stereoscopic display 120, the stereoscopic display 120 can, depending on its hardware specifications and the applied 3D display technology, allow the user's left and right eyes to view image content corresponding to different viewing angles (i.e., left-eye image and right-eye image). In some embodiments, the stereoscopic display 120 can be a naked-eye 3D display, such as a laptop monitor, television, desktop screen, or electronic billboard, etc. In some embodiments, the left-eye image and right-eye image can be displayed simultaneously based on stereoscopic image display technology, such as parallax barrier technology, lens technology, or directional backlight technology.
[0026] In other words, the stereoscopic display 120 may include a liquid crystal display (LCD), a light-emitting diode (LED) display, an organic light-emitting diode (OLED) display, or other types of displays, and this disclosure is not limited thereto.
[0027] Storage device 130 is used to temporarily or permanently store data, such as images, instructions, program code, software modules, etc. Specifically, storage device 130 may include volatile storage circuitry. The volatile storage circuitry is used to store data in a volatile manner. For example, the volatile storage circuitry may include random access memory (RAM) or similar volatile storage media. Alternatively, storage device 130 may include non-volatile storage circuitry. The non-volatile storage circuitry is used to store data in a non-volatile manner. For example, the non-volatile storage circuitry may include read-only memory (ROM), a solid-state drive (SSD), and / or a traditional hard disk drive (HDD) or similar non-volatile storage media. The number of storage devices 130 may be one or more, and this disclosure is not limited thereto.
[0028] Processor 140 connects to transceiver 110, stereoscopic display 120, and storage device 130, and is responsible for all or part of the operation of electronic device 100. For example, processor 140 may include a central processing unit (CPU), graphics processing unit (GPU), or other programmable general-purpose or special-purpose microprocessor, digital signal processor (DSP), programmable controller, application-specific integrated circuit (ASIC), programmable logic device (PLD), or other similar device or combination of these devices. The number of processors 140 may be one or more, and this disclosure does not limit this.
[0029] Figure 2 This is a schematic diagram of a stereoscopic display according to an embodiment of the present disclosure. Please refer to... Figure 2In some embodiments, the stereoscopic display 120 can be a naked-eye stereoscopic display, which provides different images to the left and right eyes through the principle of lens refraction, allowing the viewer to experience a stereoscopic display effect. The stereoscopic display 120 may include a display panel 121 and a lens layer 122. The lens layer 122 is disposed above the display panel 121, and the viewer can see the image content provided by the display panel 121 through the lens layer 122. The stereoscopic display 120 can place the pixels of the left-eye image and the pixels of the right-eye image at the corresponding pixel positions of the display panel 121. The lens layer 122 refracts different display content (i.e., the left-eye image and the right-eye image) to different positions in space through light refraction, so that the left and right eyes can receive two different images with parallax respectively. It is known that in order to place the pixels of the left-eye image and the pixels of the right-eye image at the corresponding pixel positions of the display panel 121, the left-eye image and the right-eye image need to undergo image weaving processing to produce a woven frame in which the pixels of the left-eye image and the pixels of the right-eye image are arranged alternately.
[0030] Figure 3 This is a flowchart of a stereoscopic image display method according to an embodiment of the present disclosure. Please refer to... Figure 3 The operation process of this embodiment is applicable to the electronic device 100 in the above embodiment. The detailed steps of this embodiment are described below with reference to the various components in the electronic device 100.
[0031] In step S310, processor 140 acquires a display frame including a streaming image. Specifically, processor 140 can receive the streaming image via transceiver 110 and generate a display frame including the streaming image. In some embodiments, processor 140 can utilize a screenshot function to acquire the display frame including the streaming image. In some embodiments, the streaming image may originate from a video conferencing program, a multimedia player, or a browser program's video stream. In some embodiments, when processor 140 executes video conferencing software, processor 140 can receive streaming images provided by conference participants via transceiver 110 and generate a display frame including the video conferencing software's window interface and the streaming image.
[0032] In some embodiments, the processor 140 may acquire display frames through an application programming interface (API) provided by the operating system. For example, the processor 140 may use screen acquisition technologies such as the Windows operating system's "Desktop Duplication API" or "DirectX Graphics Infrastructure (DXGI)" to acquire display frames, but is not limited to these.
[0033] In step S320, the processor 140 detects a specific style border surrounding the streaming image in the display frame by performing line detection. In step S330, the processor 140 determines whether the specific style border appears in the display frame.
[0034] In detail, in embodiments of this disclosure, an image conforming to a stereoscopic image format may be surrounded by a specific style border. In some embodiments, the specific style border may have a specific color and a specific outline. Therefore, when a streaming image in a display frame has a specific style border, the processor 140 can determine that the streaming image conforms to a stereoscopic image format. The aforementioned stereoscopic image format is, for example, a side-by-side (SBS) image format, which is not limited in this disclosure. The operation of embedding a specific style border into a stereoscopic format image can be achieved by post-processing the image conforming to the stereoscopic image format. Alternatively, a specially designed stereoscopic image capturing device can be used to directly output a stereoscopic format image with a specific style border embedded.
[0035] In some embodiments, a specific style border may be composed of multiple straight line segments, so the processor 140 can determine whether the specific style border appears in the display frame by performing line detection. In other embodiments, the processor 140 may perform line detection based on the Hough transform procedure or other line detection algorithms.
[0036] For example, Figure 4A and Figure 4B This is a schematic diagram of a specific style border according to an embodiment of this disclosure. Please refer to... Figure 4A The streaming image Imgs1, conforming to a side-by-side image format, has a left-eye image ImgL1 and a right-eye image ImgR1. A specific style border 41, presented as a rectangular outline, can be embedded within the streaming image Imgs1. The border line width of the specific style border 41 can be n pixels (e.g., 6 pixels), and this disclosure is not limited thereto. Accordingly, when the processor 140 receives the streaming image Imgs1 via the transceiver 110 and generates a display frame including the streaming image Imgs1, the processor 140 can identify the specific style border 41 in the display frame by performing line detection.
[0037] Alternatively, please refer to Figure 4BA specific style border 42 can be embedded within the streaming image Imgs1. In addition to the rectangular outline surrounding the streaming image Imgs1, the specific style border 42 also includes a vertical midline located between the left-eye image ImgL1 and the right-eye image ImgR1. Therefore, when the processor 140 receives the streaming image Imgs1 via the transceiver 110 and generates a display frame including the streaming image Imgs1, the processor 140 can identify the specific style border 42 in the display frame by performing line detection.
[0038] If step S330 determines that the received streaming image conforms to a stereoscopic image format, it means that the electronic device 100 has received a stereoscopic image. In step S340, in response to the appearance of a specific style border in the display frame, the processor 140 generates a stereoscopic image based on the display frame and the specific style border. This stereoscopic image is a side-by-side image including a first-view image and a second-view image. The first-view image may be a left-eye image, and the second-view image may be a right-eye image. Alternatively, the first-view image may be a right-eye image, and the second-view image may be a left-eye image.
[0039] In detail, because users may zoom or move the application window, the size and position of the streaming image within the application window in the display frame are variable. In this embodiment of the disclosure, in response to the movement or zooming of the application window, the specific style border surrounding the streaming image in the display frame can also move and zoom accordingly. Therefore, based on the area within the frame defined by the specific style border surrounding the streaming image, the processor 140 can obtain the image occupancy range of the streaming image conforming to a stereoscopic image format in the display frame. Based on the image occupancy range of the streaming image in the display frame, the processor 140 can distinguish between two-dimensional background blocks and streaming content blocks belonging to 3D content in the display frame.
[0040] Therefore, the processor 140 can generate left-eye and right-eye images of a stereoscopic image based on the two-dimensional background block and the streaming content block in the display frame. Specifically, the left-eye image of the stereoscopic image may include the two-dimensional background block in the display frame and the left-eye image of the streaming image. The right-eye image of the stereoscopic image may include the two-dimensional background block in the display frame and the right-eye image of the streaming image. In other words, the stereoscopic image simultaneously includes 3D image content with parallax and a two-dimensional background without parallax.
[0041] In step S350, in response to the appearance of a specific style border in the display frame, the processor 140 controls the stereoscopic display 120 to operate in stereoscopic display mode to display a stereoscopic image. Specifically, when the stereoscopic display 120 is a naked-eye stereoscopic display, the processor 140 can perform image weaving processing on the stereoscopic image (e.g., an SBS image) to obtain a woven image. This image weaving processing arranges the pixels of the left-eye image and the right-eye image of the stereoscopic image alternately within the woven frame. Subsequently, when the stereoscopic display 120 operates in stereoscopic display mode, the display panel 121 of the stereoscopic display 120 displays the woven image, and the refraction function of the lens layer 121 of the stereoscopic display 120 is enabled, allowing the viewer to experience a stereoscopic visual effect.
[0042] For example, in a scenario where the processor 140 is running video conferencing software, the stereoscopic display 120 can enable stereoscopic display functionality in response to the appearance of a specific style border in the display frame, and display stereoscopic streaming content provided by the meeting participants and the window operation interface of the video conferencing software. Therefore, in response to the appearance of the specific style border in the display frame, the user can experience a stereoscopic visual effect.
[0043] On the other hand, if step S330 determines otherwise, it means the streaming image may not conform to the stereoscopic image format. In step S360, reflecting the absence of a specific style border in the display frame, the processor 140 controls the stereoscopic display 120 to operate in two-dimensional display mode and display the display frame. In some embodiments, when the stereoscopic display 120, which is a naked-eye stereoscopic display, operates in two-dimensional display mode and does not provide stereoscopic display functionality, the display panel 121 of the stereoscopic display 120 will output the display frame, and the refraction function of the lens layer 121 of the stereoscopic display 120 is disabled.
[0044] For example, in the case where the processor 140 is running video conferencing software, if a specific style border does not appear in the display frame, the stereoscopic display 120 may disable the stereoscopic display function and display a display frame that includes the streaming image and the window operation interface of the video conferencing software.
[0045] Figure 5 This is a flowchart illustrating the detection of a specific style border according to an embodiment of this disclosure. Please refer to... Figure 5 The operation process of this embodiment is applicable to the electronic device 100 in the above embodiment. The detailed steps of this embodiment are described below with reference to the various components in the electronic device 100.
[0046] In step S510, the processor 140 filters multiple pixels of the display frame according to color component thresholds to generate a grayscale image. This grayscale image includes multiple first grayscale pixels corresponding to a first grayscale and multiple second grayscale pixels corresponding to a second grayscale. There is a grayscale difference between the first grayscale and the second grayscale. In some embodiments, the first grayscale is white and the second grayscale is black. Alternatively, the first grayscale is black and the second grayscale is white. If the color component of one of the multiple pixels in the display frame is greater than the color component threshold, one of the multiple pixels is converted to one of the multiple first grayscale pixels. If the color component of another of the multiple pixels in the display frame is not greater than the color component threshold, the other of the multiple pixels is converted to one of the multiple second grayscale pixels.
[0047] Specifically, since the color characteristics of a specific style border are predetermined, the processor 140 can first perform color detection on each pixel of the displayed frame to filter out pixels that may belong to the specific style border. By comparing the color components (e.g., R channel components, G channel components, or B channel components) of each pixel with color component thresholds, the processor 140 can distinguish between qualified pixels that conform to the color characteristics of the specific style border and unqualified pixels that do not conform to the color characteristics of the specific style border. The processor 140 can convert qualified pixels that conform to the color characteristics of the specific style border into first grayscale pixels (e.g., white pixels) in the grayscale image, and convert unqualified pixels that do not conform to the color characteristics of the specific style border into second grayscale pixels (e.g., black pixels) in the grayscale image.
[0048] For example, assuming a specific style border corresponds to green at RGB color coordinates (0, 255, 0), the processor 140 can convert multiple pixels whose G channel component is greater than the color component threshold to white pixels, and convert the remaining pixels whose G channel component is not greater than the color component threshold to black pixels. The color component threshold can be set according to the actual application, and this disclosure does not limit it. It should be noted that since the specific style border embedded in the streaming image will undergo slight color shifts during image encoding and decoding, the filtering process using the color component threshold can reduce the adverse effects of the aforementioned color shifts on the detection accuracy of the specific style border.
[0049] In step S520, the processor 140 performs line detection on the grayscale image to obtain multiple target lines. The multiple target lines include multiple vertical lines and multiple horizontal lines. In some embodiments, the processor 140 may perform line detection based on the Hough transform procedure. Specifically, the processor 140 may perform edge detection to obtain multiple edges in the grayscale image, and filter out multiple vertical lines and multiple horizontal lines with lengths greater than a length threshold from these edges. However, regarding line detection, the Hough transform procedure or other line detection algorithms well known to those skilled in the art can be applied, and there are no specific limitations.
[0050] In step S530, the processor 140 determines whether the multiple target lines constitute a specific outline of a specific style border. For example, the specific outline may be a specific rectangular outline (such as...). Figure 4A (Example). Processor 140 can determine whether multiple target lines in a grayscale image can form a rectangular outline or other outlines of other styles.
[0051] If step S530 determines "yes," in step S540, in response to the determination that multiple target lines form a specific contour, processor 140 determines that a specific style border appears in the display frame. If step S530 determines "no," in step S550, in response to the determination that multiple target lines do not form a specific contour, processor 140 determines that a specific style border does not appear in the display frame. When processor 140 determines that multiple target lines in the grayscale image form a specific contour of a specific style border, processor 140 can confirm that the specific style border appears in the display frame.
[0052] For example, Figure 6 This is a schematic diagram illustrating the detection of a specific style border according to an embodiment of this disclosure. Please refer to... Figure 6 The processor 140 can acquire a display frame F1. The display frame F1 includes an application window W1, which includes a streaming image Imgs2 conforming to a side-by-side image format. A specific style border 61 is embedded around the streaming image Imgs2. In this example, the processor 140 can filter all pixels of the display frame F1 according to color component thresholds to generate a grayscale image G1. The grayscale image G1 can include grayscale pixels corresponding to two different grayscale levels. For example, the grayscale image G1 can be a black and white image. Then, the processor 140 can acquire multiple target lines L61 to L64 by performing line detection. The processor 140 can determine that the target lines L61 to L64 form a specific rectangular outline, and therefore determine that the specific style border 61 appears in the display frame F1, thereby confirming that the streaming image Imgs2 is a side-by-side image.
[0053] Figure 7 This is a flowchart illustrating the detection of a specific style border in a display frame according to an embodiment of this disclosure. Please refer to... Figure 7 The operation process of this embodiment is applicable to the electronic device 100 in the above embodiment. The detailed steps of this embodiment are described below with reference to the various components in the electronic device 100.
[0054] In step S710, the processor 140 filters multiple pixels of the displayed frame according to the color component threshold to generate a grayscale image. In step S720, the processor 140 performs line detection on the grayscale image to obtain multiple target lines. In step S730, the processor 140 determines whether multiple first target lines among the multiple target lines conform to a specific rectangular outline. Detailed operations of the above steps can be found in the description of the foregoing embodiments and will not be repeated here.
[0055] If step S730 determines yes, in step S740, the processor 140 determines whether a second target straight line that is vertical and passes through the center of a specific rectangular outline exists in the grayscale image. Specifically, in this embodiment, the specific outline of a specific style border can be as follows: Figure 4B As shown in the example. Therefore, processor 140 needs to further determine whether a specific rectangular contour appearing in the grayscale image includes a vertical bisector (i.e., the second target line).
[0056] If step S740 determines yes, in step S750, in response to the determination that multiple target lines form a specific contour, processor 140 determines that a specific style border appears in the display frame. If step S730 or step S740 determines no, in step S760, in response to the determination that multiple target lines do not form a specific contour, processor 140 determines that a specific style border does not appear in the display frame.
[0057] For example, Figure 8 This is a schematic diagram illustrating the detection of a specific style border according to an embodiment of this disclosure. Please refer to... Figure 8The processor 140 can acquire a display frame F1. Display frame F1 includes an application window W1, which contains a streaming image Imgs3 conforming to a side-by-side image format. A specific style border 81 is embedded around the streaming image Imgs3 and at the boundary between the left-eye and right-eye images. In this example, the processor 140 can filter all pixels of display frame F1 according to color component thresholds to generate a grayscale image G2. Then, the processor 140 can acquire multiple target lines L81 to L85 through line detection. The processor 140 can determine that the target lines L81 to L84 form a specific rectangular outline, and determine that the perpendicular target line L85 passes through the center of the specific rectangular outline. Therefore, the processor 140 can determine that the specific style border 81 appears in display frame F1, and thereby confirm that the streaming image Imgs3 is a side-by-side image.
[0058] Figure 9 This is a flowchart illustrating the generation of a stereoscopic image according to an embodiment of this disclosure. Please refer to... Figure 9 The operation flow of this embodiment applies to the electronic device 100 in the above embodiments. The detailed steps of this embodiment will be described below with reference to the various components in the electronic device 100. To clearly explain the principle of this embodiment, the following supplementary explanations... Figure 10 Please provide an explanation. Figure 10 This is a schematic diagram illustrating the generation of a stereoscopic image and a woven pattern frame according to embodiments of this disclosure. Please refer to [the diagram / illustration document] as well. Figure 9 and Figure 10 .
[0059] In step S910, the processor 140 divides the display frame F10 into a streaming content block Z1 and a two-dimensional background image block Z2 according to the position and size of the specific style border 71. The streaming content block Z1 includes a streaming image that conforms to the stereoscopic image format and includes a first-view image L_1 (i.e., the left-eye image) and a second-view image R_1 (i.e., the right-eye image).
[0060] In step S920, the processor 140 combines the first-view image L_1 of the streaming image in the streaming content block Z1 with the two-dimensional background image block Z2 to form a first-view image L_2 of the stereoscopic format image Imgf1. Specifically, the processor 140 can perform image scaling on the first-view image L_1 of the streaming image according to the display block size of the streaming content block Z1. The processor 140 can synthesize the scaled first-view image L_1 and the two-dimensional background image block Z2 according to the display position of the streaming content block Z1 to generate the first-view image L_2.
[0061] In step S930, the processor 140 combines the second-view image R_1 of the streaming image in the streaming content block Z1 with the two-dimensional background image block Z2 to form the second-view image R_2 of the stereoscopic image Imgf1. The method for generating the second-view image R_2 is the same as the method for generating the first-view image L_2, and will not be described again here. It should be noted that the two-dimensional background image block Z2 in the first-view image L_2 of the stereoscopic image Imgf1 is the same as the two-dimensional background image block Z2 in the second-view image R_2 of the stereoscopic image Imgf1, that is, there is no parallax.
[0062] In some embodiments, when the stereoscopic display 120 is a naked-view stereoscopic display, the processor 140 may perform image weaving processing on the stereoscopic format image Imgf1 to generate a woven image frame WF1. In this case, when the stereoscopic display 120 displays the woven image frame WF1, the viewer can see stereoscopic streaming content with a stereoscopic visual effect.
[0063] Figure 11 This is a flowchart illustrating the generation of a stereoscopic image according to an embodiment of this disclosure. Please refer to... Figure 11 The operation process of this embodiment is applicable to the electronic device 100 in the above embodiment. The detailed steps of this embodiment are described below with reference to the various components in the electronic device 100.
[0064] In step S1110, the processor 140 divides the display frame into a streaming content block and a two-dimensional background image block according to the position and size of the specific style border. The streaming content block includes a streaming image conforming to a stereoscopic image format. In step S1120, the processor 140 combines the first-view image of the streaming image in the streaming content block with the two-dimensional background image block to form a first-view image of the stereoscopic format image. In step S1130, the processor 140 combines the second-view image of the streaming image in the streaming content block with the two-dimensional background image block to form a second-view image of the stereoscopic format image. The detailed operation of steps S1110 to S1130 can be referred to the description in the foregoing embodiments, and will not be repeated here.
[0065] It should be noted that in some operating scenarios, the application's window operation interface may include a user interface element that overlays a streaming image, and this user interface element may overlay either the left-eye image or the right-eye image of the streaming image. Therefore, when generating a stereoscopic image based on the acquired display frames, the user interface element will only be displayed in either the left-eye image or the right-eye image of the stereoscopic image. This will result in inconsistencies in the image content of the left-eye image or the right-eye image of the stereoscopic image, adversely affecting the stereoscopic display effect. Therefore, in this embodiment, the processor 140 can copy the user interface element overlaid on an image from one viewpoint to another viewpoint to make the image content of the left-eye image and the right-eye image of the stereoscopic image consistent.
[0066] Therefore, in step S1140, the processor 140 copies the user interface element to generate a copied user interface element. This user interface element is overlaid on the first-view image of the streaming image in the display frame. In some embodiments, the component information of the user interface element in the application's window operation interface is known, so the processor 140 can perform the copying operation on the user interface element overlaid on the first-view image of the streaming image. That is, the processor 140 can perform the copying operation on the user interface element located within the image area defined by a specific style border.
[0067] In step S1150, the processor 140 overlays a copied user interface element onto the second-view image of the stereoscopic image based on the position of the user interface element, such that the first-view image of the stereoscopic image includes the user interface element and the second-view image of the stereoscopic image includes the copied user interface element. This avoids the user interface element being visible only to the viewer's left or right eye.
[0068] For example, Figure 12 This is a schematic diagram illustrating the generation of a stereoscopic image by replicating user interface elements according to an embodiment of this disclosure. Please refer to... Figure 12 When processor 140 executes the video conferencing software, it can acquire display frame F12. Display frame F12 includes the window operation interface of the video conferencing software and a streamed image conforming to a side-by-side image format. Based on this, processor 140 can identify a specific style border in display frame F12 to determine that the streamed image Imgs5 is a side-by-side image. It should be noted that the window operation interface of the video conferencing software also includes a user interface element 91 overlaid on the left eye image of the streamed image Imgs5. User interface element 91 is, for example, a portrait of a meeting participant. Because a specific style border is identified in display frame F12, processor 140 will generate a stereoscopic image Imgf3 based on display frame F12.
[0069] In detail, by copying the two-dimensional background block outside the specific style border in the display frame F12, the processor 140 can draw the two-dimensional background block Z3_1 of the left-eye image and the two-dimensional background block Z3_2 of the right-eye image in the first image Img_1. Then, the processor 140 can scale the left half of the image content within the streaming content block Z1 and composite this scaled image with the two-dimensional background block in the first image Img_1 to generate the left-eye image of the second image Img_2. Additionally, the processor 140 can scale the right half of the image content within the streaming content block Z1 and composite this scaled image with the two-dimensional background block in the first image Img_1 to generate the right-eye image of the second image Img_2.
[0070] Next, the processor 140 can copy the user interface element 91' overlaid on the right eye image of the second image Img_2, and overlay the copied user interface element 92 over the left eye image of the second image Img_2 to generate a stereoscopic image Imgf3. Figure 12 As shown, the left-eye image Img_L1 of the stereoscopic image Imgf3 includes the image content of the left-eye image of the streaming image Imgs5, the two-dimensional background image outside the specific style border in the display frame F12, and the copied user interface element 92. Additionally, the right-eye image Img_R1 of the stereoscopic image Imgf3 includes the image content of the right-eye image of the streaming image Imgs5, the two-dimensional background image outside the specific style border in the display frame F12, and the user interface element 91'. That is, the image content of the right-eye image Img_R1 of the stereoscopic image Imgf3 is the same as that of the left-eye image Img_L1. Finally, the processor 140 can perform image weaving processing on the stereoscopic image Imgf3 and drive the stereoscopic display 120 to display the woven frame WF2.
[0071] Figure 13A and Figure 13B This is a flowchart of a stereoscopic image display method according to an embodiment of the present disclosure. Please refer to... Figure 13A and Figure 13B The operation flow of this embodiment applies to the electronic device 100 in the above embodiments. The detailed steps of this embodiment will be described below with reference to the various components in the electronic device 100. To clearly explain the principle of this embodiment, the following supplementary explanations... Figure 14 To explain, Figure 14 This is a schematic diagram illustrating the generation of a stereoscopic image based on an occluded object according to an embodiment of this disclosure. Please refer to it as well. Figure 13A , Figure 13B and Figure 14 .
[0072] In step S1310, processor 140 acquires a display frame F14 including a streaming image. In step S1320, processor 140 detects a specific style border surrounding the streaming image in display frame F14 by performing line detection. In this embodiment, step S1320 can be implemented as steps S1321 to S1326.
[0073] In step S1321, processor 140 filters multiple pixels of display frame F14 according to color component thresholds to generate a grayscale image. In step S1322, processor 140 performs line detection on the grayscale image to obtain multiple target lines. In step S1323, processor 140 determines whether the multiple target lines constitute a specific outline of a specific style border.
[0074] If step S1323 determines otherwise, in step S1326, processor 140 determines that the specific style border does not appear in the display frame. Therefore, in step S1330, in response to the absence of the specific style border in the display frame, processor 140 controls the stereoscopic display 120 to operate in two-dimensional display mode and display the display frame.
[0075] If step S1323 determines that the specific style border appears in display frame F14 in step S1324, the processor 140 determines that the specific style border appears in display frame F14. The streaming image in display frame F14 may include the left-eye image L_4 and the right-eye image R_3. Next, in step S1325, in response to the determination that the specific style border appears in display frame F14, the processor 140 compares multiple target lines with the specific rectangular outline to obtain the occluded section of the specific style border. Figure 14 As shown, the display frame F14 may include an occlusion object Obj1 covering the streaming image. The occlusion object Obj1 can be a window or any user interface element. Based on the presence of the occlusion object Obj1, the processor 140 can detect an incomplete specific-style border, i.e., the specific-style border in the lower right corner of the right-eye image R_3 is missing. In this case, the processor 140 can compare multiple target lines constituting a specific rectangular outline with the specific rectangular outline to obtain the occluded segment of the specific-style border. When the occluded segment of the specific-style border exists, it means that a portion of the streaming image in the display frame is occluded. To generate consistent left and right-eye images in a stereoscopic format image, the processor 140 needs to perform additional processing on the occluded area of the streaming image.
[0076] Next, in step S1340, in response to the appearance of a specific style border in the display frame F14, the processor 140 generates a stereoscopic image based on the display frame and the specific style border. In this embodiment, step S1340 can be implemented as steps S1341 to S1342.
[0077] In step S1341, the processor 140 determines the occluding object Obj1 that occludes the streaming image in the display frame F14 based on the occluded section of the specific style border. Based on the position and length of the occluded section of the specific style border, the processor 140 can identify the occluding object Obj1 and obtain the occluding image block OZ1 of the occluding object Obj1 from the display frame F14.
[0078] In step S1342, processor 140 generates a stereoscopic image Imgf5 based on the display frame F14, the specific style border, and the occluding object Obj. Figure 10 Unlike other embodiments, both the left-eye image L_5 and the right-eye image L_6 of the stereoscopic format image Imgf5 include an occlusion image block OZ1 of the occlusion object Obj1. The occlusion image block OZ1 is the portion of the image that overlaps between the occlusion object Obj1 and the streaming image. In some embodiments, there is no parallax between the occlusion image block OZ1 in the left-eye image L_5 and the occlusion image block OZ1 in the right-eye image L_6. Therefore, the operation of synchronously placing the occlusion image block OZ1 in images from different viewpoints is similar to... Figure 12 The example describes the operation of copying user interface elements.
[0079] In step S1350, in response to the appearance of a specific style border in the display frame F14, the processor 140 controls the stereoscopic display 120 to operate in stereoscopic display mode to display the stereoscopic format image Imgf5. Furthermore, the processor 140 can perform image weaving processing on the stereoscopic format image Imgf5 and drive the stereoscopic display 120 to display the woven frame WF3.
[0080] Figure 15 This is a flowchart of a stereoscopic image display method according to an embodiment of the present disclosure. Please refer to... Figure 15 The operation process of this embodiment is applicable to the electronic device 100 in the above embodiment. The detailed steps of this embodiment are described below with reference to the various components in the electronic device 100.
[0081] It should be noted that the application's window operation interface may contain user interface elements that affect the detection of specific style borders, such as user interface elements that may obscure specific style borders. In this embodiment, component edge information of preset user interface elements that may obscure specific style borders can be stored in advance. When the processor 140 detects the presence of preset user interface elements in the display frame, the processor 140 can use the recognition results of specific style borders based on the previous display frame.
[0082] In step S1510, processor 140 may record component edge information of multiple preset user interface elements of an application. The presence of these preset user interface elements affects the detection results of specific style borders in the streaming image. Since the application's window operation interface is known, storage device 130 may pre-store the component edge information of these preset user interface elements.
[0083] In step S1520, processor 140 acquires a display frame including a streaming image. In step S1530, processor 140 detects a specific style border surrounding the streaming image in the display frame by performing line detection. In step S1540, processor 140 determines whether the specific style border appears in the display frame. In step S1550, in response to the specific style border appearing in the display frame, processor 140 generates a stereoscopic image based on the display frame and the specific style border. In step S1560, in response to the specific style border appearing in the display frame, processor 140 controls stereoscopic display 120 to operate in stereoscopic display mode to display the stereoscopic image. Detailed implementation of steps S1520 to S1560 can be found in the foregoing embodiments and will not be repeated here.
[0084] It should be noted that in step S1570, in response to the absence of a specific style border in the display frame, the processor 140 detects whether the display frame includes a specific component edge that conforms to the component edge information of multiple preset user interface elements. The component edge information of each preset user interface element includes edge color, component outline, and component size, etc. In some embodiments, the processor 140 can detect whether the display frame includes a specific component edge that conforms to the component edge information through edge detection and color recognition.
[0085] If step S1570 determines that a preset user interface element appears in the display frame, then in step S1580, in response to the display frame including specific component edges that conform to the component edge information of multiple preset user interface elements, the processor 140 controls the stereoscopic display 120 to execute either a stereoscopic display mode or a two-dimensional display mode according to the display mode corresponding to a previous display frame. If the display mode corresponding to the previous display frame is a stereoscopic display mode, the processor 140 controls the stereoscopic display 120 to execute the stereoscopic display mode. If the display mode corresponding to the previous display frame is a two-dimensional display mode, the processor 140 controls the stereoscopic display 120 to execute the two-dimensional display mode.
[0086] In summary, in this embodiment of the present disclosure, if a specific style border appears within a display frame, the streaming image can be determined to be stereoscopic streaming content conforming to a stereoscopic image format. Furthermore, the image range of the streaming image conforming to the stereoscopic image format can be determined based on the specific style border to distinguish between the 3D content image area and the 2D background area in the display frame. Subsequently, a stereoscopic format image including left-eye and right-eye images can be generated based on the specific style border and the display frame, and the stereoscopic display can be controlled to operate in stereoscopic display mode to display the stereoscopic format image. Therefore, by embedding a specific style border within the stereoscopic format image, it is possible to accurately detect that the display frame includes a streaming image conforming to a stereoscopic image format, thereby controlling the stereoscopic display to automatically provide stereoscopic display functionality. Since the specific style border is located on the periphery of the streaming image, the probability of it being obscured by other display objects can be reduced, thus improving detection accuracy.
[0087] In addition, by pre-storing the component edge information of preset user interface elements, it is possible to detect whether any preset user interface element appears in the display frame, so as to reuse the recognition results of the previous display frame for specific style borders in a timely manner. Based on this, it is possible to avoid adverse effects caused by the preset user interface elements' recognition of specific style borders. Furthermore, by copying the user interface element appearing in an image from one viewpoint to another viewpoint, the image content of the left-eye image and the right-eye image of the stereoscopic format image can be made consistent, improving display quality.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for displaying stereoscopic images, applicable to electronic devices including stereoscopic displays, characterized in that, include: Acquire display frames including streaming images; By performing line detection, specific style borders surrounding the streaming image are detected in the displayed frame; The specific style border appears in the display frame, and a stereoscopic image is generated based on the display frame and the specific style border. as well as In response to the appearance of the specific style border in the display frame, the stereoscopic display is controlled to operate in stereoscopic display mode to display the stereoscopic format image.
2. The stereoscopic image display method according to claim 1, characterized in that, Also includes: In response to the fact that the specific style border does not appear in the display frame, the stereoscopic display is controlled to operate in two-dimensional display mode to display the display frame.
3. The stereoscopic image display method according to claim 1, characterized in that, The step of detecting the specific style border surrounding the streaming image in the display frame by performing the line detection includes: A grayscale image is generated by filtering multiple pixels of the display frame according to the color component threshold value, wherein the grayscale image includes multiple first grayscale pixels corresponding to a first grayscale and multiple second grayscale pixels corresponding to a second grayscale. If the color component of one of the pixels in the displayed frame is greater than the color component threshold, then one of the pixels is converted to one of the plurality of first grayscale pixels. If the color component of another pixel in the display frame is not greater than the color component threshold, the other pixel is converted to one of the multiple second grayscale pixels.
4. The stereoscopic image display method according to claim 3, characterized in that, One of the first grayscale and the second grayscale is white, and the other of the first grayscale and the second grayscale is black.
5. The stereoscopic image display method according to claim 3, characterized in that, The step of detecting the specific style border surrounding the streaming image in the display frame by performing the line detection further includes: Multiple target straight lines are obtained by performing the line detection on the grayscale image; Determine whether the multiple target straight lines constitute the specific outline of the specific style border; The reaction is to determine that the multiple target straight lines constitute the specific contour, and to determine that the specific style border appears in the display frame; and The reaction is to determine that the multiple target straight lines do not constitute the specific contour, and to determine that the specific style border does not appear in the display frame.
6. The stereoscopic image display method according to claim 5, characterized in that, The step of determining whether the multiple target straight lines constitute the specific contour of the specific style border includes: Determine whether multiple first target lines among the multiple target lines conform to a specific rectangular contour; and Determine whether a second target line that is vertical and passes through the center of the specific rectangular outline exists in the grayscale image.
7. The stereoscopic image display method according to claim 5, characterized in that, The multiple target lines include multiple vertical lines and multiple horizontal lines.
8. The stereoscopic image display method according to claim 6, characterized in that, The step of detecting the specific style border surrounding the streaming image in the display frame by performing the line detection further includes: The reaction involves determining that the multiple target lines conform to the specific rectangular outline, comparing the multiple target lines with the specific rectangular outline, and obtaining the occluded segment of the specific style border. The step of generating the stereoscopic image based on the display frame and the specific style border, which is reflected in the appearance of the specific style border in the display frame, includes: Based on the occluded segment of the specific style border, obtain the occluding object that occludes the streaming image; and The stereoscopic image is generated based on the displayed frame, the specific style border, and the occluding object.
9. The stereoscopic image display method according to claim 1, characterized in that, The step of generating the stereoscopic image based on the display frame and the specific style border, in response to the appearance of the specific style border in the display frame, includes: Based on the position and size of the specific style border, the display frame is divided into the streaming content block and the two-dimensional background image block, wherein the streaming content block includes the streaming image conforming to the stereoscopic image format; The first-view image of the streaming image in the streaming content block is combined with the two-dimensional background image block to form the first-view image of the stereoscopic format image; and The second-view image of the streaming image in the streaming content block is combined with the two-dimensional background image block to form the second-view image of the stereoscopic format image.
10. The stereoscopic image display method according to claim 9, characterized in that, The step of generating the stereoscopic image based on the display frame and the specific style border, in response to the appearance of the specific style border in the display frame, further includes: Copy user interface elements to generate copied user interface elements; and The copied user interface element is overlaid on the second perspective image of the stereoscopic format image according to the position of the user interface element, such that the first perspective image of the stereoscopic format image includes the user interface element and the second perspective image of the stereoscopic format image includes the copied user interface element.
11. The stereoscopic image display method according to claim 1, characterized in that, Also includes: Record component edge information of multiple preset user interface elements of the application; In response to the fact that the specific style border does not appear in the display frame, it is detected whether the display frame includes a specific component edge that conforms to the component edge information of the plurality of preset user interface elements; as well as The display frame includes the component edge information of the plurality of preset user interface elements, and the stereo display is controlled to execute a stereo display mode or a two-dimensional display mode according to the display mode corresponding to the previous display frame.
12. The stereoscopic image display method according to claim 1, characterized in that, The step of acquiring the display frame including the streaming image includes: Use the screenshot function to obtain the display frame including the streaming image.
13. An electronic device, characterized in that, include: A transceiver is used to receive streaming images. 3D display; as well as At least one processor is coupled to the transceiver and the described display, and configured to: Obtain a display frame including the streaming image; By performing line detection, specific style borders surrounding the streaming image are detected in the displayed frame; The specific style border appears in the display frame, and a stereoscopic image is generated based on the display frame and the specific style border. as well as In response to the appearance of the specific style border in the display frame, the stereoscopic display is controlled to operate in stereoscopic display mode to display the stereoscopic format image.
14. The electronic device according to claim 13, characterized in that, The processor is further configured to: In response to the fact that the specific style border does not appear in the display frame, the stereoscopic display is controlled to operate in two-dimensional display mode to display the display frame.
15. The electronic device according to claim 13, characterized in that, The processor is further configured to: A grayscale image is generated by filtering multiple pixels of the display frame according to the color component threshold value, wherein the grayscale image includes multiple first grayscale pixels corresponding to a first grayscale and multiple second grayscale pixels corresponding to a second grayscale. If the color component of one of the pixels in the displayed frame is greater than the color component threshold, then one of the pixels is converted to one of the plurality of first grayscale pixels. If the color component of another pixel in the display frame is not greater than the color component threshold, the other pixel is converted to one of the multiple second grayscale pixels.
16. The electronic device according to claim 15, characterized in that, The processor is further configured to: Multiple target straight lines are obtained by performing the line detection on the grayscale image; Determine whether the multiple target straight lines constitute the specific outline of the specific style border; The reaction is to determine that the multiple target straight lines constitute the specific contour, and to determine that the specific style border appears in the display frame; and The reaction is to determine that the multiple target straight lines do not constitute the specific contour, and to determine that the specific style border does not appear in the display frame.
17. The electronic device according to claim 16, characterized in that, The processor is further configured to: Determine whether multiple first target lines among the multiple target lines conform to a specific rectangular contour; and Determine whether a second target line that is vertical and passes through the center of the specific rectangular outline exists in the grayscale image.
18. The electronic device according to claim 17, characterized in that, The processor is further configured to: The reaction is to determine that the multiple target lines conform to the specific rectangular outline, and compare the multiple target lines with the specific rectangular outline to obtain the occluded section of the specific style border; Based on the occluded section of the specific style border, obtain the occluding object that occludes the streaming image; as well as The stereoscopic image is generated based on the displayed frame, the specific style border, and the occluding object.
19. The electronic device according to claim 13, characterized in that, The processor is further configured to: Based on the position and size of the specific style border, the display frame is divided into the streaming content block and the two-dimensional background image block, wherein the streaming content block includes the streaming image conforming to the stereoscopic image format; The first-view image of the streaming image in the streaming content block is combined with the two-dimensional background image block to form the first-view image of the stereoscopic format image; as well as The second-view image of the streaming image in the streaming content block is combined with the two-dimensional background image block to form the second-view image of the stereoscopic format image.
20. The electronic device according to claim 13, characterized in that, The processor is further configured to: Copy user interface elements to generate copied user interface elements; and The copied user interface element is overlaid on the second perspective image of the stereoscopic format image according to the position of the user interface element, such that the first perspective image of the stereoscopic format image includes the user interface element and the second perspective image of the stereoscopic format image includes the copied user interface element.
21. The electronic device according to claim 13, characterized in that, The processor is further configured to: Record component edge information of multiple preset user interface elements of the application; In response to the fact that the specific style border does not appear in the display frame, it is detected whether the display frame includes a specific component edge that conforms to the component edge information of the plurality of preset user interface elements; as well as The display frame includes the component edge information of the plurality of preset user interface elements, and the stereo display is controlled to execute a stereo display mode or a two-dimensional display mode according to the display mode corresponding to the previous display frame.
22. The electronic device according to claim 13, characterized in that, The processor is further configured to: Use the screenshot function to obtain the display frame including the streaming image.