You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am working on a Motorola Droid, and I use gray-scale images
(Gray8Image). For debugging purpose, I convert my Gray8Image to an RGB_565
Android Bitmap and display it on the phone.
When I directly convert the Gray8Image, without using Gray8HistEq, I
convert every byte to an int using the 2's complement convention:
if (g<0) { // conversion signed->unsigned (2's complement)
g = 256+g;
}
And then I store the color int into my bitmap. The display is correct.
But after I performed Gray8HistEq on my Gray8Image with this code:
Sequence seq = new Sequence();
try {
seq.add(new Gray8HistEq());
seq.push(img);
img = (Gray8Image) seq.getFront();
...
Then if I want to convert to a bitmap, to have the correct display I need
to do:
g += 128;
for every pixel, instead of using the 2's complement conversion.
Is that the expected behavior of Gray8HistEq()?
Thank you
Original issue reported on code.google.com by [email protected] on 3 Jun 2010 at 9:21
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 3 Jun 2010 at 9:21The text was updated successfully, but these errors were encountered: