Skip to content

AlbusPeter/Shape_Recovery_of_Endoscopic_Videos_by_Shape_from_Shading_Using_Mesh_Regularization

Repository files navigation

Shape-Recovery-of-Endoscopic-Videos-by-Shape-from-Shading-Using-Mesh-Regularization

Source Code for Shape Recovery of Endoscopic Videos by Shape from Shading Using Mesh Regularization

showcase

OpenCV Version:2.4.11

This is my very first project that I worked on during my junior Year. So here is my applogy if the code is not neat for you. The project aims to recover 3D surfaces from endoscopic videos using the simple Shape from Shading method. The raw results from Shape from Shading are noisy and unacceptable. We propose to utilize mesh regularizations to boost the Shape from Shading results. We also use OpenGL to visualize the final 3D reconstruction results, where we can change view angles and zoom in&out.

Note


  1. Make sure you have OpenCV and OpenGL environments set up.
  2. We utilized Matlab Engine for bilinear regression via sparse matrices. So make sure you set up Matlab engine as well.
  3. If you have trouble extracting required data points, you can download here. (rowpoints,testpoints)

Change parameters for new videos


Since this is my first project, I did not have much experience in coding. I manually assigned several property parameters, such as the resolution of the video, and the number of frames. So you may need to change those parameters accoding to different videos.
In main.cpp:

  1. The texture container variable declaration.
  2. The for loop in Read3DPoints().

In Viewer.cpp:

  1. The texture container variable declaration in MyDisplay().
  2. The texture container variable declaration in Texinit().

In Viewer.h:

  1. The number of frames, N.

In Draw.cpp:

  1. The denominator in DrawTriangles(int n) should be max(width,height).

For further questions, feel free to contact me at albuspeter.rzh@gmail.com.

Citation

If you find this useful in your research, please cite our paper "Shape Recovery of Endoscopic Videos by Shape from Shading Using Mesh Regularization" (PDF):

@inproceedings{ren2017shape,
  title={Shape Recovery of Endoscopic Videos by Shape from Shading Using Mesh Regularization},
  author={Ren, Zhihang and He, Tong and Peng, Lingbing and Liu, Shuaicheng and Zhu, Shuyuan and Zeng, Bing},
  booktitle={International Conference on Image and Graphics},
  pages={204--213},
  year={2017},
  organization={Springer}
}

About

Source Code for Shape Recovery of Endoscopic Videos by Shape from Shading Using Mesh Regularization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published