University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Camera -> Take snapshot issue | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Camera -> Take snapshot issue
July 29, 2015
12:09 pm
Avatar
New Member
Members
Forum Posts: 1
Member Since:
July 29, 2015
sp_UserOfflineSmall Offline

I have downloaded Smartbody sdk and installed on my machine (Windows 7). I run sbgui.exe and loaded FacialMovementDemo.py script successfully. However, when I try to record the screen using Camera -> Take snapshot -> JPG, it doesn't work. I did specify the folder in the dialog box but nothing happen.

I downloaded the source code and run sbgui project in debug mode. When running, I can see that mcu_snapshot_func has been added to the command manager.

void mcu_register_callbacks( void ) {

SmartBody::SBCommandManager* cmdMgr = SmartBody::SBScene::getScene()->getCommandManager();

// additional commands associated with this viewer
cmdMgr->insert( "q", mcu_quit_func );
cmdMgr->insert( "quit", mcu_quit_func );
cmdMgr->insert( "snapshot", mcu_snapshot_func );
cmdMgr->insert( "viewer", mcu_viewer_func );
cmdMgr->insert( "camera", mcu_camera_func );
}

However mcu_snapshot_func is never called. I thought mcu_snapshot_func should be called in order to create sequence of images and put them in the output folder when I select Camera->Take snapshot->JPG in the menu

Is there any suggestion for this issue?

Thanks a lot.

July 29, 2015
8:54 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

You can send the 'snapshot' command using the old-style syntax (Window->Command Window-> Switch to Sbm tab, type 'snapshot', or using python: scene.command("snapshot")

which will create a .ppm file of the screen. This code path will go through the mcu_snapshot_func.

 

You can also use menu -> Camera -> Take Snapshot which uses a different code path (see void FltkViewer::snapshot(int width, int height, int frame ))  to store a screenshot every frame until to select it again to disable. Make sure that the file folder that you use exists first ,though. 

 

Ari

Forum Timezone: America/Los_Angeles

Top Posters:

jwwalker: 80

jyambao: 52

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 67

Members: 99543

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 458

Posts: 2401