Ask Your Question

jowey2483's profile - activity

2017-05-15 07:22:55 -0600 received badge  Famous Question (source)
2016-02-24 13:48:13 -0600 received badge  Notable Question (source)
2015-10-21 08:16:59 -0600 received badge  Popular Question (source)
2014-04-28 18:56:17 -0600 commented question Change a Black and White image to color.

I need to subtract the yellow pixels of a color image i think this CvType.CV_8UC1 is only black and withe right?

2014-04-28 18:50:49 -0600 asked a question Change a Black and White image to color.

final Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(), options);

        Mat tmp = new Mat(bitmap.getWidth(), bitmap.getHeight(),CvType.CV_8UC1);
2014-04-25 16:29:37 -0600 asked a question Can i count only the yellow pixels of image?

I'm using opencv for android and i want to find only yellow pixels from the image . How can i do it

2014-04-22 11:28:28 -0600 asked a question How to save to internal storage?

I have this code but it saves it to the external storage and i need it to store it in the internal storage. Can anyone help me? You will save mi live with this one..

This is what i have.. Thanks in advance.

 */ Creating file uri to store image/video

public Uri getOutputMediaFileUri(int type) {
    return Uri.fromFile(getOutputMediaFile(type));
}

/*
 * returning image / video
 */
private static File getOutputMediaFile(int type) {

    // External sdcard location
    File mediaStorageDir = new File(
            Environment
                    .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),
            IMAGE_DIRECTORY_NAME);

    // Create the storage directory if it does not exist
    if (!mediaStorageDir.exists()) {
        if (!mediaStorageDir.mkdirs()) {
            Log.d(IMAGE_DIRECTORY_NAME, "Oops! Failed create "
                    + IMAGE_DIRECTORY_NAME + " directory");
            return null;
        }
    }
2014-04-19 15:56:16 -0600 commented question convert image in binary(black and withe), and count white pixels?

This is what I did. No progress. I'm new at this, Im just swinging in the dark. Lol

Mat tmp = new Mat(bitmap.getWidth(), bitmap.getHeight(),CvType.CV_8UC1);

        Mat BN = new Mat(bitmap.getWidth(), bitmap.getHeight(),CvType.CV_8UC1);

        Imgproc.threshold(tmp,BN, 123,255, Imgproc.THRESH_BINARY);




        Mat m = new Mat(bitmap.getWidth(), bitmap.getHeight(),CvType.CV_8UC1);
          Core.extractChannel(BN, m, 0);
          int n = Core.countNonZero(m);
2014-04-19 15:23:50 -0600 commented question convert image in binary(black and withe), and count white pixels?

I can take a photo and count the white pixels but i cant make a binary image to count the white pixels. I'm sorry i don't know much English. Thanks for your help and attention.

2014-04-19 15:13:10 -0600 asked a question convert image in binary(black and withe), and count white pixels?

This is what i have..

 Mat tmp = new Mat(bitmap.getWidth(), bitmap.getHeight(),CvType.CV_8UC1);
 Mat m = new Mat(bitmap.getWidth(), bitmap.getHeight(),CvType.CV_8UC1);
 Core.extractChannel(tmp, m, 0);
 int n = Core.countNonZero(m);
 w = n;