cv2.intensity_transform.BIMEF2
Same Eigen wall as BIMEF, but this time you pick the exposure ratio
- input
- nparray
BIMEF2 is the second entry of OpenCV's intensity_transform BIMEF pair, and like the first one it raises (-213) on any stock OpenCV build because the underlying function needs Eigen compiled in. If you're here because the node loaded and then failed on run, that's the whole answer: it's the build, not your graph.
What separates it from cv2_intensity_transform.BIMEF is the argument list. The one-argument BIMEF estimates its own exposure ratio internally; BIMEF2 takes that ratio as an explicit input, k. Same bio-inspired multi-exposure-fusion idea, one less thing it guesses.
The inputs it declares
input- IMAGE, MASK or NPARRAY.k- the exposure ratio. The pack's tooltip on the sibling node explains what it is: "Leave blank to let BIMEF estimate it (that is what the 1-argument BIMEF node does)." Here you supply the number yourself, which is the point of this variant - you get to decide how much brighter the fused exposure is instead of letting the estimator choose.mu,a,b- the enhancement ratio and the two camera-response model parameters, same family of settings as BIMEF.
Every one of those widgets defaults to 0 in the schema. That's OpenCV's "required argument, no useful default" position leaking through: a fresh node with k = 0, mu = 0, a = 0, b = 0 is not a meaningful configuration. On an Eigen-enabled build you'd set them explicitly; on a stock one you'd never get that far.
Output is nparray - and note it does not echo the input format the way gammaCorrection, logTransform, autoscaling and contrastStretching do. You'd get raw NPARRAY back and need CV Array → Image to feed anything image-shaped.
Why the node exists at all, and why it's unavailable
The intensity_transform contrib module holds a small collection of classic single-image enhancement algorithms. BIMEF is the interesting one conceptually: it models how a camera's sensor responds to light, and uses that response function to synthesise a second, brighter exposure of the same frame - then blends the two. The promise is a locally adaptive lift, which is what people normally reach for a model to do.
The catch is the Eigen dependency, and it's a systemic one in this pack rather than a one-off. The pack generates its low-level node registry from whatever the installed OpenCV build exposes, and as its README says, that "can include entries whose implementation the build lacks". Their own documented example is ximgproc.fastBilateralSolverFilter, which shows up in the menu and then always raises (-213) needs to be compiled with EIGEN. BIMEF and BIMEF2 are the same class of ghost. The wheels most of us install report Eigen: NO.
So the debugging reflex to build: when a node exists but every run throws an OpenCV error about a missing library, stop editing the graph. Either build OpenCV with that dependency, or use something else.
What to use instead
For a real exposure lift on a flat frame: cv2.intensity_transform.gammaCorrection (a power curve, γ below 1 brightens midtones without clipping) or logTransform (parameterless, much more aggressive on shadows - an all-or-nothing shadow lift). For a global min/max stretch with no curve at all, autoscaling. For genuinely bracketed captures, the pack's HDR nodes - CV HDR Exposure Fusion (Mertens) needs no response curve, CV HDR Merge to Radiance does.
If the detail is actually gone, no curve gets it back. That's the point at which a generative pass is the honest answer rather than an expensive habit - and if all you wanted was to stop doing colour correction with img2img, gamma is the node that lets you.
Installing the pack
Manager → search comfyui_cv, or:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_cv
pip install "opencv-contrib-python-headless~=5.0.0.93"
Python ≥ 3.12 and a ComfyUI recent enough for the V3 node API; behaviour curated against OpenCV 5.0.0.93. That gets you the working parts of the module - not this node. And the standing caveat: this is a personal, LLM-assisted project whose README warns against production use without reviewing the code yourself.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| input | NPARRAY,IMAGE,MASK | - - - Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| k | FLOAT | 0.0000-1e+38–1e+38 | - - - |
| mu | FLOAT | 0.0000-1e+38–1e+38 | - - - |
| a | FLOAT | 0.0000-1e+38–1e+38 | - - - |
| b | FLOAT | 0.0000-1e+38–1e+38 | - - - |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |