Skip to content

Objects dimensions can be very useful for measuring the object's dimension without any ruler.

Notifications You must be signed in to change notification settings

nickorzha/object-dimension-measurement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Objects Dimensions Measurement

Objects dimensions measurement can be very useful for measuring the object's dimension without any ruler (ofcourse !).

Machines got eyes 👁

What's Inside?

  1. Important! Place a refernece object at the left-most side measure it's dimensions (only of this object). We should be able to easily find this reference object in an image, either based on the placement of the object (such as the reference object always being placed in the top-left corner of an image) or via appearances (like being a distinctive color or shape, unique and different from all other objects in the image).
  2. Find the edges of objects using Canny edge Detection.
  3. Find and grab The Contours using imutils library function.
  4. Sort the contours in x-axis direction
  5. Grab the quarter (which will always be the first contour in the sorted list), and use it to define our pixels_per_metric, which we define as:
    pixels_per_metric = object_width / know_width
  6. Bound the contours using a rectangle (box) and obtain the corners of box.
  7. Calculate the size of objects using the dimensions of box(contours).

TIPS : Don't forget to dilate and erode after edge detection

About

Objects dimensions can be very useful for measuring the object's dimension without any ruler.

Topics

Resources

Stars

Watchers

Forks

Languages