UtilCapture Release

UtilCapture Release

I am accessing the PerC camera with 2 methods.  One gets 60 FPS for depth, IR map, and UV Map at 320x240.  The other gets 30 FPS and gets RGB at 640x480, depth, IR Map and UV Map .  They both work fine from startup but I am trying to switch between them dynamically.  UtilCapture has a Release method but the 'delete this' in UtilCapture.h fails with "_ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse))".  It is not clear how to terminate the camera access with UtilCapture and my search through the  examples failed to turn up anything.  What am I missing?

Both of these methods of capturing data work fine when running by themselves.  I just want to be able to dynamically switch between them.  Is there a way to do this?  Also, can I capture RGB at 60 FPS as well as the depth map?  I couldn't get that to work either. 

Bob Davies

2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

I was able to fix this.  If others hit the same problem, this might be useful information.  First the original...

Void function()

{ …

Static PXCSmartPtr<PXCSession> session;

Sts = PxCSession_Create(&session);

Static UtilCapture capture(session);

}

 But allocating it like this  worked:

Static UtilCapture capture;

Static PXCSmartPtr<PXCSession> session;

Void function()

{ …

Sts = PxCSession_Create(&session);

Capture = new UtilCapture(session);

}

Faça login para deixar um comentário.