Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Calculating distance with an Axis Camera 206 (http://www.chiefdelphi.com/forums/showthread.php?t=100653)

apalrd 21-01-2012 17:59

Re: Calculating distance with an Axis Camera 206
 
Quote:

Originally Posted by Solauj (Post 1110640)
What problems are you having with OpenCV?

I am not using OpenCV at all, as I am running all of my code on the cRio.

If you are running the vision on the cRio, using NI Vision (CVI) is a much easier way to go, as it is already compiled for VxWorks, all of the supporting code (get image from axis cam) is already written, there is an example to process rectangles, and you can use NI Vision Assistant to automate a bunch of it.

PaulDavis1968 30-01-2012 16:15

Re: Calculating distance with an Axis Camera 206
 
Quote:

Originally Posted by shuhao (Post 1109829)
There are numerous algorithms... we are trying opencv with relatively little success.

Anyone else have better experiences with opencv?

I am using the older version because I had big problems with new 2.3.1. I have starting to write the tracking algorithm I have detected the "parallelograms". Now here comes the math.

dellagd 30-01-2012 17:14

Re: Calculating distance with an Axis Camera 206
 
Quote:

Originally Posted by JewishDan18 (Post 1109914)
Basically, yes. Involves a fair amount of trig, but this is how I am doing it, and it works well.

Correct me if im wrong, but cant you use a exponential regression for the correlation from height of rectangle to distance away (at least it seems a exponential regression is the right way to go)

ganchara 31-01-2012 16:43

Re: Calculating distance with an Axis Camera 206
 
Does OpenCV have a program that will spit out code for you similar to what the NI Vision Assistant program does? It seems like using OpenCV will be easier for my team to implement our rectangle tracking with if it does, as we are having some trouble understanding the code that is spit out by Vision Assistant.

caseydech 31-01-2012 20:59

Re: Calculating distance with an Axis Camera 206
 
my team uses the axis camera to identify blobs (yes its the technical term for the... blobs that the camera picks up) And then finds the distance based on the pixel distance between top square and bottom square, angle uses trig and distance from side targets, labview can calculate the rest

Derschatten 31-01-2012 21:21

Re: Calculating distance with an Axis Camera 206
 
I have seen a lot of people over look this in past year. Make sure you are converting it to foot and inches or whatever you desire as 1' would be 1.2 as a double.

JewishDan18 01-02-2012 01:35

Re: Calculating distance with an Axis Camera 206
 
Quote:

Originally Posted by dellagd (Post 1116629)
Correct me if im wrong, but cant you use a exponential regression for the correlation from height of rectangle to distance away (at least it seems a exponential regression is the right way to go)

Sure you can, but you need to get a baseline to start from, which can be found by going through the trig for one image, or going to a field and finding it through measurements there.

Quote:

Originally Posted by caseydech
my team uses the axis camera to identify blobs (yes its the technical term for the... blobs that the camera picks up) And then finds the distance based on the pixel distance between top square and bottom square, angle uses trig and distance from side targets, labview can calculate the rest

Yeah, this is what I hope to do, since the error is much less than using a single target. But, if one target is not found, you will need to do the math without it, which makes things very interesting (and a whole lot of if-else, unless I find a more elegant way to do it)


All times are GMT -5. The time now is 18:01.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi