Jump to content

Camera communication - program structure


krzych07

Recommended Posts

I'm trying to make simple program for acquisition from camera. I'm using framegrabber and LabView wrapper delivered by its manufacturer.

 

1. In first version (minimal_camera_code.vi) grabbing from camera time is very high and is not constant (camera is set to constant frame rate = 5ms, in framegrabber manufacturer software acquisition goes with 200 fps)

After adding delay (fig. 2b) it is better but after some frames, acquisition time is not constant (fig. 2a)

 

2. In second version (minimal_camera_code2.vi) grabbing time is constant and is exacly 1ms after adding "Wait until next multiple ms" = 25ms (adding shorter delay gives effects similar to described in point 1).

 

I think that problems are connected with loops and are connected with misunderstanding of this code execution.

 

What are your suggestions for implementing this piece of code? I want grabbing frames with constant frame rate.

post-50579-0-75857200-1392153215_thumb.p

post-50579-0-59222400-1392153219_thumb.p

post-50579-0-06850100-1392153221.png

minimal_camera_code.vi

minimal_camera_code2.vi

Link to comment

I know these figures very well. I would like to see the code, but my current system does not have a LV2013 installation.

Do you run your code on a standard OS/Hardware? (e.g.: Windows 7 on PC)

 

For now I assume you do:

General purpose OS and Hardware do not guaranty real-time capabilities. So the kernel will pause any thread whenever it sees fit. In my past tests the time sometimes spiked up to 400ms instead of the required 10ms, resulting in such graphs (even if the priority is set to 'critical'). Now you could let an external hardware do the acquisition and stream directly to disk. There might be other solutions though.

Edited by LogMAN
Link to comment

I have attached files saved for LabVIEW 2011.

 

I run code on standard OS and Hardware (Win7 on PC).

 

I know that it do not guarantee real time, but as I've mentioned in camera manufacturer acquisition goes with required and constant frame rate. I suppose that this LabVIEW code can be done better. Unfortunately I do not know too much how LabVIEW executes the code under the hood.

minimal_camera_code.vi

minimal_camera_code2.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By SteveSun
      I want to implement a function as follows: first set the Max and Min voltage values, then set the number of steps in the middle of the Max and Min steps and the dwell time of each step, and finally set the total number of cycles
      The problem is: the value of each step must be output separately, there is a problem here, please help, thank you!

    • By Hannes
      Hi guys
      We had software for a FLIR AX5 thermal camera that worked perfectly.
      The camera started giving problems in the field and we had to replace it with a newer version with the latest firmware.
      No I can't seem to communicate with the new camera.
      MAX tells me that it's unable to get attribute.
      Error 0xBFF69011
      Anybody else had this problem and how did you solve it?
      Thanks in advance.

    • By piZviZ
      I have a LabVIEW based application for Vision inspection system. My application consist of acquisition from  6 cameras. 
      My question is which solution is good
      1. 6 Cameras connected to single PC1
      or
      2. 3 Cameras connected to PC1 and other 3 cameras connected to PC2
      Brief explanation on your answer is appreciated
    • By bingbot
      1: How to get last index, not last element, but last index number of an 2d array?
       
      Also
       
      2: say 2d array has contents
       
      elephant  crow    dog      goat
      giraffe      eagle   cat       fly
      ant          pig        horse   bee
       
      How to get that the bee is the 12th or 11th index in the array? (11 if you count elephant as zero index, 12 if you count elephant as first index), meaning I want the index number 11 or 12, not "bee"
    • By wolverine20
      Hi I'm new to this forum and to Labview. I'm doing my Engineering project on Iris using Labview. I know it's becoming very popular these days and it has implemented in mobile phones too.
      Can anyone suggest me what camera to use for this? I'm thinking of using a High def. webcam for doing this project. It would be great if someone enlightens me on this, whether it is possible to do with webcams..If so plz suggest me one.
       
      Regards
      -Harish
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.