Ask Your Question

Revision history [back]

how to increase image sharpness with out losing it's colors by using android opencv

i am increasing image sharpness by using fallowing code

Mat source = Imgcodecs.imread(path, Imgcodecs.CV_LOAD_IMAGE_COLOR);

Mat destination=newMat(source.rows(),source.cols(),source.type());

Imgproc.GaussianBlur(source, destination, new Size(0,0), 10);

Core.addWeighted(source, 2.5, destination, -0.5, 0, destination);

bitmap = Bitmap.createBitmap(source.cols(), destination.rows(),Bitmap.Config.ARGB_8888);

Utils.matToBitmap(destination, bitmap);

image_view2.setImageBitmap(bm);

it is displaying some quality image but displayed image is only black & white, lost it's original colors

but I need to display the original colour

How to do it? Thank's for helping

how to increase image sharpness with out losing it's colors by using android opencv

i I am increasing image sharpness by using fallowing code

Mat source = Imgcodecs.imread(path, Imgcodecs.CV_LOAD_IMAGE_COLOR);

Imgcodecs.CV_LOAD_IMAGE_COLOR); Mat destination=newMat(source.rows(),source.cols(),source.type());

destination=newMat(source.rows(),source.cols(),source.type()); Imgproc.GaussianBlur(source, destination, new Size(0,0), 10);

10); Core.addWeighted(source, 2.5, destination, -0.5, 0, destination);

destination); bitmap = Bitmap.createBitmap(source.cols(), destination.rows(),Bitmap.Config.ARGB_8888);

destination.rows(),Bitmap.Config.ARGB_8888); Utils.matToBitmap(destination, bitmap);

image_view2.setImageBitmap(bm);

bitmap); image_view2.setImageBitmap(bm);

it is displaying some quality image but displayed image is only black & white, lost it's original colors

but I need to display the original colour

How to do it? Thank's for helping

how to increase image sharpness with out losing it's colors by using android opencv

I am increasing image sharpness by using fallowing code

Mat source = Imgcodecs.imread(path, Imgcodecs.CV_LOAD_IMAGE_COLOR);
Mat destination=newMat(source.rows(),source.cols(),source.type());
Imgproc.GaussianBlur(source, destination, new Size(0,0), 10);
Core.addWeighted(source, 2.5, destination, -0.5, 0, destination);
bitmap = Bitmap.createBitmap(source.cols(),
Bitmap.createBitmap(destination.cols(),
destination.rows(),Bitmap.Config.ARGB_8888);
Utils.matToBitmap(destination, bitmap);
image_view2.setImageBitmap(bm);

it is displaying some quality image but displayed image is only black & white, lost it's original colors

but I need to display the original colour

How to do it? Thank's for helping