Jump to content

Canny edge detector: Difference between revisions

Line 689:
addborder =: (0&,@|:@|.)^:4
normalize =: ]%+/@,
resample =: 4 : '|: (1{-x)(+/%#)\ |: (0{-x)(+/%#)\ y'
attach =: 3 : 'max3x3 (3 3 partition (addborder y))'
unique =: 3 : 'y*i.$y'
connect =: 3 : 'attach^:_ unique y'
 
NB. on low memory devices, cropping or resampling may be neededrequired
crop =: 4 : 0
'h w h0 w0' =: x
|: w{. w0}. |: h{. h0}. y
)
resample =: 4 : '|: (1{-x)(+/%#)\ |: (0{-x)(+/%#)\ y'
NB. on small screen devices, image may need to be expanded for viewing
inflate1 =: 4 : 0
Cookies help us deliver our services. By using our services, you agree to our use of cookies.