Im trying to calculate the number of intercepts a line makes with the boundaries(black edges). however all pixels, even those not part of the boundary are taken to account, and the many pixels that are part of any boundary are taken as individual values.
how can i make it that small group lower than a certain pixel number are not shown in the picture, and I get the correct number of intercepts the lines make with the boundaries.
All help appreciated