Reads analog meters with PHP. The needles of the analog gauges currently have to be red.
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|
$ composer require nohn/analogmeterreader
use nohn\AnalogMeterReader\AnalogMeter;
$amr = new AnalogMeter($imagick_object, 'r');
echo $amr->getValue();
use nohn\AnalogMeterReader\AnalogMeter;
$amr = new AnalogMeter($path_to_image_file, 'r');
echo $amr->getValue();
See nohn/watermeter for a real world use case.
You can contribute to this project by:
- Opening an Issue if you found a bug or wish to propose a new feature
- Placing a Pull Request with test Images, bugfixes, new features etc.
analogmeterreader is released under the GNU Affero General Public License.