使用图表上的数据将图表图像转换为php
I have charts that have x and y data. Is there a way to somehow read the image via a script and grab the relevant data?
Example: X row at bottom of chart displays time in days. Y row on side displays a number, say 15 for example.
Is there a way to read that data using some library/helper?
Thanks!
我的图表包含x和y数据。 有没有办法通过脚本以某种方式读取图像并获取相关数据? p>
示例:图表底部的X行显示以天为单位的时间。 侧面的Y行显示一个数字,例如15。 p>
有没有办法使用某些库/帮助器读取数据? p>
谢谢 ! p> div>
You'll need an OCR library/software to get the statistical data.
There is this: http://www.phpclasses.org/package/2874-PHP-Recognize-text-objects-in-graphical-images.html
But that might not work well.
You should probably find an CLI app that works well for you, and call it from PHP. I assume you are using linux. The exec command will work under Windows. See this comment for more details: http://www.php.net/manual/en/function.exec.php#101579