# How can I calibrate a fixed camera to obtain accurate measurements of objects at different distances, despite height variations and pixel distortion?

63 Ansichten (letzte 30 Tage)
arezki am 19 Jul. 2024 um 9:31
Kommentiert: Walter Roberson am 23 Jul. 2024 um 22:46
I have a problem with calibration for detecting objects at different distances. I have a fixed camera, but the objects are not stationary. The issue is that when I perform the calibration using a scale to detect objects with real measurements, if the height changes, I get different results due to pixel variation. My question is how can I calculate the measurements of any object at varying distances to obtain accurate real-world results?"
##### 8 Kommentare6 ältere Kommentare anzeigen6 ältere Kommentare ausblenden
Umar am 22 Jul. 2024 um 18:59
No problem, @arezki, glad to help out and we are still here to assist you further if you have other questions or concerns.
arezki am 23 Jul. 2024 um 8:34
I conducted these tests on the two stones because I wanted to integrate the results to create a scale for determining the size of any stone relative to the distance. The distance is a variable, as you can see, but the actual size of the object does not change even if the height increases. is there a method to create a scale or derive an equation for determining the size of any stone relative to the distance? The distance is a variable, as you can see, but the actual size of the object does not change even if the height increases.?

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

Matt J am 22 Jul. 2024 um 10:35
You cannot determine the size of the object from a single camera without knowing its distance from the camera. You would need two cameras for that, and you would need to perform stereo camera calibration of that system, see,
##### 8 Kommentare6 ältere Kommentare anzeigen6 ältere Kommentare ausblenden
Matt J am 23 Jul. 2024 um 20:21
Bearbeitet: Matt J am 23 Jul. 2024 um 21:01
Correct. That was my original answer, and it is still my answer. What you are trying to do cannot be done with one camera.
Walter Roberson am 23 Jul. 2024 um 22:46
Exception:
If the focal length of the camera is fixed and is suitably arranged, then you might possibly be able to do texture matching to detect how out of focus objects are, and use that information to estimate distance.

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Camera Calibration finden Sie in Help Center und File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by