Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to count number of vehicles using image processing tools in LabVIEW

anyone can give me idea that how to do counting of vehicles using image processing tools

 

0 Kudos
Message 1 of 8
(7,834 Views)

Hello,

 

if camera is stationary, first take an image of the background. Then subtract each acquired image from the reference image. Limit the region of interest - build a mask of the area, where you want to detect vehicles. Use only the pixels that are under the mask for further processing. You probably would need to do some morphological operations (for example dilate) to make the detection more noise-free...

 

Maybe you could get more reference images (different time of day) and compare the average intensities of the acquired and the reference image to select the best image for subtraction.

 

You could then probably just count the numer of objects to get the number of vehicles.

 

You can perhaps also use optical flow to track the vehicles, but you would need to compute some features for example strong corners for each vehicle (check good features to track, http://docs.opencv.org/modules/imgproc/doc/feature_detection.html). Or you can use the new mean-shift tracking library (Labview 2013).

 

Hope this helps a bit.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 2 of 8
(7,818 Views)

Can you provide me vi for that morphological operations,

As I am new to this field, I kindly require your guidence,sir?

0 Kudos
Message 3 of 8
(7,810 Views)

Sir, Can you give me an idea , How to convert gray scale image to binary image???

Waiting for your reply as soon as possible..Thanks...

0 Kudos
Message 4 of 8
(7,808 Views)

Hello,

 

regarding your post, I strongly recommend that you first take a look at the included examples:

 

Help -> Find Examples

 

Also, take a look at the NI Vision Concepts Manual:

 

...\National Instruments\Vision\Documentation

 

 

You can convert the grayscale to binary by thresholding an image.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 5 of 8
(7,806 Views)

Sorry, I forgot:

 

Morphological operations are located in Image Processing toolbox!

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 6 of 8
(7,803 Views)

sir, can u send me vi for counting cars in following image.

 

0 Kudos
Message 7 of 8
(7,799 Views)

Hello,

 

sorry, but I cannot do the project for you. This is a bit too complex to just do it in a couple of minutes...

 

I can suggest that you find papers regarding vehicle detection algorithms/methods and try to implement them yourself step-by-step. This way, you will also learn a lot.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 8 of 8
(7,797 Views)