Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

License plates

Hello! I am writing a script in C++ that will be detecting and recognizing vehicle registration plates. I've already found obcjets of my interest but I have a problem in cutting out detected signs from picture. I want to do it because I want to resize them and compare them to my database. I think I have to use ROI function but I don't know how. I tried to do so, but when I'm trying to compile the program I get this statement: error C2664: 'cv::imshow' : cannot convert parameter 2 from 'cv::Rect' to 'cv::InputArray' 1> Reason: cannot convert from 'cv::Rect' to 'const cv::_InputArray' So here is my question: could anybody tell me how to do it? Below I post part of my script.

Scalar color = Scalar( rng.uniform(0, 255), rng.uniform(0,255), rng.uniform(0,255) ); rectangle( image_roi, prostokat[j].tl(), prostokat[j].br(), color, 2, 8, 0 );

        Rect roi_1(prostokat[1].x, prostokat[1].y, prostokat[1].width, prostokat[1].height);
            Mat image_1 = image(roi_1); 
            namedWindow( "Example1", CV_WINDOW_AUTOSIZE );
            imshow("Example1",roi_1);
                }

I would be very grateful if someone would help me.

License plates

Hello! Hello!

I am writing a script in C++ that will be detecting and recognizing vehicle registration plates. I've already found obcjets objects of my interest but I have a problem in cutting out detected signs from picture. I want to do it because I want to resize them and compare them to my database. I think I have to use ROI function but I don't know how.

I tried to do so, but when I'm trying to compile the program I get this statement:

error C2664: 'cv::imshow' : cannot convert parameter 2 from 'cv::Rect' to 'cv::InputArray'
1>          Reason: cannot convert from 'cv::Rect' to 'const cv::_InputArray'

So here is my question: could anybody tell me how to do it? Below I post part of my script.

Scalar color = Scalar( rng.uniform(0, 255), rng.uniform(0,255), rng.uniform(0,255) );
 rectangle( image_roi, prostokat[j].tl(), prostokat[j].br(), color, 2, 8, 0 );

 );       
Rect roi_1(prostokat[1].x, prostokat[1].y, prostokat[1].width, prostokat[1].height);
 Mat image_1 = image(roi_1); 
 namedWindow( "Example1", CV_WINDOW_AUTOSIZE );
 imshow("Example1",roi_1);
                }

I would be very grateful if someone would help me.

License plates

Hello!

I am writing a script in C++ that will be detecting and recognizing vehicle registration plates. I've already found objects of my interest but I have a problem in cutting out detected signs from picture. I want to do it because I want to resize them and compare them to my database. I think I have to use ROI function but I don't know how.

I tried to do so, but when I'm trying to compile the program I get this statement:

error C2664: 'cv::imshow' : cannot convert parameter 2 from 'cv::Rect' to 'cv::InputArray'
1>          Reason: cannot convert from 'cv::Rect' to 'const cv::_InputArray'

So here is my question: could anybody tell me how to do it? Below I post part of my script.

Scalar color = Scalar( rng.uniform(0, 255), rng.uniform(0,255), rng.uniform(0,255) );
rectangle( image_roi, prostokat[j].tl(), prostokat[j].br(), color, 2, 8, 0 );       
Rect roi_1(prostokat[1].x, prostokat[1].y, prostokat[1].width, prostokat[1].height);
Mat image_1 = image(roi_1); 
namedWindow( "Example1", CV_WINDOW_AUTOSIZE );
imshow("Example1",roi_1);

I would be very grateful if someone would help me.