ComfyUI Node

cv2.dft

Raw wrapper of cv2.dft(src, flags?, nonzeroRows?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
cv2.dft
  • src
  • nparray
flagsnone (0)
nonzeroRows0
Categoryimage/CV/low-level/cv2 D

Inputs (3)

NameTypeDefaultDescription
srcNPARRAYinput array that could be real or complex. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
flagsoptSTRINGnone (0)transformation flags, representing a combination of the #DftFlags cv2.dft flags: one of none (0) plus any of DFT_COMPLEX_OUTPUT, DFT_REAL_OUTPUT, DFT_SCALE, DFT_INVERSE, DFT_ROWS, DFT_COMPLEX_INPUT, pipe-joined (e.g. "none (0) | DFT_COMPLEX_OUTPUT"). In the UI this renders as a dropdown with one toggle per flag.
nonzeroRowsoptINT0-2147483648–2147483647when the parameter is not zero, the function assumes that only the first nonzeroRows rows of the input array (#DFT_INVERSE is not set) or only the first nonzeroRows of the output array (#DFT_INVERSE is set) contain non-zeros, thus, the function can handle the rest of the rows more efficiently and save some time; this technique is very useful for calculating array cross-correlation or convolution using DFT. Preset to the OpenCV default (0).

Outputs (1)

NameTypeDescription
nparrayNPARRAY