From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-27-2018 03:30 PM
I am doing Pattern Matching for a project and I want to start video recording when the camera does not record a video while it is at the threshold and detects the pattern matching object. Can I add my VI?
04-29-2018 03:53 PM
I regret to say I do not completely understand what you want to do (from your very brief description). You can certainly set your video camera to acquire images at some frame rate, you can certainly analyze each frame as it is acquired, you can certainly make a decision based on the frame analysis.
Suppose we assume that you are acquiring frames at 30 fps, analyzing each frame in 33 msec (the time between frames), and detect "something" at Frame 214. What do you want to do? I'm guessing (but am not sure if I'm right) that you want to make an AVI starting at Frame 214 and continuing for (not specified ... 20 Frames? 100 seconds?), then close and save the Video. Then what?
Do you know about State Machines? [If not, open a new LabVIEW Project and when the right-hand pane asks what type of Project, choose Simple State Machine and study the example produced, as this might be a good Design for your Project].
Bob Schor
04-30-2018 10:39 AM
I want video recording to start when an object is detected while the camera is running
05-01-2018 06:19 PM
Hello,
You could use a case structure to start recording video to a file once your number of matches is greater than one, assuming you're seeing a match every time the object you want to record is on-screen. You can find a good example demonstrating how to save images to an AVI file in the example finder by following the steps below:
1. Open the example finder by opening any LabVIEW window and clicking Help -> Find Examples...
2. You will see the task tree as soon as the example finder opens. Navigate the task tree to Hardware Input and Output -> Vision Acquisition -> NI-IMAQ -> File Input and Output
3. All the examples in this folder save images to an AVI file, but Grab and Save to AVI is probably the simplest one.
Writing to an AVI file is an expensive operation, so you may want to consider a producer/consumer architecture to stream to disk. I've linked an example below which demonstrates how you can do so.
IMAQdx Stream Image to Disk Using Asynchronous TDMS
http://www.ni.com/example/31550/en/
Note this example streams to TDMS, so you'd want to replace the TDMS elements with the Write to AVI functions demonstrated in the shipping examples.
05-02-2018 05:49 AM
I can not apply the solution to your own VI. If you wish, can you add my VI?
Can you (grab and save) add my VI?