Identify the surface, edges and line borders of the table top using Kinect sensor

In my docking project, I need to find the surface, edges/corners, and line borders of the table and visualize these things in rviz platform. Please any guide me for this.

OpenCV has useful resources for image processing.
https://docs.opencv.org/3.4/da/d22/tutorial_py_canny.html

Once you have Kinect output as a pointcloud, then use PCL library as this tutorial shows:
http://pointclouds.org/documentation/tutorials/planar_segmentation.html#planar-segmentation