Visit our LabVIEW Wiki Machine Vision and Imaging Portal
Tags |
(This content has not been tagged yet)
|
![]() |
Oct 21 2004, 08:53 AM
Post
#1
|
|||
|
Enough LAVA to be dangerous Member Posts: 4 Joined: 21-October 04 Member No.: 876 LV:7.0
|
Hi,
I'm trying to connect a normal digital camera to labview to get an image and read out information about a position. Is it possible to connect the camera from LabVIEW, and to work out a dark-bright-edge without the machine vision package from ni? i work for a small company and they don't want to spend much money on this, so i'm trying to find a cheap but good solution(if possible...) i thank you for each answer and tip, because i am not so familiar with imaging and i'm sure i can learn from every answer! thanks andgan
|
||
|
|
|||
| Ad |
Oct 21 2004, 08:53 AM
Post
#
|
||
|
|
|
||
|
|
|||
Oct 21 2004, 02:39 PM
Post
#2
|
|||
![]() More Active Member Posts: 48 Joined: 20-April 04 From: Ontario, Canada Member No.: 365 LV:7.1
|
andgan,
If your camera has a composite video output, you can get the image into LabVIEW using a frame grabber (but that will still require $$$). Maybe someone else can come up with a cheaper solution... At any rate, if you can figure out how get the images into memory, the edge detection can be done by creating your own algos. A simple approach is as follows: get the region of interest of your image and populate a 2-d array with the grayscale pixel values. Create a histogram of the image and look at the difference between the dark region and light region. If there is >20% difference between these two regions, then edge detection should be easy & robust. If you lack this contrast, try playing with the lighting. Now binerize the image by select a threshold roughly halfway between the dark and light grayscale values (i.e. all pixels < threshold =0, all pixels > threshold =1). If your edge runs top-to-bottom, sum all columns into a 1-d array, and take the maximum of the derivative as the location of the edge. If your edge runs left-to-right, sum all rows and look for the max in the derivative. If your edge can have any orientation, then you will have to look for the transition from light to dark in each row, and then do a linear fit to the result to figure out location and angle. Once you calibrate your camera to some real world dimensions you can express the location of the edge in these real world terms. Cheers, James [EDIT] PS> If you find you require an industrial solution, you might want to take a look at DVT - their total cost of ownership is lower than most for the quality of the product IMHO. I have no vested interest in the company - I just like their product. You would be looking at a few thousand bucks. [\EDIT] This post has been edited by James McAnanama: Oct 21 2004, 02:44 PM
|
||
|
|
|||
Oct 22 2004, 12:37 AM
Post
#3
|
|||
|
Instant Human, just add coffee Premium Member ![]() Posts: 889 Joined: 31-January 03 From: Waterford, CT USA Member No.: 45 Using LabVIEW Since:1992 LV:8.2.1 ,7.1 ,8.0.1
|
QUOTE (andgan @ Oct 21 2004, 03:53 AM) Hi, I'm trying to connect a normal digital camera to labview to get an image and read out information about a position. Is it possible to connect the camera from LabVIEW, ... If the "normal digital camera" has a USB output then you can grab images using a couple of freebie (or very low $) VI libraries that people have posted. Here are a couple: LabVIEW Webcam Library (free) http://www.cs.unc.edu/~parente/labview/ IVision Package (very inexpensive for what you get) http://www.hytekautomation.com/Products/IVision.html Enjoy, This post has been edited by Michael Ashe: Oct 22 2004, 12:38 AM -------------------- ************************************************************* "Always listen to the experts, they'll tell you what can't be done, and why. Then go do it." ~The Notebooks of Lazarus Long (by Robert Heinlein) *************************************************************
|
||
|
|
|||
Oct 22 2004, 06:17 AM
Post
#4
|
|||
|
Enough LAVA to be dangerous Member Posts: 4 Joined: 21-October 04 Member No.: 876 LV:7.0
|
Thank you for these great hints! Especially the free vi's are very useful!
I hope I can also help anyone in this forum later to reward your help! Again, thanks a lot from Germany! ang
|
||
|
|
|||
![]() ![]() |
| Time is now: 22nd November 2008 - 02:07 AM |