My intention is to simply code some figure like this:
Is there any online tool to transform figures or pictures in to latex code?
My intention is to simply code some figure like this:
Is there any online tool to transform figures or pictures in to latex code?
No, there's not a one click tool that gets the PNG and converts it to TikZ out of the box. But there are routines you can follow to do it. Keep in mind, though, that as Torbjørn T. mentioned, the diagram will only have the advantage of being a vector graphic, there will be no font consistency, the generated code will likely be very extense and perhaps the converted graphics will not be so great after all, therefore perhaps it's better to just convert to PDF and use \includegraphics.
For a reference: in Advices on drawing a complex figure using tikz there are two ways to convert a PNG: one to SVG and one to TikZ (the second is done completely in Inkscape). Also take note that SVG can be easily converted to TikZ.
This I speak from my personal experience on learning TikZ for the last few months: simple diagrams are worth to draw yourself and learn a bit of the tool after all. By simple I mean with well defined geometric shapes, and with no coloring, shading, shadowing and etc. The reason why I say this are simple:
Customization: if you decide, later on, to use it again but with some changes you can easily do it. If you're not the boss and you're asked to change the picture you can also easily do it. Bottomline you have much flexibility, changing is easy.
Difficulty: it's not difficult and there are plenty of examples on the Website to help out. Here's one that fits nicely to yours, IMHO.
All other reasons to learn TikZ: What are the advantages of TikZ/PGF over PSTricks? also some more here How productive are you with TikZ?
TeX.SE: if you run into some trouble, a specific question here about your issue will always be welcome.
Unfortunately online tool to transform figures or pictures in to LaTeX code not exist. Peraphs with InftyReader it is possible. See at the link http://www.inftyreader.org/. But if you want to build your figure, you can use
IPE, http://ipe.otfried.org/; XFig or WinFig, http://winfig.com/;LaTeXdraw, http://latexdraw.sourceforge.net/InkScape, https://inkscape.org/en/. With InkScape you can create your figure and after you export your picture in LaTeX.