Measure Object Size using OpenCV and ArUco Marker
Find the object sizes in an image containing an ArUco marker using OpenCV
In this post, you will use an ArUco marker with a predefined size and ID as a reference to calculate the pixel to inch conversion and then use the conversion ratio to find the dimension of different objects in the image.
ArUco Marker
The ArUco markers are fiducial square markers used for camera pose estimation. An ArUco marker is a synthetic square marker with an internal binary matrix enclosed within a wide black color border with a Unique Identifier.
The ArUco marker consists of predefined dictionaries covering a range of different dictionary sizes and marker sizes. To generate the ArUco marker, you need to specify
- The dictionary size that determines the number of markers in the dictionary
- The marker size which indicates the number of bits in the marker
To know more about ArUco Marker, click here
Object Size Measuring Logic
The following steps are performed to measure the size of different objects in an image.
- Load the image, identify the objects whose size needs to be measured and…