Android Question when converting the image , it is not captured completely

Sadk

Member
View attachment 122132
1637585933693.jpg


Is this because of the image, I tried to convert it to more bitmap through black and white shown in the right of the image, but how is it initialize ? Or maybe i need to save image the file in Temp file and load it again so that changes of Flip etc are permanently made. Then the conversion is done


1637585933688.jpg
 

Attachments

  • convert image to binary.zip
    15 KB · Views: 116
Solution
As I already told you, your test is wrong !
Attached a new version.
It uses the same BlackeAndWhite routine, you used for the right image, which returns a BitmapCreator instead of a Bitmap.
In what format do you want to send the image to the microcontroller?

1637653901540.png

klaus

Expert
Licensed User
Longtime User
Sorry, but I do not understand what exactly you want to do.
You have a SeekBar in your layout with Visible set to False, therefor it is not displayed.
I Set Visible to True, and the SeekBar event does not work.
Because the event name must be ValueChanged and not ValueChange !!!
I leave it up to you to correct it.
Then your original image is already black and white, so I do not understand the logic.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Sorry, if it might sound a bit rude.
But you need to think a bit about of what you are doing.
The size of your image is 255 * 255 pixels.
This means that you need 255 characters for each line !!!
How many characters can you put horizontally in your EditText view.
In the test project, the image is not displayed completely because I limited it intentionally to limit the number of iterations!
Maybe you missed the comment in the other thread: For testing I reduced the loop.
In the image of your previous post you display about 40 characters per line, out of 256 !?

I just made some changes to see what happens.
To see full lines in the EditText I had to set the TextSize to 1 !!!
Then, the number of characters exceeds the max authorized number.
So I limited the number of lines.
Then, in your image not all supposed black pixels are really black and bot all white pixels are really white.
This means that your test is wrong !
Up to you to improve it.

1637599997588.png


Attached the test project.

Again, what is the purpose, is it just for fun or something else ?
 

Attachments

  • convert image to binary1.zip
    14.7 KB · Views: 100
Upvote 0

Sadk

Member
Again, what is the purpose, is it just for fun or something else ?
Yes, as I indicated in the image, it must be converted to black and white again in order to obtain a pure pixel, the result is the same as visual basic, for something else it is output to a microcontroller


Capture..PNG
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
As I already told you, your test is wrong !
Attached a new version.
It uses the same BlackeAndWhite routine, you used for the right image, which returns a BitmapCreator instead of a Bitmap.
In what format do you want to send the image to the microcontroller?

1637653901540.png
 

Attachments

  • convert image to binary2.zip
    14.9 KB · Views: 122
Upvote 1
Solution

klaus

Expert
Licensed User
Longtime User
First, try to do it on your own.
I have never done it, so I would need to do the same as you could do, search and test.
In the BlackeAndWhite routine you know for each pixel if it is black or white.
So, you can create the message for the Arduino in the format you need.
 
Upvote 0
Top