android - Convert binary image (monochorme) to sampling image -
i have got problem converting image sampling image image below. first managed convert image binary image/monochrome image live photographic camera using code
protected bitmap processframe(byte[] data) { //int framesize = getframewidth() * getframeheight(); int[] rgba = mrgba; (int = 0; < getframeheight(); i=i+1){ (int j = 0; j < getframewidth(); j=j+1) { int index = * getframewidth() + j; int y = (0xff & ((int) data[index])); if(y>128)y=0; else y=0xff; rgba[i * getframewidth() + j] = 0xff000000 + (y << 16) + (y << 8) + y; } } mbitmap.setpixels(rgba, 0/* offset */, getframewidth() /* stride */, 0, 0, getframewidth(), getframeheight()); homecoming mbitmap; }
but next step want display these binary image become sampling image image below where can add together code displaying sampling image? site: http://cse.ust.hk/learning_objects/imagerep.html
android image-processing binary sampling
No comments:
Post a Comment