pixels in centimeters

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

pixels in centimeters

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

Hello,


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
kwagyeman
Posts: 4270
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.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 19 guests