05-05-2010 01:57 PM
Hi There;
I"m writing a VI for an Axis IP camera. It's party working, but I need to extract individual frames from the video feed so I can overlay text using the IMAQ text overlay functions.
The trick, is when I grab a frame using the Axis dll library (GetCurrentFrame), it returns a buffer size and a variant type, which represents the frame data. The data is = 921,640 bytes which represents a 40 byte header, then 640x480x3 of frame data. When I run the vi, I get a correct value for the buffer size (921,640) so I know this is working.
What I don't understand is the video frame is placed into a buffer of type variant. I'm not at all sure how to extract the raster data from the 'buffer' data type which is a variant type. Apologies, I'm a bit ignorant in how to handle 'variant' types.
Anyone have a suggestion?
Here's the VI
Solved! Go to Solution.
05-05-2010 02:45 PM
Have you tried using IMAQdx (part of the latest Vision Acquisition package) to acquire from the camera instead? As of the recent versions we now support native acquisition from Axis IP cameras.
Eric
05-05-2010 03:03 PM
Thanks, good suggestion.
I"m downloading IMAQdx now and I'll give it a try. I'll post back with the results.
Cheers
Peter
05-05-2010 05:50 PM
Ok, tried the IMAQdx toolkit and no luck.
The problem seems to be in IMAQdx discover ethernet cameras.
I see that IMAQdx supposedly supports Axis IP cameras, but IMAQdx discover ethernet cameras does not seem to work. It just times out.
Double checked with a web browser that the IP address of the axis camera is correct, and it is. Camera is working properly for sure.
Are there any examples of Vi's that detect Axis (or other IP video cameras), and grab frames? I'm not 100% sure that I have my vi configred correctly.
Comments, rants appreciated
Peter
05-05-2010 05:52 PM
CORRECTION: Are there any examples that use IMAQdx to discover and grab frames from an Axis or other IP cameras. Can't seem to find much info on Axis camera support on IMAQdx.
Peter
05-05-2010 05:58 PM
Hi Peter,
Just to confirm, what version of IMAQdx are you using? You want to get the 2010.3 version as that is the latest: http://joule.ni.com/nidu/cds/view/p/id/1641/lang/en
The next issue would be that the Discover Ethernet Cameras is unnecessary and is only used for GigE Vision cameras. The VI was named before IP camera support was added and the name is unfortunately confusing now. In any case, discovery of cameras takes place in the background and is automatic. The Enumerate VI should list your camera. It may be worthwhile to simply try seeing if the camera shows up in MAX first. Note that the IP camera must reside on your local subnet for it to be discovered.
As for examples, pretty much any of the IMAQdx examples included in the Help->Find Examples should work.
Eric
05-06-2010 04:46 PM
Yes, that solved the problem! I had an older version of IMAQdx and once I changed it to the new version it all works really well. IMAQdx Enumerate Camera and Open Camera worked perfectly, even without me telling IMAQ the IP address of the camera.
Excellent!!!
Here's the working vi that grabs frames from the Axis IP camera (a 214 PTZ) in case anyone else is interested.
Peter
05-28-2010 01:02 AM
Hi guy ...
What about other IP Cameras ?
I have an IP Camera. How can I get frames from it ?
05-28-2010 01:11 AM
05-28-2010 02:59 AM