Ask Your Question

sasmn's profile - activity

2019-10-23 00:32:40 -0600 received badge  Notable Question (source)
2019-06-19 11:23:52 -0600 received badge  Student (source)
2018-06-06 10:14:26 -0600 received badge  Popular Question (source)
2015-06-30 19:29:52 -0600 commented question unknwon array type error

I wrote in the post all the statements I used to detect the edges

2015-06-30 18:01:29 -0600 commented question unknwon array type error

I integrated this code in my program, but I changed the type of variables. It's very difficult to do that know , because the whole program is based on old c-api.

2015-06-30 16:40:16 -0600 received badge  Organizer (source)
2015-06-30 15:20:00 -0600 asked a question unknwon array type error

I am trying to detect edges of a disparity map using canny edge detector.Unfortunately, I keep receiving the error OpenCV Error: Bab argument (unknwon array type) in cv::cvarrToMat

I am using a track bar to adjust the threshold value

CvMat src; 
CvMat dst, detected_edges;
CvMat* vdisp; //  disparity map 
Mat srcM,dstM,detected_edgesM;

int edgeThresh = 1;
int lowThreshold;
int const max_lowThreshold = 100;
int ratio = 3;
int kernel_size = 3; 
char* window_name = "Edge Map";

void CannyThreshold(int,void*)
 { 
    srcM=Mat(&src,true);
        detected_edgesM=Mat(&detected_edges,true); /// Reduce noise with a kernel 3x3   
        blur( srcM,  detected_edgesM, Size(3,3) );// blur( src_gray, detected_edges, Size(3,3) );   

        // Canny detector 
    Canny( detected_edgesM, detected_edgesM, lowThreshold, lowThreshold*ratio, kernel_size );

    /// Using Canny's output as a mask, we display our result  
       cvZero(&dst);  //dst = Scalar::all(0); //the  error is returned from her while debugging  
       cvCopy(vdisp,&dst,&detected_edges);//src.copyTo( dst, detected_edges);
       cvShowImage(window_name,&dst);  //imshow( window_name, dst ); 
 }

int realTimeDestanceCalc()
 {
        /// Create a window for canny
    namedWindow( window_name, CV_WINDOW_AUTOSIZE );
    /// Create a Trackbar for user to enter canny threshold
     createTrackbar( "Min Threshold:", window_name, &lowThreshold, max_lowThreshold, CannyThreshold );

         //-------------

         vdisp=cvCreateMat(imageSizeL.height,imageSizeL.width,CV_8U);   
         src = cvMat(imageSizeL.height,imageSizeL.width,CV_8U,vdisp);   
         dst=cvMat(imageSizeL.height,imageSizeL.width,CV_8U);         
         detected_edges=cvMat(imageSizeL.height,imageSizeL.width,CV_8U);

         while (true)
         {
                //----- calculating disparity map processes -----//

                src=*vdisp; //cvCvtColor(vdisp,&src,CV_BGR2GRAY);
                CannyThreshold(0,0);
         }
 }

how can I fix this problem ?

2015-06-30 08:43:57 -0600 received badge  Supporter (source)
2015-06-30 07:38:18 -0600 asked a question conversion between CvMat* and cv::Mat

how can I convert CvMat* to cv::Mat ?

2015-06-29 23:45:56 -0600 asked a question equivalent to CopyTo() for CvMat*

as OpenCv documentation mentioned , Mat::copyTo()is using an input of type Mat. http://docs.opencv.org/modules/core/d...

I need an equivalent function that takes an input of type CvMat* .