H3 Window Crop (internal):
The H3WindowCrop node is an experimental component designed to facilitate the cropping of a specific window from a sequence of images, often referred to as the "world." This node is part of a larger framework that handles rolling-window regeneration, which is particularly useful for processing clips that exceed the memory capacity of your hardware. By focusing on a single planned window, H3WindowCrop extracts the necessary frames and provides a detailed hold map and splice map, which are essential for further processing steps. Unlike other cropping methods, this node does not derive the window from the hold map; instead, it relies on a pre-determined plan that specifies the span, handle widths, and seam policies. This approach allows for precise control over the cropping process, ensuring that each window is handled according to the specific requirements of the project. The node is typically used in conjunction with other nodes in a pipeline to achieve seamless integration and processing of video segments.
H3 Window Crop (internal) Input Parameters:
images
The images parameter represents the sequence of frames from which a specific window will be cropped. This input is crucial as it provides the raw data that the node will process. The frames can either be the entire sequence or a running splice, depending on the context of use. There are no specific minimum or maximum values for this parameter, but it should be a valid sequence of images that the node can process.
window_spec
The window_spec parameter is a JSON string that contains the specifications for the window to be cropped. This includes details such as the start and end frames, world length, and handle information. The JSON format allows for a structured and detailed description of the window, ensuring that the node can accurately extract the desired segment. The default value is an empty string, but it must be populated with valid JSON data for the node to function correctly.
H3 Window Crop (internal) Output Parameters:
images
This output provides the cropped sequence of frames that corresponds to the specified window. It is a crucial output as it represents the primary result of the cropping operation, ready for further processing or analysis.
hold_map
The hold_map output is a JSON string that details the exact per-frame hold information for the cropped window. This map is essential for understanding how each frame within the window is treated, particularly in terms of hold and release dynamics.
splice_map
The splice_map output is another JSON string that provides the coordinates of the splice in world terms. This map is vital for integrating the cropped window back into the larger sequence, ensuring seamless transitions between segments.
first_frame
The first_frame output is an image representing the first frame of the cropped window. This output is useful for previewing the start of the window and verifying that the cropping operation has been executed correctly.
last_frame
The last_frame output is an image representing the last frame of the cropped window. Similar to the first frame, this output allows for verification of the end of the window and ensures that the cropping operation has captured the intended segment.
report
The report output is a string that provides a summary of the cropping operation, including details such as the window's start and end frames, dilated length, and seam information. This report is valuable for debugging and understanding the specifics of the cropping process.
H3 Window Crop (internal) Usage Tips:
- Ensure that the
window_specparameter is correctly formatted as a JSON string to avoid errors during processing. - Use the
reportoutput to verify the details of the cropping operation and make adjustments to thewindow_specif necessary. - Consider the sequence length and available memory when planning the window to avoid overloading your system.
H3 Window Crop (internal) Common Errors and Solutions:
AssertionError: (world_len, n)
- Explanation: This error occurs when the specified
world_lenin thewindow_specexceeds the number of frames in theimagesinput. - Solution: Verify that the
world_lenvalue in yourwindow_specdoes not exceed the total number of frames in theimagesinput.
AssertionError: (len(holds), b - a + 1)
- Explanation: This error indicates a mismatch between the length of the
holdsarray and the expected number of frames betweenaandb. - Solution: Ensure that the
holdsarray in yourwindow_specmatches the number of frames specified by theaandbvalues. Adjust theholdsarray to align with the specified frame range.
