DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

/dvs/git/dirty/gitlab-master_av/dw/sdk/samples/imageprocessing/colorcorrection/README.md
Go to the documentation of this file.
1 # Copyright (c) 2018-2019 NVIDIA CORPORATION. All rights reserved.
2 
3 @page dwx_camera_color_correction_sample Camera Color Correction Sample
4 @tableofcontents
5 
6 @note SW Release Applicability: This sample is available in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
7 
8 @section dwx_camera_color_correction_description Description
9 
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
13 index.
14 
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.
20 
21 The sample uses the NvMedia engine to decode the stream.
22 
23 @section dwx_camera_color_correction_running Running the Sample
24 
25 The command line for the Camera Color Correction sample is:
26 
27  ./sample_color_correction --factor=[0.0f...1.0f]
28  --ref=[0|1|2|3]
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]
34 
35 where
36 
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.
39  Default value: 0.8
40 
41  --ref=[0|1|2|3]
42  Specifies the reference camera.
43  Default value: 2
44 
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
48 
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
52 
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
56 
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
60 
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
64 
65 To activate or deactivate color correction while the sample is running, press the **C** key.
66 
67 @subsection dwx_camera_color_correction_examples Examples
68 
69 #### To run the sample with four videos
70 
71  ./sample_color_correction --video1=filename1 --video2=filename2 --video2=filename3 --video2=filename4
72 
73 #### To run the sample with a specific rig configuration file
74 
75  ./sample_color_correction --rig=filename'
76 
77 #### To run the sample with a specific reference camera
78 
79  ./sample_color_correction --ref=3
80 
81 #### To run the sample with a specific correction factor
82 
83  ./sample_color_correction --factor=0.75
84 
85 @section dwx_camera_color_correction_output Output
86 
87 The sample creates a window and displays four videos.
88 
89 ![Four parallel H.264 streams](sample_camera_color_correction.png)
90 
91 @section dwx_camera_color_correction_more Additional Information
92 
93 For more information, see @ref colorcorrection_mainsection.