Ask Your Question

ademmler's profile - activity

2020-04-30 00:47:27 -0600 received badge  Enthusiast
2020-04-29 06:31:34 -0600 received badge  Supporter (source)
2020-04-29 02:30:54 -0600 commented answer How to set/get camera properties on Mac OS X

how i delete my wrong answer?

2020-04-29 02:30:22 -0600 marked best answer How to set/get camera properties on Mac OS X

I am using OpenCV3 on Mac OS X. I want to get/set camera properties. Whatever value I tryout it has no effect. I wrote a simple code to see which properties are available and tried this with different webcams I own. But I could not get any values from any of the cams.

  • Is there something wrong in my code?
  • Does the Mac OS X backend not support to get/set camera properties?
  • Which webcams are fully controllable?

The code you can get as attachment.

Thx and regards Alexander

// The code I am using
#include "opencv2/opencv.hpp" 
using namespace cv;
using namespace std;

int main(int argc, char** argv)
{
     // Start default camera
    VideoCapture video(0);

    //Alexander
    float Brightness = video.get(CV_CAP_PROP_BRIGHTNESS);
    float Contrast   = video.get(CV_CAP_PROP_CONTRAST );
    float Saturation = video.get(CV_CAP_PROP_SATURATION);
    float Gain       = video.get(CV_CAP_PROP_GAIN);

    float Position = video.get(CV_CAP_PROP_POS_MSEC);
    float Width = video.get(CV_CAP_PROP_FRAME_WIDTH);
    float Height = video.get(CV_CAP_PROP_FRAME_HEIGHT);
    float Format = video.get(CV_CAP_PROP_FORMAT);

    double Hue = video.get(CV_CAP_PROP_HUE);
    double Exposure = video.get(CV_CAP_PROP_EXPOSURE);
    double Mode = video.get(CV_CAP_PROP_MODE);
    double fps = video.get(CV_CAP_PROP_FPS);

    cout<<"Brightness -------> "<<Brightness<<endl;
    cout<<"Contrast----------> "<<Contrast<<endl;
    cout<<"Saturation--------> "<<Saturation<<endl;
    cout<<"Gain--------------> "<<Gain<<endl;
    cout<<"Hue---------------> "<<Hue<<endl;
    cout<<"Exposure----------> "<<Exposure<<endl;
    cout<<"Mode--------------> "<<Mode<<endl;

    cout<<"Position---------->"<<Position<<endl;
    cout<<"Width------------->"<<Width<<endl;
    cout<<"Height------------>"<<Height<<endl;
    cout<<"Format------------>"<<Format<<endl;
    cout<<"Frames---------->"<<fps<<endl<<endl;

    return 0;
}
2020-04-29 02:30:22 -0600 received badge  Scholar (source)
2020-04-29 02:30:15 -0600 commented question How to set/get camera properties on Mac OS X

Hi there, I came back to my project ... I am now using opencv4.2. But still I do not get any more options to work as be

2020-04-27 13:31:22 -0600 answered a question How to set/get camera properties on Mac OS X

Hi there, I came back to my project ... I am now using opencv4.2. But still I do not get any more options to work as be

2020-04-27 11:55:50 -0600 answered a question Is there OpenCV.framework available for MacOS that can be notarized from within a .pkg installer in order to be compatible with Mac OSX Catalina?

Hello PK, forgive me - I do not have an answer for this. But I would like to compile a opncv4.framework myself. - Can y

2019-01-24 14:51:00 -0600 commented question How to set/get camera properties on Mac OS X

..and what are the results? Brightness -------> 0 Contrast----------> 0 Saturation--------> 0 Gain-

2019-01-24 09:18:14 -0600 asked a question How to set/get camera properties on Mac OS X

How to set/get camera properties on Mac OS X I am using OpenCV3 on Mac OS X. I want to get/set camera properties. Whatev

2018-12-23 06:17:00 -0600 asked a question QT5 + OpenCV 3.4 + calcHist function not found

QT5 + OpenCV 3.4 + calcHist function not found Hi, I am using OpenCV 3.4.1 within QT5 on Mac OS X 10.14. I try to reali

2014-08-19 16:28:51 -0600 asked a question Read raw webcam data

hi opencv fans,

I am new to opencv and I am happy that I have found this project. Who can tell me if and how to read raw pixel data from a webcamera.

thx Alex