Ask Your Question

Safari's profile - activity

2017-03-02 18:37:23 -0600 received badge  Notable Question (source)
2015-06-30 09:07:54 -0600 received badge  Popular Question (source)
2014-03-20 18:02:33 -0600 commented question ANPR Algorithm example using OpenCV

The error that I reported in the text question is this: Error: Unsupported format or combination of formats () in cvFloodFill,

2014-03-20 18:00:41 -0600 received badge  Editor (source)
2014-03-20 16:06:20 -0600 asked a question ANPR Algorithm example using OpenCV

Hi all,

I followed this example/tutorial about ANPR algorithm using OpenCV.

I downloaded c++ example code and I ported this code on iOS app.

Using some example photos, this code work well.

Now, I would to use the iPhone camera to take the photo to pass to the ANPR algorithm but oft I obtain an error (so also a crash). The error is this:

int area = floodFill(input, mask, seed, Scalar(255,0,0), &ccomp, Scalar(loDiff, loDiff, loDiff), Scalar(upDiff, upDiff, upDiff), flags);

OpenCV Error: Unsupported format or combination of formats () in cvFloodFill, file /src/floodfill.cpp, line 621

floodFill function is used in this context:

Mat mask;
        mask.create(input.rows + 2, input.cols + 2, CV_8UC1);
        mask= Scalar::all(0);
        int loDiff = 30;
        int upDiff = 30;
        int connectivity = 4;
        int newMaskVal = 255;
        int NumSeeds = 10;
        cv::Rect ccomp;
        int flags = connectivity + (newMaskVal << 8 ) +  CV_FLOODFILL_FIXED_RANGE + CV_FLOODFILL_MASK_ONLY;
        for(int j=0; j<NumSeeds; j++){
            cv::Point seed;
            seed.x=rects[i].center.x+rand()%(int)minSize-(minSize/2);
            seed.y=rects[i].center.y+rand()%(int)minSize-(minSize/2);
            circle(result, seed, 1, Scalar(0,255,255), -1);
            int area = cv::floodFill(input, mask, seed, Scalar(255,0,0), &ccomp,

Scalar(loDiff, loDiff, loDiff), Scalar(upDiff, upDiff, upDiff), flags);
            printf("%d",area);
        }

some suggestions?

2013-12-23 08:45:16 -0600 asked a question OpenCV and Iphone back camera

I have a question about OpenCV video processing and iOS. I followed this tutorial to create a simple example project. http://docs.opencv.org/doc/tutorials/ios/video_processing/video_processing.html#basic-video-processing

self.videoCamera = [[CvVideoCamera alloc] initWithParentView:imageView];
self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset640x480;
self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
self.videoCamera.defaultFPS = 60;
self.videoCamera.grayscaleMode = YES;

self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionBack;

self.videoCamera = [[CvVideoCamera alloc] initWithParentView:imageView];
self.videoCamera.delegate = self;

It works well but I can't change to use the back camera. I use this line to change the camera but it not work:

self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionBack;