Get Started

  • 2021.2
  • 03/26/2021
  • Public Content

Run a Sample with Intel® Open Image Denoise

This tutorial demonstrates how to run the pre-built sample application. The sample application in this tutorial uses Intel® Open Image Denoise library to enhance image quality.

Run a Pre-Built Sample

The
oidnDenoise
sample does not require a graphical user interface (GUI). You can run it in the Intel® DevCloud terminal-only interface. See the job submission guidance to put the execution command in a job script or use the piping interface to queue the job on Intel® DevCloud.
Prerequisites
On the Ubuntu* OS, you can run the following command to install the ImageMagick tools:
apt install imagemagick
Run the Sample Application
  1. Download the input files:
    If you want to run the sample in the Intel® DevCloud, transfer the input images to the Intel® DevCloud to use with the
    oidnDenoise
    sample.
  2. Open a new terminal window.
  3. Go to a writable directory and create a directory to stage input images and save the results to. For example, create the
    rk_gsg
    folder under the
    home directory
    ~
    :
    cd ~
    mkdir rk_gsg
    cd rk_gsg
  4. Set environment variables:
    source <install-dir>/setvars.sh
    The script sets variables for Intel® Embree,
    rkcommon
    , and
    Intel® oneAPI Threading Building Blocks
    (
    oneTBB
    ) libraries
  5. While in the writable stage directory, copy the downloaded input files there:
    cp <path-to-image>/mazda_64spp_input.jpg .
    cp <path-to-image>/mazda_firsthit_512spp_albedo.jpg .
  6. Convert the input files to the little-endian PFM format:
    convert mazda_64spp_input.jpg -endian LSB -resize 1280x720 PFM:noisy_input.pfm
    convert mazda_firsthit_512spp_albedo.jpg -endian LSB -resize 1280x720 PFM:albedo.pfm
  7. Review the converted input images with the PFM image viewer. To open the
    noisy_input.pfm
    (converted from
    mazda_64spp_input.jpg
    ) with the
    display
    tool:
    display noisy_input.pfm
    Observe noise artifacts in the dark area underneath the vehicle on the image.
  8. Run the pre-built
    oidnDenoise
    application to denoise the converted image:
    <install-dir>/oidn/latest/bin/oidnDenoise -ldr noisy_input.pfm -alb albedo.pfm -o denoised_output.pfm
    If the program executes successfully, you should see the
    denoised_ouput.pfm
    result image in the working directory.
  9. Open the resulting image:
    display denoised_output.pfm
    If you ran the sample in the Intel® DevCloud, transfer the resulting images to your local system with the
    scp
    tool to view them.
    You will see that the noise artifacts in the dark area underneath the vehicle are reduced.

Next Steps

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.