1 # Copyright (c) 2018-2019 NVIDIA CORPORATION. All rights reserved.
3 @page dwx_camera_color_correction_sample Camera Color Correction Sample
6 @note SW Release Applicability: This sample is available in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
8 @section dwx_camera_color_correction_description Description
10 The Camera Color Correction sample demonstrates H.264 playback with color
11 correction. The sample opens a window to play back the 4 provided
12 video files and corrects their color based on a selected master camera
15 @note The sample performs color correction by reprojecting all cameras into a common plane,
16 where the common plane is the ground plane.
17 Further, when color correction is enabled, the sample equalizes the hue of the ground texture to the selected
18 master camera. As a result, other parts of the image may have hues that appear
19 slightly different than you might intuitively expect.
21 The sample uses the NvMedia engine to decode the stream.
23 @section dwx_camera_color_correction_running Running the Sample
25 The command line for the Camera Color Correction sample is:
27 ./sample_color_correction --factor=[0.0f...1.0f]
29 --rig=[path/to/rig/file]
30 --video1=[path/to/the/first/video]
31 --video2=[path/to/the/second/video]
32 --video3=[path/to/the/third/video]
33 --video4=[path/to/the/fourth/video]
37 --factor=[0.0f...1.0f]
38 Specifies the color correction factor. 0 means no correction (original video) and 1 means fully using the master camera's color.
42 Specifies the reference camera.
45 --rig=[path/to/rig/file]
46 Points to the rig file that contains calibration information.
47 Default value: path/to/data/samples/sfm/triangulation/rig.json
49 --video1=[path/to/the/first/video]
50 Points to a video recorded from the first camera.
51 Default value: path/to/data/samples/sfm/triangulation/video_0.h264
53 --video2=[path/to/the/second/video]
54 Points to a video recorded from the second camera.
55 Default value: path/to/data/samples/sfm/triangulation/video_1.h264
57 --video3=[path/to/the/third/video]
58 Points to a video recorded from the third camera.
59 Default value: path/to/data/samples/sfm/triangulation/video_2.h264
61 --video4=[path/to/the/fourth/video]
62 Points to a video recorded from the fourth camera.
63 Default value: path/to/data/samples/sfm/triangulation/video_3.h264
65 To activate or deactivate color correction while the sample is running, press the **C** key.
67 @subsection dwx_camera_color_correction_examples Examples
69 #### To run the sample with four videos
71 ./sample_color_correction --video1=filename1 --video2=filename2 --video2=filename3 --video2=filename4
73 #### To run the sample with a specific rig configuration file
75 ./sample_color_correction --rig=filename'
77 #### To run the sample with a specific reference camera
79 ./sample_color_correction --ref=3
81 #### To run the sample with a specific correction factor
83 ./sample_color_correction --factor=0.75
85 @section dwx_camera_color_correction_output Output
87 The sample creates a window and displays four videos.
89 
91 @section dwx_camera_color_correction_more Additional Information
93 For more information, see @ref colorcorrection_mainsection.