Rename depthoverlay argument
This commit is contained in:
@@ -156,7 +156,7 @@ simulation rate), and output file name are specified as command-line arguments.
|
|||||||
|
|
||||||
.. code-block:: Shell
|
.. code-block:: Shell
|
||||||
|
|
||||||
record modelfile duration fps rgbfile [adddepth]
|
record modelfile duration fps rgbfile [depthoverlay]
|
||||||
|
|
||||||
Where the command line arguments are
|
Where the command line arguments are
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ Where the command line arguments are
|
|||||||
* - ``rgbfile``
|
* - ``rgbfile``
|
||||||
- (required)
|
- (required)
|
||||||
- path to raw recording file
|
- path to raw recording file
|
||||||
* - ``adddepth``
|
* - ``depthoverlay``
|
||||||
- 1
|
- 1
|
||||||
- add a depth image overlay to the lower left corner (0 for no overlay)
|
- add a depth image overlay to the lower left corner (0 for no overlay)
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -218,7 +218,7 @@ void closeOpenGL(void) {
|
|||||||
int main(int argc, const char** argv) {
|
int main(int argc, const char** argv) {
|
||||||
// check command-line arguments
|
// check command-line arguments
|
||||||
if (argc < 5 || argc > 6) {
|
if (argc < 5 || argc > 6) {
|
||||||
std::printf(" USAGE: record modelfile duration fps rgbfile [adddepth]\n");
|
std::printf(" USAGE: record modelfile duration fps rgbfile [depthoverlay]\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,9 +255,9 @@ int main(int argc, const char** argv) {
|
|||||||
mju_error("Could not open rgbfile for writing");
|
mju_error("Could not open rgbfile for writing");
|
||||||
}
|
}
|
||||||
|
|
||||||
int adddepth = 1;
|
int depthoverlay = 1;
|
||||||
if (argc > 5 && std::sscanf(argv[5], "%d", &adddepth) != 1) {
|
if (argc > 5 && std::sscanf(argv[5], "%d", &depthoverlay) != 1) {
|
||||||
mju_error("Invalid adddepth argument");
|
mju_error("Invalid depthoverlay argument");
|
||||||
}
|
}
|
||||||
|
|
||||||
// main loop
|
// main loop
|
||||||
@@ -281,7 +281,7 @@ int main(int argc, const char** argv) {
|
|||||||
mjr_readPixels(rgb, depth, viewport, &con);
|
mjr_readPixels(rgb, depth, viewport, &con);
|
||||||
|
|
||||||
// insert subsampled depth image in lower-left corner of rgb image
|
// insert subsampled depth image in lower-left corner of rgb image
|
||||||
if (adddepth) {
|
if (depthoverlay) {
|
||||||
const int NS = 3; // depth image sub-sampling
|
const int NS = 3; // depth image sub-sampling
|
||||||
for (int r=0; r<H; r+=NS)
|
for (int r=0; r<H; r+=NS)
|
||||||
for (int c=0; c<W; c+=NS) {
|
for (int c=0; c<W; c+=NS) {
|
||||||
|
|||||||
Reference in New Issue
Block a user