Group Abstract Group Abstract

Message Boards Message Boards

Distance of lines in image: works but slow

3 Replies
POSTED BY: Henrik Schachner

Hi Maximilian,

one simple idea would be to overlap your image with its point density:

img = Binarize[ < your original image > ];
dims = ImageDimensions[img];
pos1 = ImageValuePositions[img, 1];
cimg = SmoothDensityHistogram[pos1, 15, Frame -> False, 
   ColorFunction -> "Rainbow", ImageSize -> dims, PlotPoints -> 100, 
   PlotRange -> Full];
ImageMultiply[cimg, img]

enter image description here

Does that help? It runs fast, at least ...

POSTED BY: Henrik Schachner

Dear Henrik,

this is exactly what I was looking for! As always, you nailed it!

Thanks so much again.

Best wishes,

Max

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard