Mat mLogo = new Mat();
But now I want to add that image to drawable, but I m unable to find the path or other method to create Mat from Drawable, or bitmap.mLogo = Highgui.imread("STRING TO FILE ON SDCARD");
mLogo = Utils.loadResource(getContext(), R.drawable.slsp);
On 9 pro, 13:26, Csaba Bolyós <bladesza...@gmail.com> wrote:
> thanks
>
> 2011/12/9 Hardik <har...@sourcebits.com>
>
>
>
>
>
>
>
>
>
> > Hi Csaba,
>
> > you can create bitmap from Mat using following method,,
>
> > Utils.matToBitmap(Mat,bitmap)
>
> > Thanks.....
>
> > On Fri, Dec 9, 2011 at 4:21 PM, Csaba Bolyós <bladesza...@gmail.com>wrote:
>
> >> Hi I was using
>
> >> Mat mLogo = new Mat();
>
> >> mLogo = Highgui.imread("STRING TO FILE ON SDCARD");
>
> >> But now I want to add that image to drawable, but I m unable to find the
> >> path or other method to create Mat from Drawable, or bitmap.
>
> >> Thanks for any help
>
> >> --
> >> Bolyós Csaba
>
> > --
> > Regards,
>
> > *Pansuria Hardik
>
> > Sourcebits Inc.
> > *
>
> --
> Bolyós Csaba
> *Pansuria Hardik
>
> Android Developer
>
> *
mROI = mRgba.submat(r); //r is rectangle with detected object
Imgproc.resize(mFace, mROI, mROI.size());
mFace.copyTo(mROI);
Do you get only position and draw drawable in some view over the
preview, or use mat too?
Thanks Csaba,
Roman
On 10 pro, 23:21, Csaba Bolyós <bladesza...@gmail.com> wrote:
> It is probably problem with the image, I load the image from drawables like
> R.drawable.myimage and display it like bitmap and it works fine.
>
> as U can see it in the pictures
>
> 2011/12/10 Roman <hruskozr...@gmail.com>
> device-2011-12-09-132816.png
> 235KZobrazitStáhnout
>
> device-2011-12-09-132848.png
> 264KZobrazitStáhnout
I use:
mFace = new Mat();
mFace = Utils.loadResource(context, R.drawable.faceicon); // faceicon
is PNG32 with alpha background
mROI = mRgba.submat(r); //r is rectangle with detected object
Imgproc.resize(mFace, mROI, mROI.size());
mFace.copyTo(mROI);
Do you get only position and draw drawable in some view over the
preview, or use mat too?
Thanks Csaba,
Roman