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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT image processing very slow

Hello ,
i am doing image processing by using Myrio and USB camera in real time .
in the program i  acquire image and do some filtering  and skeleton to find the straight lines
but the result appear after long time
how  can i make it  faster?

Download All
0 Kudos
Message 1 of 5
(3,008 Views)

Welcome to the world of Video Processing, where the data set is often large, complex, and thus requiring significant CPU power and speed to "do rapidly".

 

Note that your images are almost 4MB in size (each, and you are using Grab, implying that you are taking multiple images at some frame rate).  One thing you could do that would help is to acquire the images as 8-bit Greyscale, and maybe use a lower resolution, say 640 x 400 (which would give you a factor of 8 smaller image size-in-bytes).

 

The myRIO does have an FPGA -- I don't know if any of the Image-processing algorithms can run in there, but since the algorithms you need to use are parallel in nature, if they've been developed for the FPGA, they should be significantly faster.  Otherwise, you've bitten off a computationally-intensive problem ...

 

Bob Schor

Message 2 of 5
(2,964 Views)

@Bob_Schor wrote:

Welcome to the world of Video Processing, where the data set is often large, complex, and thus requiring significant CPU power and speed to "do rapidly".

 

Note that your images are almost 4MB in size (each, and you are using Grab, implying that you are taking multiple images at some frame rate).  One thing you could do that would help is to acquire the images as 8-bit Greyscale, and maybe use a lower resolution, say 640 x 400 (which would give you a factor of 8 smaller image size-in-bytes).

 

The myRIO does have an FPGA -- I don't know if any of the Image-processing algorithms can run in there, but since the algorithms you need to use are parallel in nature, if they've been developed for the FPGA, they should be significantly faster.  Otherwise, you've bitten off a computationally-intensive problem ...

 

Bob Schor



thank you for replying
but can you help me how to acquire the video without Grab ?
also how to acquire the images as 8-bit Grayscale?

0 Kudos
Message 3 of 5
(2,949 Views)

thank you for replying
but can you help me how to acquire the video without Grab ?
also how to acquire the images as 8-bit Grayscale?

0 Kudos
Message 4 of 5
(2,948 Views)

If you want to acquire a video (meaning successive images at a frame rate that might, or might not, be settable on your Camera), Grab is a good choice.  If you need only an Image, use Snap.

 

Did you notice that the Grab and Snap functions require an "Image In", which you create using IMAQ Create Image?  Create Image has an Image Type parameter, an Enum whose first element is "Grayscale (U8)".

 

If none of this makes sense to you, you need to learn a lot more about NI Vision.  I recommend finding a colleague or mentor and asking for guidance.

 

Bob Schor 

0 Kudos
Message 5 of 5
(2,941 Views)