pixels in centimeters

Discussion related to "under the hood" OpenMV topics.
Posts: 4
Joined: Wed Jan 08, 2020 5:00 am

pixels in centimeters

Postby ali » Wed Jan 08, 2020 5:19 am


I tried to use the blob.h and blob.w commands to determine the edge length of a square.
I think that he gives me the edge length in pixels but I need it in cm, can I convert it or is there a command that outputs it directly in cm?
User avatar
Posts: 4268
Joined: Sun May 24, 2015 2:10 pm

Re: pixels in centimeters

Postby kwagyeman » Wed Jan 08, 2020 11:53 am

The camera has no way to know what the size of the object is. You have to write code that converts pixels to mm using a scaling method. It should be a linear scale for your object so just measure how many pixels equals how many cm and multiply the pixels by that ratio.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests