Rename depthoverlay to adddepth

This commit is contained in:
Jan Margeta
2024-03-06 21:17:43 +01:00
parent f287372467
commit 32dc89b425
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -159,7 +159,7 @@ simulation rate), and output file name are specified as command-line arguments.
.. code-block:: Shell
record modelfile duration fps rgbfile [depthoverlay]
record modelfile duration fps rgbfile [adddepth]
Where the command line arguments are
@@ -184,7 +184,7 @@ Where the command line arguments are
* - ``rgbfile``
- (required)
- path to raw recording file
* - ``depthoverlay``
* - ``adddepth``
- 1
- add a depth image overlay to the lower left corner (0 for no overlay)
+5 -5
View File
@@ -218,7 +218,7 @@ void closeOpenGL(void) {
int main(int argc, const char** argv) {
// check command-line arguments
if (argc < 5 || argc > 6) {
std::printf(" USAGE: record modelfile duration fps rgbfile [depthoverlay]\n");
std::printf(" USAGE: record modelfile duration fps rgbfile [adddepth]\n");
return 0;
}
@@ -255,9 +255,9 @@ int main(int argc, const char** argv) {
mju_error("Could not open rgbfile for writing");
}
int depthoverlay = 1;
if (argc > 5 && std::sscanf(argv[5], "%d", &depthoverlay) != 1) {
mju_error("Invalid depthoverlay argument");
int adddepth = 1;
if (argc > 5 && std::sscanf(argv[5], "%d", &adddepth) != 1) {
mju_error("Invalid adddepth argument");
}
// main loop
@@ -281,7 +281,7 @@ int main(int argc, const char** argv) {
mjr_readPixels(rgb, depth, viewport, &con);
// insert subsampled depth image in lower-left corner of rgb image
if (depthoverlay) {
if (adddepth) {
const int NS = 3; // depth image sub-sampling
for (int r=0; r<H; r+=NS)
for (int c=0; c<W; c+=NS) {