Software Archive
Read-only legacy content
17061 Discussions

how to save selected video frames into file

wei_j_
Beginner
432 Views

 

 

I want to use the F200 to check every current frame  to detect mobile object in video and once a mobile object was detected, I should save the following frames(about 300),then detect mobile object again.

But I only found a function, SetFilename and it just record the vidio from beginning to end.

Is there any way just save the frames or one frame  what I need into file?

 

0 Kudos
5 Replies
jb455
Valued Contributor II
432 Views

What format do you want to save the frames to?

If you want to use the .rssdk format, after setting the filename, you can use 
pSenseManager.captureManager.SetPause(true);
To pause recording (or rather, not start yet), then use it again set to false when you want to start again.

If you want to save the frames individually, or in a format readable by other things (like an .avi), you can export each frame to a bitmap then do what you want with those.

0 Kudos
wei_j_
Beginner
432 Views

James B. wrote:

What format do you want to save the frames to?

If you want to use the .rssdk format, after setting the filename, you can use 
pSenseManager.captureManager.SetPause(true);
To pause recording (or rather, not start yet), then use it again set to false when you want to start again.

If you want to save the frames individually, or in a format readable by other things (like an .avi), you can export each frame to a bitmap then do what you want with those.

Thanks for your answering

if I save the frames to .rssdk format, how can I read the video I have saved?

Actually I want to save the frames in the second way.can you tell me more details about it ? 

 

0 Kudos
jb455
Valued Contributor II
432 Views

To play back an .rssdk video, you use SetFilename but give it the file you've already saved and set the second argument to false (true == record, false == playback).

Which environment/language are you using? I can only really help on your second question if you're using C# .net.

0 Kudos
wei_j_
Beginner
432 Views

James B. wrote:

To play back an .rssdk video, you use SetFilename but give it the file you've already saved and set the second argument to false (true == record, false == playback).

Which environment/language are you using? I can only really help on your second question if you're using C# .net.

I use C++.But you can still tell me how to do with C# .I  could have a try in the future.
Words can‘t express my gratitude. 
0 Kudos
jb455
Valued Contributor II
432 Views

This thread will tell you how to get bitmaps (or the C++ equivalent) from the camera stream. Then I'm sure Google will point you towards an API which will help you convert your group of bitmaps into a video file. Good luck!

0 Kudos
Reply