Roll Mask Axes:
The Roll Mask Axes node is designed to manipulate mask images by shifting their content along the horizontal and vertical axes. This operation is particularly useful for adjusting mask positions to make facial seams easier to manage or access, especially in equirectangular images used in 360-degree environments. By rolling the mask, you can effectively reposition elements within the mask without altering its overall structure, which is crucial for tasks that require precise alignment or seam removal. This node provides a straightforward method to achieve these adjustments, enhancing the flexibility and control you have over mask manipulation in your projects.
Roll Mask Axes Input Parameters:
mask
The mask parameter is the primary input for this node, representing the mask image you wish to manipulate. It should be a three-dimensional tensor, typically containing the mask data that defines which areas are to be affected or preserved in subsequent operations. This parameter is crucial as it forms the basis of the rolling operation, and its dimensions must be correctly specified to ensure proper functionality.
roll_x
The roll_x parameter specifies the number of pixels to shift the mask horizontally. This integer value allows you to move the mask content left or right, with positive values shifting it to the right and negative values to the left. The default value is 0, meaning no horizontal shift. Adjusting this parameter can help align mask features with other elements in your image.
roll_y
The roll_y parameter determines the vertical shift of the mask in pixels. Similar to roll_x, this integer value moves the mask content up or down, with positive values shifting it downward and negative values upward. The default value is 0, indicating no vertical shift. This parameter is essential for aligning mask features vertically within your image.
roll_x_by_50_percent
The roll_x_by_50_percent parameter is a boolean option that, when enabled, shifts the mask horizontally by 50% of its width. This operation is equivalent to a 180-degree rotation on an equirectangular image, effectively repositioning the mask to the opposite side. The default value is False, meaning this operation is not applied unless explicitly set. This parameter is particularly useful for quickly repositioning masks in panoramic or 360-degree images.
Roll Mask Axes Output Parameters:
Rolled Mask
The Rolled Mask output is the result of the rolling operation applied to the input mask. It is a three-dimensional tensor representing the adjusted mask, with its content shifted according to the specified parameters. This output is crucial for further processing or integration into your workflow, as it provides the modified mask ready for use in subsequent tasks or analyses.
Roll Mask Axes Usage Tips:
- To achieve a seamless transition in equirectangular images, consider using the
roll_x_by_50_percentoption to quickly reposition the mask by half its width. - Experiment with different
roll_xandroll_yvalues to fine-tune the alignment of mask features with other elements in your image, ensuring optimal results.
Roll Mask Axes Common Errors and Solutions:
"mask should have 3 dimensions, got <number>"
- Explanation: This error occurs when the input mask does not have the expected three dimensions, which is necessary for the node to function correctly.
- Solution: Ensure that the input mask is a three-dimensional tensor. Check the dimensions of your mask and reshape it if necessary before passing it to the node.
