A surgical system configured to determine an edge of a vessel within a region proximate to a working end of a surgical instrument, comprising: at least one light emitter disposed at the working end of the surgical instrument; an array of light sensors disposed at the working end of the surgical instrument opposite the at least one light emitter, the array of light sensors comprising a least one row of light sensors, individual light sensors in the row of light sensors adapted to generate a signal comprising a first AC component and a second DC component; and a controller coupled to the array of light sensors, the controller comprising a splitter configured to separate the first AC component from the second DC component and an analyzer configured to determine if an edge of a vessel is present based on the ratio: r = 1 u ∑ t = 1 u v t I ̅ t where r is the ratio; u is a number of samples used to compute the ratio; v(t) is a recursive variance, and is a square of AC root mean square, RMS; and I (t) is a mean light intensity received by a light sensor at a distalmost end of the at least one row; computed at a time instant t, wherein the analyzer is configured to determine the recursive variance according to: v t = t − 1 t v t − 1 + 1 t I t − I ̅ t 2 + t − 1 t 3 I ̅ t − 1 − I t 2 where I(t) is a light intensity received by a light sensor at a distalmost end of the at least one row at time instant t; and I (t-1) is a mean light intensity computed at a time instant t-1. at least one light emitter disposed at the working end of the surgical instrument; an array of light sensors disposed at the working end of the surgical instrument opposite the at least one light emitter, the array of light sensors comprising a least one row of light sensors, individual light sensors in the row of light sensors adapted to generate a signal comprising a first AC component and a second DC component; and a controller coupled to the array of light sensors, the controller comprising a splitter configured to separate the first AC component from the second DC component and an analyzer configured to determine if an edge of a vessel is present based on the ratio: r = 1 u ∑ t = 1 u v t I ̅ t where r is the ratio; u is a number of samples used to compute the ratio; v(t) is a recursive variance, and is a square of AC root mean square, RMS; and I (t) is a mean light intensity received by a light sensor at a distalmost end of the at least one row; computed at a time instant t, r is the ratio; u is a number of samples used to compute the ratio; v(t) is a recursive variance, and is a square of AC root mean square, RMS; and I (t) is a mean light intensity received by a light sensor at a distalmost end of the at least one row; computed at a time instant t, wherein the analyzer is configured to determine the recursive variance according to: v t = t − 1 t v t − 1 + 1 t I t − I ̅ t 2 + t − 1 t 3 I ̅ t − 1 − I t 2 where I(t) is a light intensity received by a light sensor at a distalmost end of the at least one row at time instant t; and I (t-1) is a mean light intensity computed at a time instant t-1. I(t) is a light intensity received by a light sensor at a distalmost end of the at least one row at time instant t; and I (t-1) is a mean light intensity computed at a time instant t-1.