Visit ComfyUI Online for ready-to-use ComfyUI environment
Transform metric depth images into relative representations for visual interpretation and processing in various applications, enhancing contrast and detail visibility.
The MetricDepthToRelative
node is designed to transform metric depth images into relative depth representations, which are more suitable for visual interpretation and further processing in various applications. This node is particularly useful in scenarios where depth information needs to be normalized across different images or within a single image to enhance contrast and detail visibility. By converting metric depth values to a relative scale, this node allows for more consistent and visually coherent depth maps, which can be crucial for tasks such as 3D reconstruction, augmented reality, and image editing. The node offers flexibility through its parameters, enabling you to adjust the conversion process to suit specific needs, such as inverting the depth map or applying gamma correction to fine-tune the output.
The depth
parameter is the input image that contains the metric depth information. This image serves as the basis for the conversion process, where each pixel's depth value is transformed into a relative scale. The depth image should be in a format that the node can process, typically a single-channel image representing depth values.
The per_image
parameter is a boolean option that determines whether the depth normalization should be applied individually to each image in a batch or across the entire batch. When set to True
, each image is normalized independently, which is useful when images have varying depth ranges. The default value is True
.
The invert
parameter is a boolean option that specifies whether the relative depth values should be inverted. Inverting the depth can be useful for certain visualizations or when the depth map needs to be interpreted in reverse. The default value is True
, meaning the depth map will be inverted by default.
The gamma
parameter is a float value that allows you to apply gamma correction to the relative depth map. This adjustment can enhance or reduce the contrast of the depth map, depending on the gamma value used. The parameter accepts values ranging from 0.01 to 100, with a default value of 1.0, which means no gamma correction is applied by default.
The depth
output parameter is the resulting image after the conversion from metric to relative depth. This image represents the depth information on a normalized scale, making it easier to interpret and use in subsequent processing steps. The relative depth map is typically a single-channel image where pixel values indicate relative depth, with adjustments applied based on the input parameters.
per_image
parameter to False
. This will ensure that all images are normalized using the same scale, which can be beneficial for batch processing tasks.gamma
parameter to adjust the contrast of the depth map. A gamma value less than 1 will increase contrast, while a value greater than 1 will decrease it. Experiment with different values to find the optimal setting for your specific application.© Copyright 2024 RunComfy. All Rights Reserved.