Filter löschen
Filter löschen

Need general ideas for calculating angle from an image using centroid

2 Ansichten (letzte 30 Tage)
Sarmad Paracha
Sarmad Paracha am 7 Mär. 2019
Beantwortet: darova am 5 Apr. 2019
Hello there. I am working on a fire detection project. In this project i need to detect fire and calculate the exact angle at which the fire is present and then extingiush it. I have interfaced matlab with arduino. I have done all the coding for the detection of the fire all that is left is calculating the physical angles. I am a bit confused and i need some general approach to how to tackle this. I know that distance between the camera and the motors matter and so does the distance of the fire. How can i use centroid to calculate the degrees. How much i need to turn the motors in x and y axis so that it will point exaclty at the fire.
please provide any general Ideas.
Thanks.
  2 Kommentare
darova
darova am 7 Mär. 2019
can you attach a picture with explanations?
Sarmad Paracha
Sarmad Paracha am 8 Mär. 2019
sure. Here is a model. image captured through camera. Motors moving in x and y axis. These might help.
model.PNGfire.PNG
motors.PNG

Melden Sie sich an, um zu kommentieren.

Antworten (1)

darova
darova am 5 Apr. 2019
First of all you have to measure your main dimensions. Red rectangle on the picture below is your red boundary table.
Let's place origin of coordinate system like on the image (for example). You need to calibrate your bottom motor
expl1.png
Remember about eccentricity (if you have). For correcting your angle for more precision:
scheme2.png
Angle of the top motor (remember about eccentricity too). dx, dy - values from the first picture:
expl3.png
About camera. It depends on how far your candle will be (how big angle will be).
camera.png
Ask something
Sorry for late resonse, have'n seen you answered

Produkte


Version

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by