top of page

Edge detecting:

   To detect the edge of hand in the depth image, we use the built-in function “edge” in MATLAB. The input of the function is an RGB image of a depth image. In the project, we input a depth. 

The left image is the original image and the right image is the image after edge detection. We can notice the edges are emphasized, which is what we want in the project since we need to capture the hand edge first.

The mechanism of edge function is Sobel operation. Sobel operation uses two Sobel operator to obtain the horizontal derivative approximation and the vertical derivative approximation of each pixel in an image. The square root of the sum of the square of the two approximations is the gradient approximation. Below are examples of the calculation, we can see the second pixel is not on the edge since the gradient approximation is 0; the third is on the edge vertical to x-direction since the vertical derivative approximation is 0 while the horizontal derivative approximation is not; the forth one is on the edge vertical to y-direction for similar reason. 

After comparing with a threshold value, we can treat the pixel with gradient approximation greater that the threshold value to be 1 and 0 otherwise. The detected image then consists of purely 1 and 0 pixels, in which we can see the edges.

The efffect of the deteciton is shown below.

bottom of page