% estimate the Jacobean, here in 1D for simplicity
function J = estJacob(binimage,fig7)

  % find leftmost edge of rightmost blob
  edgebefore = findlredge(binimage);
  if edgebefore < 0
    J=0;
    return
  end

  % move up 10 mm
  [NX,NY,NZ,NY,NP,NR] = rel_position_rtx(4,4,0,0,10,0,0,0); 
  newbinimage=getbinimage(0,0,0,0);

  % find leftmost edge of new rightmost blob
  edgeafter = findlredge(newbinimage);
  if edgeafter < 0
    J=0;
    return
  end

  % return to original position
  [NX,NY,NZ,NY,NP,NR] = rel_position_rtx(4,4,0,0,-10,0,0,0); 

  % compute Jacobean
  J = (edgeafter-edgebefore)/10;

