Hi Guys!
Im trying to make a big Hopfield ANN but i find myself with a libgdx issue.
Heres what im doing :
A) Read an image which just have either complete white dots or black dots ( transparency will be seem as white), though i prefer to work with RGB and not RGBA.
B)Make an array of boolean.False for white pixel and black for a black pixel.
//Unsure if i need to make a 2D array for the hopfield stuff… BurntPizza?
C) … Hopfield stuff
Well, i have this :
public boolean[] getImageBoolean(Pixmap image) {
//0 = white
//1 = Black
boolean[] result;
Color response = new Color();
ByteBuffer pixels = image.getPixels();
return result;
}
In the white space in the middle, i had some code that was reading int and printing some weird stuff.
Then i was able to find this :
[quote]Color color = new Color();
Color.rgba8888ToColor(color, pixmap.getPixel(x,y));
pixmap.dispose();
return color.r;
[/quote]
I did that.But i found myself with another problem.
How can i limit my for statement? i mean, how can i check the size of the image in pixels?
I ve been stalled in some hours by this…
Any tip is appreciated.