Ask Your Question

maizi's profile - activity

2014-05-20 19:11:45 -0600 commented question Could not find OpenCV Library - 2.4.8.apk!

If I use

 Mat dark_channel(Row,Cols,CV_8UC1);

It can't compile. But I can use

 Mat dark_channel=new Mat();

it can compile ,but the dark_channel is null! I think I have add the library(OpenCV library 2.4.8) into my project,because the other code is right for example I can put out the rows of Mat ,making a color picture gray.

2014-05-20 04:02:50 -0600 commented question Could not find OpenCV Library - 2.4.8.apk!

Thank you,I see.

2014-05-20 03:44:28 -0600 commented question Could not find OpenCV Library - 2.4.8.apk!

Thank you very much! Could you teach me how to make the code highlight in this forum.

2014-05-20 02:57:03 -0600 commented question Could not find OpenCV Library - 2.4.8.apk!

Yes! What do you mean with @berak?

2014-05-20 02:47:44 -0600 commented question Could not find OpenCV Library - 2.4.8.apk!

Ok! Thank you. I learn the Java by myself,so I don't know many standard.

 Mat src=new Mat();
 Utils.bitmapToMat(srcbmp, src);//get the picture from srcbmap
 int Row=src.rows();
 int Cols=src.cols();
 Mat dark_channel(Row,Cols,CV_8UC1);

If I write

  MinMaxLocResult minR;

it will error the local variable minR may not have been initialized. Another how to highlight the code in this forum.

2014-05-19 19:13:27 -0600 commented question Could not find OpenCV Library - 2.4.8.apk!

I'm sorry,it is my mistake.I have modified it.It show error like that above.

2014-05-19 09:11:53 -0600 commented question Combining multiple cv::Mat images into single cv::Mat

Sorry for my poor English expression abilities. This is my question:
http://answers.opencv.org/question/33639/could-not-find-opencv-library-248apk/

2014-05-19 09:06:56 -0600 asked a question Could not find OpenCV Library - 2.4.8.apk!

Anyone know the error :Could not find OpenCV Library - 2.4.8.apk! Please help me!

The console:

[2014-05-19 21:53:36 - OpenCV Library - 2.4.8] Could not find OpenCV Library - 2.4.8.apk!

In My project I write a piece of code like this :Mat imageroiB(block,block,CV_8UC1),it will appear a red break line under the word "Mat". I could not find the "CV_8UC1" in the options when I use the "Alt+/". image description

2014-05-19 07:11:41 -0600 commented question Combining multiple cv::Mat images into single cv::Mat

OK ,thank you all the same! I write like this :Mat imageroiB(block,block,CV_8UC1) .it will appear a red break line under the word "Mat".And it can't run. I could not find the "CV_8UC1" in the options when I use the "Alt+/".

2014-05-19 06:59:21 -0600 commented question Combining multiple cv::Mat images into single cv::Mat

Can I have your e-mail.I send the screenshots to you.

2014-05-19 03:16:02 -0600 commented question Combining multiple cv::Mat images into single cv::Mat

Why it show CV_8UC1 cannot be resolved to a variable when I write imageroiB.create(block,block,CV_8UC1);

2014-05-16 03:13:04 -0600 received badge  Scholar (source)
2014-05-16 02:32:46 -0600 asked a question Ask for a piece of code of Haze Removal in OpenCV4Android

I am writng a pece of code of Haze Removal in OpenCV4Android.But I am not familiar with the new version of OpenCV! Please Help Me!

2014-05-14 08:01:50 -0600 commented answer How to read the pixels of the three channels at the same time?

why my Eclipse can't recognize the "CV_16UC1" ?

2014-05-14 07:58:49 -0600 received badge  Supporter (source)
2014-05-14 07:58:46 -0600 received badge  Critic (source)
2014-05-14 07:55:30 -0600 commented answer Some small problems about OpenCV4Android haze removal

Thank you very much! your comments in the code is right. sorry for the "toushelv" , it is chinese words it means transmittance. I don't remeber the word in Enghish,so~~~.But I am learning OpenCV4Android,some function and parameter can't find or call,like Vector<Mat>channels; Mat roi_dark_channel = dark_channel(ROI_rect); I use this inplace of your code: Rect ROI_rect = null; Mat roi_dark=new Mat();
Mat dark_channel =new Mat();
Mat toushelv =new Mat();
Utils.bitmapToMat(bmp, src);
Core.split(src, dst);
Mat dstR=dst.get(0); Mat dstG=dst.get(0); Mat dstB=dst.get(0); Do you know OpenCV4Android,it maks me crazy

2014-05-06 20:00:54 -0600 commented question Some small problems about OpenCV4Android haze removal

Thank you for your comments. My main question I don't know how to switch the code to C++ API,because my English is not good enough to read the official documents.

2014-05-06 19:48:56 -0600 received badge  Editor (source)
2014-05-06 08:18:19 -0600 asked a question Some small problems about OpenCV4Android haze removal

