Skip to content

Image restoration for deep-sea ROV underwater images and videos.

Notifications You must be signed in to change notification settings

torhaa1/deep-sea-rov-image-restoration

Repository files navigation

Deep-Sea ROV Image Restoration

This repository contains code to restore images and videos taken by deep-sea ROVs (Remotely Operated Vehicles) at depths without natural light (most below a depth of 2000m). Specifically, it focuses on images and videos from the Norwegian Petroleum Directorate (NPD) and University of Bergen (UiB) research cruises at the mid-ocean ridges of Mohn's Ridge and Knipovich Ridge.
The restoration process aims to provide a better starting point for both visual human interpretation and machine object detection. For videos, each frame is processed individually.

Dataset

The ROV data from NPD/UiB data is publicly available. For more information visit the NPD-website.
This repository includes a few test images and short video clips for demonstration purposes:

  • 2019 HD images and video (1920x1080p).
  • 2018 SD images and video (704x576p).

Image restoration model

The image restoration steps include:

# Technique Description
1 Noise Reduction Bilateral filter-based smoothing
2 Dehazing Uses Underwater Dark Channel Prior (UDCP) to reduce scattering and absorption
3 White Balancing Restores color balance using the "Gray World Assumption" method
4 Contrast Enhancement Uses CLAHE* on LAB for contrast without altering color balance or hue
5 Color Correction Uses CLAHE* on RGB to adjust contrast with potential color balance/hue changes
6 Edge Enhancement Employs Canny edge detection
7 Sharpening Enhances details using Unsharp Mask

(*) CLAHE stands for Contrast Limited Adaptive Histogram Equalization and is a commonly used method for contrast enhancement.

Repository Structure

The repository contains:

Toolbox Scripts:

  • plot_toolbox.py: Contains functions related to plotting and inspecting the results.
  • restoration_toolbox.py: Contains functions for image restoration.

Jupyter Notebooks:

  • process_images.ipynb: Notebook to process images.
  • process_videos.ipynb: Notebook to process videos.
  • concatenate_videos.ipynb: Notebook to concatenate videos. For comparison between original vs. processed videos.

Demo images

Original images are on the left and processed images are on the right.
These images were processed with a relatively mild/safe setting to be suitable for a wide variety of scenes.

Original Image Processed Image

Original Image Segmented Image

Original Image Segmented Image

Original Image Segmented Image

Note: If GitHub isn't rendering the images, they can be seen or downloaded from the folders:

Demo video

A demo video showing a side-by-side comparison of the original and processed videos can be seen or downloaded here. The in-browser player has a resolution limit of 720p, so download is preferred for better quality.


Getting Started

Environment Setup using Conda

  1. Create the conda environment:
    conda create -n restoration_env
  2. Activate the created environment:
    conda activate restoration_env
  3. Install the required packages:
    conda install numpy matplotlib opencv

If you need specific versions of the packages, they are:

numpy==1.25.0
matplotlib==3.7.1
opencv==4.8.0.74

Further work

  • Make model dynamically fine-tune parameters settings for each image based on image statistics.
    The current model runs 1 parameter setting (a compromise) for all images in the folder.

Contribution

Feel free to contribute, raise issues or suggest enhancements!