@@ -1537,18 +1537,16 @@ hist_match in ref
15371537
15381538hist_equalize x = hist_map ((hist_norm @ hist_cum @ hist_find) x) x;
15391539
1540- hist_equalize_local w h image
1540+ hist_equalize_local w h l image
15411541 = oo_unary_function hist_equalize_local_op image, is_class image
1542- = lhisteq image , is_image image
1542+ = out , is_image image
15431543 = error (_ "bad arguments to " ++ "hist_equalize_local")
15441544{
15451545 hist_equalize_local_op = Operator "hist_equalize_local"
1546- (hist_equalize_local w h) Operator_type.COMPOUND_REWRAP false;
1546+ (hist_equalize_local w h l ) Operator_type.COMPOUND_REWRAP false;
15471547
1548- // loop over bands, if necessary
1549- lhisteq im
1550- = im_lhisteq im (to_real w) (to_real h), get_bands im == 1
1551- = (foldl1 join @ map lhisteq @ bandsplit) im;
1548+ [out] = vips_call "hist_local"
1549+ [image, to_real w, to_real h] [$max_slope => to_real l];
15521550}
15531551
15541552// find the threshold below which are percent of the image (percent in [0,1])
@@ -2521,3 +2519,12 @@ worley cell width height
25212519 $cell_size => to_real cell
25222520 ];
25232521}
2522+
2523+ gaussnoise width height mean sigma
2524+ = im
2525+ {
2526+ [im] = vips_call "gaussnoise" [to_real width, to_real height] [
2527+ $mean => to_real mean,
2528+ $sigma => to_real sigma
2529+ ];
2530+ }
0 commit comments