Need general ideas for calculating angle from an image using centroid
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
darova
on 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
Remember about eccentricity (if you have). For correcting your angle for more precision:
Angle of the top motor (remember about eccentricity too). dx, dy - values from the first picture:
About camera. It depends on how far your candle will be (how big angle will be).
Ask something
Sorry for late resonse, have'n seen you answered
0 Comments
See Also
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!