-1

I have binary fingerprint image . I want to count the number of transform 1 to 0 between 2 point . the value of two point is 0. Can any bode help me for write matlab code of it?

my picture is here:

enter image description here

My points are a , b . I draw line between a , b

LaurentY
  • 7,495
  • 3
  • 37
  • 55
jiang
  • 47
  • 7

1 Answers1

3

Use improfile:

c = diff(improfile(I,x,y));

where x and y are vectors of end point coordinates of the line. Then count nonzero elements in c.

Vahid
  • 312
  • 3
  • 13
  • thanks for your help. improfile function is for gray and rgb image but my image is binary and the values of improfile is 0 matrix always. is there any function like improfile for binary image? – jiang Jun 29 '16 at 13:18