Subversion Repositories seema-scanner

Rev

Rev 53 | Rev 110 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 53 Rev 74
Line 122... Line 122...
122
    if (error != FlyCapture2::PGRERROR_OK)
122
    if (error != FlyCapture2::PGRERROR_OK)
123
        PrintError(error);
123
        PrintError(error);
124
 
124
 
125
    std::cout << camInfo.vendorName << "  " << camInfo.modelName << "  " << camInfo.serialNumber << std::endl;
125
    std::cout << camInfo.vendorName << "  " << camInfo.modelName << "  " << camInfo.serialNumber << std::endl;
126
 
126
 
127
    // Set white balance appropriate for LED projector
127
    // Turn off auto settings
128
    FlyCapture2::Property property;
128
    FlyCapture2::Property property;
-
 
129
    property.type = FlyCapture2::AUTO_EXPOSURE;
-
 
130
    property.onOff = false;
-
 
131
    error = cam.SetProperty(&property);
-
 
132
    if (error != FlyCapture2::PGRERROR_OK)
-
 
133
        PrintError(error);
-
 
134
 
-
 
135
    property.type = FlyCapture2::GAMMA;
-
 
136
    property.onOff = true;
-
 
137
    property.absControl = true;
-
 
138
    property.absValue = 1.0;
-
 
139
    error = cam.SetProperty(&property);
-
 
140
    if (error != FlyCapture2::PGRERROR_OK)
-
 
141
        PrintError(error);
-
 
142
 
-
 
143
    // Set white balance appropriate for LED projector
-
 
144
    property.type = FlyCapture2::WHITE_BALANCE;
129
    property.onOff = true;
145
    property.onOff = true;
130
    property.absControl = false;
146
    property.absControl = false;
131
    property.autoManualMode = false;
147
    property.autoManualMode = false;
132
    property.type = FlyCapture2::WHITE_BALANCE;
-
 
133
    property.valueA = 666; //red
148
    property.valueA = 666; //red
134
    property.valueB = 777; //blue
149
    property.valueB = 777; //blue
135
    error = cam.SetProperty(&property);
150
    error = cam.SetProperty(&property);
136
    if (error != FlyCapture2::PGRERROR_OK)
151
    if (error != FlyCapture2::PGRERROR_OK)
137
        PrintError(error);
152
        PrintError(error);
138
 
153
 
139
    // Set reasonable default settings
154
    // Set reasonable default settings
140
    CameraSettings settings;
155
    CameraSettings settings;
141
    //settings.shutter = 8.33;
156
    //settings.shutter = 8.33;
142
    settings.shutter = 33.33;
157
    settings.shutter = 16.66;
143
    settings.gain = 0.0;
158
    settings.gain = 0.0;
144
    this->setCameraSettings(settings);
159
    this->setCameraSettings(settings);
145
 
160
 
146
    return;
161
    return;
147
}
162
}