KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
On an image frame, I use void ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar& color, int thickness=1, int lineType=8, int shift=0) to draw an ellipse and I want to set the ellipse color to green [ RGB value : (165, 206, 94) ]. So I set the parameter const Scalar& color to cv::Scalar(94.0, 206.0, 165.0, 0.0); // as BGR order, suppose the value is 0.0 - 255.0 cv::Scalar(94.0/255.0, 206.0/255.0, 165.0/255.0, 0.0); // suppose the value is 0.0 - 1.0 I also tried RGB alternative. CV_RGB(165.0, 206.0, 94.0); // as RGB order, suppose the value is 0.0 - 255.0 CV_RGB(165.0/255.0, 206.0/255.0, 94.0/255.0); // suppose the value is 0.0 - 1.0 But the color being displayed is white [ RGB value (255, 255, 255) ] , not the desired green one. What I missed at this point? Any suggestion please. Thank you. EDIT: Let me put whole related code here. According to OpenCV iOS - Video Processing , this is the CvVideoCamera config in - (void)viewDidLoad; : self.videoCamera = [[CvVideoCamera alloc] initWithParentView:imgView]; [self.videoCamera setDelegate:self]; self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront; self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset352x288; self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait; self.videoCamera.defaultFPS = 30; self.videoCamera.grayscaleMode = NO; [self.videoCamera adjustLayoutToInterfaceOrientation:UIInterfaceOri
Tags (comma-separated)
Save Edits
Cancel