# Generate Image with Artificial intelligence

I am pretty new to Artificial Intelligence programming, however i do understand the basic concept. I have an idea in my mind:

Import a JPEG Image, Convert this Image into a 2D Array (x,y values + r g b values). Then create a second array with same (xy) values wit rgb all set to 0,0,0. Now i want to build an AI Layer which will try to lower the error factor between the arrays until they are equal (the rgb values in the second array are equal to the first array (error factor 0) ). I would prefer to do it in Java. Any suggestions to librarys or example that can help me get started? Thanks for any help.

• To just copy image pixel values between arrays as you suggest you don't need any AI "layer". However, this kind of thing is strongly related to various image generating, classifying or compression work. It may help to explain where you want to take this. A very simply "toy" example might be for an AI to learn the function pixel(x,y) which given a co-ordinate in the image generates the right RGB colour array [r,g,b] - it's a simple, fun and informative task to use a neural network on, and you can animate the results. Would that sort of thing be what you had in mind? – Neil Slater Oct 25 '19 at 11:17
• Yes that sounds like a cool idea too. Do you have a framework or sdk or something in mind? – videokate Oct 25 '19 at 11:20
• Not for Java. Someone else would need to suggest that. I wanted to clarify what kind of thing would count, since your description of your idea is a bit vague, and does not naturally lead to an AI solution. So it would be helpful to know your goals - e.g. are you learning about neural networks, or want to explore computational creativity? With this one idea it is only going to be a single small step towards any goal. – Neil Slater Oct 25 '19 at 11:23
• My idea is to recreate a given image by using ai, maybe you could add a twist like only lines are allowed etc. Im just messing around with ai because it seems really interesting to me. – videokate Oct 25 '19 at 11:26
• That sounds more like a genetic algorthm approach e.g. youtube.com/watch?v=rGt3iMAJVT8 - I think you need to settle on a more specific goal than "just mess with AI" for this question (it's fine as a personal goal, but too broad for anyone to answer). This site cannot really give you the ideas for your project as answers because that is too open-ended. But we can answer more specific questions such as how to use neural networks or how to use genetic algorithms to solve a given problem. – Neil Slater Oct 25 '19 at 11:38