LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i measure distance ?

i am making afire fighting robot that us camera to detect the fire i made the vi which find the fire through match pattern but now i want to measure the distance between the camera (which on th robot ) and the fire (which located in the image using match pattern) so how can i measure this distance?

 

 

khaledyr 

0 Kudos
Message 1 of 7
(3,015 Views)

Hi khaledyr,

 

you could use a folding rule...

 

How do you want to measure when all you have is a picture? You need some more information like known objects where you can detect their size/position to "interpolate" the fireplace... 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,005 Views)

i have an image and a picture match my template marked by a box in the image.

 

 

 

khaledyr 

0 Kudos
Message 3 of 7
(2,996 Views)

You have a fundamental problem here...

you are doing an image match of a fire to detect it's existance... OK

 

Problem: all fires are different

Fire A is twice the size of fire B fire...

this means that Fire A will give off more heat and be detected visually and thermally from further away. - Use an inverse square law to determine the maths of this.

i.e. a fire 8 times the size will be detected from twice the distance away? < Someone check this for me, I'm flying by wire here without caffeine.

 

What you need is 2 sensors, a known distance apart and you need to calculate the intensity at both sensors, Then you can extrapolate a linear distance to the fire from a known calibrated figure obtained from empirical tests.

 

(That would be my approach, if you choose to only use 1 sensor and advance the robot a known distance, you risk marching the robot straight into an inferno and melting it!!! Smiley Very Happy)

 

James

 

Edit 

P.S (Much respect to Gerd, but having a fire fighting robot that only works in one location is useless, especially if the reference objects get melted, the robot needs to interpolate the distance to the fire from it's current position - and probably also know when it's losing the battle too, so it needs to do cyclical interpolation.)

Message Edited by James W on 04-22-2010 09:22 AM
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 4 of 7
(2,986 Views)

The standard solution is triangulation. This would need at least two pictures from (slightly) different angles.

If you only have one camera you can split it with two mirrors ...

Or a Laserbeam ... hard to detect in a fire 😞

 

You can use information from an 'auto'focus .. again hard to use picture (fft) based focus on a flame...

 

 So 'cannibalize' an old scanner to get the mirrors and make a stereo camera..

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 7
(2,976 Views)

khaleydr,

 

As a former firefighter and an engineer, I am quite interested in your project.  You have been given some good advice.

 

Perhaps you could use the camera to detect the presence and direction of the flame and use an ultrasonic rangefinder with a narrow beam to estimate the distance.  Even in the absence of solid objects at the source of the fire, the density gradients in the air might be sufficient to produce a usable reflection.

 

Lynn 

0 Kudos
Message 6 of 7
(2,951 Views)

Ok... this is sad, I should be asleep now instead I'm here thinking about this problem.

 

I've worked out how to do the distance caluclation with no extra H/W and only 1 camera - as Henrik said, the standard solution is triangulation, but you just want to measure distance, so I'm going to assume you're already pointing in the right direction.

Assumptions:

1) It is usual to use triangulation to to measure intenisity, this is because light will have 2 different distances to travel from source to sink.

2) It is possible to use 1 sink if you use mirrors to increase the path of the light so you can have 2 seperate source -> sink distances.

3) having 2 cameras (sinks) next to each other, one covered with a physical filter would have the same effect as the amount of light reaching the 2 sinks from the source will be different.

 

... following on from 3, it can be assumed that taking 1 image and applying 2 levels of filtering to it before processing will give the same result as if we had 2 different images. Careful setting of the software filter level will then allow it to remain contstant and then the system can be calibrated just as any other system would be calibrated:

Measure the intensity of the source from sink A at distance X

Measure the intensity of the source from sink B at distance X

Measure the intensity of the source from sink A at distance Y

Measure the intensity of the source from sink B at distance Y

If Y=2X the calibration calulation is easy....

 

Hope this provides more food for thought.

 

James

 

P.S. Lynn - currently a firefighter and worked for the emergency services ehh? Smiley Wink Always good to see your posts when you have something to add. (Firefighter / Software programmer - what's the difference?)

Message Edited by James W on 04-22-2010 10:56 PM
Message Edited by James W on 04-22-2010 10:56 PM
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 7 of 7
(2,920 Views)