Nodes/comfyui_cv/CV Coordinate Grid
ComfyUI Node

CV Coordinate Grid

A dense meshgrid of pixel coordinates: every (x, y) on a step-spaced grid over a width x height canvas, row-major (y outer, x inner). Feed it into 'CV Train Classifier' query_features to classify EVERY grid location, then 'CV Reshape Array' the predictions back to (rows, cols) and colormap them - that renders the decision REGIONS of the classifier. Also a generic sample-position generator for remap/lookup experiments.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Coordinate Grid
    • points
    • cols
    • rows
    • count
    width224
    height224
    step2
    Categoryimage/CV/ml

    Inputs (3)

    NameTypeDefaultDescription
    widthINT2241–8192Canvas width in pixels the grid covers (x goes 0, step, 2*step, ... below width).
    heightINT2241–8192Canvas height in pixels the grid covers (y goes 0, step, 2*step, ... below height).
    stepINT21–1024Grid spacing in pixels. 1 = every pixel (slow to classify); 2-4 is plenty for a preview.

    Outputs (4)

    NameTypeDescription
    pointsNPARRAYNx1x2 float32 (x, y) grid coordinates, row-major: N = rows * cols. Feeds query_features of 'OpenCV Train Classifier'.
    colsINTGrid columns = number of x positions. Use as the cols of 'CV Reshape Array' on the predictions.
    rowsINTGrid rows = number of y positions. Use as the rows of 'CV Reshape Array' on the predictions.
    countINTrows * cols.