Get Started

  • 2021.3
  • 07/20/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

Prerequisites
ImageMagick* 7.0.10-1 Q16 x64 is the deployment reference for this tutorial. ImageMagick was deployed with all tools visible in the
PATH
, as configured in its installer.
Run the Sample Application
  1. Download the input files:
  2. From the
    Start
    menu, type
    cmd
    and press
    Enter
    to open a new Command Prompt 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
    user directory
    %USERPROFILE%
    :
    cd %USERPROFILE%
    mkdir rk_gsg
    cd rk_gsg
  4. Set oneAPI environment variables:
    call "<install-dir>\setvars.bat"
    where
    <install-dir>
    is the directory where you installed the
    Intel® oneAPI Rendering Toolkit
    . By default, it is
    C:\Program Files (x86)\Intel\oneAPI\
    .
    For Render Kit programs, this will ensure programs and pre-compiled library
    .dll
    files are available for samples launched within the command shell session. You can also set up the
    Render Kit
    environment variables per component from a command prompt as follows:
    path <install-dir>\ospray\latest\bin;%PATH%
    path <install-dir>\ospray_studio\latest\bin;%PATH%
    path <install-dir>\embree\latest\bin;%PATH%
    path <install-dir>\tbb\latest\redist\intel64\vc_mt;%PATH%
    path <install-dir>\openvkl\latest\bin;%PATH%
    path <install-dir>\oidn\latest\bin;%PATH%
    path <install-dir>\rkcommon\latest\bin;%PATH%
  5. While in the writable stage directory, copy the downloaded input files there:
    copy <path-to-image>\mazda_64spp_input.jpg .
    copy <path-to-image>\mazda_firsthit_512spp_albedo.jpg .
  6. Convert the input files to the little-endian PFM format:
    <imagemagick-install-path>\convert.exe mazda_64spp_input.jpg -endian LSB -resize 1280x720 PFM:noisy_input.pfm
    <imagemagick-install-path>\convert.exe mazda_firsthit_512spp_albedo.jpg -endian LSB -resize 1280x720 PFM:albedo.pfm
    These commands use the
    convert
    tool from the ImageMagick, not the default
    convert
    as provided in the Windows system path.
  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
    imdisplay
    tool:
    imdisplay 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:
    oidnDenoise.exe -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:
    imdisplay denoised_output.pfm
    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.