You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -259,6 +267,7 @@ The following deprecated features have been removed:
259
267
-`getClosestCommonParent()` and `getRelativePosition()` have been removed.
260
268
-`getSimilarity()` and `getIntersection()` have been removed.
261
269
-`paintPolygons()` and `paintPolylines()`have been removed. Use [`drawPolygon()`](https://image-js.github.io/image-js/classes/index.Image.html#drawpolygon'API link on drawPolygon')/ [`drawPolyline()`](https://image-js.github.io/image-js/classes/index.Image.html#drawpolyline'API link on drawPolyline') + a `for` loop.
**Use cases**: Camera calibration, white balance correction, matching images from different devices, scientific imaging standardization.
354
363
364
+
### `variance()`
365
+
366
+
A function that calculates image's [variance](https://en.wikipedia.org/wiki/Variance'wikipedia link on variance') has been added.
367
+
368
+
```ts
369
+
// Calculate variance for entire image
370
+
const variance =img.variance();
371
+
// Returns: Array of variance values for each channel [R_variance, G_variance, B_variance]
372
+
```
373
+
374
+
It computes the variance of pixel values for each channel in the image. Variance measures how spread out the pixel values are from the mean - higher variance indicates greater variation in pixel intensities, while lower variance suggests more uniform regions.
0 commit comments