All Projects → anastr → RulerView

anastr / RulerView

Licence: Apache-2.0 license
simple ruler library for android, with Calibration and Dimension measurement 📏 .

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to RulerView

NeuroMorph
The NeuroMorph analysis and visualization toolkit
Stars: ✭ 57 (+171.43%)
Mutual labels:  measurements
frc-characterization
Tools to help FRC teams measure the physical parameters of their robot
Stars: ✭ 55 (+161.9%)
Mutual labels:  measurements
PPG
Code to estimate HR from PPG signals using Subspace Decomposition and Kalman filter for the dataset of 22 PPG recordings provided for the 2015 IEEE Signal Processing Cup (SP Cup) competition. The traces are stored in folder 'DATABASE'. Please cite this publication when referencing this material: "Measuring Heart Rate During Physical Exercise by …
Stars: ✭ 43 (+104.76%)
Mutual labels:  measurements
cheap-ruler-cpp
Fast approximations for common geodesic measurements
Stars: ✭ 32 (+52.38%)
Mutual labels:  measurements
react-native-console-time-polyfill
console.time and console.timeEnd polyfill for react-native
Stars: ✭ 92 (+338.1%)
Mutual labels:  measurements
abacus
Abacus is a tool to simplify the handling of units
Stars: ✭ 22 (+4.76%)
Mutual labels:  measurements
units
A run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements
Stars: ✭ 114 (+442.86%)
Mutual labels:  measurements
camera-calibration
This repository include implementation of calibrating intrinsic and extrinsic camera parameter for distance calculation
Stars: ✭ 19 (-9.52%)
Mutual labels:  distance-calculation
PyDynamic
Python library for the analysis of dynamic measurements
Stars: ✭ 17 (-19.05%)
Mutual labels:  measurements
clothing-sizing
simple computer vision learning project to get the estimated dimensions of jeans, trousers and pants
Stars: ✭ 15 (-28.57%)
Mutual labels:  measurements
vpglib
Opencv extension that allows to capture PPG signal from the video of the human face
Stars: ✭ 50 (+138.1%)
Mutual labels:  measurements
snippet-timekeeper
An android library to measure code execution time. No need to remove the measurement code, automatically becomes no-op in the release variants. Does not compromise with the code readability and comes with features that enhance the developer experience.
Stars: ✭ 70 (+233.33%)
Mutual labels:  measurements
simetbox-openwrt-feed
SIMETBox package feed for OpenWRT (comece aqui/start here!)
Stars: ✭ 72 (+242.86%)
Mutual labels:  measurements
geodesy-php
Geodesy PHP - Port of some known geodesic/math functions for getting distance from a known point A to a known point B given their coordinates. It also supports conversion between units of length, Polar position to Cartesian coordinates, and different Reference Datums.
Stars: ✭ 26 (+23.81%)
Mutual labels:  distance-calculation
vincenty
Calculate the geographical distance between 2 points with extreme accuracy.
Stars: ✭ 53 (+152.38%)
Mutual labels:  distance-calculation
android-object-distance
Android sample app which provides distance of an object from the camera.
Stars: ✭ 29 (+38.1%)
Mutual labels:  distance-calculation
ofxTimeMeasurements
OpenFrameworks add-on to easily measure execution times on different parts of your code.
Stars: ✭ 90 (+328.57%)
Mutual labels:  measurements
sigsby
Sistem Informasi Geografis (SIG) / GIS Wisata Kota Surabaya Berbasis Web - www.firstplato.com
Stars: ✭ 23 (+9.52%)
Mutual labels:  distance-calculation
semetrics
Speech Enhancement Metrics (PESQ, CSIG, CBAK, COVL)
Stars: ✭ 39 (+85.71%)
Mutual labels:  measurements
erkir
Երկիր (Erkir) - a C++ library for geodesic and trigonometric calculations
Stars: ✭ 26 (+23.81%)
Mutual labels:  distance-calculation

RulerView

simple Ruler library response to user's actions give you accurate measurement in millimeter, with Calibration and Dimension measurement for Android, see project on GitHub.

minSdkVersion=15

Library Size just ~ 18 KB.

API Bintray


Download

add this line to build.gradle

dependencies {
    implementation 'com.github.anastr:rulerview:1.1.0'
}

for maven

<dependency>
  <groupId>com.github.anastr</groupId>
  <artifactId>rulerview</artifactId>
  <version>1.1.0</version>
  <type>pom</type>
</dependency>

Simple Usage

add RulerView to your Layout.xml.

<com.github.anastr.rulerview.RulerView
        android:id="@+id/rulerView"
        android:layout_width="match_parent"
        android:layout_height="150dp" />

and that's it!!

you can get the length in millimeter simply By

val length = rulerView.getDistance()

you can change the unit using this method

rulerView.unit = RulerUnit.IN // in inch

Calibration

in android devices, convert pixels to (MM, IN...) is not always accurate.
you need your users help to calibration RulerView for there devices, that's why you should use RulerCalibrationView to do that.

the user can easily slide to match real measurements.

to use that, add RulerCalibrationView to your layout.xml

<com.github.anastr.rulerview.RulerCalibrationView
        android:id="@+id/rulerCalibrationView"
        android:layout_width="match_parent"
        android:layout_height="100dp" />

then you can get the coefficient and save it, then pass it to RulerView

// coefficient is a float number
val myCoefficient = rulerCalibrationView.coefficient
// save it somewhere (SharedPreferences maybe)
saveNumber(myCoefficient)

...

// pass it to your ruler
rulerView.coefficient = myCoefficient

OneDimensionRulerView

to measure distance between two lines

<com.github.anastr.rulerview.OneDimensionRulerView
        android:id="@+id/oneDimensionRulerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
// return distance in Unit you have set
val distance = oneDimensionRulerView.getDistance()

TODO

  • add control on marks color
  • text color
  • text size
  • new TwoDimensionRulerView

LICENSE


Copyright 2016 Anas Altair

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].