02-06-2025 05:58 AM
Hi, I wanted to ask for help in implementing my program. I want to save the image from my camera when I click on the button, so that I can save the image, but when I save it again, it will be replaced with the current one. How do I create a new name with the current time name?
(For example: Image_12:30, Image_12:35..)
2) Is there a way to capture video from a camera and save it to a file not as an image, but as a video?
3) Is there a way to record the entire virtual instrument? (For example: A video showing the inodes, camera, and other interface elements)
Solved! Go to Solution.
02-07-2025 07:29 AM - edited 02-07-2025 07:30 AM
Hi Seth,
@SeraphimSeth wrote:
How do I create a new name with the current time name?
(For example: Image_12:30, Image_12:35..)
Like this:
Read the help for format codes to learn about the possible options!
02-07-2025 09:52 AM - edited 02-07-2025 09:54 AM
Hello,
1. GerdW already showed you a more scalable way (especially since you can also add fractional seconds) to name your file, but even in your code you could connect True to "want seconds?" (EDIT: to "Get Date/Time String") in your code :).
2. Yes, as .AVI file. Check this example: C:\Program Files\National Instruments\LabVIEW <version>\examples\Vision\Files\Read AVI File.vi. You'll figure out how to write frames to AVI based on that.
3. Would overlays on the image work for you? Check this example on how to handle overlays, just remember you'd likely need to use IMAQ Merge Overlay function before writing to a file. C:\Program Files\National Instruments\LabVIEW <version>\examples\Vision\Contour Analysis\Contour Defect Inspection.vi. Of course there is IMAQ Overlay Text, so you can add info you need in the image.
Hope that helps!
02-12-2025 12:49 AM - edited 02-12-2025 12:52 AM
Thanks for the advice and help from "GerdW" and "Zieleslaw"
I have previously used this method, it is also somewhat working, but I think your suggestions are more correct in terms of coding.
I am self-taught and therefore
I want to learn how to code correctly.
Thanks again!
02-12-2025 01:04 AM
Hi Seraphim,
@SeraphimSeth wrote:
I have previously used this method, it is also somewhat working, but I think your suggestions are more correct in terms of coding.
Well, my method definitely looks more simple (with just one FormatIntoString) than your code with 4 functions and lots of string constants…
Recommendation: use a filename scheme that allows for simple file sorting! That's why I suggested a naming scheme like %H%M%S: it results in the same file order when you sort by name or by file creation date…
02-13-2025 02:21 AM
I was able to display the information on the video and have this information saved via AVI along with the image.(I did a simple test on displaying the number 100 to understand how it works)
But for my project, I would like the information and the video to be displayed separately when watching the video. (This will be much more convenient, since I will receive information from sensors (current, power, voltage, etc.) this is a fairly large amount of information that will overlap the video, which is not good.
For example: (The video is saved AVI - the user views both the video and the information from LabVIEW)