Pixels to inch conversion
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
harjan
am 17 Mär. 2014
Beantwortet: Image Analyst
am 17 Mär. 2014
Hello everyone, I need to convert the number of pixels into inches(cm)...I know the calculation but if the image is taken as a photograph, based on the camera distance number of pixels are varied...Then what is the relationship between number of pixels and camera focal length...Thanks in advace ...
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 17 Mär. 2014
See my spatial calibration demo, attached. It lets you specify some known distance in the image and then make measurements based off of that.
0 Kommentare
Weitere Antworten (2)
Walter Roberson
am 17 Mär. 2014
Unknown. You need at least two pieces of information to determine this. For example the lens aperture together with the focal length.
Usually the easiest way to proceed is to calibrate the camera at any reasonable distance: take a picture of an object of known length, count the pixels occupied in the image, convert to a pixels per inch (or pixels per mm) ratio; that together with the focal length is enough to calibrate for all distances, using standard trigonometry (e.g., twice the focal length would render the same sized object as half as many pixels)
0 Kommentare
Amit Nambiar
am 17 Mär. 2014
Hi harjan, Walter suggested a good thing. I wanted to do the same thing in my assignment. It is not a good idea to find out the pixels/inch factor by knowing the camera's cmos sensor dimensions or aperture and all. It introduces lot of errors while measurement. I wanted reasonable accuracy. So what I did is i placed a 4 cms square scale(you can take anything as per your convenience) near the object whose image is taken. I separated the scale's region in image using rgb values and found out the pixel counts of each side and then measured my objects dimensions. I got 95% accuracy by this method!
0 Kommentare
Siehe auch
Kategorien
Mehr zu MATLAB Support Package for IP Cameras finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!