ComfyUI > Nodes > ComfyUI-JNodes > Create Stereoscopic Image From Depth (Experimental)

ComfyUI Node: Create Stereoscopic Image From Depth (Experimental)

Class Name

JNodes_CreateStereoscopicImageFromDepth

Category
None
Author
JaredTherriault (Account age: 3626days)
Extension
ComfyUI-JNodes
Latest Updated
2024-08-11
Github Stars
0.03K

How to Install ComfyUI-JNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-JNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-JNodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Create Stereoscopic Image From Depth (Experimental) Description

Generates stereoscopic 3D images from RGB input and depth map, enhancing visual experience with depth perception.

Create Stereoscopic Image From Depth (Experimental):

The JNodes_CreateStereoscopicImageFromDepth node is designed to generate a stereoscopic 3D image from a given RGB input image and its corresponding depth map. This node leverages the depth information to create a perception of depth, resulting in a 3D effect that can be viewed using stereoscopic methods. The primary benefit of this node is its ability to transform 2D images into immersive 3D visuals, enhancing the visual experience. It supports two modes of stereoscopic image creation: side-by-side (SBS) and over-under (OU), and offers the flexibility to swap the left and right images if needed. This node is particularly useful for AI artists looking to add a 3D dimension to their artwork, making it more engaging and visually appealing.

Create Stereoscopic Image From Depth (Experimental) Input Parameters:

input_image

The input_image parameter is the RGB input image that you want to convert into a stereoscopic image. It should be provided as a PyTorch tensor with the shape [1, height, width, 3]. This image serves as the base for generating the 3D effect.

depth_map

The depth_map parameter is the depth map corresponding to the input image, also provided as a PyTorch tensor with the shape [1, height, width, 3]. The depth map contains information about the distance of each pixel from the viewer, which is crucial for creating the stereoscopic effect.

max_disparity

The max_disparity parameter defines the maximum disparity value used to create the 3D effect. It is an integer value with a default of 1000. This parameter controls the extent of the depth effect, with higher values resulting in a more pronounced 3D effect.

mode

The mode parameter specifies the format of the stereoscopic image. It can be set to either side-by-side (SBS) or over-under (OU). This determines how the left and right images are combined to create the final stereoscopic image.

swap_images

The swap_images parameter is a boolean that, when set to True, swaps the left and right images in the final stereoscopic image. This can be useful if the initial left and right images are not in the desired order. The default value is False.

Create Stereoscopic Image From Depth (Experimental) Output Parameters:

IMAGE

The output parameter IMAGE is the resulting stereoscopic image, provided as a PyTorch tensor. This image combines the left and right views based on the specified mode (SBS or OU) and incorporates the depth information to create a 3D effect. The output can be used for further processing or directly for viewing with appropriate stereoscopic equipment.

Create Stereoscopic Image From Depth (Experimental) Usage Tips:

  • Ensure that the input_image and depth_map have the same dimensions to avoid mismatches during processing.
  • Experiment with different max_disparity values to achieve the desired depth effect. Higher values will create a more pronounced 3D effect.
  • Use the swap_images parameter if the left and right images appear reversed in the final output.
  • Choose the mode that best suits your viewing method: side-by-side (SBS) for VR headsets or over-under (OU) for certain 3D displays.

Create Stereoscopic Image From Depth (Experimental) Common Errors and Solutions:

Mode should be 'SBS' for side-by-side or 'OU' for over-under

  • Explanation: This error occurs when an invalid mode is specified for the mode parameter.
  • Solution: Ensure that the mode parameter is set to either side-by-side (SBS) or over-under (OU).

Input image and depth map dimensions do not match

  • Explanation: This error occurs when the dimensions of the input_image and depth_map do not match.
  • Solution: Verify that both the input_image and depth_map have the same height and width dimensions before passing them to the node.

Invalid tensor shape for input image or depth map

  • Explanation: This error occurs when the input_image or depth_map tensors do not have the expected shape [1, height, width, 3].
  • Solution: Ensure that both the input_image and depth_map are provided as PyTorch tensors with the correct shape.

Create Stereoscopic Image From Depth (Experimental) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-JNodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.