0

I'm implementing the feature where users can draw the diagram on canvas for the prepositional phrase. When the user done with the diagram then I convert and save the diagram as an Image. Now I want to find out whether the diagram drawn by the user is correct. For that, I'm comparing the user-drawn diagram with the correct diagram I have in my system. I've tried the pHash but the score isn't satisfying. Is there a way to do it in PHP/Javascript?

Below is the sample Image on which I want to perform the comparison.

enter image description here

Thank you.

Markus Meyer
  • 3,327
  • 10
  • 22
  • 35
Dipti Gajjar
  • 51
  • 2
  • 7
  • entire approach is doomed to fail. if that's supposed to be a graph, you need to give the user an input method that lets them draw a graph, not arbitrary pictures. and then you need to preserve that graph structure (nodes, edges). "phash" is not magic, it does **not** solve this problem. wrong tool. – Christoph Rackwitz Jun 06 '22 at 11:02
  • @ChristophRackwitz Do you have any idea how to achieve this? any library/tool or custom logic to achieve this? – Dipti Gajjar Jun 07 '22 at 04:03
  • that's GUI programming then, a new problem. you'll have to figure out how you did your GUI, i.e. is it a web page or a desktop program (Qt, tkinter, ...) and then research your options – Christoph Rackwitz Jun 07 '22 at 10:56

0 Answers0