Measuring Objects Using Ruler Function