Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Recording usb camera (IMAQdx) to AVI

the problem here is not CPU it is RAM
altran
could you tell us about your RAM usage ?
also could you tell about the images size that you capture from your cam?
also I have 2014 LV
could you send your vis in 2014 version ?

0 Kudos
Message 11 of 27
(2,137 Views)

Hi Ryan,

 

I just remove the AVI Write function and leave the queues and it gets up to ~30fps (not instantly, but it goes up to 30, as with the no recording vi).

 

I tried the Overwrite Mode and I get not acquisition errors.

 

 

@hatef

I have 16GB of RAM and it doesn't look like its a RAM issue either as it reports 16% RAM usage when I record.

0 Kudos
Message 12 of 27
(2,133 Views)

altran;

may be this link could told you about  How Much Memory can LabVIEW 32-bit or 64-bit Use

this

0 Kudos
Message 13 of 27
(2,133 Views)

thanks for the suggestion Hatef, my computer is 64-bit and from the link it looks like it enables up to 4gb of virtual memory.

0 Kudos
Message 14 of 27
(2,118 Views)
ok so if your labview use 16% of your RAM it is almost 2.5 gig and maybe it increase if you do not expose extra images
ok now could you tell us image size and frame rate of capture and also
send your vis in Lv 2014?
0 Kudos
Message 15 of 27
(2,115 Views)

I record at 1920x1080.

 

I attached both files for LV14, thanks.

0 Kudos
Message 16 of 27
(2,113 Views)
ok I see your vi there is some mistake on them
try this by to by
also i do not had imaqdmx grab2 I have imaqdmx grab in lv2014 could you send me that as a vi for me
anyway
1 try to record video without queue functions you do not need it for 30fps recording
2 try to use some codec in your avi file to reduce size of avi file
3 when you remove images from front of queue it is better to add image to front of qeue to not to back of
4 in imagdx grab you can chose false value for wait for next buffer it work too
so try them by to by and tell me result
I hope you could solve your problem with one of them
0 Kudos
Message 17 of 27
(2,108 Views)

1.  I've tried that, It has made no difference.  Can you explain why it is not needed for 30fps?  I've read on this forum that the producer/consumer approach is the method to use when recording to AVI as it will capture and record the frames at the fastest rate.

 

2.  I am using a codec to record, it is shown in my VI as "Motion JPEG (NI Vision)"  I've also tried several other codecs and this one seems to be the best one for me.

 

3.  I did not realize this, I tried it and it still makes no difference.

 

4.  I also have tried this, it does not help.

0 Kudos
Message 18 of 27
(2,078 Views)

Hi altran,

Sorry it's been a while since I've been able to reply.

It's interesting that we get no errors with an Overwrite Mode of fail - that means that even while the code is running slower, we're not writing over any of the IMAQdx buffers in memory. It's not the behavior I would have expected, so it's an interesting data point to have, but I don't have any new suggestions based on that at the moment.

Based on your post from the 24th, it seems like AVI write is the bottleneck, which is odd; it amost makes me think there's an issue with the speed that your computer is able to write to disk. Are you still just writing to a local drive? Can you think of any reason your computer's hardware would be causing a bottleneck at the write to disk?

@Hatef - just fyi, I can run altran's recording code on my machine at the full 30 fps in LabVIEW 2015 32-bit without any obvious memory leaks or other issues, so I don't think memory is the problem here.

Ryan K.
Product Manager, ATCA and BEEcube
National Instruments
0 Kudos
Message 19 of 27
(2,056 Views)

I write locally to my C drive.  I am not aware of any hardware issues.  I have also tried on two other laptops.  

 

At least I know my code is working since it works for you, I just have to find where the issue is on my computer! grrrr

0 Kudos
Message 20 of 27
(2,049 Views)