Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to add Gaussion noise use JAVA

    Mat grayMat = new Mat();
    Mat noiseMat = new Mat();
    BitmapFactory.Options o = new BitmapFactory.Options();
    o.inDither=false;
    o.inSampleSize=1;
    int width = grayBitmap.getWidth();
    int height= grayBitmap.getHeight();
    noiseBitmap=Bitmap.createBitmap(width,height,Bitmap.Config.ALPHA_8);
    //bitmap to MAT
    Utils.bitmapToMat(grayBitmap,grayMat);
    GaussianNoise = grayMat.clone();

I don't know how to do next, to generate a Mat which is the same size as grayMat and then add them together.

click to hide/show revision 2
None

updated 2019-01-08 21:51:44 -0500

berak gravatar image

How to add Gaussion noise use JAVA

    Mat grayMat = new Mat();
    Mat noiseMat = new Mat();
    BitmapFactory.Options o = new BitmapFactory.Options();
    o.inDither=false;
    o.inSampleSize=1;
    int width = grayBitmap.getWidth();
    int height= grayBitmap.getHeight();
    noiseBitmap=Bitmap.createBitmap(width,height,Bitmap.Config.ALPHA_8);
    //bitmap to MAT
    Utils.bitmapToMat(grayBitmap,grayMat);
    GaussianNoise = grayMat.clone();

I don't know how to do next, to generate a Mat which is the same size as grayMat and then add them together.

click to hide/show revision 3
None

updated 2019-01-08 21:51:58 -0500

berak gravatar image

How to add Gaussion Gaussian noise use JAVA

    Mat grayMat = new Mat();
    Mat noiseMat = new Mat();
    BitmapFactory.Options o = new BitmapFactory.Options();
    o.inDither=false;
    o.inSampleSize=1;
    int width = grayBitmap.getWidth();
    int height= grayBitmap.getHeight();
    noiseBitmap=Bitmap.createBitmap(width,height,Bitmap.Config.ALPHA_8);
    //bitmap to MAT
    Utils.bitmapToMat(grayBitmap,grayMat);
    GaussianNoise = grayMat.clone();

I don't know how to do next, to generate a Mat which is the same size as grayMat and then add them together.

click to hide/show revision 4
None

updated 2019-01-08 22:42:36 -0500

berak gravatar image

How to add Gaussian Gaussion noise use using JAVA

    Mat grayMat = new Mat();
    Mat noiseMat = new Mat();
    BitmapFactory.Options o = new BitmapFactory.Options();
    o.inDither=false;
    o.inSampleSize=1;
    int width = grayBitmap.getWidth();
    int height= grayBitmap.getHeight();
    noiseBitmap=Bitmap.createBitmap(width,height,Bitmap.Config.ALPHA_8);
    //bitmap to MAT
    Utils.bitmapToMat(grayBitmap,grayMat);
    GaussianNoise = grayMat.clone();

I don't know how to do next, to generate a Mat which is the same size as grayMat and then add them together.