Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with ApplyMask
12-26-2013, 07:20 PM
Post: #2
RE: Issue with ApplyMask
Think I might have figured out the reason it barfs. I'm suspecting the process of applying the mask isn't synced with the incoming video. IF the mask is applied when the video frame is changing it barfs. This would account for the randomness of the problem. My solution is to stop the video capture, VLDSCapture->Enabled = false; apply the mask then re-enable the capture. So far I have not been able to get it to fail using this trick.

I really do not like the frame flashing black for the time it takes to load the mask. Would be nice if Video Lab would provide a way to sync the two controls but I don't know how to do it.

Code:
if(DoingOverlay) {
            VLDSCapture->Enabled = false;
            sprintf(backfile, "%s%02d%d.bmp", GrabForm->BorderPath, GrabForm->BorderNumber,ShotCount);
            VLApplyMask1->Picture->LoadFromFile(backfile); // this is where it barfs
            VLDSCapture->Enabled = true;
        }
        //Have Delay here as I am using a timer to cycle through 4 shots
       VLGenericFilter1->Enabled = true; // Grab the frame
Quote this message in a reply
Post Reply 


Messages In This Thread
Issue with ApplyMask - BReeves - 12-25-2013, 08:54 PM
RE: Issue with ApplyMask - BReeves - 12-26-2013 07:20 PM
RE: Issue with ApplyMask - Dave - 12-29-2013, 02:22 AM
RE: Issue with ApplyMask - BReeves - 12-30-2013, 01:36 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)