Image based Point Density
Higher concentration at darker colors
1
img01 = Image.ReadFromFile(img00);
2
dim01 = Image.Dimensions(img01);
3
wdt01 = dim01["width"]/25;
4
hgt01 = dim01["height"]/25;
5
pxl01 = Image.Pixels(img01,wdt01,hgt01);
6
bgt01 = Color.Brightness(pxl01);
7
pnt01 = Point.ByCoordinates((0..wdt01-1)<1>,(0..hgt01-1)<2>);
8
bgt02 = List.FilterByBoolMask(bgt01,bgt01 > 0.5);
9
bgt11 = List.TakeEveryNthItem(bgt02["in"]<1>,2,0);
10
rad01 = List.TakeEveryNthItem(bgt11,2,0) * 0.5;
11
pnt02 = List.FilterByBoolMask(pnt01,bgt01 > 0.5);
12
pnt11 = List.TakeEveryNthItem(pnt02["in"]<1>,2,0);
13
cen01 = List.TakeEveryNthItem(pnt11,2,0);
14
rad02 = (Math.Floor(bgt02["out"])+0.1)*1.75;
15
cir01 = Circle.ByCenterPointRadius(cen01,rad01);
16
cir02 = Circle.ByCenterPointRadius(pnt02["out"],rad02);
17
[cir01,cir02];
Copied!
Last modified 1yr ago
Copy link