I am a new of OpenCV4Android.I have a piece of code about OpenCV which written by C.I want to rewrite it in Android and use my cellphone to make it come ture.But some function I don't know why can't call ,for example cvSetImageROI();cvCopy();cvMinMaxLoc();cvSetImageROI();cvSet() etc.Who can teach me how to deal with it.

The whole code is blow
int block=5;
int w1=80;
double w;
IplImage *src=NULL;
IplImage *dst=NULL;


IplImage *quw(IplImage *src,int block,double w)
{

         IplImage *dst1=NULL;
         IplImage *dst2=NULL;
         IplImage *dst3=NULL;
         IplImage *imgroi1;

         IplImage *imgroi2;

         IplImage *imgroi3;

         IplImage *roidark;

         IplImage *dark_channel=NULL;

         IplImage *toushelv=NULL;
         IplImage *j1=NULL;
         IplImage *j2=NULL;
         IplImage *j3=NULL;

         IplImage *dst=NULL;
         CvRect ROI_rect;


         dst1=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);
         dst2=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);
         dst3=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);


         imgroi1=cvCreateImage(cvSize(block,block),IPL_DEPTH_8U,1);
         imgroi2=cvCreateImage(cvSize(block,block),IPL_DEPTH_8U,1);
         imgroi3=cvCreateImage(cvSize(block,block),IPL_DEPTH_8U,1);
         roidark=cvCreateImage(cvSize(block,block),IPL_DEPTH_8U,1);


         j1=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);
         j2=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);
         j3=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);

         dark_channel=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);

         toushelv=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,1);

         dst=cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_8U,3);

         cvSplit(src,dst1,dst2,dst3,NULL);
         ROI_rect.width=block;
         ROI_rect.height=block;
         ROI_rect.x=0;
         ROI_rect.y=0;


         int i;
         int j;
         double min1=0;
         double max1=0;
         double min2=0;
         double max2=0;
         double min3=0;
         double max3=0;
         double min=0;
         CvScalar value;
         for(i=0;i<src->width/block;i++)
         {  for(j=0;j<src->height/block;j++)
                   {

                     cvSetImageROI(dst1,ROI_rect);
                     cvCopy(dst1,imgroi1,NULL);
                     cvMinMaxLoc(imgroi1,&min1,&max1,NULL,NULL);
                     cvSetImageROI(dst2,ROI_rect);
                     cvCopy(dst2,imgroi2,NULL);
                     cvMinMaxLoc(imgroi2,&min2,&max2,NULL,NULL);
                     cvSetImageROI(dst3,ROI_rect);
                     cvCopy(dst3,imgroi3,NULL);
                     cvMinMaxLoc(imgroi3,&min3,&max3,NULL,NULL);

                     if(min1<min2)
                        min=min1;
                     else
                     min=min2;
                     if(min>min3)
                     min=min3;
                     alar(min,min,min,min);

                    cvSetImageROI(dark_channel,ROI_rect);
                    cvSet(roidark,value,NULL);
                     cvCopy(roidark,dark_channel,NULL);

                    cvResetImageROI(dst1);
                    cvResetImageROI(dst2);
                    cvResetImageROI(dst3);
                    cvResetImageROI(dark_channel);

                    ROI_rect.x=block*i;
                    ROI_rect.y=block*j;
                   }
         }

         cvSaveImage("f:/dark_channel_prior.jpg",dark_channel);

         double min_dark;
         double max_dark;
         CvPoint min_loc;
         CvPoint max_loc;          

         cvMinMaxLoc(dark_channel,&min_dark,&max_dark,&min_loc,&max_loc,NULL);
         cout<<max_loc.x<<" "<<max_loc.y<<endl;
         ROI_rect.x=max_loc.x;
         ROI_rect.y=max_loc.y;
         double A_dst1;
         double dst1_min;
         double A_dst2;
         double dst2_min;
         double A_dst3;
         double dst3_min;
         cvSetImageROI(dst1,ROI_rect);

         cvCopy(dst1,imgroi1,NULL);
         cvMinMaxLoc(imgroi1,&dst1_min,&A_dst1,NULL,NULL);
         cvSetImageROI(dst2,ROI_rect);
         cvCopy(dst2,imgroi2,NULL);
         cvMinMaxLoc(imgroi2,&dst2_min,&A_dst2,NULL,NULL);
         cvSetImageROI(dst3,ROI_rect);
         cvCopy(dst3,imgroi3,NULL);
         cvMinMaxLoc(imgroi3,&dst3_min,&A_dst3,NULL,NULL);
         cout<<A_dst1<<" "<<A_dst2<<" "<<A_dst3<<endl;

         int k;
         int l;
         CvScalar m;
         CvScalar n;

        for(k=0;k<src->height;k++)
         {for(l=0;l<src->width;l++)
            {
              m=cvGet2D(dark_channel,k,l);
              n=cvScalar(255-w ...
(more)
2014-05-04 07:00:59 -0600 answered a question How to read the pixels of the three channels at the same time?

Thank you very much!