2011-10-08 04:35:22

Good to hear about the new braille display support!  big_smile
If you are adding braille graphic support to an actual game, you won't need to worry about handling images.  You could just store all of the data internally as the game created the appropriate output.  But yes, if BGT doesn't handle images easily, it might not work well for a generic graphic to braille program.

- Aprone
Please try out my games and programs:
Aprone's software

2011-10-08 05:45:55

Well, as I mentioned earlier, I was able to get java to interpret a contrived image just fine, though I don't know if I'd be able to get the output in a form that would be of much practical use.
I want to imagine a vb / .net program might be better suited for the interface, but as I don't know much in that family, going that direction would seem like I'm just dumping the entire project on you. tongue

In any case, I now have a reason to update audio Mario this weekend. smile

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2011-10-08 09:28:53

I'll try to send you something tomorrow for you to test.  I've never asked, do you have any sight?  If you have no sight at all, I gotta admit I'm extra impressed that you've been tackling a graphics based project!

- Aprone
Please try out my games and programs:
Aprone's software

2011-10-08 19:45:25

I have some sight that is useless enough that I usually don't bother looking at the screen. Actually, I have my head down most of the time I'm on the computer (without headphones, anyway), which is probably part of the reason I don't get as much done as I have time for. lol
I've tried tackling graphics a number of times, but the fact that I can't see the results has always killed the project without much success. I did manage to make everything in this video, if three minutes of the same couple frames counts. (Maybe I threw a butterfly in there that I didn't make, I don't remember...).

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2011-10-08 21:25:54

That's pretty cool though man.  Like writing software where you never get to compile the code to see if it is working properly, working on a visual project where you cannot verify the outcome is indeed an extra challenge.  It makes it that much more epic when it works!  big_smile

CAE_Jones, I'm running into a small problem.  I started working on a text output rather than just a black and white image dump, since it seems like you could easily read in the text file from whatever language you were using.  I'm running into a lot of cell combinations that don't have a simple output character.  If the 2x3 pixel section is just a dot at 1,1 then I can use "a" in the output because a is just cell 1 raised.   I'm hitting things like the need to output raised cells 3-4-5, just 4, or 4-5-6.  Odd combinations to which I don't have a clear way to print them into the text file.  Hopefully I'm making sense.

- Aprone
Please try out my games and programs:
Aprone's software

2011-10-09 00:13:19

The way the bit I tested works, I have an array of symbols in binary order, and each group of pixels is put into binary.

I can just post the code, if it helps:

public static String[] brl={
" ", "a", "1", "b", "\'", "k", "2", "l",
"`", "c", "i", "f", "/", "m", "s", "p",
"\"", "e", "3", "h", "9", "o", "6", "r",
"~", "d", "j", "g", ">", "n", "t", "q",
",", "*", "5", "<", "-", "u", "8", "v",
".", "%", "{", "$", "+", "x", "!", "&",
";", ":", "4", "|", "0", "z", "7", "(",
"_", "?", "w", "}", "#", "y", ")", "="
};


And the method that does the analysis:



public static String[] getText(BufferedImage processedImage) {

WritableRaster input=processedImage.copyData(null);
byte[][] bytes=new byte[processedImage.getWidth()/2][processedImage.getHeight()/3];
String[] ret=new String[processedImage.getHeight()/3];
float value;
for(int x=0; x<processedImage.getWidth(); x++) {
for(int y=0; y<processedImage.getHeight(); y++) {
value = input.getSample(x, y, 0);
System.out.print(", " + value);
int rx=x%2;
int ry=y%3;
// Is this bit set? If so, set it.
boolean isSet=(value>0);
// Get the bit offset.
int bit=(3*rx)+ry;

if((x/2<processedImage.getWidth()/2)&&(y/3<processedImage.getHeight()/3)) {
if(isSet) {
bytes[x/2][y/3]|=(1<<bit);
}
else {
bytes[x/2][y/3]&=~(1<<bit);
}
}// Range check.
}
System.out.print("\n");
}// Loops.

// Now, build the text.
for(int y=0; y<processedImage.getHeight()/3; y++) {
ret[y]="";
for(int x=0; x<processedImage.getWidth()/2; x++) {
ret[y] = ret[y] + brl[(int)(bytes[x][y])];
}}// Loop for byte scanning.
return ret;
}// Get Text.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2011-10-09 00:29:56

actually that helps a lot thanks!

- Aprone
Please try out my games and programs:
Aprone's software