04-09-2016 10:42 AM
Hello. I want to get the distance from an object using a single Webcam and myRIO. I did not found a proper solution for this, I watched some videos and tried to do some VIs, but the closest thing that I have done is to get the distance in pixels from a ROI. I also tried Vision Assistant, but I didn't handle it. I want to detect the distance between the edges from an object (and transform it in cm), but i need the camera to detect automatic the object and not to put by myself the ROI in the image. Can somebody help me please?
04-09-2016 12:03 PM
04-09-2016 12:24 PM - edited 04-09-2016 12:25 PM
xy are ok. Can you please help me with an example? I tried to calibrate the camera in Vision Assistant but I only succeeded on a picture that is load from computer, and I don't know how to do it in real time using Grab.
I did this: https://www.youtube.com/watch?v=2ycFJJcKbMs&feature=youtu.be
04-11-2016 12:54 AM
04-12-2016 06:46 AM - edited 04-12-2016 06:46 AM
I made an aquisition wich continously snaps an image, I made a grayscale and an edge detection. I want now to extract every single pixel from this image and to verify if it is a 1 or an 0 and to measure a distance (how many 0 pixels are between two pixels of 1). Can somebody help me please? Or is it a simple way to detect the object and verify if is moving close or far?
04-13-2016 12:20 PM
Hello DC20,
You should be able to extract the pixel values of the image by converting it to an array using the function below.
IMAQ ImageToArray VI:
http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_imagetoarray/
The pixel manipulation functions in the link below may also be useful.
Pixel Manipulation:
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/pixel_manipulation_pal/
Regards,
j_bou